From 3d99fad71166d47de34f6fe93880ee3ddf13a924 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Sun, 21 Mar 2010 08:32:59 +0100 Subject: [PATCH] pop b0283e26815279d45d201d5585820bb1d1997663 --- ANNOUNCE | 1046 +++++++------- Makefile.in | 19 +- VERSION | 2 +- aclocal.m4 | 86 +- configure | 1450 ++++++++----------- configure.ac | 45 +- dlls/acledit/Makefile.in | 2 - dlls/aclui/Makefile.in | 2 - dlls/activeds/Makefile.in | 2 - dlls/actxprxy/Makefile.in | 2 - dlls/adsiid/Makefile.in | 2 - dlls/advapi32/Makefile.in | 2 - dlls/advapi32/tests/Makefile.in | 2 - dlls/advapi32/tests/crypt.c | 18 +- dlls/advpack/Makefile.in | 2 - dlls/advpack/tests/Makefile.in | 2 - dlls/amstream/Makefile.in | 2 - dlls/amstream/tests/Makefile.in | 2 - dlls/appwiz.cpl/Makefile.in | 2 - dlls/atl/Makefile.in | 2 - dlls/authz/Makefile.in | 2 - dlls/avicap32/Makefile.in | 2 - dlls/avifil32/Makefile.in | 2 - dlls/avifil32/api.c | 10 +- dlls/avifil32/tests/Makefile.in | 2 - dlls/avifile.dll16/Makefile.in | 2 - dlls/avrt/Makefile.in | 2 - dlls/bcrypt/Makefile.in | 2 - dlls/browseui/Makefile.in | 2 - dlls/browseui/tests/Makefile.in | 2 - dlls/cabinet/Makefile.in | 2 - dlls/cabinet/tests/Makefile.in | 2 - dlls/capi2032/Makefile.in | 2 - dlls/cards/Makefile.in | 2 - dlls/cfgmgr32/Makefile.in | 2 - dlls/clusapi/Makefile.in | 2 - dlls/comcat/Makefile.in | 2 - dlls/comcat/tests/Makefile.in | 2 - dlls/comctl32/Makefile.in | 2 - dlls/comctl32/datetime.c | 6 +- dlls/comctl32/listview.c | 5 +- dlls/comctl32/tests/Makefile.in | 2 - dlls/comdlg32/Makefile.in | 2 - dlls/comdlg32/filedlg.c | 14 +- dlls/comdlg32/fontdlg.c | 12 +- dlls/comdlg32/printdlg.c | 8 +- dlls/comdlg32/tests/Makefile.in | 2 - dlls/comm.drv16/Makefile.in | 2 - dlls/commdlg.dll16/Makefile.in | 2 - dlls/compobj.dll16/Makefile.in | 2 - dlls/compstui/Makefile.in | 2 - dlls/credui/Makefile.in | 2 - dlls/credui/tests/Makefile.in | 2 - dlls/crtdll/Makefile.in | 2 - dlls/crypt32/Makefile.in | 2 - dlls/crypt32/chain.c | 75 + dlls/crypt32/main.c | 4 +- dlls/crypt32/oid.c | 9 + dlls/crypt32/tests/Makefile.in | 2 - dlls/cryptdlg/Makefile.in | 2 - dlls/cryptdll/Makefile.in | 2 - dlls/cryptnet/Makefile.in | 2 - dlls/cryptnet/tests/Makefile.in | 2 - dlls/cryptui/Makefile.in | 2 - dlls/cryptui/tests/Makefile.in | 2 - dlls/ctapi32/Makefile.in | 2 - dlls/ctl3d.dll16/Makefile.in | 2 - dlls/ctl3d32/Makefile.in | 2 - dlls/ctl3dv2.dll16/Makefile.in | 2 - dlls/d3d10/Makefile.in | 2 - dlls/d3d10/tests/Makefile.in | 2 - dlls/d3d10core/Makefile.in | 2 - dlls/d3d10core/tests/Makefile.in | 2 - dlls/d3d8/Makefile.in | 2 - dlls/d3d8/device.c | 16 + dlls/d3d8/tests/Makefile.in | 2 - dlls/d3d8/tests/device.c | 103 +- dlls/d3d9/Makefile.in | 2 - dlls/d3d9/device.c | 15 + dlls/d3d9/tests/Makefile.in | 2 - dlls/d3d9/tests/buffer.c | 19 +- dlls/d3d9/tests/device.c | 103 +- dlls/d3d9/tests/surface.c | 87 +- dlls/d3d9/tests/visual.c | 4 - dlls/d3dim/Makefile.in | 2 - dlls/d3drm/Makefile.in | 2 - dlls/d3drm/tests/Makefile.in | 2 - dlls/d3dx9_24/Makefile.in | 2 - dlls/d3dx9_25/Makefile.in | 2 - dlls/d3dx9_26/Makefile.in | 2 - dlls/d3dx9_27/Makefile.in | 2 - dlls/d3dx9_28/Makefile.in | 2 - dlls/d3dx9_29/Makefile.in | 2 - dlls/d3dx9_30/Makefile.in | 2 - dlls/d3dx9_31/Makefile.in | 2 - dlls/d3dx9_32/Makefile.in | 2 - dlls/d3dx9_33/Makefile.in | 2 - dlls/d3dx9_34/Makefile.in | 2 - dlls/d3dx9_35/Makefile.in | 2 - dlls/d3dx9_36/Makefile.in | 3 +- dlls/d3dx9_36/d3dx9_36.spec | 4 +- dlls/d3dx9_36/{texture.c => effect.c} | 30 +- dlls/d3dx9_36/math.c | 2 +- dlls/d3dx9_36/shader.c | 67 +- dlls/d3dx9_36/tests/Makefile.in | 2 - dlls/d3dx9_36/tests/shader.c | 20 +- dlls/d3dx9_36/texture.c | 24 +- dlls/d3dx9_37/Makefile.in | 2 - dlls/d3dx9_38/Makefile.in | 2 - dlls/d3dx9_39/Makefile.in | 2 - dlls/d3dx9_40/Makefile.in | 2 - dlls/d3dx9_41/Makefile.in | 2 - dlls/d3dx9_42/Makefile.in | 2 - dlls/d3dxof/Makefile.in | 2 - dlls/d3dxof/tests/Makefile.in | 2 - dlls/d3dxof/tests/d3dxof.c | 55 +- dlls/dbghelp/Makefile.in | 2 - dlls/dbghelp/dbghelp_private.h | 50 +- dlls/dbghelp/dwarf.c | 166 ++- dlls/dbghelp/elf_module.c | 523 ++++--- dlls/dbghelp/image_private.h | 182 +++ dlls/dbghelp/macho_module.c | 46 +- dlls/dbghelp/module.c | 11 +- dlls/dbghelp/pe_module.c | 497 ++++--- dlls/dbghelp/symbol.c | 16 +- dlls/dciman32/Makefile.in | 2 - dlls/ddeml.dll16/Makefile.in | 2 - dlls/ddraw/Makefile.in | 2 - dlls/ddraw/ddraw.c | 30 +- dlls/ddraw/ddraw_thunks.c | 10 +- dlls/ddraw/executebuffer.c | 4 +- dlls/ddraw/material.c | 1 - dlls/ddraw/tests/Makefile.in | 2 - dlls/ddraw/tests/d3d.c | 6 +- dlls/ddraw/tests/dsurface.c | 63 + dlls/ddraw/tests/visual.c | 2 +- dlls/ddrawex/Makefile.in | 2 - dlls/ddrawex/tests/Makefile.in | 2 - dlls/devenum/Makefile.in | 2 - dlls/dinput/Makefile.in | 2 - dlls/dinput/tests/Makefile.in | 2 - dlls/dinput8/Makefile.in | 2 - dlls/dispdib.dll16/Makefile.in | 2 - dlls/dispex/Makefile.in | 2 - dlls/dispex/tests/Makefile.in | 11 + dlls/dispex/tests/marshal.c | 416 ++++++ dlls/dispex/usrmarshal.c | 90 +- dlls/display.drv16/Makefile.in | 2 - dlls/dmband/Makefile.in | 2 - dlls/dmcompos/Makefile.in | 2 - dlls/dmime/Makefile.in | 2 - dlls/dmloader/Makefile.in | 2 - dlls/dmloader/tests/Makefile.in | 2 - dlls/dmscript/Makefile.in | 2 - dlls/dmstyle/Makefile.in | 2 - dlls/dmsynth/Makefile.in | 2 - dlls/dmusic/Makefile.in | 2 - dlls/dmusic32/Makefile.in | 2 - dlls/dnsapi/Makefile.in | 2 - dlls/dnsapi/tests/Makefile.in | 2 - dlls/dplay/Makefile.in | 2 - dlls/dplayx/Makefile.in | 2 - dlls/dplayx/tests/Makefile.in | 2 - dlls/dpnaddr/Makefile.in | 2 - dlls/dpnet/Makefile.in | 2 - dlls/dpnhpast/Makefile.in | 2 - dlls/dpnlobby/Makefile.in | 2 - dlls/dpwsockx/Makefile.in | 2 - dlls/drmclien/Makefile.in | 2 - dlls/dsound/Makefile.in | 2 - dlls/dsound/mixer.c | 4 +- dlls/dsound/tests/Makefile.in | 2 - dlls/dssenh/Makefile.in | 2 - dlls/dswave/Makefile.in | 2 - dlls/dwmapi/Makefile.in | 2 - dlls/dxdiagn/Makefile.in | 2 - dlls/dxdiagn/container.c | 56 +- dlls/dxdiagn/tests/Makefile.in | 3 +- dlls/dxdiagn/tests/container.c | 540 +++++++ dlls/dxerr8/Makefile.in | 2 - dlls/dxerr9/Makefile.in | 2 - dlls/dxgi/Makefile.in | 2 - dlls/dxgi/tests/Makefile.in | 2 - dlls/dxguid/Makefile.in | 2 - dlls/faultrep/Makefile.in | 2 - dlls/fltlib/Makefile.in | 2 - dlls/fusion/Makefile.in | 2 - dlls/fusion/tests/Makefile.in | 2 - dlls/fwpuclnt/Makefile.in | 2 - dlls/gdi.exe16/Makefile.in | 2 - dlls/gdi32/Makefile.in | 2 - dlls/gdi32/bitmap.c | 8 +- dlls/gdi32/tests/Makefile.in | 2 - dlls/gdiplus/Makefile.in | 2 - dlls/gdiplus/brush.c | 5 +- dlls/gdiplus/image.c | 11 +- dlls/gdiplus/tests/Makefile.in | 2 - dlls/gdiplus/tests/graphics.c | 145 +- dlls/gdiplus/tests/image.c | 67 +- dlls/glu32/Makefile.in | 2 - dlls/gphoto2.ds/Makefile.in | 2 - dlls/gpkcsp/Makefile.in | 2 - dlls/hal/Makefile.in | 2 - dlls/hhctrl.ocx/Makefile.in | 2 - dlls/hid/Makefile.in | 2 - dlls/hlink/Makefile.in | 2 - dlls/hlink/browse_ctx.c | 17 +- dlls/hlink/hlink_main.c | 42 +- dlls/hlink/link.c | 4 +- dlls/hlink/tests/Makefile.in | 2 - dlls/hlink/tests/browse_ctx.c | 47 + dlls/hlink/tests/hlink.c | 84 +- dlls/hnetcfg/Makefile.in | 2 - dlls/httpapi/Makefile.in | 2 - dlls/iccvid/Makefile.in | 2 - dlls/icmp/Makefile.in | 2 - dlls/ifsmgr.vxd/Makefile.in | 2 - dlls/imaadp32.acm/Makefile.in | 2 - dlls/imagehlp/Makefile.in | 2 - dlls/imagehlp/tests/Makefile.in | 2 - dlls/imm.dll16/Makefile.in | 2 - dlls/imm32/Makefile.in | 2 - dlls/imm32/tests/Makefile.in | 2 - dlls/inetcomm/Makefile.in | 2 - dlls/inetcomm/tests/Makefile.in | 2 - dlls/inetmib1/Makefile.in | 2 - dlls/inetmib1/tests/Makefile.in | 2 - dlls/infosoft/Makefile.in | 2 - dlls/infosoft/tests/Makefile.in | 2 - dlls/initpki/Makefile.in | 2 - dlls/inkobj/Makefile.in | 2 - dlls/inseng/Makefile.in | 2 - dlls/iphlpapi/Makefile.in | 2 - dlls/iphlpapi/ifenum.c | 79 +- dlls/iphlpapi/ifenum.h | 7 + dlls/iphlpapi/iphlpapi_main.c | 88 +- dlls/iphlpapi/tests/Makefile.in | 2 - dlls/itircl/Makefile.in | 2 - dlls/itss/Makefile.in | 2 - dlls/itss/tests/Makefile.in | 2 - dlls/jscript/Makefile.in | 4 - dlls/jscript/tests/Makefile.in | 2 - dlls/kernel32/Makefile.in | 2 - dlls/kernel32/debugger.c | 16 +- dlls/kernel32/oldconfig.c | 112 +- dlls/kernel32/process.c | 86 +- dlls/kernel32/tests/Makefile.in | 2 - dlls/kernel32/tests/debugger.c | 49 +- dlls/keyboard.drv16/Makefile.in | 2 - dlls/krnl386.exe16/Makefile.in | 2 - dlls/krnl386.exe16/ne_module.c | 7 +- dlls/krnl386.exe16/thunk.c | 8 + dlls/loadperf/Makefile.in | 2 - dlls/localspl/Makefile.in | 2 - dlls/localspl/tests/Makefile.in | 2 - dlls/localui/Makefile.in | 2 - dlls/localui/tests/Makefile.in | 2 - dlls/lz32/Makefile.in | 2 - dlls/lz32/tests/Makefile.in | 2 - dlls/lzexpand.dll16/Makefile.in | 2 - dlls/mapi32/Makefile.in | 2 - dlls/mapi32/tests/Makefile.in | 2 - dlls/mapistub/Makefile.in | 2 - dlls/mciavi32/Makefile.in | 2 - dlls/mciavi32/mciavi.c | 17 +- dlls/mcicda/Makefile.in | 2 - dlls/mcicda/mcicda.c | 2 + dlls/mciqtz32/Makefile.in | 2 - dlls/mciseq/Makefile.in | 2 - dlls/mciseq/mcimidi.c | 30 +- dlls/mciwave/Makefile.in | 2 - dlls/midimap/Makefile.in | 2 - dlls/midimap/midimap.c | 14 +- dlls/mlang/Makefile.in | 2 - dlls/mlang/tests/Makefile.in | 2 - dlls/mmdevapi/Makefile.in | 2 - dlls/mmdevapi/devenum.c | 586 +++++++- dlls/mmdevapi/mmdevapi.h | 4 + dlls/mmdevapi/tests/Makefile.in | 2 - dlls/mmdevldr.vxd/Makefile.in | 2 - dlls/mmsystem.dll16/Makefile.in | 2 - dlls/monodebg.vxd/Makefile.in | 2 - dlls/mountmgr.sys/Makefile.in | 2 - dlls/mouse.drv16/Makefile.in | 2 - dlls/mpr/Makefile.in | 2 - dlls/mprapi/Makefile.in | 2 - dlls/msacm.dll16/Makefile.in | 2 - dlls/msacm32.drv/Makefile.in | 2 - dlls/msacm32/Makefile.in | 2 - dlls/msacm32/tests/Makefile.in | 2 - dlls/msadp32.acm/Makefile.in | 2 - dlls/mscat32/Makefile.in | 2 - dlls/mscms/Makefile.in | 2 - dlls/mscms/tests/Makefile.in | 2 - dlls/mscoree/Makefile.in | 2 - dlls/msctf/Makefile.in | 3 +- dlls/msctf/displayattributemgr.c | 139 ++ dlls/msctf/msctf.c | 1 + dlls/msctf/msctf_internal.h | 1 + dlls/msctf/regsvr.c | 7 + dlls/msctf/tests/Makefile.in | 2 - dlls/msdaps/Makefile.in | 2 - dlls/msdmo/Makefile.in | 2 - dlls/msftedit/Makefile.in | 2 - dlls/msg711.acm/Makefile.in | 2 - dlls/msgsm32.acm/Makefile.in | 2 - dlls/mshtml.tlb/Makefile.in | 2 - dlls/mshtml/Makefile.in | 2 - dlls/mshtml/htmldoc.c | 14 +- dlls/mshtml/htmldoc3.c | 2 +- dlls/mshtml/htmlelem2.c | 2 +- dlls/mshtml/htmlevent.c | 98 +- dlls/mshtml/htmlevent.h | 10 +- dlls/mshtml/htmlimg.c | 13 +- dlls/mshtml/htmlwindow.c | 4 +- dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/mutation.c | 3 + dlls/mshtml/navigate.c | 5 +- dlls/mshtml/nsevents.c | 15 +- dlls/mshtml/nsio.c | 2 +- dlls/mshtml/omnavigator.c | 23 +- dlls/mshtml/persist.c | 7 +- dlls/mshtml/tests/Makefile.in | 2 - dlls/mshtml/tests/dom.c | 14 +- dlls/mshtml/tests/events.c | 109 +- dlls/msi/Makefile.in | 4 - dlls/msi/database.c | 6 +- dlls/msi/msiquery.c | 6 +- dlls/msi/msiserver.idl | 6 +- dlls/msi/tests/Makefile.in | 2 - dlls/msi/tests/install.c | 2 + dlls/msimg32/Makefile.in | 2 - dlls/msimtf/Makefile.in | 2 - dlls/msisip/Makefile.in | 2 - dlls/msisys.ocx/Makefile.in | 2 - dlls/msnet32/Makefile.in | 2 - dlls/msrle32/Makefile.in | 2 - dlls/mssign32/Makefile.in | 2 - dlls/mssip32/Makefile.in | 2 - dlls/mstask/Makefile.in | 2 - dlls/mstask/tests/Makefile.in | 2 - dlls/msvcirt/Makefile.in | 2 - dlls/{msvcirt => msvcr70}/Makefile.in | 7 +- dlls/{mmdevapi/mmdevapi.h => msvcr70/msvcr70.c} | 29 +- dlls/msvcr70/msvcr70.spec | 841 +++++++++++ dlls/msvcr71/Makefile.in | 2 - dlls/msvcr80/Makefile.in | 12 + dlls/{mmdevapi/mmdevapi.h => msvcr80/msvcr80.c} | 29 +- dlls/msvcr80/msvcr80.spec | 1468 ++++++++++++++++++++ dlls/{msvcirt => msvcr90}/Makefile.in | 7 +- dlls/msvcr90/msvcr90.c | 69 + dlls/msvcr90/msvcr90.spec | 1452 +++++++++++++++++++ dlls/msvcrt/Makefile.in | 2 - dlls/msvcrt/tests/Makefile.in | 2 - dlls/msvcrt20/Makefile.in | 2 - dlls/msvcrt40/Makefile.in | 2 - dlls/msvcrtd/Makefile.in | 2 - dlls/msvcrtd/tests/Makefile.in | 2 - dlls/msvfw32/Makefile.in | 2 - dlls/msvfw32/mciwnd.c | 29 +- dlls/msvfw32/tests/Makefile.in | 2 - dlls/msvidc32/Makefile.in | 2 - dlls/msvideo.dll16/Makefile.in | 2 - dlls/mswsock/Makefile.in | 2 - dlls/msxml3/Makefile.in | 2 - dlls/msxml3/domdoc.c | 7 +- dlls/msxml3/tests/Makefile.in | 2 - dlls/msxml3/tests/domdoc.c | 16 + dlls/msxml4/Makefile.in | 2 - dlls/nddeapi/Makefile.in | 2 - dlls/netapi32/Makefile.in | 2 - dlls/netapi32/tests/Makefile.in | 2 - dlls/newdev/Makefile.in | 2 - dlls/ntdll/Makefile.in | 2 - dlls/ntdll/directory.c | 1 + dlls/ntdll/process.c | 21 +- dlls/ntdll/tests/Makefile.in | 2 - dlls/ntdll/tests/info.c | 83 ++ dlls/ntdsapi/Makefile.in | 2 - dlls/ntdsapi/tests/Makefile.in | 2 - dlls/ntoskrnl.exe/Makefile.in | 2 - dlls/ntoskrnl.exe/ntoskrnl.c | 67 + dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntprint/Makefile.in | 2 - dlls/ntprint/tests/Makefile.in | 2 - dlls/objsel/Makefile.in | 2 - dlls/odbc32/Makefile.in | 2 - dlls/odbccp32/Makefile.in | 2 - dlls/odbccp32/tests/Makefile.in | 2 - dlls/ole2.dll16/Makefile.in | 2 - dlls/ole2conv.dll16/Makefile.in | 2 - dlls/ole2disp.dll16/Makefile.in | 2 - dlls/ole2nls.dll16/Makefile.in | 2 - dlls/ole2prox.dll16/Makefile.in | 2 - dlls/ole2thk.dll16/Makefile.in | 2 - dlls/ole32/Makefile.in | 2 - dlls/ole32/compobj.c | 2 +- dlls/ole32/stg_bigblockfile.c | 75 +- dlls/ole32/stg_prop.c | 4 +- dlls/ole32/storage32.c | 109 +- dlls/ole32/storage32.h | 17 +- dlls/ole32/tests/Makefile.in | 2 - dlls/ole32/tests/storage32.c | 2 +- dlls/oleacc/Makefile.in | 2 - dlls/oleacc/tests/Makefile.in | 2 - dlls/oleaut32/Makefile.in | 2 - dlls/oleaut32/tests/Makefile.in | 2 - dlls/oleaut32/tests/tmarshal.c | 23 + dlls/oleaut32/tests/tmarshal.idl | 3 + dlls/oleaut32/tests/tmarshal_dispids.h | 1 + dlls/oleaut32/tests/typelib.c | 96 +- dlls/oleaut32/tests/vartype.c | 2 - dlls/oleaut32/typelib.c | 30 +- dlls/oleaut32/typelib2.c | 352 +++-- dlls/olecli.dll16/Makefile.in | 2 - dlls/olecli32/Makefile.in | 2 - dlls/oledb32/Makefile.in | 2 - dlls/oledb32/tests/Makefile.in | 2 - dlls/oledlg/Makefile.in | 2 - dlls/olepro32/Makefile.in | 2 - dlls/olesvr.dll16/Makefile.in | 2 - dlls/olesvr32/Makefile.in | 2 - dlls/olethk32/Makefile.in | 2 - dlls/openal32/Makefile.in | 2 - dlls/opengl32/Makefile.in | 2 - dlls/opengl32/opengl_ext.c | 1236 +++++++++++++++- dlls/opengl32/tests/Makefile.in | 2 - dlls/pdh/Makefile.in | 2 - dlls/pdh/tests/Makefile.in | 2 - dlls/pidgen/Makefile.in | 2 - dlls/powrprof/Makefile.in | 2 - dlls/printui/Makefile.in | 2 - dlls/propsys/Makefile.in | 2 - dlls/psapi/Makefile.in | 2 - dlls/psapi/tests/Makefile.in | 2 - dlls/pstorec/Makefile.in | 2 - dlls/qcap/Makefile.in | 2 - dlls/qedit/Makefile.in | 2 - dlls/qedit/samplegrabber.c | 110 +- dlls/qedit/tests/Makefile.in | 2 - dlls/qmgr/Makefile.in | 2 - dlls/qmgr/tests/Makefile.in | 2 - dlls/qmgrprxy/Makefile.in | 2 - dlls/quartz/Makefile.in | 2 - dlls/quartz/filtermapper.c | 9 +- dlls/quartz/tests/Makefile.in | 2 - dlls/query/Makefile.in | 2 - dlls/rasapi16.dll16/Makefile.in | 2 - dlls/rasapi32/Makefile.in | 2 - dlls/rasapi32/tests/Makefile.in | 2 - dlls/rasdlg/Makefile.in | 2 - dlls/resutils/Makefile.in | 2 - dlls/riched20/Makefile.in | 2 - dlls/riched20/tests/Makefile.in | 2 - dlls/riched32/Makefile.in | 2 - dlls/riched32/tests/Makefile.in | 2 - dlls/rpcrt4/Makefile.in | 2 - dlls/rpcrt4/ndr_marshall.c | 61 +- dlls/rpcrt4/tests/Makefile.in | 2 - dlls/rpcrt4/tests/ndr_marshall.c | 7 - dlls/rpcrt4/tests/server.c | 19 + dlls/rpcrt4/tests/server.idl | 3 + dlls/rsabase/Makefile.in | 2 - dlls/rsaenh/Makefile.in | 5 +- dlls/rsaenh/implglue.c | 36 + dlls/rsaenh/implglue.h | 4 + dlls/rsaenh/rsaenh.c | 16 +- dlls/rsaenh/sha2.c | 1003 +++++++++++++ dlls/rsaenh/sha2.h | 89 ++ dlls/rsaenh/tests/Makefile.in | 2 - dlls/rsaenh/tests/rsaenh.c | 134 +- dlls/rtutils/Makefile.in | 2 - dlls/sane.ds/Makefile.in | 2 - dlls/sccbase/Makefile.in | 2 - dlls/schannel/Makefile.in | 2 - dlls/schannel/tests/Makefile.in | 2 - dlls/secur32/Makefile.in | 2 - dlls/secur32/tests/Makefile.in | 2 - dlls/security/Makefile.in | 2 - dlls/sensapi/Makefile.in | 2 - dlls/serialui/Makefile.in | 2 - dlls/serialui/tests/Makefile.in | 2 - dlls/setupapi/Makefile.in | 2 - dlls/setupapi/devinst.c | 12 + dlls/setupapi/setupapi.spec | 2 +- dlls/setupapi/tests/Makefile.in | 2 - dlls/setupx.dll16/Makefile.in | 2 - dlls/sfc/Makefile.in | 2 - dlls/sfc_os/Makefile.in | 2 - dlls/shdoclc/Makefile.in | 2 - dlls/shdocvw/Makefile.in | 2 - dlls/shdocvw/dochost.c | 61 +- dlls/shdocvw/iexplore.c | 2 +- dlls/shdocvw/navigate.c | 203 ++- dlls/shdocvw/oleobject.c | 11 - dlls/shdocvw/shdocvw.h | 8 + dlls/shdocvw/tests/Makefile.in | 2 - dlls/shdocvw/tests/webbrowser.c | 295 +++- dlls/shdocvw/webbrowser.c | 16 +- dlls/shell.dll16/Makefile.in | 2 - dlls/shell32/Makefile.in | 2 - dlls/shell32/shell32.spec | 1 + dlls/shell32/shell32_main.c | 7 + dlls/shell32/shelllink.c | 36 +- dlls/shell32/shellord.c | 46 +- dlls/shell32/shlview.c | 458 +++--- dlls/shell32/shv_item_cmenu.c | 132 ++ dlls/shell32/tests/Makefile.in | 3 +- dlls/shell32/tests/msg.h | 294 ++++ dlls/shell32/tests/shelllink.c | 60 +- dlls/shell32/tests/shlexec.c | 111 ++ dlls/shell32/tests/shlview.c | 514 +++++++ dlls/shfolder/Makefile.in | 2 - dlls/shlwapi/Makefile.in | 2 - dlls/shlwapi/ordinal.c | 128 +- dlls/shlwapi/shlwapi.spec | 3 +- dlls/shlwapi/string.c | 28 +- dlls/shlwapi/tests/Makefile.in | 2 - dlls/shlwapi/tests/istream.c | 15 + dlls/shlwapi/tests/ordinal.c | 118 +- dlls/shlwapi/tests/string.c | 27 + dlls/shlwapi/tests/url.c | 51 +- dlls/shlwapi/url.c | 70 +- dlls/slbcsp/Makefile.in | 2 - dlls/slc/Makefile.in | 2 - dlls/snmpapi/Makefile.in | 2 - dlls/snmpapi/tests/Makefile.in | 2 - dlls/softpub/Makefile.in | 2 - dlls/sound.drv16/Makefile.in | 2 - dlls/spoolss/Makefile.in | 2 - dlls/spoolss/tests/Makefile.in | 2 - dlls/stdole2.tlb/Makefile.in | 2 - dlls/stdole32.tlb/Makefile.in | 2 - dlls/sti/Makefile.in | 2 - dlls/sti/tests/Makefile.in | 2 - dlls/storage.dll16/Makefile.in | 2 - dlls/stress.dll16/Makefile.in | 2 - dlls/strmiids/Makefile.in | 2 - dlls/svrapi/Makefile.in | 2 - dlls/sxs/Makefile.in | 2 - dlls/system.drv16/Makefile.in | 2 - dlls/t2embed/Makefile.in | 2 - dlls/tapi32/Makefile.in | 2 - dlls/toolhelp.dll16/Makefile.in | 2 - dlls/traffic/Makefile.in | 2 - dlls/twain.dll16/Makefile.in | 2 - dlls/twain_32/Makefile.in | 2 - dlls/twain_32/tests/Makefile.in | 2 - dlls/typelib.dll16/Makefile.in | 2 - dlls/unicows/Makefile.in | 2 - dlls/updspapi/Makefile.in | 2 - dlls/url/Makefile.in | 2 - dlls/urlmon/Makefile.in | 2 - dlls/urlmon/internet.c | 9 + dlls/urlmon/sec_mgr.c | 15 +- dlls/urlmon/tests/Makefile.in | 2 - dlls/urlmon/uri.c | 278 +++- dlls/urlmon/urlmon.spec | 2 + dlls/usbd.sys/Makefile.in | 13 + dlls/usbd.sys/usbd.c | 115 ++ dlls/usbd.sys/usbd.sys.spec | 33 + dlls/user.exe16/Makefile.in | 2 - dlls/user32/Makefile.in | 2 - dlls/user32/cursoricon.c | 49 +- dlls/user32/input.c | 4 +- dlls/user32/tests/Makefile.in | 2 - dlls/user32/tests/cursoricon.c | 249 ++++ dlls/user32/tests/win.c | 57 + dlls/userenv/Makefile.in | 2 - dlls/userenv/tests/Makefile.in | 2 - dlls/usp10/Makefile.in | 2 - dlls/usp10/tests/Makefile.in | 2 - dlls/usp10/tests/usp10.c | 73 + dlls/usp10/usp10.c | 2 +- dlls/uuid/Makefile.in | 2 - dlls/uuid/uuid.c | 1 + dlls/uxtheme/Makefile.in | 2 - dlls/uxtheme/tests/Makefile.in | 2 - dlls/vdhcp.vxd/Makefile.in | 2 - dlls/vdmdbg/Makefile.in | 2 - dlls/ver.dll16/Makefile.in | 2 - dlls/version/Makefile.in | 2 - dlls/version/tests/Makefile.in | 2 - dlls/vmm.vxd/Makefile.in | 2 - dlls/vnbt.vxd/Makefile.in | 2 - dlls/vnetbios.vxd/Makefile.in | 2 - dlls/vtdapi.vxd/Makefile.in | 2 - dlls/vwin32.vxd/Makefile.in | 2 - dlls/w32skrnl/Makefile.in | 2 - dlls/w32sys.dll16/Makefile.in | 2 - dlls/wbemprox/Makefile.in | 2 - dlls/wiaservc/Makefile.in | 2 - dlls/win32s16.dll16/Makefile.in | 2 - dlls/win87em.dll16/Makefile.in | 2 - dlls/winaspi.dll16/Makefile.in | 2 - dlls/windebug.dll16/Makefile.in | 2 - dlls/windowscodecs/Makefile.in | 2 - dlls/windowscodecs/info.c | 37 +- dlls/windowscodecs/jpegformat.c | 2 +- dlls/windowscodecs/pngformat.c | 4 +- dlls/windowscodecs/tests/Makefile.in | 2 - dlls/winealsa.drv/Makefile.in | 2 - dlls/wineaudioio.drv/Makefile.in | 2 - dlls/winecoreaudio.drv/Makefile.in | 2 - dlls/winecrt0/Makefile.in | 2 - dlls/wined3d/Makefile.in | 2 - dlls/wined3d/arb_program_shader.c | 12 +- dlls/wined3d/basetexture.c | 2 +- dlls/wined3d/buffer.c | 194 ++- dlls/wined3d/context.c | 717 ++++------ dlls/wined3d/cubetexture.c | 2 +- dlls/wined3d/device.c | 447 +++--- dlls/wined3d/directx.c | 155 ++- dlls/wined3d/drawprim.c | 22 +- dlls/wined3d/glsl_shader.c | 18 +- dlls/wined3d/resource.c | 2 +- dlls/wined3d/state.c | 70 +- dlls/wined3d/surface.c | 712 +++++----- dlls/wined3d/surface_base.c | 62 +- dlls/wined3d/surface_gdi.c | 2 +- dlls/wined3d/swapchain.c | 75 +- dlls/wined3d/swapchain_base.c | 8 +- dlls/wined3d/texture.c | 4 +- dlls/wined3d/utils.c | 214 +-- dlls/wined3d/volume.c | 4 +- dlls/wined3d/volumetexture.c | 2 +- dlls/wined3d/wined3d_gl.h | 26 - dlls/wined3d/wined3d_main.c | 5 - dlls/wined3d/wined3d_private.h | 76 +- dlls/wineesd.drv/Makefile.in | 2 - dlls/winejack.drv/Makefile.in | 2 - dlls/winejoystick.drv/Makefile.in | 2 - dlls/winemapi/Makefile.in | 2 - dlls/winemp3.acm/Makefile.in | 4 +- dlls/winemp3.acm/mpegl3.c | 466 +++++-- dlls/winenas.drv/Makefile.in | 2 - dlls/wineoss.drv/Makefile.in | 2 - dlls/wineps.drv/Makefile.in | 2 - dlls/wineps.drv/init.c | 15 +- dlls/wineps16.drv16/Makefile.in | 2 - dlls/winequartz.drv/Makefile.in | 2 - dlls/winex11.drv/Makefile.in | 2 - dlls/winex11.drv/clipboard.c | 5 +- dlls/winex11.drv/opengl.c | 15 + dlls/winex11.drv/window.c | 14 +- dlls/wing.dll16/Makefile.in | 2 - dlls/wing32/Makefile.in | 2 - dlls/winhttp/Makefile.in | 2 - dlls/winhttp/tests/Makefile.in | 2 - dlls/winhttp/tests/url.c | 19 + dlls/winhttp/url.c | 2 +- dlls/wininet/Makefile.in | 2 - dlls/wininet/http.c | 13 +- dlls/wininet/internet.c | 92 ++ dlls/wininet/internet.h | 1 + dlls/wininet/tests/Makefile.in | 2 - dlls/winmm/Makefile.in | 2 - dlls/winmm/playsound.c | 7 +- dlls/winmm/tests/Makefile.in | 2 - dlls/winmm/tests/midi.c | 5 + dlls/winnls.dll16/Makefile.in | 2 - dlls/winnls32/Makefile.in | 2 - dlls/winscard/Makefile.in | 2 - dlls/winsock.dll16/Makefile.in | 2 - dlls/winspool.drv/Makefile.in | 2 - dlls/winspool.drv/tests/Makefile.in | 2 - dlls/wintab.dll16/Makefile.in | 2 - dlls/wintab32/Makefile.in | 2 - dlls/wintab32/tests/Makefile.in | 2 - dlls/wintrust/Makefile.in | 2 - dlls/wintrust/tests/Makefile.in | 2 - dlls/wldap32/Makefile.in | 2 - dlls/wldap32/tests/Makefile.in | 2 - dlls/wmi/Makefile.in | 2 - dlls/wmiutils/Makefile.in | 2 - dlls/wnaspi32/Makefile.in | 2 - dlls/wow32/Makefile.in | 2 - dlls/ws2_32/Makefile.in | 2 - dlls/ws2_32/tests/Makefile.in | 2 - dlls/wsock32/Makefile.in | 2 - dlls/wtsapi32/Makefile.in | 2 - dlls/wuapi/Makefile.in | 2 - dlls/wuaueng/Makefile.in | 2 - dlls/xinput1_1/Makefile.in | 2 - dlls/xinput1_2/Makefile.in | 2 - dlls/xinput1_3/Makefile.in | 2 - dlls/xinput1_3/tests/Makefile.in | 2 - dlls/xinput9_1_0/Makefile.in | 2 - dlls/xmllite/Makefile.in | 2 - dlls/xmllite/tests/Makefile.in | 2 - documentation/README.de | 22 +- include/Makefile.in | 3 +- include/config.h.in | 19 + include/d3dx9.h | 1 + include/d3dx9effect.h | 295 ++++ include/d3dx9shader.h | 49 +- include/ddk/usbdlib.h | 4 + include/msctf.idl | 2 +- include/urlmon.idl | 100 ++ include/wincodec.idl | 63 +- include/wincrypt.h | 3 + include/wine/server_protocol.h | 4 +- include/wine/wined3d.idl | 9 + include/winerror.h | 79 ++ include/winsock.h | 2 +- libs/port/Makefile.in | 2 - libs/wine/Makefile.in | 2 - libs/wpp/Makefile.in | 4 - loader/Makefile.in | 2 - programs/{winepath => attrib}/Makefile.in | 6 +- .../mmdevapi.h => programs/attrib/attrib.c | 26 +- programs/cacls/Makefile.in | 2 - programs/clock/Makefile.in | 2 - programs/cmd/Makefile.in | 2 - programs/cmd/tests/Makefile.in | 2 - programs/cmd/tests/batch.c | 39 +- programs/cmd/tests/test_builtins.cmd | 16 + programs/cmd/tests/test_builtins.cmd.exp | 16 + programs/cmd/wcmdmain.c | 2 + programs/cmdlgtst/Makefile.in | 2 - programs/control/Makefile.in | 2 - programs/dxdiag/Makefile.in | 2 - programs/eject/Makefile.in | 2 - programs/expand/Makefile.in | 2 - programs/explorer/Makefile.in | 2 - programs/extrac32/Makefile.in | 2 - programs/hh/Makefile.in | 2 - programs/icinfo/Makefile.in | 2 - programs/iexplore/Makefile.in | 2 - programs/lodctr/Makefile.in | 2 - programs/mshta/Makefile.in | 2 - programs/msiexec/Makefile.in | 2 - programs/net/Makefile.in | 2 - programs/notepad/Makefile.in | 2 - programs/notepad/dialog.c | 4 +- programs/oleview/Makefile.in | 2 - programs/{secedit => ping}/Makefile.in | 6 +- programs/ping/ping_main.c | 61 + programs/progman/Makefile.in | 2 - programs/reg/Makefile.in | 2 - programs/regedit/Makefile.in | 2 - programs/regsvr32/Makefile.in | 2 - programs/rpcss/Makefile.in | 2 - programs/rundll32/Makefile.in | 2 - programs/secedit/Makefile.in | 2 - programs/services/Makefile.in | 2 - programs/spoolsv/Makefile.in | 2 - programs/start/Makefile.in | 2 - programs/svchost/Makefile.in | 2 - programs/taskmgr/Makefile.in | 2 - programs/termsv/Makefile.in | 2 - programs/uninstaller/Makefile.in | 2 - programs/unlodctr/Makefile.in | 2 - programs/view/Makefile.in | 2 - programs/wineboot/Makefile.in | 2 - programs/winebrowser/Makefile.in | 2 - programs/winecfg/Makefile.in | 2 - programs/wineconsole/Makefile.in | 3 - programs/winedbg/Makefile.in | 4 - programs/winedevice/Makefile.in | 2 - programs/winefile/Makefile.in | 2 - programs/winemenubuilder/Makefile.in | 2 - programs/winemine/Makefile.in | 2 - programs/winepath/Makefile.in | 2 - programs/winetest/Makefile.in | 2 - programs/winevdm/Makefile.in | 2 - programs/winhelp.exe16/Makefile.in | 2 - programs/winhlp32/Makefile.in | 2 - programs/winoldap.mod16/Makefile.in | 2 - programs/winver/Makefile.in | 2 - programs/wordpad/Makefile.in | 2 - programs/write/Makefile.in | 2 - programs/xcopy/Makefile.in | 2 - server/Makefile.in | 2 - server/debugger.c | 1 + server/process.c | 1 + server/protocol.def | 1 + server/request.h | 1 + server/sock.c | 32 +- server/trace.c | 1 + tools/Makefile.in | 2 - tools/makedep.c | 22 +- tools/widl/Makefile.in | 4 - tools/widl/client.c | 2 - tools/widl/parser.y | 1 - tools/widl/typegen.c | 522 ++++--- tools/widl/typegen.h | 2 - tools/widl/widltypes.h | 7 - tools/wine.inf.in | 7 + tools/winebuild/Makefile.in | 2 - tools/winedump/Makefile.in | 2 - tools/winegcc/Makefile.in | 2 - tools/winegcc/winegcc.c | 2 +- tools/wmc/Makefile.in | 4 - tools/wrc/Makefile.in | 4 - 795 files changed, 18909 insertions(+), 6446 deletions(-) rewrite ANNOUNCE (96%) copy dlls/d3dx9_36/{texture.c => effect.c} (51%) create mode 100644 dlls/dbghelp/image_private.h create mode 100644 dlls/dispex/tests/Makefile.in create mode 100644 dlls/dispex/tests/marshal.c create mode 100644 dlls/dxdiagn/tests/container.c create mode 100644 dlls/msctf/displayattributemgr.c copy dlls/{msvcirt => msvcr70}/Makefile.in (56%) copy dlls/{mmdevapi/mmdevapi.h => msvcr70/msvcr70.c} (65%) create mode 100644 dlls/msvcr70/msvcr70.spec create mode 100644 dlls/msvcr80/Makefile.in copy dlls/{mmdevapi/mmdevapi.h => msvcr80/msvcr80.c} (65%) create mode 100644 dlls/msvcr80/msvcr80.spec copy dlls/{msvcirt => msvcr90}/Makefile.in (56%) create mode 100644 dlls/msvcr90/msvcr90.c create mode 100644 dlls/msvcr90/msvcr90.spec create mode 100644 dlls/rsaenh/sha2.c create mode 100644 dlls/rsaenh/sha2.h create mode 100644 dlls/shell32/tests/msg.h create mode 100644 dlls/shell32/tests/shlview.c create mode 100644 dlls/usbd.sys/Makefile.in create mode 100644 dlls/usbd.sys/usbd.c create mode 100644 dlls/usbd.sys/usbd.sys.spec create mode 100644 include/d3dx9effect.h copy programs/{winepath => attrib}/Makefile.in (61%) copy dlls/mmdevapi/mmdevapi.h => programs/attrib/attrib.c (67%) copy programs/{secedit => ping}/Makefile.in (64%) create mode 100644 programs/ping/ping_main.c diff --git a/ANNOUNCE b/ANNOUNCE dissimilarity index 96% index 9381f0e36fa..2df5b4329d7 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,559 +1,487 @@ -The Wine development release 1.1.40 is now available. - -What's new in this release (see below for details): - - Support for Wow64 registry redirection. - - Increased coverage of MSI standard actions. - - Various Wordpad improvements. - - Many shell fixes for better IE support. - - Improved support for typelibs. - - Better GL card detection. - - Various bug fixes. - -The source is available from the following locations: - - http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.40.tar.bz2 - http://prdownloads.sourceforge.net/wine/wine-1.1.40.tar.bz2 - -Binary packages for various distributions will be available from: - - http://www.winehq.org/site/download - -You will find documentation on http://www.winehq.org/site/documentation - -You can also get the current source directly from the git -repository. Check http://www.winehq.org/site/git for details. - -Wine is available thanks to the work of many people. See the file -AUTHORS in the distribution for the complete list. - ----------------------------------------------------------------- - -Bugs fixed in 1.1.40: - - 1517 Advanced Archive Password Recovery -- endless loop - 4561 winecfg crash with ATI fglrx kernel driver on firegl based graphics cards - 8938 Regression in SCIM input - 9664 Missing icon during MS Office 2000 installation - 11466 Bookworm Deluxe crashes on startup - 11676 Urban Assault fails to load due to msvcrt.dll._ftol2 - 13505 iTunes 7.6 crashes when previewing video - 14174 Warhammer 40K - upper line blank (text rendered incorrectly) - 14916 Dameware NTutilities crashes - 16090 Fritz 11 Crashes on exit with builtin shdocvw - 16543 PopCap: FATAL ERROR: Invalid command line parameter - 17707 wine crashes when trying to run Medieval II - 17919 Oblivion: The game scene is not visible - 17926 Wrong Return key handling in file dialog - 18069 Oblivion frequently crashes - 18073 VarFormat formats decimals wrongly - 18097 Missing extrac32.exe tool causes some prerequisite installers to fail (msjavx86.exe) - 18098 urlmon.AsyncInstallDistributionUnit not implemented (needed MS Java VM) - 18551 Xenocode: NtMapViewOfSection() callers must take non-negative NTSTATUS into account (STATUS_IMAGE_NOT_AT_BASE) - 19110 Top of font is cut off in Medieval 2 - 19155 Ankh2: main character, NPC and other things black without UseGLSL=disabled - 19253 broken parameterization of error messages using %1 - 19360 Medieval 2: Total War loading screens turn black when progress bar moves - 19438 Formula Broomstick crashes on startup in d3dxof - 19784 cmd doesn't handle "else" properly; breaks firefox build - 19807 Nokia ovi suite fails to install - 19913 2weistein: UseGLSL=disabled dark character with Shader Model 2.0 - 20109 httprecon 7.3 gets wrong data in case of a invalid http response - 20138 Tropico 3 doesn't start - 20198 Help icon crashes Internet Explorer 7 - 20248 iTunes 9 crashes on load - 20339 IE6. Proxy settings do not work - 20457 Elevated demo crashes in system.drv16 on startup - 21129 cmd /? should give a help message, not '/?' - 21276 python's test_uuid test fails - 21324 Streets of SimCity demo installer takes slightly longer to initialize - 21480 dash is not recognized as a valid column name - 21515 VENDOR_WINE vs VENDOR_ATI with xf86-video-ati - 21549 Windows PowerShell 1.x installer dies on unimplemented function USERENV.dll.138 - 21567 Slingbox 2.0.4 crashes - 21614 Part of spotify window missing when opened - 21615 Steam: Windows are confined to a certain area when using virtual desktop - 21631 Lego Star Wars I crashes at start after displaying the nvidia logo - 21638 Motocross Madness 2 (mcm2): crashes after aborting a race - 21673 Office 2007 Enterprise installation fails - 21756 StarCraft 2 Beta Installer crashes with a page fault - 21762 Company Of Heroes crashes after a few minutes of Play - 21764 Sun JRE (jre-6u16-windows-i586-s) installation failure - 21777 CreateMutexExA(): use heap for A to W conversion to work around transbase db engine app bug (affects multiple apps, TecDoc CATALOG ...) - 21780 Some icons are shifted down and to the right in Nero CD-DVD Speed - 21820 3d architecte from microapplication assert on startup - 21825 winetricks dcom98 installation fails - 21846 TREPCAD 4.4.1 Demo: install aborts - 21853 Dragon NaturallySpeaking 10 Standard freezes when opening training window - 21854 Dragon NaturallySpeaking 10 Standard does not paste text from DictationBox - 21857 RealBasic's TextArea.text returns exactly half of the inputed text - 21882 make depend actually required on OpenBSD's make - 21887 Tomb raider 3 demo crashes when run - 21893 ie7 setup fails to install with Cryptographic Service error - 21898 uTorrent 2.0 redraws the listview torrent progress indicator incorrectly - 21906 setupapi copyfiles action target must default to LDID_WIN (win9x) or LDID_SYS (NT) when neither DestinationDirs nor DefaultDestDir is given - 21911 Provide "C:\\windows\\Help" folder (MS Java runtime installer) - ----------------------------------------------------------------- - -Changes since 1.1.39: - -Adam Petaccia (2): - mshtml: Implement HTMLScriptElement_put_type. - mshtml: Test IHTMLScriptElement_put_type. - -Alasdair Sinclair (1): - gdiplus: Create a full BITMAPINFO to prevent clobbering memory with palette data. - -Alexandre Goujon (2): - configure: Add dll name recognition for cygwin. - configure: Define _WIN32 when compiling on Windows. - -Alexandre Julliard (49): - configure: Define AS_VAR_APPEND if necessary for older autoconf versions. - makefiles: Make sure that dependencies are always updated when regenerating makefiles. - makefiles: Use the standard C_SRCS variable as the list of test files. - advapi32/tests: Fix a test failure on Wow64. - kernel32/tests: Add a couple of last error codes for Win7. - mlang/tests: Add another possible failure for Win2k. - winex11: Make sure that the owner window exists when setting the transient for attribute. - winex11: Windows that own popups should be managed. - winex11: Switch owner window to managed when displaying one of its popups. - krnl386.exe: Add an explicit name check to allow importing user.exe and gdi.exe even if not loaded already. - makefiles: Always generate the subdirs makefiles from the main makefile. - makefiles: Always build dependencies by default and get rid of the auto-depend rules. - makefiles: Add some shell function helpers to generate the makefile rules. - makefiles: Remove makedep only after everything else has been cleaned. - shell32/tests: Don't use the return value of the ok macro. - shell32/tests: Fix broken check of the ok() macro return value. - user32/tests: Fix broken check of the ok() macro return value. - comctl32/tests: Fix broken check of the ok() macro return value. - kernel32/tests: Fix broken usage of the ok() macro return value. - tests: The ok() macro shouldn't return a value. - ntdll/tests: Add some test cases for Wow64 registry redirection. - makefiles: Make sure that makedep is rebuilt before updating dependencies in tools. - kernel32: Move shared heap creation to krnl386 and load it by default on Win9x versions. - makefiles: Fix makedep dependency now that we explicitly to make depend when creating makefiles. - kernel32: Moved creation of the DynData registry keys to wineboot. - kernel32: Create the hardware registry keys one at a time, and bail out if the main key already exists. - kernel32: Create the Control Panel\International key one element at a time. - kernel32: Create the Nls\CodePage key one element at a time. - advapi32: Create keys recursively if necessary. - server: Add a separate function for internal registry key creation. - server: Make the standard registry key creation non-recursive. - ntdll/tests: Add tests showing that NtCreateKey is not recursive. - winex11: Don't try to create the owner window if it belongs to a different thread. - server: Initial support for Wow64 registry redirection. - krnl386.exe: Don't try to free again an already freed global block. - user32: Pass HWND_BOTTOM unmodified to the server in PeekMessage. - server: Set the idle event when PeekMessage is called with -1 as window filter. - ntdll: Return STATUS_IMAGE_NOT_AT_BASE when an image mapping has to be relocated. - wine.inf: Create a few Wow64 symbolic links. - advapi32/tests: Add a number of tests for Wow64 registry redirection. - server: Add a helper function for the common functionality between open_key and create_key. - server: Add support for Wow64 sharing of the HKLM\Software\Classes key. - ntdll/tests: Add tests for HKLM\Software\Classes Wow64 sharing. - wine.inf: Create empty keys for all entries that are shared in Wow64. - wine.inf: Create symlinks for shared Wow64 keys under HKLM\Software. - server: Fix a typo in the context tracing. - ntdll: Always restore the context after an exception even if setting the debug registers fails. - winetest: Refuse to run if we cannot create a window. - ole32/tests: Avoid sizeof in traces. - -Anders Jonsson (1): - wordpad: Update Swedish translation. - -Andrew Eikum (2): - shdocvw: Fix typo in WARN. - shlwapi: Ignore the hash of HTML URLs in UrlCombine. - -Andrew Nguyen (3): - user32: Ensure that WM_INITDIALOG passes the first tabstop control handle to the dialog procedure. - user32/tests: Fix a failure message trace. - msi: Correctly set the process working directory in custom action type 34. - -Andrey Turkin (5): - kernel32: Use TEB-based buffer in CreateMutexExA. - extrac32: Implement /C mode. - extrac32: Enhance command-line parsing. - shdocvw: Return success code in ITaskBarList::HrInit. - userenv: Implement stubbed userenv.dll.138. - -André Hentschel (7): - oleaut32: Fix rounding. - oleaut32: Reorder some code to make it easier to read and look like the block above. - oleaut32/tests: Add some tests. - oleaut32: Fix fractional calculation. - oleaut32: Fix localized date parsing. - oleaut32: Fix localized date and time parsing. - oleaut32: Fix FormatString (valgrind). - -Arjun Comar (1): - cmd: Fix cmd to take /? as a help parameter. - -Aurimas Fišeras (1): - wordpad: Update Lithuanian translation. - -Austin English (2): - ntdll: Add initial support for OpenBSD to fill_cpu_info. - urlmon: Add a stub for AsyncInstallDistributionUnit. - -Charles Davis (1): - include: Don't accidentally redefine a member in struct _IRP (LLVM/Clang). - -Christian Costa (16): - d3d8: Display FIXME only once in ValidatePixelShader and ValidateVertexShader. - d3dx9_36: Add stub for D3DXGetShaderConstantTableEx. Implement D3DXGetShaderConstantTable. - d3dx9_36: Fix AddRef and Release macros and add IID for ID3DXConstantTable. - shell32: Allow copy operation to overwrite an existing write protected file + tests. - d3dxof: Allow templates to be defined anywhere in objects file. - d3dxof: Fix file types checks + tests. - d3dxof: Remove wrong description. - d3dxof: Use proper macro for AddRef. - ddraw/tests: Fix typos. - d3drm: Use proper macro for AddRef. - d3dx9_36: Implement stubbed ID3DXConstantTable interface. - d3dx9_36: Implement D3DXFindShaderComment (based on code from Luis Busquets) + tests. - d3dx9_36: Find, store and enable retreival of CTAB comment data in shader (based on code from Luis Busquets). - d3dx9_36: Remove useless HEAP_ZERO_MEMORY flag (spotted by Henri Verbeet). - d3dxof: Turn some TRACEs into WARNs in case of parsing error. - d3dx9_36: Avoid dereferencing null pointers in trace (spotted by Paul Vriens). - -David Hedberg (6): - msvcrt: Add trail bytes info for codepage 1361. - msvcrt: Implement _ismbclegal. - msvcrt: Implement _mbctombb. - richedit: GTL_PRECISE to GETTEXTLENGTHEX implies GTL_NUMBYTES. - user32: Fix return value of EDIT_EM_Scroll. - user32: Fix case where EM_SCROLL with page down results in trying to scroll up past the beginning. - -Detlef Riekenberg (3): - wordpad: Update German print preview translation. - msvcr71: Forward more functions to msvcrt.dll. - msvcrt20: Forward more functions to msvcrt.dll. - -Dmitry Timoshkov (4): - comctl32: Initialize item.mask before sending HDM_GETITEM message. - gdi32: Dump GDI objects in the case of running out of GDI handles. - user32: DeleteDC() should allow to delete a DC returned by GetDC(). - gdi32: Fix the DeleteDC test failures under Win9x. - -Dylan Smith (19): - richedit: Added some extra tests for EM_FORMATRANGE. - wordpad: Added missing calls to DeleteDC and ReleaseDC. - wordpad: Get preview page character boundaries with number of pages. - wordpad: Use pages_shown variables to indicate pages shown. - wordpad: Update bitmaps outside of WM_PAINT. - wordpad: Cache text length. - wordpad: Avoid unnecessary deletion of hdcSized. - wordpad: Don't waste time getting the number of preview pages. - wordpad: Avoid forward declarations in print.c. - wordpad: Added zoom cursor for print preview. - wordpad: Number of preview pages to show when unzoomed is persistent. - wordpad: Show page numbers in statusbar for print preview. - wineconsole: Handle mouse wheel scrolling for user backend. - richedit: Documented paragraph border widths are in points not pixels. - richedit: Make zooming affect all pictures. - comctl32/tests: Add NULL terminator to unicode string constant. - comctl32/listview: Scrolling affects subitem rect. - comctl32/tests: Added scrolled listview test for LVM_GETSUBITEMRECT. - gdi32: Provide a non-blank font face name for ANSI_FIXED_FONT. - -Eric Pouech (2): - ntdll: Fix wrong marking for valgrind on 64bit systems. - ntdll: Notify valgrind for stack management while in exception. - -Erich Hoover (2): - ntdll: Allow 'all processors' flag used in Vista and newer. - kernel32/tests: Add test for 'all processors' flag on Vista and newer. - -Gerald Pfeifer (4): - winmm/tests: Fix test condition in test_midiStream(). - comdlg32: Remove unused wParam parameters from PRINTDLG_WMInitDialog and PRINTDLG_WMInitDialogW. - comdlg32: Shed unused parameters from CFn_WMInitDialog and CFn_WMDestroy. - widl: Avoid two warnings. - -Hans Leidekker (47): - msi: Make msi_reset_folders static. - msi: All stream names starting with 0x0005 are unencoded. - msi/tests: Free exception information. - msi: Allocate sufficient memory in ITERATE_InstallODBCDriver and ITERATE_InstallODBCTranslator. - fusion: Add a stub implementation of CreateApplicationContext. - kernel32/tests: Fix a thread handle leak. - winhttp: Add support for resolve timeouts. - wininet: Fix handling of a response without headers. - msi: Implement the RemoveDuplicateFiles standard action. - msi: Add tests for creating and removing duplicate files. - wininet: Fix a memory leak. - msi: Implement the RemoveRegistryValues standard action. - msi: Add tests for removing registry values. - msi: Remove empty directories as part of the RemoveFiles action. - msi: The table for isolated components is called IsolatedComponent. - msi: Improve a trace. - msi: Only create environment strings when the component is set to be installed. - msi: Look at the requested action when installing services, not the action taken. - msi: Look at the requested action when stopping services, not the action taken. - msi: Look at the requested action when deleting services, not the action taken. - msi: Look at the requested action when moving files, not the action taken. - msi: Look at the requested action when publishing assemblies, not the action taken. - msi: Improve a trace. - msi: Skip the FindRelatedProducts action when product is already installed. - msi: Implement the RemoveIniValues standard action. - msi: Add tests for removing values from .ini files. - setupapi: Destination directory defaults to system directory. - msi: Strip leading text style label from control text before lookup in binary table. - msi: Implement the RemoveEnvironmentStrings standard action. - msi: Add tests for removing environment strings. - msi: Initialize a couple of variables. - msi: Update the UI in the AllocateRegistrySpace action. - msi: Update the UI in the AppSearch action. - msi: Display directory identifier instead of the full path in the CreateFolders action. - msi: Update the UI in the DeleteServices action. - msi: Properly update the UI in the DuplicateFiles and RemoveDuplicateFiles actions. - msi: Display the product code in the FindRelatedProducts action. - msi: Update the UI in the InstallODBC action. - msi: Update the UI in the RemoveODBC action. - msi: Move the implementation of the MoveFiles action to files.c. - msi: Update the UI in the MoveFiles action. - msi: Update the UI in the MsiPublishAssemblies action. - msi: Display the product code in the PublishProduct action. - msi: Update the UI in the RegisterProduct action. - msi: Update the UI in the RegisterUser action. - msi: Also update the UI when removing files listed in the RemoveFiles table. - winhttp: Implement WINHTTP_QUERY_STATUS_TEXT. - -Henri Verbeet (13): - wined3d: Properly report shader comment sizes. - wined3d: Escape shader comments. - winex11.drv: Store if a bitmap is top-down in X_PHYSBITMAP. - winex11.drv: Use the bitmap's "topdown" field in X11DRV_SetDIBits(). - winex11.drv: Use the bitmap's "topdown" field in X11DRV_AlphaBlend(). - winex11.drv: Use the bitmap's "topdown" field in X11DRV_DIB_DoCopyDIBSection(). - gdi32/tests: Fix a few format strings. - gdi32: GetObject() should return the DIB's absolute height in dsBmih.biHeight. - winex11.drv: GetObject() already returns a DIB's absolute height. - uxtheme: GetObject() already returns a DIB's absolute height. - user32: Also show dialogs right after a WM_TIMER message. - wined3d: Split TEXT shader comments into separate lines. - server: Allow the debugger to be debugged. - -Huw Davies (8): - rpcrt4: Add support for FC_FLOAT and FC_DOUBLE in complex structures. - oleaut32: Correctly marshal NULL interface ptrs. - include: Add IProvideRuntimeContext and a few annotations. - dispex: Add a stub dispex.dll. - tools: Register dispex.dll. - oleaut32: Add a test for non-oleautomation error handling. - shell32: Improve a TRACE and issue a FIXME if the interface is not implemented. - shell32: Mask out the CSIDL_ flags. - -Hwang YunSong (1): - wordpad: Update Korean translation. - -Jacek Caban (24): - mshtml: Rename nsURI to nsWineURI. - mshtml: Store nsWineURI object instead of interface in nsChannel. - mshtml: Moved OnStartURIOpen implementation to nsio.c. - mshtml: Use nsWineURL structure directly in load_nsuri. - mshtml: Get rid of most nsIWineURI methods. - mshtml: Get rid of nsIWineURI::[GS]etWindow. - mshtml: Get rid of nsIWineURI::[GS]etNSContainer. - mshtml: Get rid of nsIWineURI interface. - atl: Don't add CLSID_ATLRegistrar replacement in do_register_dll_server. - atl: Properly release registrar in do_register_dll_server. - include: Added IHTMLPrivateWindow declaration. - mshtml: Added IHTMLPrivateWindow stub implementation. - mshtml: Moved asynchronous document binding to separated function. - mshtml: Allow post data and headers to be passed to create_channelbsc. - mshtml: nsio.c code clean up. - mshtml: Set current moniker in start_binding. - mshtml: Properly handle IHlinkFrame::Navigate result. - mshtml: Load data from moniker in IPersistStreamInit::InitNew. - mshtml: Moved SZ_HTML_CLIENTSITE_OBJECTPARAM handling to IPersistMoniker::Load. - mshtml: Call OnViewChange in set_downloading_proc. - mshtml: Correctly handle document with already loaded moniker in set_moniker. - mshtml: Added IHTMLPrivateWindow::SuperNavigate implementation. - mshtml: Added more navigation tests. - mshtml: Call Exec(DOCHOST_DOCCANNAVIGATE) from IOleObject::SetClientSite. - -Jeff Latimer (2): - usp10: Fix trace to remove an incorrect assignment. - usp10: Remove duplicate code. - -Jeff Zaroyko (1): - mmdevapi/tests: Fix a failing test for Vista/W2k8. - -Joris Huizer (1): - mshtml: create_channelbsc: Handle OOM case correctly. - -Juan Lang (3): - wintrust: Correct GenericChainCertificateTrust's handling of WINTRUST_CreateChainForSigner's return value. - rpcrt4: Add tests for UuidCreateSequential. - rpcrt4: Implement UuidCreateSequential using the machine's MAC address, when available. - -Justin Chevrier (4): - gdiplus/test: Add GdipGetNearestColor test. - gdiplus: Basic implementation of GdipGetNearestColor with changes to test to reflect fixes. - gdiplus/test: Add GdipSetImageAttributesRemapTable test and fix typo. - gdiplus: Implement GdipSetImageAttributesRemapTable with updated test. - -Jörg Höhle (11): - user32: Sync vkey codes with winuser.h. - wineoss: Do not access WAVEHDR past DriverCallback. - winealsa: Do not access WAVEHDR past DriverCallback. - midimap: Have GetDevCaps error out when no MIDI device is present. - winmm: Do not access MIDIHDR past MOM_DONE DriverCallback. - winmm: MIDIHDR.dwOffset is set with MEVT_F_CALLBACK only. - winmm: Accept the ancient, smaller MIDIHDR. - winmm/tests: MIDIHDR tests. - winmm/tests: Fix transient notification error: messages may arrive late. - winmm/tests: Fix up to 3 MCI test failures. - winex11: Log keycode decimal <-> hex for keysym & MS vkey and scancode. - -Ken Thomases (2): - kernel32: Mac: If language is less specific variant of locale, keep locale. - ntdll: Mac: Fix leak of send right for Mach thread port. - -Kusanagi Kouichi (6): - winex11.drv: Keep the state of XIM and IME consistent. - winex11.drv: Check XDND version. - winex11.drv: Generate IME messages as needed. - winex11.drv: There seems to be nothing to be done for IMN_SETOPENSTATUS. - winex11.drv: Add a new debug channel for XIM. - wined3d: Fix a failure of card vendor detection. - -Louis Lenders (2): - wine.inf: Add windows\help directory. - activeds: Add stub for ADsGetLastError. - -Maarten Lankhorst (6): - mmdevapi: Add tests for renderclient. - mmdevapi: Add todo_wine in dependency test. - include: Fix IsEqualPropertyKey definition. - include: Add devpropdev.h. - include: Add devpkey.h. - mmdevapi: Implement a stub of MMDevice. - -Marcus Meissner (1): - windowscodecs: Handle old libpng.so using distros (as SLE 10). - -Michael Stefaniuc (1): - oleaut32: Remove superfluous NULL check before HeapFree (Smatch). - -Mikołaj Zalewski (1): - include: Add a strcmpW-equivalent function usable in tests. - -Nikolay Sivov (17): - msxml3: Simplify IXMLDOMElement_get_tagName(), add null check. - user32/tests: Test to show that caption added for WS_EX_LAYERED as well. - user32: Intersect with passed dirty rectangle while blitting. - user32: Use whole window rectangle for UpdateLayeredWindow. - kernel32/lcformat: Get rid of back jumps on errors. - shlwapi: Fix mask usage in SHSetWindowBits with tests. - shlwapi: Implement SHFormatDateTimeA/SHFormatDateTimeW with tests. - comctl32/toolbar: Fix possible null pointer dereference. - shlwapi/tests: Some tests for PathGetDriveNumber. - shell32/tests: Minor test file cleanup. - shell32: Implement SHParseDisplayName with basic tests. - shell32: Remove WINAPI where it's not needed. - shell32: Use return value on failure updated in Vista+. - shell32: Stub IFolderView implementation for IShellView instance. - shell32: Cast to class data pointer IShellView2 vtable as it's a first member. - shell32: Move SelectItem implementation to IFolderView and use it for IShellView::SelectItem. - shell32: Stub IShellView2::SelectAndPositionItem() over IFolderView::SelectAndPositionItems(). - -Paul Andrew Panon (6): - wined3d: Rename GL_VENDOR to HW_VENDOR. - wined3d: Add a real GL vendor detection. - wined3d: Adjust the quirks to use the new GL_VENDOR codes. - wined3d: Add a card detection table and refactor wined3d_guess_card. - wined3d: Add Mesa ATI card detection code. - wined3d: Update to add Mesa ATI card detection code. - -Paul Chitescu (3): - quartz: Do not assert() the existence of a media format of an input pin. - qedit: A full format is required when connecting either pin of the SampleGrabber. - quartz: Silence the FIXME that AsyncReader does not implement IBasicAudio. - -Paul Vriens (6): - cmd: Fix a memory leak (Valgrind). - ntdll/tests: Fix a crash on some Vista boxes. - shell32/tests: Prevent crash on W2K and below. - gdi32/tests: Fix a test failure on Win9x/WinMe. - shlwapi/tests: Skip some tests on Win9x/WinMe. - shlwapi/tests: Fix some test failures on Win9x/WinMe. - -Piotr Caban (22): - oleaut32: Added partial ICreateTypeInfo2_LayOut implementation. - oleaut32: Improved ICreateTypeInfo2_fnAddFuncDesc implementation. - oleaut32: Added TypeInfo validation in ICreateTypeInfo_LayOut. - oleaut32: Added MEMBERID_NIL handling to ICreateTypeInfo_LayOut. - oleaut32: Added partial ICreateTypeInfo2_AddFuncDesc arguments with default values handling. - oleaut32: Added more arguments with default values handling. - oleaut32: Added VT_BSTR handling to ctl2_add_default_value. - oleaut32: Improved ICreateTypeInfo2_SetFuncAndParamNames implementation. - oleaut32/tests: Added VT_PTR tests in function arguments. - oleaut32: Improved ICreateTypeInfo2_AddRefTypeInfo implementation. - oleaut: Added ITypeInfo2_fnGetRefTypeInfo implementation. - oleaut32: Improved implementation of ICreateTypeInfo2_fnAddImplType. - oleaut32/tests: Added more typelib creation tests. - oleaut32: Added implementation of ITypeInfo2_fnGetTypeAttr. - oleaut32: Fix importfile searching in ctl2_alloc_importinfo. - oleaut32: Improve TKIND_COCLASS handling while creating typelib. - oleaut32/tests: Remove incorrect test. - oleaut32: Added implementation of ITypeInfo2_GetImplTypeFlags. - oleaut32: Added implementation of ITypeInfo2_GetRefTypeOfImplType. - oleaut32: Added ITypeLib2_GetLibAttr implementation. - oleaut32: Added ITypeLib2_GetDocumentation implementation. - oleaut32: Update TypeInfo flags when object inherits IDispatch. - -Reece Dunn (9): - shlwapi/tests: Skip SHCreateStreamOnFileA/W configurations not supported on Win98 SE. - ole32/tests: Improve the HGLOBAL stream tests for Seek. - ole32: Fix the HGLOBAL stream Seek implementation. - comctl32/mru: In EnumMRUListA, ensure that the string is NULL terminated and the correct size is returned. - msxml3/tests: Improve the IObjectSecurity tests to cover msxml3 SP8+ behaviour. - hlink/tests: Add more tests to show a difference in string and moniker hlinks. - ole32: IMoniker_IsRunning returns E_INVALIDARG when bindctx is NULL. - kernel32/tests: Add a test case for calling TlsFree on a freed index. - crypt32: Fix CryptFreeTls when calling with a freed index. - -Roderick Colenbrander (6): - winex11: When a mask picture is active, the source offsets should be relative to mask_pict instead of src_pict. - winex11: Also take into account source offsets when a mask is around. - wined3d: Fix multisampling on cards without 32-bit RGB fbconfigs. - opengl32: Update opengl extensions. - wined3d: Rename yuv to complex in order to prepare for 8-bit palette fixups using the same code. - wined3d: Move the 8-bit palette shader code over to the blit_shader backend. - -Stefan Dösinger (3): - wined3d: Create a wined3d internal event query interface. - wined3d: Introduce wined3d_event_query_issue. - wined3d: Add wined3d_event_query_create and destroy. - -Stefan Leichter (1): - ntdll/tests: Test NtCreateFile with an invalid filename. - -Vincent Povirk (9): - gdiplus: Add a test for GdipImageRotateFlip. - comdlg32: Add a test showing the font dialog ignores printer dpi. - comdlg32: Always use screen dpi in the font dialog, even with a printer dc. - gdiplus: Free the attached HBITMAP when destroying Bitmap objects. - gdiplus: Stub GdipGetImageItemData. - gdiplus: Stub GdipGetRegionScansCount. - ole32: Clear the sibling links when reinserting a renamed element. - ole32: Add a test showing IStorage_CopyTo ignores open objects in the source. - ole32: Add tests for CopyTo in recursive situations. - -Vitaly Perov (2): - mshtml: Silence IStdMarshalInfo in htmldoc_qi FIXME. - notepad: Implement printing to file. - -XueFeng Chang (1): - server: Check create_event return value in console creation. - -Yann Droneaud (1): - aclocal.m4: Fix WINE_TRY_CFLAGS macro (LLVM/Clang). - --- -Alexandre Julliard -julliard@winehq.org +The Wine development release 1.1.41 is now available. + +What's new in this release (see below for details): + - A wide range of Direct3D improvements. + - Support for SHA-256, SHA-384, and SHA-512 algorithms. + - A number of MSHTML fixes. + - Support for mp3 decoding on Mac OS X. + - Various widl improvements. + - More typelib fixes. + - OLE storage improvements. + - Various bug fixes. + +The source is available from the following locations: + + http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.41.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-1.1.41.tar.bz2 + +Binary packages for various distributions will be available from: + + http://www.winehq.org/site/download + +You will find documentation on http://www.winehq.org/site/documentation + +You can also get the current source directly from the git +repository. Check http://www.winehq.org/site/git for details. + +Wine is available thanks to the work of many people. See the file +AUTHORS in the distribution for the complete list. + +---------------------------------------------------------------- + +Bugs fixed in 1.1.41: + + 10479 Grass jumping around in S.T.A.L.K.E.R. + 10829 err:ntdll:RtlpWaitForCriticalSection when trying to use an SMS-sending program + 11827 Asterix et les jeux olympiques demo crashes in shdocvw component + 11842 abel370 crashes + 12200 error message in TREPCAD on project creation + 12896 kernel32: pipe.ok hangs in PC-BSD but not Linux + 13302 GetProcessMemoryInfo is unimplemented + 13555 Adobe Acrobat Pro 6 does not install + 14057 "Psalmen - Lieder des Lebens" fails to load + 14511 Discworld Noir: segfault crash regression upon startup + 14616 Dracula Origin Demo: Pixelshaders broken + 15283 Morrowind: Random, usually reproducible crashes when traveling by boat + 15324 gdi32: bitmap test fails in PC-BSD but not Ubuntu + 16137 If a Linux window is set to On Top, it will not be able to be on top of a Wine window set on top + 16215 Adobe Framemaker 8.0 prevented from installing due to invalid O/S version + 16684 cnsconf.exe fails to start + 17056 Team Fortress 2 launched from within steam loads, but crashes when launching any map + 17251 Torrents renaming each other + 17324 Lotus Notes Client 6.5.5 crashed + 17731 Profesor Henry 5.0 doesn't run - a black screen appears + 18572 TCP(iexplore.exe:23945): Application bug, race in MSG_PEEK. + 18585 Evil Genius crashes with page fault in d3d9 + 18613 Hero Lab hangs with an invisible message box while loading Mutants & Masterminds RPG game + 18632 gklayout.dll compiled from mingw fails to load (.dll from Firefox) + 18997 Warcraft 3 1.23 crashes after remaining one minute in a Battle.net chat room. + 19627 IPersistFile_fnGetCurFile too stubby, some installers fail + 19798 IoReportResourceUsage is not implemented + 20079 WOW locks up at login screeen + 20299 AutoCAD 2008: No images on buttons from Quick Help Toolbar + 20360 Mouse cursor changes colour + 20376 Albumplayer craches with dotnet20 function + 20714 build fails on OpenSolaris: ifenum.c:322: error: structure has no member named `ifr_hwaddr' + 21300 Sony Vegas 5 fails with open a new mp3 + 21310 motocross madness crashing + 21323 Spelunky 0.98.1 crashes after config screen + 21426 Fallout Tactics no longer works + 21581 GTA4 crashes during "Lure" mission + 21784 Pandaland does not work + 21869 Jazz Jack Rabbit 2: Black/flickering screen followed by page fault + 21903 gdiplus: graphics test crashing + 21938 Test tool breaks secured wireless on windows 7 x64 + 21941 Alpha Prime crashes right after the intro + 21946 Pokémon Play It! v2 installer aborts + 21949 Verbose the d3d vertices processing code + 21951 3D Studio Max 2010 trial installer crashes in GdipCreateTextureIA + 21954 Blood Ties (Yahoo! Games) fails during the startup + 21971 Gecko-using help viewer crashes application + 21980 ImgBurn: no recognized drives + 21993 Lemmings Paintball: Crash when skipping intro video + 22001 datetime.c test fails when LC_CTYPE="ru_RU.UTF-8" + 22017 LiveUpdate can not connect via proxy + 22020 Page Fault in wine_utf8_wcstombs when running ToonTalk/AvrStudio + 22028 King's Bounty. Armored Princess - mouse doesn't work + 22035 After clicking a link in Steam program it crashes + 22043 Regression of VB6 string comparison bug 14703 + +---------------------------------------------------------------- + +Changes since 1.1.40: + +Alexandre Julliard (17): + krnl386.exe: Preload gdi and user when thunks are being used. + makefiles: Don't recurse for the testclean target. + kernel32: Abstract the key creation routine and move the key existence check to the top-level function. + makedep: Append the separator if not found in an existing makefile. + makedep: Output source dependency for bison files needed for parallel makes. + makefiles: Remove the no longer needed explicit separators for dependencies. + makefiles: Remove the no longer needed explicit dependencies for bison files. + makefiles: Add more shell functions to generate the main makefile. + kernel32: Don't try to open builtin exe files during CreateProcess, only check the path syntax. + user32/tests: Add some tests demonstrating that SetCursor uses the thread input data. + user32/tests: Add some tests for ShowCursor. + user32/tests: Add some tests for GetCursorInfo. + user32: Return fake global information in GetCursorInfo instead of thread-local values. + gdiplus/tests: Create a window for graphics tests instead of painting over the desktop. + winegcc: Force importing msvcrt when using the Unicode hack for a Windows build. + oleaut32: Move variable declaration outside of the switch statement. + shlwapi/tests: Avoid size_t in a trace. + +Andrew Eikum (6): + shlwapi: Improve error handling in UrlGetPart. + hlink: Set hlink's location to NULL if the empty string is given. + hlink: Split target at hash in HlinkCreateFromString. + hlink: Implement IHlinkBrowseContext::GetBrowseWindowInfo. + mshtml: Fix return value interpretation when navigating. + shlwapi: Only skip 'localhost' in file URLs in UrlCanonicalize. + +Andrew Nguyen (8): + wine.inf: Add LSA key under the HKLM control key. + dxdiagn/tests: Add tests for IDxDiagContainer. + dxdiagn: Fix return and output behavior of IDxDiagContainer::EnumChildContainerNames. + dxdiagn: Fix string copy behavior with an excessively short buffer in IDxDiagContainer::EnumChildContainerNames. + dxdiagn: Initialize output pointer to NULL in IDxDiagContainer::GetChildContainer. + dxdiagn: Fix dot parsing in IDxDiagContainer::GetChildContainer for the case of a lone dot terminator. + dxdiagn: Fix return and output behavior of IDxDiagContainer::EnumPropNames. + dxdiagn: Fix string copy behavior with an excessively short buffer in IDxDiagContainer::EnumPropNames. + +André Hentschel (3): + oleaut32/tests: Remove a todo_wine from a dead test. + documentation: Keep README.de in sync. + README.de: Sync german filesystem support section. + +Aric Stewart (2): + winemp3.acm: Support mp3 decoding on Mac OS/X Leopard systems. + msctf: Add stub for ITfDisplayAttributeMgr. + +Christian Costa (14): + d3dxof: Fix tzip and bzip files tests on all windows platform. + d3dxof: Avoid using strlen for specifying templates or objects size. + d3dx9_36: Rename variables in D3DXGetShaderConstantTable(Ex) to match naming convention used in the file. + d3dx9: Fix typo in ID3DXConstantTable_SetMatrixTranspose macro. + d3dx9: Add some shader definitions. + d3dx9_36/tests: Fix contant table header in ctab data. + d3dx9_36: Add stub for D3DXCreateTextureFromFileInMemoryEx. + d3dx9_36: Implement ID3DXConstantTableImpl_GetDesc + tests. + d3dx9_36: Add missing GetSamplerIndex method to ID3DXConstantTable. + d3dx9_36: Fix method name. + d3dx9_36: Use %u to print unsigned integer. + d3dx9: Add d3dx9effect.h include file. + d3dx9_36: Add stub for D3DXCreateEffect. + attrib.exe: Add stubbed command. + +Damjan Jovanovic (4): + setupapi: Stub out SetupDiRemoveDevice. + ntoskrnl.exe: Implement IoIsWdmVersionAvailable. + usbd.sys: Add stub usbd.sys. + usbd.sys: Add USB descriptor parsing functions. + +David Hedberg (3): + wine.inf: Add key for approved shell extensions. + shell32: SHCreatePropSheetExtArrayEx should check if the key itself contains the clsid of the shell extension. + shell32: Initial support for the properties command in the IContextMenu for shellview. + +Detlef Riekenberg (7): + msvcr70: Add msvcr70.dll with forwards to msvcrt.dll. + msvcr80: Add msvcr80.dll with forwards to msvcrt.dll. + msvcr90: Add msvcr90.dll with forwards to msvcrt.dll. + msvcr90: Implement _initterm_e. + msvcr80: Forward _initterm_e to msvcr90.dll. + msvcr90: Forward _malloc_crt to msvcrt.malloc. + msvcr80: Forward _malloc_crt functions to msvcrt.malloc. + +Dmitry Timoshkov (2): + gdi32: Fix GDI locking in SetBitmapBits. + user32: Restore special handling of monochrome bitmaps removed by c2202929ab4b6d1ce379865dfd8904186814f265. + +Eric Pouech (14): + dbghelp: Added full support for DW_FORM_data8 attributes, as well as primary support for DW_FORM_block* attributes. + dbghelp: Added helper to free module's specific data (ELF, MSC...) upon removal. + dbghelp: Store the file map in ELF's module specific data. + dbghelp: Make the ELF mapping code easier to use. + dbghelp: Extend the ELF image management to PE modules so we get a rather uniform interface to image manipulation. + dbghelp: Create the notion of image (PE, ELF modules) to uniformize some handlings. + dbghelp: Keep the file map around for every PE module, so that we can access image whenever we like to. + dbghelp: Extend the image (ELF/PE) scheme to get the RVA out of a section. + dbghelp: Let dwarf_parse decide on which sections it needs to map. + dbghelp: Now that we can keep ELF sections around, don't copy the loclist section, just don't unmap it. + dbghelp: Create new infrastructure to hold specific information for multiple file/debug formats in a single module, and use it to store dwarf2 stuff. + dbghelp: Move the PE debug info to the newly define scheme. + dbghelp: Moved the ELF's module information into the new scheme. + dbghelp: Move the mach-o information into the modfmt structure. + +Francois Gouget (2): + include: Also define the WSAxxx error codes in winerror.h. + server: Don't include winsock.h to avoid creating a dependency on generated headers. + +Gerald Pfeifer (4): + comdlg32: Removed unused parameters from PRINTDLG_WMInitDialogW and PRINTDLG_WMInitDialogA. + comdlg32: Removed unused parameters from FILEDLG95_OnWMSize, FILEDLG95_OnWMCommand, and FD32_WMMeasureItem. + comdlg32: Remove unused parameters from CFn_WMMeasureItem and CFn_WMDrawItem. + ntdll: Avoid compiler warning in the default case in append_entry. + +Henri Verbeet (43): + server: Debugging our own process is disallowed. + ddraw: Print unhandled vertex processing flags in IDirect3DExecuteBufferImpl_Execute(). + d3dx9_36: ID3DXBuffer is a base interface for ID3DXConstantTable. + d3dx9_36: Not implementing an interface is not an internal error. + wined3d: Kill pbuffer offscreen rendering support. + wined3d: Don't partially initialize contexts in AddContextToArray(). + wined3d: Move device context array functions to device.c. + ntdll: Fix the ProcessDebugPort information length in NtQueryInformationProcess(). + ntdll: Improve support for the ProcessDebugPort info class in NtQueryInformationProcess(). + kernel32: Implement CheckRemoteDebuggerPresent(). + wined3d: Use "gl_info" in some more places in context_create(). + wined3d: Add a separate function to set the pixel format in context_create(). + wined3d: Store the swapchain instead of the surface in the context. + wined3d: Use the context's window handle in stretch_rect_fbo(). + wined3d: Use the context's window handle in IWineD3DSurfaceImpl_BltOverride(). + wined3d: The swapchain should always have a window handle. + wined3d: Simplify a comparison in IWineD3DDeviceImpl_Reset(). + wined3d: Store the device window in the swapchain. + wined3d: Implement SetDestWindowOverride() by simply making the context current on a different window. + wined3d: Use "gl_filter" in the non-FBO path of swapchain_blit() as well. + wined3d: Don't use filtering on textures that need complex fixups in swapchain_blit(). + wined3d: Don't use framebuffer blit for backbuffer formats with fixups in swapchain_blit(). + wined3d: Add missing checkGLcall's to buffer_Map(). + wined3d: Simplify context_apply_attachment_filter_states() flow a bit. + wined3d: Simplify the IWineD3DDeviceImpl_ClearSurface() surface loading code. + wined3d: Don't change the draw buffer in IWineD3DDeviceImpl_SetFrontBackBuffers(). + wined3d: Cleanup IWineD3DDeviceImpl_SetFrontBackBuffers(). + ddraw: Implement IDirectDrawImpl_GetSurfaceFromDC(). + ddraw: Fix IDirectDraw4Impl_GetSurfaceFromDC(). + user32/tests: Add a test for foreground windows on a different thread. + d3d8/tests: Extend the window proc / focus window tests. + d3d9/tests: Extend the window proc / focus window tests. + wined3d: Make the focus window also the foreground window. + ddraw: Acquire/release the focus window from the correct location. + wined3d: Unify GLINFO_LOCATION in surface.c. + wined3d: Add a quirk to rebind FBOs when one of their attached textures is updated. + wined3d: Replace some VTRACEs with proper TRACEs. + wined3d: Kill VTRACE. + wined3d: Avoid some common invalid context accesses. + wined3d: Simplify the generated GLSL for NRM. + wined3d: Rename GlPixelFormatDesc to wined3d_format_desc. + wined3d: Unify "gl_formats_template" naming with the other format info tables. + wined3d: Add COMPLEX_FIXUP_NONE as value 0 to the complex_fixup enum. + +Henry Kroll III (1): + notepad: Don't prompt to save empty Untitled file. + +Huw Davies (2): + wineps.drv: Retrieve the full printer name to avoid truncation when the name is 32 characters or longer. + dispex: Implement proxy and stub for IDispatchEx_InvokeEx. + +Ilya Basin (1): + shell32/tests: Add tests for the parser of SHELLEXECUTEINFO.lpFile. + +Jacek Caban (21): + mshtml: Fixed ref count leak. + mshtml: Ignore EndLoad call if document is already detached. + shdocvw: Use heap_alloc_zero to allocate DocHost objects. + shdocvw: Store object passed in DOCHOST_DOCCANNAVIGATE command. + shdocvw: Separate document state from control state. + shdocvw: Pass post data as SAFEARRAY to on_before_navigate2. + shdocvw: Use IHTMLPrivateWindow for navigation in navigate_hlink if available. + shdocvw: Use IHTMLPrivateWindow for navigation in navigate_url if available. + shdocvw: Added more navigation tests. + mshtml: Ignore load event on detached documents. + mshtml: Return S_OK from IHTMLDocument2::get_referrer. + mshtml: Forward setting document.location to window object. + mshtml: Use user agent string in IOmNavigator::get_appVersion. + shdocvw: Fixed tests on some Windows. + mshtml: Make sure that readState is READYSTATE_LOADING in read_stream_data. + mshtml: Fire readystatechange event on document nodes. + mshtml: Moved removing event target to separated function. + mshtml: Added support for load event on all nodes. + mshtml: Added IHTMLImgElement::onload property implementation. + mshtml: Added IHTMLImgElement::onload tests. + cmd: Added @or_broken@ handling to test templates and use it to fix tests on win2k. + +Jeff Latimer (2): + usp10: Change default glyph returned from 0xffff to 0. + comctl32: cchTextMax needs to be set for LVS_OWNERDATA as it uses LVN_GETDISPINFO notifications. + +Juan Lang (13): + iphlpapi: Check for ifr_hwaddr member of struct ifreq. + iphlpapi: Rename a function and variables to make it clearer they're related to IPv4 addresses. + iphlpapi: Pass address family to adapterAddressesFromIndex. + iphlpapi: Implement GetAdaptersAddresses for IPv6 addresses. + rsaenh: Fix some test failures on Win9x/NT4. + rsaenh: Add simple tests for SHA-256, SHA-384, and SHA-512. + include: Add a few missing OIDs. + wininet: Handle proxy entries of the form =, and allow multiple proxies. + rsaenh: Add support for SHA-256, SHA-384, and SHA-512. + rsaenh: Add signature support for SHA-256, SHA-384, and SHA-512 hashes. + crypt32: Add constants to support SHA-256, SHA-384, and SHA-512. + crypt32: Switch to use the AES provider by default. + crypt32: Add support for the anyPolicy certificate policy. + +Julian Rüger (1): + windowscodecs: Small spelling fixes. + +Justin Chevrier (2): + gdiplus/tests: Expand GdipImageGetFrameCount test coverage. + gdiplus: Basic implementation of GdipImageGetFrameCount with updated tests. + +Jörg Höhle (6): + mciavi: Prevent deadlock when closing while playing or when paused. + mcicda: Prevent crash when closing while playing. + mciavi: Stubs should return a success code. + mciseq: MCI Set Port allows to select the MIDI device. + msvfw32: MCI Step is like Seek. + midimap: Allow GetVolume by device identifier. + +Maarten Lankhorst (9): + dsound: Improve underrun behavior. + mmdevapi: Implement property store. + mmdevapi: Add IMMEndpoint to IMMDevice. + mmdevapi: Implement some methods in IMMDevice. + mmdevapi: Implement MMDeviceCollection methods. + mmdevapi: Implement IMMDeviceEnumerator::GetDevice. + mmdevapi: Pass a property bag to IBaseFilter in IMMDevice::Activate. + midimap: Defer initialisation. + winmm: Allow SND_ALIAS|SND_FILENAME in PlaySound. + +Maciej Borsz (1): + winhttp: Fix invalid behaviour of WinHttpCrackUrl. + +Michael Stefaniuc (4): + ddraw: Remove redundant memset. + iphlpapi: Don't crash when enumerating PtP interfaces. + oleaut32: Remove superfluous NULL check before HeapFree (Smatch). + oleaut32: Plug some memleaks on error paths (Smatch). + +Nicolas Le Cam (1): + wine.inf: Define the Win64 DefaultInstall.Services section. + +Nikolay Sivov (24): + shell32/shellview: Improve error handling on some helpers, fix possible leak. + shell32/shellview: Use W-calls for menu handling, same for SendMessage to ListView window. + shell32: Initial test file for IShellView/IFolderView, implemented IFolderView::GetSpacing. + shell32/shellview: Remove unneeded memset, release browser reference on failure. + shell32/shellview: Implemented IFolderView::GetSelectionMarkedItem() with basic test. + shell32/shellview: Implemented IFolderView::GetFocusedItem. + shell32/shellview: Implement IFolderView::GetFolder() for IID_IShellFolder. + shell32/shellview: Implement IFolderView::ItemCount for SVGIO_ALLVIEW flag. + shell32/shellview: Don't crash on ::DragLeave called without droptraget. + shell32: Add SHCreateFileExtractIconW stub. + shlwapi: Partially implement SHGetObjectCompatFlags with tests. + avifil32: Registry access calls don't return HRESULT codes. + msi: Convert IWineMsiRemoteDatabase BSTR parameters to LPCWSTR to avoid typecast. + shlwapi: Don't cast WCHAR string to BSTR. + quartz: Don't cast WSTR to BSTR, convert properly instead. + comctl32/datetime: Use user locale for format. + msxml3: Treat input BSTR as general WCHAR string for ::loadXML(). + ole32: Turn FIXME to TRACE for CoGetTreatAsClass. + ole32: Remove useless parameter check. + urlmon: Add stub IUriBuilder interface. + urlmon: Add CoInternetIsFeatureEnabled stub. + shlwapi: Add a forward to DelayLoadFailureHook. + shlwapi: Fix StrCpyNW to deal with null inputs better, and don't use lstrcpynW. + shell32: Add IPersistFile::GetCurFile implementation for IShellLink. + +Paul Chitescu (3): + qedit: In SampleGrabber ReceiveConnection check early the format type, return VFW_E_INVALIDMEDIATYPE like native. + qedit: SampleGrabber pins should enumerate a preferred format only after the input pin is connected and a fully defined format is known. + qedit: Implement buffering in SampleGrabber. + +Paul Vriens (13): + msi/tests: Remove a key after running tests. + advapi32/tests: Restore default cryptographic provider after the tests. + oleaut32/tests: Don't add typelib information to the registry. + shlwapi/tests: Fix a test failure on NT4. + mshtml/tests: Fix some test failures on Win9x/WinMe by using a A-function. + kernel32/tests: Run tests again on Win95. + gdiplus/tests: Fix a test failure on Win98/WinMe. + rsaenh/tests: Fix some test failures on XP (pre SP3). + shlwapi/tests: Fix some test failures on XP/Vista. + shlwapi/tests: Fix some test failures on Vista+. + d3d8/tests: Fix timeouts on Win9x/WinMe. + d3d9/tests: Fix timeouts on Win9x/WinMe. + user32/tests: Fix timeouts on Win9x/WinMe. + +Piotr Caban (16): + oleaut32: Simplify ICreateTypeInfo2_SetTypeFlags implementation. + oleaut32: Improve TypeInfos with changed TypeKind handling. + oleaut32: Improve dual interfaces creation in typelib. + oleaut32: Added ICreateTypeInfo2_SetFuncHelpContext implementation. + oleaut32: Fix some reference leaks. + oleaut32: Fix importinfo flags. + oleaut32: Remove incorrect memid validation. + oleaut32: Use QueryPathOfRegTypeLib in ICreateTypeInfo2_AddRefTypeInfo. + oleaut32: Improved ICreateTypeInfo AddFuncDesc implementation. + oleaut32: Improve ICreateTypeInfo_LayOut implementation. + oleaut32: Set parameter to NULL in GetMops stub. + oleaut32: Improve ITypeInfo2 GetTypeAttr implementation. + oleaut32/tests: Make tests working on older systems, prevent crash on some wine boxes. + oleaut32: Fix ITypeInfo GetImplTypeFlags for dispinterfaces. + oleaut32: Improve ICreateTypeInfo2 AddImplType implementation. + oleaut32: Improve ITypeInfo2 GetRefTypeOfImplType implementation. + +Ričardas Barkauskas (2): + wined3d: Fix ATI2N pitch and offset calculations. + d3d9/tests: Test ATI2N pitch and locking offset behaviour. + +Rob Shearman (16): + widl: Remove some unused functions, definitions and types. + widl: Make write_pointer_tfs more readable. + widl: Simplify write_typeformatstring_var. + widl: Write pointers in write_typeformatstring_var using write_pointer_tfs. + widl: Don't use the return value of write_embedded_types to determine whether a type contains pointers or not. + widl: Merge write_typeformatstring_var and write_embedded_types into one function, write_type_tfs. + widl: Use typegen_detect_type to determine which types should be written for the pointer description in write_struct_tfs. + widl: Pass current_structure into write_conf_or_var_desc in write_ip_tfs. + widl: error_status_t isn't an allowed conformance type. + widl: Fix the writing of expressions in un-typedef'd structures by using write_type_left to write out the type, which adds the "struct ..." if necessary. + widl: Remove some FIXME comments and replace them with comments explaining why the current behaviour is correct. + widl: Clean up array case in write_remoting_arg. + widl: Simplify write_parameter_conf_or_var_exprs by making use of typegen_detect_type. + widl: Remove a FIXME comment in write_function_stubs. + rpcrt4: Add support for marshalling/unmarshalling complex arrays of pointers. + rpcrt4: Add tests for a complex array of pointers. + +Roderick Colenbrander (9): + wgl: Add more OpenGL diagnosing checks. + opengl32: Add OpenGL 3.3/4.0 extensions. + wined3d: Extend surface_get_depth_blt_info with texture coordinate code from surface_blt_to_drawable. + wined3d: Use surface_get_blt_info to compute texture coordinates for surface_blt_to_drawable. + wined3d: Remove oversize texture support. + wined3d: Add a helper function for drawing a textured quad. + wined3d: Use draw_textured_quad in BltOverride. + wined3d: Start moving paletted texture support to the blit_shader. + wined3d: Get rid of d3dfmt_get_conv in RealizePalette. + +Sandijs Ribaks (1): + wined3d: Add surface conversion function from WINED3DFMT_YUY2 to WINED3DFMT_B8G8R8X8_UNORM. + +Stefan Dösinger (11): + d3d9: Fix test failures on Windows 7. + wined3d: Don't DISCARD or NOOVERWRITE non-dynamic buffers. + wined3d: Use glMapBuffer for 1:1 uploads in PreLoad. + wined3d: Implement unfenced updates of double buffered buffers. + wined3d: Check the alignment of mapped buffer pointers. + wined3d: Merge two if conditions in buffer.c. + wined3d: Make resources 16 byte aligned. + ddraw: Use a D24X8 depth buffer. + d3d9: Remove the double unlock test. + d3d9: Windows 7 rejects invalid rectangles. + d3d9: Remove old debug messages from the tests. + +Trey Hunner (1): + ping: Add skeleton ping command. + +Vincent Povirk (19): + ole32: Allow CopyTo to succeed in spite of already open source streams. + gdiplus: Don't crash when creating a texture with NULL imageattributes. + gdiplus: Add a test for GdipGetMetafileHeaderFromMetafile. + gdiplus: Zero the MetafileHeader structure in GetMetafileHeader. + include: Add definitions for IWICBitmap. + ole32: Don't treat the header as a big block in StorageImpl_LoadFileHeader. + ole32: Don't treat the header as a big block in StorageImpl_SaveFileHeader. + ole32: Fix the big block offset calculation. + ole32: Remove the unused BlockBits structures from BigBlockFile objects. + ole32: Remove the BIG_BLOCK_SIZE define. + ole32: Remove the NUM_BLOCKS_PER_DEPOT_BLOCK define. + ole32: Remove knowledge of block sizes from the BigBlockFile object. + ole32: Allow storage files with a block size of 4096 to open. + oleaut32: Return type mismatch errors in ITypeLibComp_fnBind. + oleaut32: Always use DISPID_PROPERTYPUT to fill in the last argument. + winex11.drv: ReadSelectionData should fail if the import function fails. + winex11.drv: Use CurrentTime to focus windows if we have no timestamp. + include: Add definitions for IWICBitmapScaler. + windowscodecs: Make component enumerators thread-safe. + +Yann Droneaud (5): + cmd: Fixed uninitialised field in WCMD_addCommand() (Valgrind). + configure: Fixed test. + cmd: Added some expansion tests. + cmd: Remove %CD% test. + cmd: Add another expansion test. + +-- +Alexandre Julliard +julliard@winehq.org diff --git a/Makefile.in b/Makefile.in index d93ea8153d4..2768b176e54 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,15 +148,13 @@ $(ALL_TEST_DIRS:%=%/__test__): dummy $(ALL_TEST_DIRS:%=%/__crosstest__): dummy @cd `dirname $@` && $(MAKE) crosstest -$(ALL_TEST_DIRS:%=%/__testclean__): dummy - @cd `dirname $@` && $(MAKE) testclean - check test:: $(ALL_TEST_DIRS:%=%/__test__) crosstest:: $(ALL_TEST_DIRS:%=%/__crosstest__) -testclean:: $(ALL_TEST_DIRS:%=%/__testclean__) -.PHONY: check test testclean crosstest $(ALL_TEST_DIRS:%=%/__test__) \ - $(ALL_TEST_DIRS:%=%/__crosstest__) $(ALL_TEST_DIRS:%=%/__testclean__) +testclean:: + $(RM) $(ALL_TEST_DIRS:%=%/*.ok) + +.PHONY: check test testclean crosstest $(ALL_TEST_DIRS:%=%/__test__) $(ALL_TEST_DIRS:%=%/__crosstest__) # Rules for auto documentation @@ -224,15 +222,6 @@ tools/wmc/__install__ tools/wmc/__install-dev__: tools/wmc tools/wrc/__install__ tools/wrc/__install-dev__: tools/wrc tools/__depend__: $(MAKEDEP) -RECURSE_TARGETS = \ - __clean__ \ - __install__ \ - __instal-dev__ \ - __install-lib__ \ - __uninstall__ \ - __testclean__ \ - __crosstest__ - $(MAKEDEP): include/config.h tools/Makefile @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT) diff --git a/VERSION b/VERSION index d4875452867..1da60fa92d9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Wine version 1.1.40 +Wine version 1.1.41 diff --git a/aclocal.m4 b/aclocal.m4 index 1aba0830a93..9ad2a80e99e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -156,7 +156,7 @@ wine_fn_config_makefile () ac_deps=$[2] wine_fn_append_file ALL_DIRS $ac_dir wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ -"\$(RECURSE_TARGETS:%=$ac_dir/%) $ac_dir: $ac_dir/Makefile +"$ac_dir/__clean__ $ac_dir/__install__ $ac_dir/__install-dev__ $ac_dir/__install-lib__ $ac_dir/__uninstall__ $ac_dir: $ac_dir/Makefile $ac_dir/Makefile $ac_dir/__depend__: $ac_dir/Makefile.in config.status $ac_deps @./config.status --file $ac_dir/Makefile && cd $ac_dir && \$(MAKE) depend" } @@ -172,6 +172,52 @@ dlls/$ac_name/lib$ac_name.cross.a: dlls/$ac_name/Makefile dummy @cd dlls/$ac_name && \$(MAKE) lib$ac_name.cross.a" } +wine_fn_config_dll () +{ + ac_dir=$[1] + ac_implib=$[2] + ac_implibsrc=$[3] + ac_file="dlls/$ac_dir/lib$ac_implib" + ac_deps="tools/widl tools/winebuild tools/winegcc include" + + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"dlls/$ac_dir dlls/$ac_dir/__install__ dlls/$ac_dir/__install-lib__ dlls/$ac_dir/__install-dev__: __builddeps__" + + if test -n "$ac_implibsrc" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps +$ac_file.def: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile + @cd dlls/$ac_dir && \$(MAKE) \`basename \$[@]\` +$ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/Makefile dummy + @cd dlls/$ac_dir && \$(MAKE) \`basename \$[@]\`" + elif test -n "$ac_implib" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_file.$IMPLIBEXT $ac_file.cross.a: $ac_deps +$ac_file.$IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile + @cd dlls/$ac_dir && \$(MAKE) \`basename \$[@]\`" + + if test "$ac_dir" != "$ac_implib" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"dlls/lib$ac_implib.$IMPLIBEXT: $ac_file.$IMPLIBEXT + \$(RM) \$[@] && \$(LN_S) $ac_dir/lib$ac_implib.$IMPLIBEXT \$[@] +dlls/lib$ac_implib.cross.a: $ac_file.cross.a + \$(RM) \$[@] && \$(LN_S) $ac_dir/lib$ac_implib.cross.a \$[@] +clean:: + \$(RM) dlls/lib$ac_implib.$IMPLIBEXT" + fi + fi +} + +wine_fn_config_program () +{ + ac_dir=$[1] + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"programs/$ac_dir programs/$ac_dir/__install__ programs/$ac_dir/__install-lib__: __builddeps__" +} + wine_fn_config_test () { ac_dir=$[1] @@ -184,7 +230,7 @@ $ac_name.rc: echo \"$ac_name.exe TESTRES \\\"$ac_name.exe\\\"\" >\$[@] || (\$(RM) \$[@] && false) $ac_name.res: $ac_name.rc $ac_name.exe" wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir: __builddeps__" - wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir/__crosstest__: __buildcrossdeps__" + wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir/__crosstest__: __buildcrossdeps__ $ac_dir/Makefile" }]) dnl **** Define helper function to append a file to a makefile file list **** @@ -245,41 +291,21 @@ dnl **** Create a dll makefile from config.status **** dnl dnl Usage: WINE_CONFIG_DLL(name,enable,implib,implibsrc) dnl -AC_DEFUN([WINE_CONFIG_DLL], -[m4_pushdef([ac_implib],m4_ifval([$3],[dlls/$1/lib$3.$IMPLIBEXT]))dnl -m4_pushdef([ac_crosslib],m4_ifval([$3],[dlls/$1/lib$3.cross.a]))dnl -m4_pushdef([ac_staticlib],m4_ifval([$4],[dlls/$1/lib$3.$STATIC_IMPLIBEXT]))dnl -m4_pushdef([ac_symlink],m4_if([$1],[$3],,[dlls/lib$3.$IMPLIBEXT]))dnl +AC_DEFUN([WINE_CONFIG_DLL],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl +m4_pushdef([ac_implib],m4_ifval([$3],[dlls/$1/lib$3.$IMPLIBEXT]))dnl m4_ifval(ac_implib,[m4_ifval([$2],[test "x$[$2]" != xno && ])WINE_APPEND_FILE(ALL_IMPORT_LIBS,ac_implib)dnl -m4_ifval(ac_symlink,[ && WINE_APPEND_FILE(ALL_IMPORT_LIBS,ac_symlink)])dnl -m4_ifval(ac_staticlib,[ && WINE_APPEND_FILE(ALL_IMPORT_LIBS,ac_staticlib)]) -])WINE_APPEND_RULE(ALL_MAKEFILE_DEPENDS, -[m4_ifval(ac_implib,[ac_implib m4_ifval(ac_staticlib,[ac_staticlib ])ac_crosslib: tools/widl tools/winebuild tools/winegcc include -m4_ifval(ac_symlink,[ac_symlink: ac_implib - \$(RM) \$[@] && \$(LN_S) $1/lib$3.$IMPLIBEXT \$[@] -dlls/lib$3.cross.a: ac_crosslib - \$(RM) \$[@] && \$(LN_S) $1/lib$3.cross.a \$[@] -clean:: - \$(RM) ac_symlink -])m4_ifval(ac_staticlib,[dlls/$1/lib$3.def: dlls/$1/$1.spec dlls/$1/Makefile - @cd dlls/$1 && \$(MAKE) \`basename \$[@]\` -ac_staticlib ac_crosslib: dlls/$1/Makefile dummy - @cd dlls/$1 && \$(MAKE) \`basename \$[@]\`], -[ac_implib ac_crosslib: dlls/$1/$1.spec dlls/$1/Makefile - @cd dlls/$1 && \$(MAKE) \`basename \$[@]\`]) -])dlls/$1 dlls/$1/__install__ dlls/$1/__install-lib__ dlls/$1/__install-dev__: __builddeps__]) +m4_if([$1],[$3],,[ && WINE_APPEND_FILE(ALL_IMPORT_LIBS,[dlls/lib$3.$IMPLIBEXT])])dnl +m4_ifval([$4],[ && WINE_APPEND_FILE(ALL_IMPORT_LIBS,[dlls/$1/lib$3.$STATIC_IMPLIBEXT])]) +])wine_fn_config_dll [$1] [$3] m4_ifval([$4],["$4"]) WINE_CONFIG_MAKEFILE([dlls/$1/Makefile],[dlls/Makedll.rules],[ALL_DLL_DIRS],[$2])dnl -m4_popdef([ac_implib])dnl -m4_popdef([ac_crosslib])dnl -m4_popdef([ac_staticlib])dnl -m4_popdef([ac_symlink])]) +m4_popdef([ac_implib])]) dnl **** Create a program makefile from config.status **** dnl dnl Usage: WINE_CONFIG_PROGRAM(name,var,enable) dnl -AC_DEFUN([WINE_CONFIG_PROGRAM], -[WINE_APPEND_RULE(ALL_MAKEFILE_DEPENDS,[programs/$1 programs/$1/__install__ programs/$1/__install-lib__: __builddeps__]) +AC_DEFUN([WINE_CONFIG_PROGRAM],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl +wine_fn_config_program [$1] WINE_CONFIG_MAKEFILE([programs/$1/Makefile],[programs/Makeprog.rules],[$2],[$3])]) dnl **** Create a test makefile from config.status **** diff --git a/configure b/configure index 058a96e79a8..e67ec96729a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for Wine 1.1.40. +# Generated by GNU Autoconf 2.65 for Wine 1.1.41. # # Report bugs to . # @@ -552,8 +552,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Wine' PACKAGE_TARNAME='wine' -PACKAGE_VERSION='1.1.40' -PACKAGE_STRING='Wine 1.1.40' +PACKAGE_VERSION='1.1.41' +PACKAGE_STRING='Wine 1.1.41' PACKAGE_BUGREPORT='wine-devel@winehq.org' PACKAGE_URL='http://www.winehq.org' @@ -612,7 +612,6 @@ ALL_WINETEST_DEPENDS ALL_MAKEFILE_DEPENDS ALL_SYMLINKS ALL_MAKERULES -DEPENDENCIES LDAPLIBS LIBPOLL LIBDL @@ -1377,7 +1376,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Wine 1.1.40 to adapt to many kinds of systems. +\`configure' configures Wine 1.1.41 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1445,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 1.1.40:";; + short | recursive ) echo "Configuration of Wine 1.1.41:";; esac cat <<\_ACEOF @@ -1589,7 +1588,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 1.1.40 +Wine configure 1.1.41 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2109,7 +2108,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Wine $as_me 1.1.40, which was +It was created by Wine $as_me 1.1.41, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -5697,6 +5696,9 @@ done for ac_header in \ AL/al.h \ + AudioToolbox/AudioConverter.h \ + AudioToolbox/AudioFile.h \ + AudioToolbox/AudioFileStream.h \ AudioUnit/AudioUnit.h \ Carbon/Carbon.h \ CoreAudio/CoreAudio.h \ @@ -6073,6 +6075,20 @@ fi done +for ac_header in ifaddrs.h +do : + ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "#include +" +if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IFADDRS_H 1 +_ACEOF + +fi + +done + + for ac_header in ucontext.h do : ac_fn_c_check_header_compile "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "#include @@ -6444,6 +6460,24 @@ fi then COREAUDIO="-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI" + ac_save_LIBS="$LIBS" + if test "$ac_cv_header_AudioToolbox_AudioFile_h" = "yes" + then + LIBS="$LIBS $COREAUDIO" + for ac_func in AudioFileStreamOpen +do : + ac_fn_c_check_func "$LINENO" "AudioFileStreamOpen" "ac_cv_func_AudioFileStreamOpen" +if test "x$ac_cv_func_AudioFileStreamOpen" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AUDIOFILESTREAMOPEN 1 +_ACEOF + +fi +done + + LIBS="$ac_save_LIBS" + fi + test "x$ac_cv_func_AudioFileStreamOpen" = xyes || as_fn_append wine_notices "|AudioToolbox version too old, mp3 codec won't be supported." fi if test "$ac_cv_header_OpenAL_al_h" = "yes" then @@ -10128,6 +10162,9 @@ if test "${ac_cv_c_ppdev+set}" = set; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#ifdef HAVE_SYS_IOCTL_H +# include +#endif #include int main () @@ -11304,7 +11341,7 @@ if test "x$ac_cv_lib_mpg123_mpg123_feed" = x""yes; then : fi fi -if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes; then : +if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes; then : case "x$with_mpg123" in x) as_fn_append wine_notices "|libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported." ;; xno) ;; @@ -11312,7 +11349,7 @@ if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes; then : This is an error since --with-mpg123 was requested." "$LINENO" 5 ;; esac fi -test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no} +test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes -o "x$ac_cv_func_AudioFileStreamOpen" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no} if test "$ac_cv_header_AL_al_h" = "yes" then @@ -13462,6 +13499,23 @@ _ACEOF fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NET_IF_H +# include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 +_ACEOF + + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone variable" >&5 $as_echo_n "checking for timezone variable... " >&6; } if test "${ac_cv_have_timezone+set}" = set; then : @@ -13757,14 +13811,6 @@ fi ;; esac -DEPENDENCIES="### Dependencies: -\$(OBJS) \$(CROSSOBJS): \$(IDL_GEN_HEADERS) \$(BISON_SRCS:.y=.tab.h) -\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS) -\$(RC_SRCS:.rc=.res): \$(IDL_TLB_SRCS:.idl=.tlb) -\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c) -\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)" - - ALL_MAKERULES="" ALL_SYMLINKS="" @@ -13820,7 +13866,7 @@ wine_fn_config_makefile () ac_deps=$2 wine_fn_append_file ALL_DIRS $ac_dir wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ -"\$(RECURSE_TARGETS:%=$ac_dir/%) $ac_dir: $ac_dir/Makefile +"$ac_dir/__clean__ $ac_dir/__install__ $ac_dir/__install-dev__ $ac_dir/__install-lib__ $ac_dir/__uninstall__ $ac_dir: $ac_dir/Makefile $ac_dir/Makefile $ac_dir/__depend__: $ac_dir/Makefile.in config.status $ac_deps @./config.status --file $ac_dir/Makefile && cd $ac_dir && \$(MAKE) depend" } @@ -13836,6 +13882,52 @@ dlls/$ac_name/lib$ac_name.cross.a: dlls/$ac_name/Makefile dummy @cd dlls/$ac_name && \$(MAKE) lib$ac_name.cross.a" } +wine_fn_config_dll () +{ + ac_dir=$1 + ac_implib=$2 + ac_implibsrc=$3 + ac_file="dlls/$ac_dir/lib$ac_implib" + ac_deps="tools/widl tools/winebuild tools/winegcc include" + + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"dlls/$ac_dir dlls/$ac_dir/__install__ dlls/$ac_dir/__install-lib__ dlls/$ac_dir/__install-dev__: __builddeps__" + + if test -n "$ac_implibsrc" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps +$ac_file.def: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile + @cd dlls/$ac_dir && \$(MAKE) \`basename \$@\` +$ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/Makefile dummy + @cd dlls/$ac_dir && \$(MAKE) \`basename \$@\`" + elif test -n "$ac_implib" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_file.$IMPLIBEXT $ac_file.cross.a: $ac_deps +$ac_file.$IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile + @cd dlls/$ac_dir && \$(MAKE) \`basename \$@\`" + + if test "$ac_dir" != "$ac_implib" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"dlls/lib$ac_implib.$IMPLIBEXT: $ac_file.$IMPLIBEXT + \$(RM) \$@ && \$(LN_S) $ac_dir/lib$ac_implib.$IMPLIBEXT \$@ +dlls/lib$ac_implib.cross.a: $ac_file.cross.a + \$(RM) \$@ && \$(LN_S) $ac_dir/lib$ac_implib.cross.a \$@ +clean:: + \$(RM) dlls/lib$ac_implib.$IMPLIBEXT" + fi + fi +} + +wine_fn_config_program () +{ + ac_dir=$1 + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"programs/$ac_dir programs/$ac_dir/__install__ programs/$ac_dir/__install-lib__: __builddeps__" +} + wine_fn_config_test () { ac_dir=$1 @@ -13848,7 +13940,7 @@ $ac_name.rc: echo \"$ac_name.exe TESTRES \\\"$ac_name.exe\\\"\" >\$@ || (\$(RM) \$@ && false) $ac_name.res: $ac_name.rc $ac_name.exe" wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir: __builddeps__" - wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir/__crosstest__: __buildcrossdeps__" + wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir/__crosstest__: __buildcrossdeps__ $ac_dir/Makefile" } ac_config_links="$ac_config_links dlls/wineps.drv/generic.ppd:dlls/wineps.drv/generic.ppd" test "$srcdir" = "." || wine_fn_append_file ALL_SYMLINKS "dlls/wineps.drv/generic.ppd" @@ -13905,27 +13997,21 @@ ac_config_files="$ac_config_files programs/Makeprog.rules" wine_fn_append_rule ALL_MAKEFILE_DEPENDS "Makefile: Makefile.in Make.rules config.status" ac_config_files="$ac_config_files Makefile" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/acledit dlls/acledit/__install__ dlls/acledit/__install-lib__ dlls/acledit/__install-dev__: __builddeps__" +wine_fn_config_dll acledit wine_fn_config_makefile dlls/acledit "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_acledit" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/acledit" wine_fn_append_file ALL_IMPORT_LIBS "dlls/aclui/libaclui.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/aclui/libaclui.$IMPLIBEXT dlls/aclui/libaclui.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/aclui/libaclui.$IMPLIBEXT dlls/aclui/libaclui.cross.a: dlls/aclui/aclui.spec dlls/aclui/Makefile - @cd dlls/aclui && \$(MAKE) \`basename \$@\` -dlls/aclui dlls/aclui/__install__ dlls/aclui/__install-lib__ dlls/aclui/__install-dev__: __builddeps__" +wine_fn_config_dll aclui aclui wine_fn_config_makefile dlls/aclui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_aclui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/aclui" wine_fn_append_file ALL_IMPORT_LIBS "dlls/activeds/libactiveds.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/activeds/libactiveds.$IMPLIBEXT dlls/activeds/libactiveds.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/activeds/libactiveds.$IMPLIBEXT dlls/activeds/libactiveds.cross.a: dlls/activeds/activeds.spec dlls/activeds/Makefile - @cd dlls/activeds && \$(MAKE) \`basename \$@\` -dlls/activeds dlls/activeds/__install__ dlls/activeds/__install-lib__ dlls/activeds/__install-dev__: __builddeps__" +wine_fn_config_dll activeds activeds wine_fn_config_makefile dlls/activeds "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_activeds" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/activeds" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/actxprxy dlls/actxprxy/__install__ dlls/actxprxy/__install-lib__ dlls/actxprxy/__install-dev__: __builddeps__" +wine_fn_config_dll actxprxy wine_fn_config_makefile dlls/actxprxy "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_actxprxy" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/actxprxy" @@ -13934,10 +14020,7 @@ wine_fn_config_makefile dlls/adsiid "dlls/Makeimplib.rules \$(MAKEDEP)" test "x$enable_adsiid" != xno && wine_fn_append_file ALL_STATICLIB_DIRS "dlls/adsiid" wine_fn_append_file ALL_IMPORT_LIBS "dlls/advapi32/libadvapi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/advapi32/libadvapi32.$IMPLIBEXT dlls/advapi32/libadvapi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/advapi32/libadvapi32.$IMPLIBEXT dlls/advapi32/libadvapi32.cross.a: dlls/advapi32/advapi32.spec dlls/advapi32/Makefile - @cd dlls/advapi32 && \$(MAKE) \`basename \$@\` -dlls/advapi32 dlls/advapi32/__install__ dlls/advapi32/__install-lib__ dlls/advapi32/__install-dev__: __builddeps__" +wine_fn_config_dll advapi32 advapi32 wine_fn_config_makefile dlls/advapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_advapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/advapi32" @@ -13946,10 +14029,7 @@ wine_fn_config_makefile dlls/advapi32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/advapi32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/advpack/libadvpack.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/advpack/libadvpack.$IMPLIBEXT dlls/advpack/libadvpack.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/advpack/libadvpack.$IMPLIBEXT dlls/advpack/libadvpack.cross.a: dlls/advpack/advpack.spec dlls/advpack/Makefile - @cd dlls/advpack && \$(MAKE) \`basename \$@\` -dlls/advpack dlls/advpack/__install__ dlls/advpack/__install-lib__ dlls/advpack/__install-dev__: __builddeps__" +wine_fn_config_dll advpack advpack wine_fn_config_makefile dlls/advpack "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_advpack" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/advpack" @@ -13957,7 +14037,7 @@ wine_fn_config_test dlls/advpack/tests advpack_test wine_fn_config_makefile dlls/advpack/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/advpack/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/amstream dlls/amstream/__install__ dlls/amstream/__install-lib__ dlls/amstream/__install-dev__: __builddeps__" +wine_fn_config_dll amstream wine_fn_config_makefile dlls/amstream "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_amstream" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/amstream" @@ -13965,35 +14045,26 @@ wine_fn_config_test dlls/amstream/tests amstream_test wine_fn_config_makefile dlls/amstream/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/amstream/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/appwiz.cpl dlls/appwiz.cpl/__install__ dlls/appwiz.cpl/__install-lib__ dlls/appwiz.cpl/__install-dev__: __builddeps__" +wine_fn_config_dll appwiz.cpl wine_fn_config_makefile dlls/appwiz.cpl "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_appwiz_cpl" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/appwiz.cpl" wine_fn_append_file ALL_IMPORT_LIBS "dlls/atl/libatl.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/atl/libatl.$IMPLIBEXT dlls/atl/libatl.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/atl/libatl.$IMPLIBEXT dlls/atl/libatl.cross.a: dlls/atl/atl.spec dlls/atl/Makefile - @cd dlls/atl && \$(MAKE) \`basename \$@\` -dlls/atl dlls/atl/__install__ dlls/atl/__install-lib__ dlls/atl/__install-dev__: __builddeps__" +wine_fn_config_dll atl atl wine_fn_config_makefile dlls/atl "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_atl" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/atl" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/authz dlls/authz/__install__ dlls/authz/__install-lib__ dlls/authz/__install-dev__: __builddeps__" +wine_fn_config_dll authz wine_fn_config_makefile dlls/authz "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_authz" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/authz" wine_fn_append_file ALL_IMPORT_LIBS "dlls/avicap32/libavicap32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/avicap32/libavicap32.$IMPLIBEXT dlls/avicap32/libavicap32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/avicap32/libavicap32.$IMPLIBEXT dlls/avicap32/libavicap32.cross.a: dlls/avicap32/avicap32.spec dlls/avicap32/Makefile - @cd dlls/avicap32 && \$(MAKE) \`basename \$@\` -dlls/avicap32 dlls/avicap32/__install__ dlls/avicap32/__install-lib__ dlls/avicap32/__install-dev__: __builddeps__" +wine_fn_config_dll avicap32 avicap32 wine_fn_config_makefile dlls/avicap32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_avicap32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/avicap32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/avifil32/libavifil32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/avifil32/libavifil32.$IMPLIBEXT dlls/avifil32/libavifil32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/avifil32/libavifil32.$IMPLIBEXT dlls/avifil32/libavifil32.cross.a: dlls/avifil32/avifil32.spec dlls/avifil32/Makefile - @cd dlls/avifil32 && \$(MAKE) \`basename \$@\` -dlls/avifil32 dlls/avifil32/__install__ dlls/avifil32/__install-lib__ dlls/avifil32/__install-dev__: __builddeps__" +wine_fn_config_dll avifil32 avifil32 wine_fn_config_makefile dlls/avifil32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_avifil32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/avifil32" @@ -14001,23 +14072,20 @@ wine_fn_config_test dlls/avifil32/tests avifil32_test wine_fn_config_makefile dlls/avifil32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/avifil32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/avifile.dll16 dlls/avifile.dll16/__install__ dlls/avifile.dll16/__install-lib__ dlls/avifile.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll avifile.dll16 wine_fn_config_makefile dlls/avifile.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/avifile.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/avrt/libavrt.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/avrt/libavrt.$IMPLIBEXT dlls/avrt/libavrt.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/avrt/libavrt.$IMPLIBEXT dlls/avrt/libavrt.cross.a: dlls/avrt/avrt.spec dlls/avrt/Makefile - @cd dlls/avrt && \$(MAKE) \`basename \$@\` -dlls/avrt dlls/avrt/__install__ dlls/avrt/__install-lib__ dlls/avrt/__install-dev__: __builddeps__" +wine_fn_config_dll avrt avrt wine_fn_config_makefile dlls/avrt "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_avrt" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/avrt" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/bcrypt dlls/bcrypt/__install__ dlls/bcrypt/__install-lib__ dlls/bcrypt/__install-dev__: __builddeps__" +wine_fn_config_dll bcrypt wine_fn_config_makefile dlls/bcrypt "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_bcrypt" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/bcrypt" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/browseui dlls/browseui/__install__ dlls/browseui/__install-lib__ dlls/browseui/__install-dev__: __builddeps__" +wine_fn_config_dll browseui wine_fn_config_makefile dlls/browseui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_browseui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/browseui" @@ -14026,10 +14094,7 @@ wine_fn_config_makefile dlls/browseui/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/browseui/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/cabinet/libcabinet.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cabinet/libcabinet.$IMPLIBEXT dlls/cabinet/libcabinet.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/cabinet/libcabinet.$IMPLIBEXT dlls/cabinet/libcabinet.cross.a: dlls/cabinet/cabinet.spec dlls/cabinet/Makefile - @cd dlls/cabinet && \$(MAKE) \`basename \$@\` -dlls/cabinet dlls/cabinet/__install__ dlls/cabinet/__install-lib__ dlls/cabinet/__install-dev__: __builddeps__" +wine_fn_config_dll cabinet cabinet wine_fn_config_makefile dlls/cabinet "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cabinet" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cabinet" @@ -14038,38 +14103,26 @@ wine_fn_config_makefile dlls/cabinet/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/cabinet/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/capi2032/libcapi2032.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/capi2032/libcapi2032.$IMPLIBEXT dlls/capi2032/libcapi2032.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/capi2032/libcapi2032.$IMPLIBEXT dlls/capi2032/libcapi2032.cross.a: dlls/capi2032/capi2032.spec dlls/capi2032/Makefile - @cd dlls/capi2032 && \$(MAKE) \`basename \$@\` -dlls/capi2032 dlls/capi2032/__install__ dlls/capi2032/__install-lib__ dlls/capi2032/__install-dev__: __builddeps__" +wine_fn_config_dll capi2032 capi2032 wine_fn_config_makefile dlls/capi2032 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_capi2032" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/capi2032" wine_fn_append_file ALL_IMPORT_LIBS "dlls/cards/libcards.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cards/libcards.$IMPLIBEXT dlls/cards/libcards.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/cards/libcards.$IMPLIBEXT dlls/cards/libcards.cross.a: dlls/cards/cards.spec dlls/cards/Makefile - @cd dlls/cards && \$(MAKE) \`basename \$@\` -dlls/cards dlls/cards/__install__ dlls/cards/__install-lib__ dlls/cards/__install-dev__: __builddeps__" +wine_fn_config_dll cards cards wine_fn_config_makefile dlls/cards "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cards" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cards" wine_fn_append_file ALL_IMPORT_LIBS "dlls/cfgmgr32/libcfgmgr32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cfgmgr32/libcfgmgr32.$IMPLIBEXT dlls/cfgmgr32/libcfgmgr32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/cfgmgr32/libcfgmgr32.$IMPLIBEXT dlls/cfgmgr32/libcfgmgr32.cross.a: dlls/cfgmgr32/cfgmgr32.spec dlls/cfgmgr32/Makefile - @cd dlls/cfgmgr32 && \$(MAKE) \`basename \$@\` -dlls/cfgmgr32 dlls/cfgmgr32/__install__ dlls/cfgmgr32/__install-lib__ dlls/cfgmgr32/__install-dev__: __builddeps__" +wine_fn_config_dll cfgmgr32 cfgmgr32 wine_fn_config_makefile dlls/cfgmgr32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cfgmgr32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cfgmgr32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/clusapi/libclusapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/clusapi/libclusapi.$IMPLIBEXT dlls/clusapi/libclusapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/clusapi/libclusapi.$IMPLIBEXT dlls/clusapi/libclusapi.cross.a: dlls/clusapi/clusapi.spec dlls/clusapi/Makefile - @cd dlls/clusapi && \$(MAKE) \`basename \$@\` -dlls/clusapi dlls/clusapi/__install__ dlls/clusapi/__install-lib__ dlls/clusapi/__install-dev__: __builddeps__" +wine_fn_config_dll clusapi clusapi wine_fn_config_makefile dlls/clusapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_clusapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/clusapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/comcat dlls/comcat/__install__ dlls/comcat/__install-lib__ dlls/comcat/__install-dev__: __builddeps__" +wine_fn_config_dll comcat wine_fn_config_makefile dlls/comcat "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_comcat" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/comcat" @@ -14078,10 +14131,7 @@ wine_fn_config_makefile dlls/comcat/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/comcat/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/comctl32/libcomctl32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/comctl32/libcomctl32.$IMPLIBEXT dlls/comctl32/libcomctl32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/comctl32/libcomctl32.$IMPLIBEXT dlls/comctl32/libcomctl32.cross.a: dlls/comctl32/comctl32.spec dlls/comctl32/Makefile - @cd dlls/comctl32 && \$(MAKE) \`basename \$@\` -dlls/comctl32 dlls/comctl32/__install__ dlls/comctl32/__install-lib__ dlls/comctl32/__install-dev__: __builddeps__" +wine_fn_config_dll comctl32 comctl32 wine_fn_config_makefile dlls/comctl32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_comctl32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/comctl32" @@ -14090,10 +14140,7 @@ wine_fn_config_makefile dlls/comctl32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/comctl32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/comdlg32/libcomdlg32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/comdlg32/libcomdlg32.$IMPLIBEXT dlls/comdlg32/libcomdlg32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/comdlg32/libcomdlg32.$IMPLIBEXT dlls/comdlg32/libcomdlg32.cross.a: dlls/comdlg32/comdlg32.spec dlls/comdlg32/Makefile - @cd dlls/comdlg32 && \$(MAKE) \`basename \$@\` -dlls/comdlg32 dlls/comdlg32/__install__ dlls/comdlg32/__install-lib__ dlls/comdlg32/__install-dev__: __builddeps__" +wine_fn_config_dll comdlg32 comdlg32 wine_fn_config_makefile dlls/comdlg32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_comdlg32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/comdlg32" @@ -14101,31 +14148,25 @@ wine_fn_config_test dlls/comdlg32/tests comdlg32_test wine_fn_config_makefile dlls/comdlg32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/comdlg32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/comm.drv16 dlls/comm.drv16/__install__ dlls/comm.drv16/__install-lib__ dlls/comm.drv16/__install-dev__: __builddeps__" +wine_fn_config_dll comm.drv16 wine_fn_config_makefile dlls/comm.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/comm.drv16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/commdlg.dll16 dlls/commdlg.dll16/__install__ dlls/commdlg.dll16/__install-lib__ dlls/commdlg.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll commdlg.dll16 wine_fn_config_makefile dlls/commdlg.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/commdlg.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/compobj.dll16 dlls/compobj.dll16/__install__ dlls/compobj.dll16/__install-lib__ dlls/compobj.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll compobj.dll16 wine_fn_config_makefile dlls/compobj.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/compobj.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/compstui/libcompstui.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/compstui/libcompstui.$IMPLIBEXT dlls/compstui/libcompstui.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/compstui/libcompstui.$IMPLIBEXT dlls/compstui/libcompstui.cross.a: dlls/compstui/compstui.spec dlls/compstui/Makefile - @cd dlls/compstui && \$(MAKE) \`basename \$@\` -dlls/compstui dlls/compstui/__install__ dlls/compstui/__install-lib__ dlls/compstui/__install-dev__: __builddeps__" +wine_fn_config_dll compstui compstui wine_fn_config_makefile dlls/compstui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_compstui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/compstui" wine_fn_append_file ALL_IMPORT_LIBS "dlls/credui/libcredui.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/credui/libcredui.$IMPLIBEXT dlls/credui/libcredui.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/credui/libcredui.$IMPLIBEXT dlls/credui/libcredui.cross.a: dlls/credui/credui.spec dlls/credui/Makefile - @cd dlls/credui && \$(MAKE) \`basename \$@\` -dlls/credui dlls/credui/__install__ dlls/credui/__install-lib__ dlls/credui/__install-dev__: __builddeps__" +wine_fn_config_dll credui credui wine_fn_config_makefile dlls/credui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_credui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/credui" @@ -14134,18 +14175,12 @@ wine_fn_config_makefile dlls/credui/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/credui/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/crtdll/libcrtdll.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/crtdll/libcrtdll.$IMPLIBEXT dlls/crtdll/libcrtdll.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/crtdll/libcrtdll.$IMPLIBEXT dlls/crtdll/libcrtdll.cross.a: dlls/crtdll/crtdll.spec dlls/crtdll/Makefile - @cd dlls/crtdll && \$(MAKE) \`basename \$@\` -dlls/crtdll dlls/crtdll/__install__ dlls/crtdll/__install-lib__ dlls/crtdll/__install-dev__: __builddeps__" +wine_fn_config_dll crtdll crtdll wine_fn_config_makefile dlls/crtdll "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_crtdll" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/crtdll" wine_fn_append_file ALL_IMPORT_LIBS "dlls/crypt32/libcrypt32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/crypt32/libcrypt32.$IMPLIBEXT dlls/crypt32/libcrypt32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/crypt32/libcrypt32.$IMPLIBEXT dlls/crypt32/libcrypt32.cross.a: dlls/crypt32/crypt32.spec dlls/crypt32/Makefile - @cd dlls/crypt32 && \$(MAKE) \`basename \$@\` -dlls/crypt32 dlls/crypt32/__install__ dlls/crypt32/__install-lib__ dlls/crypt32/__install-dev__: __builddeps__" +wine_fn_config_dll crypt32 crypt32 wine_fn_config_makefile dlls/crypt32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_crypt32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/crypt32" @@ -14153,23 +14188,17 @@ wine_fn_config_test dlls/crypt32/tests crypt32_test wine_fn_config_makefile dlls/crypt32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/crypt32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cryptdlg dlls/cryptdlg/__install__ dlls/cryptdlg/__install-lib__ dlls/cryptdlg/__install-dev__: __builddeps__" +wine_fn_config_dll cryptdlg wine_fn_config_makefile dlls/cryptdlg "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cryptdlg" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cryptdlg" wine_fn_append_file ALL_IMPORT_LIBS "dlls/cryptdll/libcryptdll.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cryptdll/libcryptdll.$IMPLIBEXT dlls/cryptdll/libcryptdll.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/cryptdll/libcryptdll.$IMPLIBEXT dlls/cryptdll/libcryptdll.cross.a: dlls/cryptdll/cryptdll.spec dlls/cryptdll/Makefile - @cd dlls/cryptdll && \$(MAKE) \`basename \$@\` -dlls/cryptdll dlls/cryptdll/__install__ dlls/cryptdll/__install-lib__ dlls/cryptdll/__install-dev__: __builddeps__" +wine_fn_config_dll cryptdll cryptdll wine_fn_config_makefile dlls/cryptdll "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cryptdll" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cryptdll" wine_fn_append_file ALL_IMPORT_LIBS "dlls/cryptnet/libcryptnet.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cryptnet/libcryptnet.$IMPLIBEXT dlls/cryptnet/libcryptnet.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/cryptnet/libcryptnet.$IMPLIBEXT dlls/cryptnet/libcryptnet.cross.a: dlls/cryptnet/cryptnet.spec dlls/cryptnet/Makefile - @cd dlls/cryptnet && \$(MAKE) \`basename \$@\` -dlls/cryptnet dlls/cryptnet/__install__ dlls/cryptnet/__install-lib__ dlls/cryptnet/__install-dev__: __builddeps__" +wine_fn_config_dll cryptnet cryptnet wine_fn_config_makefile dlls/cryptnet "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cryptnet" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cryptnet" @@ -14178,10 +14207,7 @@ wine_fn_config_makefile dlls/cryptnet/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/cryptnet/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/cryptui/libcryptui.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/cryptui/libcryptui.$IMPLIBEXT dlls/cryptui/libcryptui.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/cryptui/libcryptui.$IMPLIBEXT dlls/cryptui/libcryptui.cross.a: dlls/cryptui/cryptui.spec dlls/cryptui/Makefile - @cd dlls/cryptui && \$(MAKE) \`basename \$@\` -dlls/cryptui dlls/cryptui/__install__ dlls/cryptui/__install-lib__ dlls/cryptui/__install-dev__: __builddeps__" +wine_fn_config_dll cryptui cryptui wine_fn_config_makefile dlls/cryptui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_cryptui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/cryptui" @@ -14189,31 +14215,25 @@ wine_fn_config_test dlls/cryptui/tests cryptui_test wine_fn_config_makefile dlls/cryptui/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/cryptui/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ctapi32 dlls/ctapi32/__install__ dlls/ctapi32/__install-lib__ dlls/ctapi32/__install-dev__: __builddeps__" +wine_fn_config_dll ctapi32 wine_fn_config_makefile dlls/ctapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ctapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ctapi32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ctl3d.dll16 dlls/ctl3d.dll16/__install__ dlls/ctl3d.dll16/__install-lib__ dlls/ctl3d.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ctl3d.dll16 wine_fn_config_makefile dlls/ctl3d.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ctl3d.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ctl3d32/libctl3d32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ctl3d32/libctl3d32.$IMPLIBEXT dlls/ctl3d32/libctl3d32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ctl3d32/libctl3d32.$IMPLIBEXT dlls/ctl3d32/libctl3d32.cross.a: dlls/ctl3d32/ctl3d32.spec dlls/ctl3d32/Makefile - @cd dlls/ctl3d32 && \$(MAKE) \`basename \$@\` -dlls/ctl3d32 dlls/ctl3d32/__install__ dlls/ctl3d32/__install-lib__ dlls/ctl3d32/__install-dev__: __builddeps__" +wine_fn_config_dll ctl3d32 ctl3d32 wine_fn_config_makefile dlls/ctl3d32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ctl3d32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ctl3d32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ctl3dv2.dll16 dlls/ctl3dv2.dll16/__install__ dlls/ctl3dv2.dll16/__install-lib__ dlls/ctl3dv2.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ctl3dv2.dll16 wine_fn_config_makefile dlls/ctl3dv2.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ctl3dv2.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3d10/libd3d10.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3d10/libd3d10.$IMPLIBEXT dlls/d3d10/libd3d10.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3d10/libd3d10.$IMPLIBEXT dlls/d3d10/libd3d10.cross.a: dlls/d3d10/d3d10.spec dlls/d3d10/Makefile - @cd dlls/d3d10 && \$(MAKE) \`basename \$@\` -dlls/d3d10 dlls/d3d10/__install__ dlls/d3d10/__install-lib__ dlls/d3d10/__install-dev__: __builddeps__" +wine_fn_config_dll d3d10 d3d10 wine_fn_config_makefile dlls/d3d10 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3d10" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3d10" @@ -14222,10 +14242,7 @@ wine_fn_config_makefile dlls/d3d10/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3d10/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3d10core/libd3d10core.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3d10core/libd3d10core.$IMPLIBEXT dlls/d3d10core/libd3d10core.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3d10core/libd3d10core.$IMPLIBEXT dlls/d3d10core/libd3d10core.cross.a: dlls/d3d10core/d3d10core.spec dlls/d3d10core/Makefile - @cd dlls/d3d10core && \$(MAKE) \`basename \$@\` -dlls/d3d10core dlls/d3d10core/__install__ dlls/d3d10core/__install-lib__ dlls/d3d10core/__install-dev__: __builddeps__" +wine_fn_config_dll d3d10core d3d10core wine_fn_config_makefile dlls/d3d10core "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3d10core" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3d10core" @@ -14234,10 +14251,7 @@ wine_fn_config_makefile dlls/d3d10core/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3d10core/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3d8/libd3d8.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3d8/libd3d8.$IMPLIBEXT dlls/d3d8/libd3d8.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3d8/libd3d8.$IMPLIBEXT dlls/d3d8/libd3d8.cross.a: dlls/d3d8/d3d8.spec dlls/d3d8/Makefile - @cd dlls/d3d8 && \$(MAKE) \`basename \$@\` -dlls/d3d8 dlls/d3d8/__install__ dlls/d3d8/__install-lib__ dlls/d3d8/__install-dev__: __builddeps__" +wine_fn_config_dll d3d8 d3d8 wine_fn_config_makefile dlls/d3d8 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3d8" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3d8" @@ -14246,10 +14260,7 @@ wine_fn_config_makefile dlls/d3d8/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3d8/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3d9/libd3d9.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3d9/libd3d9.$IMPLIBEXT dlls/d3d9/libd3d9.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3d9/libd3d9.$IMPLIBEXT dlls/d3d9/libd3d9.cross.a: dlls/d3d9/d3d9.spec dlls/d3d9/Makefile - @cd dlls/d3d9 && \$(MAKE) \`basename \$@\` -dlls/d3d9 dlls/d3d9/__install__ dlls/d3d9/__install-lib__ dlls/d3d9/__install-dev__: __builddeps__" +wine_fn_config_dll d3d9 d3d9 wine_fn_config_makefile dlls/d3d9 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3d9" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3d9" @@ -14258,18 +14269,12 @@ wine_fn_config_makefile dlls/d3d9/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3d9/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3dim/libd3dim.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dim/libd3dim.$IMPLIBEXT dlls/d3dim/libd3dim.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3dim/libd3dim.$IMPLIBEXT dlls/d3dim/libd3dim.cross.a: dlls/d3dim/d3dim.spec dlls/d3dim/Makefile - @cd dlls/d3dim && \$(MAKE) \`basename \$@\` -dlls/d3dim dlls/d3dim/__install__ dlls/d3dim/__install-lib__ dlls/d3dim/__install-dev__: __builddeps__" +wine_fn_config_dll d3dim d3dim wine_fn_config_makefile dlls/d3dim "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dim" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dim" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3drm/libd3drm.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3drm/libd3drm.$IMPLIBEXT dlls/d3drm/libd3drm.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3drm/libd3drm.$IMPLIBEXT dlls/d3drm/libd3drm.cross.a: dlls/d3drm/d3drm.spec dlls/d3drm/Makefile - @cd dlls/d3drm && \$(MAKE) \`basename \$@\` -dlls/d3drm dlls/d3drm/__install__ dlls/d3drm/__install-lib__ dlls/d3drm/__install-dev__: __builddeps__" +wine_fn_config_dll d3drm d3drm wine_fn_config_makefile dlls/d3drm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3drm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3drm" @@ -14277,65 +14282,56 @@ wine_fn_config_test dlls/d3drm/tests d3drm_test wine_fn_config_makefile dlls/d3drm/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3drm/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_24 dlls/d3dx9_24/__install__ dlls/d3dx9_24/__install-lib__ dlls/d3dx9_24/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_24 wine_fn_config_makefile dlls/d3dx9_24 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_24" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_24" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_25 dlls/d3dx9_25/__install__ dlls/d3dx9_25/__install-lib__ dlls/d3dx9_25/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_25 wine_fn_config_makefile dlls/d3dx9_25 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_25" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_25" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_26 dlls/d3dx9_26/__install__ dlls/d3dx9_26/__install-lib__ dlls/d3dx9_26/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_26 wine_fn_config_makefile dlls/d3dx9_26 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_26" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_26" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_27 dlls/d3dx9_27/__install__ dlls/d3dx9_27/__install-lib__ dlls/d3dx9_27/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_27 wine_fn_config_makefile dlls/d3dx9_27 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_27" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_27" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_28 dlls/d3dx9_28/__install__ dlls/d3dx9_28/__install-lib__ dlls/d3dx9_28/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_28 wine_fn_config_makefile dlls/d3dx9_28 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_28" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_28" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_29 dlls/d3dx9_29/__install__ dlls/d3dx9_29/__install-lib__ dlls/d3dx9_29/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_29 wine_fn_config_makefile dlls/d3dx9_29 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_29" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_29" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_30 dlls/d3dx9_30/__install__ dlls/d3dx9_30/__install-lib__ dlls/d3dx9_30/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_30 wine_fn_config_makefile dlls/d3dx9_30 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_30" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_30" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_31 dlls/d3dx9_31/__install__ dlls/d3dx9_31/__install-lib__ dlls/d3dx9_31/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_31 wine_fn_config_makefile dlls/d3dx9_31 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_31" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_31" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_32 dlls/d3dx9_32/__install__ dlls/d3dx9_32/__install-lib__ dlls/d3dx9_32/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_32 wine_fn_config_makefile dlls/d3dx9_32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_33 dlls/d3dx9_33/__install__ dlls/d3dx9_33/__install-lib__ dlls/d3dx9_33/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_33 wine_fn_config_makefile dlls/d3dx9_33 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_33" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_33" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_34 dlls/d3dx9_34/__install__ dlls/d3dx9_34/__install-lib__ dlls/d3dx9_34/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_34 wine_fn_config_makefile dlls/d3dx9_34 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_34" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_34" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_35 dlls/d3dx9_35/__install__ dlls/d3dx9_35/__install-lib__ dlls/d3dx9_35/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_35 wine_fn_config_makefile dlls/d3dx9_35 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_35" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_35" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3dx9_36/libd3dx9.$IMPLIBEXT" && wine_fn_append_file ALL_IMPORT_LIBS "dlls/libd3dx9.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_36/libd3dx9.$IMPLIBEXT dlls/d3dx9_36/libd3dx9.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/libd3dx9.$IMPLIBEXT: dlls/d3dx9_36/libd3dx9.$IMPLIBEXT - \$(RM) \$@ && \$(LN_S) d3dx9_36/libd3dx9.$IMPLIBEXT \$@ -dlls/libd3dx9.cross.a: dlls/d3dx9_36/libd3dx9.cross.a - \$(RM) \$@ && \$(LN_S) d3dx9_36/libd3dx9.cross.a \$@ -clean:: - \$(RM) dlls/libd3dx9.$IMPLIBEXT -dlls/d3dx9_36/libd3dx9.$IMPLIBEXT dlls/d3dx9_36/libd3dx9.cross.a: dlls/d3dx9_36/d3dx9_36.spec dlls/d3dx9_36/Makefile - @cd dlls/d3dx9_36 && \$(MAKE) \`basename \$@\` -dlls/d3dx9_36 dlls/d3dx9_36/__install__ dlls/d3dx9_36/__install-lib__ dlls/d3dx9_36/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_36 d3dx9 wine_fn_config_makefile dlls/d3dx9_36 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_36" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_36" @@ -14343,35 +14339,32 @@ wine_fn_config_test dlls/d3dx9_36/tests d3dx9_36_test wine_fn_config_makefile dlls/d3dx9_36/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3dx9_36/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_37 dlls/d3dx9_37/__install__ dlls/d3dx9_37/__install-lib__ dlls/d3dx9_37/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_37 wine_fn_config_makefile dlls/d3dx9_37 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_37" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_37" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_38 dlls/d3dx9_38/__install__ dlls/d3dx9_38/__install-lib__ dlls/d3dx9_38/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_38 wine_fn_config_makefile dlls/d3dx9_38 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_38" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_38" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_39 dlls/d3dx9_39/__install__ dlls/d3dx9_39/__install-lib__ dlls/d3dx9_39/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_39 wine_fn_config_makefile dlls/d3dx9_39 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_39" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_39" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_40 dlls/d3dx9_40/__install__ dlls/d3dx9_40/__install-lib__ dlls/d3dx9_40/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_40 wine_fn_config_makefile dlls/d3dx9_40 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_40" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_40" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_41 dlls/d3dx9_41/__install__ dlls/d3dx9_41/__install-lib__ dlls/d3dx9_41/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_41 wine_fn_config_makefile dlls/d3dx9_41 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_41" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_41" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dx9_42 dlls/d3dx9_42/__install__ dlls/d3dx9_42/__install-lib__ dlls/d3dx9_42/__install-dev__: __builddeps__" +wine_fn_config_dll d3dx9_42 wine_fn_config_makefile dlls/d3dx9_42 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dx9_42" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dx9_42" wine_fn_append_file ALL_IMPORT_LIBS "dlls/d3dxof/libd3dxof.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/d3dxof/libd3dxof.$IMPLIBEXT dlls/d3dxof/libd3dxof.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/d3dxof/libd3dxof.$IMPLIBEXT dlls/d3dxof/libd3dxof.cross.a: dlls/d3dxof/d3dxof.spec dlls/d3dxof/Makefile - @cd dlls/d3dxof && \$(MAKE) \`basename \$@\` -dlls/d3dxof dlls/d3dxof/__install__ dlls/d3dxof/__install-lib__ dlls/d3dxof/__install-dev__: __builddeps__" +wine_fn_config_dll d3dxof d3dxof wine_fn_config_makefile dlls/d3dxof "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_d3dxof" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/d3dxof" @@ -14380,30 +14373,21 @@ wine_fn_config_makefile dlls/d3dxof/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/d3dxof/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dbghelp/libdbghelp.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dbghelp/libdbghelp.$IMPLIBEXT dlls/dbghelp/libdbghelp.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dbghelp/libdbghelp.$IMPLIBEXT dlls/dbghelp/libdbghelp.cross.a: dlls/dbghelp/dbghelp.spec dlls/dbghelp/Makefile - @cd dlls/dbghelp && \$(MAKE) \`basename \$@\` -dlls/dbghelp dlls/dbghelp/__install__ dlls/dbghelp/__install-lib__ dlls/dbghelp/__install-dev__: __builddeps__" +wine_fn_config_dll dbghelp dbghelp wine_fn_config_makefile dlls/dbghelp "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dbghelp" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dbghelp" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dciman32/libdciman32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dciman32/libdciman32.$IMPLIBEXT dlls/dciman32/libdciman32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dciman32/libdciman32.$IMPLIBEXT dlls/dciman32/libdciman32.cross.a: dlls/dciman32/dciman32.spec dlls/dciman32/Makefile - @cd dlls/dciman32 && \$(MAKE) \`basename \$@\` -dlls/dciman32 dlls/dciman32/__install__ dlls/dciman32/__install-lib__ dlls/dciman32/__install-dev__: __builddeps__" +wine_fn_config_dll dciman32 dciman32 wine_fn_config_makefile dlls/dciman32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dciman32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dciman32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ddeml.dll16 dlls/ddeml.dll16/__install__ dlls/ddeml.dll16/__install-lib__ dlls/ddeml.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ddeml.dll16 wine_fn_config_makefile dlls/ddeml.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ddeml.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ddraw/libddraw.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ddraw/libddraw.$IMPLIBEXT dlls/ddraw/libddraw.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ddraw/libddraw.$IMPLIBEXT dlls/ddraw/libddraw.cross.a: dlls/ddraw/ddraw.spec dlls/ddraw/Makefile - @cd dlls/ddraw && \$(MAKE) \`basename \$@\` -dlls/ddraw dlls/ddraw/__install__ dlls/ddraw/__install-lib__ dlls/ddraw/__install-dev__: __builddeps__" +wine_fn_config_dll ddraw ddraw wine_fn_config_makefile dlls/ddraw "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ddraw" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ddraw" @@ -14411,7 +14395,7 @@ wine_fn_config_test dlls/ddraw/tests ddraw_test wine_fn_config_makefile dlls/ddraw/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ddraw/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ddrawex dlls/ddrawex/__install__ dlls/ddrawex/__install-lib__ dlls/ddrawex/__install-dev__: __builddeps__" +wine_fn_config_dll ddrawex wine_fn_config_makefile dlls/ddrawex "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ddrawex" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ddrawex" @@ -14419,17 +14403,12 @@ wine_fn_config_test dlls/ddrawex/tests ddrawex_test wine_fn_config_makefile dlls/ddrawex/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ddrawex/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/devenum dlls/devenum/__install__ dlls/devenum/__install-lib__ dlls/devenum/__install-dev__: __builddeps__" +wine_fn_config_dll devenum wine_fn_config_makefile dlls/devenum "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_devenum" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/devenum" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dinput/libdinput.$IMPLIBEXT" && wine_fn_append_file ALL_IMPORT_LIBS "dlls/dinput/libdinput.$STATIC_IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dinput/libdinput.$IMPLIBEXT dlls/dinput/libdinput.$STATIC_IMPLIBEXT dlls/dinput/libdinput.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dinput/libdinput.def: dlls/dinput/dinput.spec dlls/dinput/Makefile - @cd dlls/dinput && \$(MAKE) \`basename \$@\` -dlls/dinput/libdinput.$STATIC_IMPLIBEXT dlls/dinput/libdinput.cross.a: dlls/dinput/Makefile dummy - @cd dlls/dinput && \$(MAKE) \`basename \$@\` -dlls/dinput dlls/dinput/__install__ dlls/dinput/__install-lib__ dlls/dinput/__install-dev__: __builddeps__" +wine_fn_config_dll dinput dinput "data_formats.c" wine_fn_config_makefile dlls/dinput "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dinput" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dinput" @@ -14438,38 +14417,39 @@ wine_fn_config_makefile dlls/dinput/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/dinput/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dinput8/libdinput8.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dinput8/libdinput8.$IMPLIBEXT dlls/dinput8/libdinput8.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dinput8/libdinput8.$IMPLIBEXT dlls/dinput8/libdinput8.cross.a: dlls/dinput8/dinput8.spec dlls/dinput8/Makefile - @cd dlls/dinput8 && \$(MAKE) \`basename \$@\` -dlls/dinput8 dlls/dinput8/__install__ dlls/dinput8/__install-lib__ dlls/dinput8/__install-dev__: __builddeps__" +wine_fn_config_dll dinput8 dinput8 wine_fn_config_makefile dlls/dinput8 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dinput8" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dinput8" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dispdib.dll16 dlls/dispdib.dll16/__install__ dlls/dispdib.dll16/__install-lib__ dlls/dispdib.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll dispdib.dll16 wine_fn_config_makefile dlls/dispdib.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dispdib.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dispex dlls/dispex/__install__ dlls/dispex/__install-lib__ dlls/dispex/__install-dev__: __builddeps__" +wine_fn_config_dll dispex wine_fn_config_makefile dlls/dispex "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dispex" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dispex" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/display.drv16 dlls/display.drv16/__install__ dlls/display.drv16/__install-lib__ dlls/display.drv16/__install-dev__: __builddeps__" +wine_fn_config_test dlls/dispex/tests dispex_test +wine_fn_config_makefile dlls/dispex/tests "Maketest.rules \$(MAKEDEP)" +test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/dispex/tests" + +wine_fn_config_dll display.drv16 wine_fn_config_makefile dlls/display.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/display.drv16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmband dlls/dmband/__install__ dlls/dmband/__install-lib__ dlls/dmband/__install-dev__: __builddeps__" +wine_fn_config_dll dmband wine_fn_config_makefile dlls/dmband "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmband" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmband" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmcompos dlls/dmcompos/__install__ dlls/dmcompos/__install-lib__ dlls/dmcompos/__install-dev__: __builddeps__" +wine_fn_config_dll dmcompos wine_fn_config_makefile dlls/dmcompos "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmcompos" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmcompos" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmime dlls/dmime/__install__ dlls/dmime/__install-lib__ dlls/dmime/__install-dev__: __builddeps__" +wine_fn_config_dll dmime wine_fn_config_makefile dlls/dmime "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmime" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmime" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmloader dlls/dmloader/__install__ dlls/dmloader/__install-lib__ dlls/dmloader/__install-dev__: __builddeps__" +wine_fn_config_dll dmloader wine_fn_config_makefile dlls/dmloader "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmloader" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmloader" @@ -14477,35 +14457,29 @@ wine_fn_config_test dlls/dmloader/tests dmloader_test wine_fn_config_makefile dlls/dmloader/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/dmloader/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmscript dlls/dmscript/__install__ dlls/dmscript/__install-lib__ dlls/dmscript/__install-dev__: __builddeps__" +wine_fn_config_dll dmscript wine_fn_config_makefile dlls/dmscript "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmscript" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmscript" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmstyle dlls/dmstyle/__install__ dlls/dmstyle/__install-lib__ dlls/dmstyle/__install-dev__: __builddeps__" +wine_fn_config_dll dmstyle wine_fn_config_makefile dlls/dmstyle "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmstyle" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmstyle" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmsynth dlls/dmsynth/__install__ dlls/dmsynth/__install-lib__ dlls/dmsynth/__install-dev__: __builddeps__" +wine_fn_config_dll dmsynth wine_fn_config_makefile dlls/dmsynth "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmsynth" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmsynth" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmusic dlls/dmusic/__install__ dlls/dmusic/__install-lib__ dlls/dmusic/__install-dev__: __builddeps__" +wine_fn_config_dll dmusic wine_fn_config_makefile dlls/dmusic "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmusic" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmusic" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dmusic32/libdmusic32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dmusic32/libdmusic32.$IMPLIBEXT dlls/dmusic32/libdmusic32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dmusic32/libdmusic32.$IMPLIBEXT dlls/dmusic32/libdmusic32.cross.a: dlls/dmusic32/dmusic32.spec dlls/dmusic32/Makefile - @cd dlls/dmusic32 && \$(MAKE) \`basename \$@\` -dlls/dmusic32 dlls/dmusic32/__install__ dlls/dmusic32/__install-lib__ dlls/dmusic32/__install-dev__: __builddeps__" +wine_fn_config_dll dmusic32 dmusic32 wine_fn_config_makefile dlls/dmusic32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dmusic32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dmusic32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dnsapi/libdnsapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dnsapi/libdnsapi.$IMPLIBEXT dlls/dnsapi/libdnsapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dnsapi/libdnsapi.$IMPLIBEXT dlls/dnsapi/libdnsapi.cross.a: dlls/dnsapi/dnsapi.spec dlls/dnsapi/Makefile - @cd dlls/dnsapi && \$(MAKE) \`basename \$@\` -dlls/dnsapi dlls/dnsapi/__install__ dlls/dnsapi/__install-lib__ dlls/dnsapi/__install-dev__: __builddeps__" +wine_fn_config_dll dnsapi dnsapi wine_fn_config_makefile dlls/dnsapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dnsapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dnsapi" @@ -14514,18 +14488,12 @@ wine_fn_config_makefile dlls/dnsapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/dnsapi/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dplay/libdplay.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dplay/libdplay.$IMPLIBEXT dlls/dplay/libdplay.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dplay/libdplay.$IMPLIBEXT dlls/dplay/libdplay.cross.a: dlls/dplay/dplay.spec dlls/dplay/Makefile - @cd dlls/dplay && \$(MAKE) \`basename \$@\` -dlls/dplay dlls/dplay/__install__ dlls/dplay/__install-lib__ dlls/dplay/__install-dev__: __builddeps__" +wine_fn_config_dll dplay dplay wine_fn_config_makefile dlls/dplay "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dplay" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dplay" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dplayx/libdplayx.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dplayx/libdplayx.$IMPLIBEXT dlls/dplayx/libdplayx.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dplayx/libdplayx.$IMPLIBEXT dlls/dplayx/libdplayx.cross.a: dlls/dplayx/dplayx.spec dlls/dplayx/Makefile - @cd dlls/dplayx && \$(MAKE) \`basename \$@\` -dlls/dplayx dlls/dplayx/__install__ dlls/dplayx/__install-lib__ dlls/dplayx/__install-dev__: __builddeps__" +wine_fn_config_dll dplayx dplayx wine_fn_config_makefile dlls/dplayx "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dplayx" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dplayx" @@ -14533,39 +14501,33 @@ wine_fn_config_test dlls/dplayx/tests dplayx_test wine_fn_config_makefile dlls/dplayx/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/dplayx/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dpnaddr dlls/dpnaddr/__install__ dlls/dpnaddr/__install-lib__ dlls/dpnaddr/__install-dev__: __builddeps__" +wine_fn_config_dll dpnaddr wine_fn_config_makefile dlls/dpnaddr "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dpnaddr" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dpnaddr" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dpnet/libdpnet.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dpnet/libdpnet.$IMPLIBEXT dlls/dpnet/libdpnet.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dpnet/libdpnet.$IMPLIBEXT dlls/dpnet/libdpnet.cross.a: dlls/dpnet/dpnet.spec dlls/dpnet/Makefile - @cd dlls/dpnet && \$(MAKE) \`basename \$@\` -dlls/dpnet dlls/dpnet/__install__ dlls/dpnet/__install-lib__ dlls/dpnet/__install-dev__: __builddeps__" +wine_fn_config_dll dpnet dpnet wine_fn_config_makefile dlls/dpnet "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dpnet" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dpnet" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dpnhpast dlls/dpnhpast/__install__ dlls/dpnhpast/__install-lib__ dlls/dpnhpast/__install-dev__: __builddeps__" +wine_fn_config_dll dpnhpast wine_fn_config_makefile dlls/dpnhpast "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dpnhpast" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dpnhpast" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dpnlobby dlls/dpnlobby/__install__ dlls/dpnlobby/__install-lib__ dlls/dpnlobby/__install-dev__: __builddeps__" +wine_fn_config_dll dpnlobby wine_fn_config_makefile dlls/dpnlobby "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dpnlobby" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dpnlobby" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dpwsockx dlls/dpwsockx/__install__ dlls/dpwsockx/__install-lib__ dlls/dpwsockx/__install-dev__: __builddeps__" +wine_fn_config_dll dpwsockx wine_fn_config_makefile dlls/dpwsockx "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dpwsockx" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dpwsockx" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/drmclien dlls/drmclien/__install__ dlls/drmclien/__install-lib__ dlls/drmclien/__install-dev__: __builddeps__" +wine_fn_config_dll drmclien wine_fn_config_makefile dlls/drmclien "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_drmclien" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/drmclien" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dsound/libdsound.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dsound/libdsound.$IMPLIBEXT dlls/dsound/libdsound.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dsound/libdsound.$IMPLIBEXT dlls/dsound/libdsound.cross.a: dlls/dsound/dsound.spec dlls/dsound/Makefile - @cd dlls/dsound && \$(MAKE) \`basename \$@\` -dlls/dsound dlls/dsound/__install__ dlls/dsound/__install-lib__ dlls/dsound/__install-dev__: __builddeps__" +wine_fn_config_dll dsound dsound wine_fn_config_makefile dlls/dsound "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dsound" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dsound" @@ -14573,23 +14535,20 @@ wine_fn_config_test dlls/dsound/tests dsound_test wine_fn_config_makefile dlls/dsound/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/dsound/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dssenh dlls/dssenh/__install__ dlls/dssenh/__install-lib__ dlls/dssenh/__install-dev__: __builddeps__" +wine_fn_config_dll dssenh wine_fn_config_makefile dlls/dssenh "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dssenh" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dssenh" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dswave dlls/dswave/__install__ dlls/dswave/__install-lib__ dlls/dswave/__install-dev__: __builddeps__" +wine_fn_config_dll dswave wine_fn_config_makefile dlls/dswave "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dswave" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dswave" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dwmapi/libdwmapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dwmapi/libdwmapi.$IMPLIBEXT dlls/dwmapi/libdwmapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dwmapi/libdwmapi.$IMPLIBEXT dlls/dwmapi/libdwmapi.cross.a: dlls/dwmapi/dwmapi.spec dlls/dwmapi/Makefile - @cd dlls/dwmapi && \$(MAKE) \`basename \$@\` -dlls/dwmapi dlls/dwmapi/__install__ dlls/dwmapi/__install-lib__ dlls/dwmapi/__install-dev__: __builddeps__" +wine_fn_config_dll dwmapi dwmapi wine_fn_config_makefile dlls/dwmapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dwmapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dwmapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dxdiagn dlls/dxdiagn/__install__ dlls/dxdiagn/__install-lib__ dlls/dxdiagn/__install-dev__: __builddeps__" +wine_fn_config_dll dxdiagn wine_fn_config_makefile dlls/dxdiagn "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dxdiagn" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dxdiagn" @@ -14606,10 +14565,7 @@ wine_fn_config_makefile dlls/dxerr9 "dlls/Makeimplib.rules \$(MAKEDEP)" test "x$enable_dxerr9" != xno && wine_fn_append_file ALL_STATICLIB_DIRS "dlls/dxerr9" wine_fn_append_file ALL_IMPORT_LIBS "dlls/dxgi/libdxgi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/dxgi/libdxgi.$IMPLIBEXT dlls/dxgi/libdxgi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/dxgi/libdxgi.$IMPLIBEXT dlls/dxgi/libdxgi.cross.a: dlls/dxgi/dxgi.spec dlls/dxgi/Makefile - @cd dlls/dxgi && \$(MAKE) \`basename \$@\` -dlls/dxgi dlls/dxgi/__install__ dlls/dxgi/__install-lib__ dlls/dxgi/__install-dev__: __builddeps__" +wine_fn_config_dll dxgi dxgi wine_fn_config_makefile dlls/dxgi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_dxgi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/dxgi" @@ -14621,15 +14577,15 @@ wine_fn_config_lib dxguid wine_fn_config_makefile dlls/dxguid "dlls/Makeimplib.rules \$(MAKEDEP)" test "x$enable_dxguid" != xno && wine_fn_append_file ALL_STATICLIB_DIRS "dlls/dxguid" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/faultrep dlls/faultrep/__install__ dlls/faultrep/__install-lib__ dlls/faultrep/__install-dev__: __builddeps__" +wine_fn_config_dll faultrep wine_fn_config_makefile dlls/faultrep "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_faultrep" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/faultrep" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/fltlib dlls/fltlib/__install__ dlls/fltlib/__install-lib__ dlls/fltlib/__install-dev__: __builddeps__" +wine_fn_config_dll fltlib wine_fn_config_makefile dlls/fltlib "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_fltlib" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/fltlib" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/fusion dlls/fusion/__install__ dlls/fusion/__install-lib__ dlls/fusion/__install-dev__: __builddeps__" +wine_fn_config_dll fusion wine_fn_config_makefile dlls/fusion "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_fusion" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/fusion" @@ -14637,19 +14593,16 @@ wine_fn_config_test dlls/fusion/tests fusion_test wine_fn_config_makefile dlls/fusion/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/fusion/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/fwpuclnt dlls/fwpuclnt/__install__ dlls/fwpuclnt/__install-lib__ dlls/fwpuclnt/__install-dev__: __builddeps__" +wine_fn_config_dll fwpuclnt wine_fn_config_makefile dlls/fwpuclnt "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_fwpuclnt" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/fwpuclnt" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/gdi.exe16 dlls/gdi.exe16/__install__ dlls/gdi.exe16/__install-lib__ dlls/gdi.exe16/__install-dev__: __builddeps__" +wine_fn_config_dll gdi.exe16 wine_fn_config_makefile dlls/gdi.exe16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/gdi.exe16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/gdi32/libgdi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/gdi32/libgdi32.$IMPLIBEXT dlls/gdi32/libgdi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/gdi32/libgdi32.$IMPLIBEXT dlls/gdi32/libgdi32.cross.a: dlls/gdi32/gdi32.spec dlls/gdi32/Makefile - @cd dlls/gdi32 && \$(MAKE) \`basename \$@\` -dlls/gdi32 dlls/gdi32/__install__ dlls/gdi32/__install-lib__ dlls/gdi32/__install-dev__: __builddeps__" +wine_fn_config_dll gdi32 gdi32 wine_fn_config_makefile dlls/gdi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_gdi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/gdi32" @@ -14658,10 +14611,7 @@ wine_fn_config_makefile dlls/gdi32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/gdi32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/gdiplus/libgdiplus.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/gdiplus/libgdiplus.$IMPLIBEXT dlls/gdiplus/libgdiplus.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/gdiplus/libgdiplus.$IMPLIBEXT dlls/gdiplus/libgdiplus.cross.a: dlls/gdiplus/gdiplus.spec dlls/gdiplus/Makefile - @cd dlls/gdiplus && \$(MAKE) \`basename \$@\` -dlls/gdiplus dlls/gdiplus/__install__ dlls/gdiplus/__install-lib__ dlls/gdiplus/__install-dev__: __builddeps__" +wine_fn_config_dll gdiplus gdiplus wine_fn_config_makefile dlls/gdiplus "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_gdiplus" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/gdiplus" @@ -14670,42 +14620,33 @@ wine_fn_config_makefile dlls/gdiplus/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/gdiplus/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/glu32/libglu32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/glu32/libglu32.$IMPLIBEXT dlls/glu32/libglu32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/glu32/libglu32.$IMPLIBEXT dlls/glu32/libglu32.cross.a: dlls/glu32/glu32.spec dlls/glu32/Makefile - @cd dlls/glu32 && \$(MAKE) \`basename \$@\` -dlls/glu32 dlls/glu32/__install__ dlls/glu32/__install-lib__ dlls/glu32/__install-dev__: __builddeps__" +wine_fn_config_dll glu32 glu32 wine_fn_config_makefile dlls/glu32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_glu32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/glu32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/gphoto2.ds dlls/gphoto2.ds/__install__ dlls/gphoto2.ds/__install-lib__ dlls/gphoto2.ds/__install-dev__: __builddeps__" +wine_fn_config_dll gphoto2.ds wine_fn_config_makefile dlls/gphoto2.ds "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_gphoto2_ds" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/gphoto2.ds" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/gpkcsp dlls/gpkcsp/__install__ dlls/gpkcsp/__install-lib__ dlls/gpkcsp/__install-dev__: __builddeps__" +wine_fn_config_dll gpkcsp wine_fn_config_makefile dlls/gpkcsp "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_gpkcsp" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/gpkcsp" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/hal dlls/hal/__install__ dlls/hal/__install-lib__ dlls/hal/__install-dev__: __builddeps__" +wine_fn_config_dll hal wine_fn_config_makefile dlls/hal "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_hal" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/hal" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/hhctrl.ocx dlls/hhctrl.ocx/__install__ dlls/hhctrl.ocx/__install-lib__ dlls/hhctrl.ocx/__install-dev__: __builddeps__" +wine_fn_config_dll hhctrl.ocx wine_fn_config_makefile dlls/hhctrl.ocx "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_hhctrl_ocx" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/hhctrl.ocx" wine_fn_append_file ALL_IMPORT_LIBS "dlls/hid/libhid.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/hid/libhid.$IMPLIBEXT dlls/hid/libhid.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/hid/libhid.$IMPLIBEXT dlls/hid/libhid.cross.a: dlls/hid/hid.spec dlls/hid/Makefile - @cd dlls/hid && \$(MAKE) \`basename \$@\` -dlls/hid dlls/hid/__install__ dlls/hid/__install-lib__ dlls/hid/__install-dev__: __builddeps__" +wine_fn_config_dll hid hid wine_fn_config_makefile dlls/hid "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_hid" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/hid" wine_fn_append_file ALL_IMPORT_LIBS "dlls/hlink/libhlink.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/hlink/libhlink.$IMPLIBEXT dlls/hlink/libhlink.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/hlink/libhlink.$IMPLIBEXT dlls/hlink/libhlink.cross.a: dlls/hlink/hlink.spec dlls/hlink/Makefile - @cd dlls/hlink && \$(MAKE) \`basename \$@\` -dlls/hlink dlls/hlink/__install__ dlls/hlink/__install-lib__ dlls/hlink/__install-dev__: __builddeps__" +wine_fn_config_dll hlink hlink wine_fn_config_makefile dlls/hlink "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_hlink" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/hlink" @@ -14713,35 +14654,32 @@ wine_fn_config_test dlls/hlink/tests hlink_test wine_fn_config_makefile dlls/hlink/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/hlink/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/hnetcfg dlls/hnetcfg/__install__ dlls/hnetcfg/__install-lib__ dlls/hnetcfg/__install-dev__: __builddeps__" +wine_fn_config_dll hnetcfg wine_fn_config_makefile dlls/hnetcfg "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_hnetcfg" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/hnetcfg" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/httpapi dlls/httpapi/__install__ dlls/httpapi/__install-lib__ dlls/httpapi/__install-dev__: __builddeps__" +wine_fn_config_dll httpapi wine_fn_config_makefile dlls/httpapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_httpapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/httpapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/iccvid dlls/iccvid/__install__ dlls/iccvid/__install-lib__ dlls/iccvid/__install-dev__: __builddeps__" +wine_fn_config_dll iccvid wine_fn_config_makefile dlls/iccvid "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_iccvid" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/iccvid" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/icmp dlls/icmp/__install__ dlls/icmp/__install-lib__ dlls/icmp/__install-dev__: __builddeps__" +wine_fn_config_dll icmp wine_fn_config_makefile dlls/icmp "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_icmp" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/icmp" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ifsmgr.vxd dlls/ifsmgr.vxd/__install__ dlls/ifsmgr.vxd/__install-lib__ dlls/ifsmgr.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll ifsmgr.vxd wine_fn_config_makefile dlls/ifsmgr.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ifsmgr.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/imaadp32.acm dlls/imaadp32.acm/__install__ dlls/imaadp32.acm/__install-lib__ dlls/imaadp32.acm/__install-dev__: __builddeps__" +wine_fn_config_dll imaadp32.acm wine_fn_config_makefile dlls/imaadp32.acm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_imaadp32_acm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/imaadp32.acm" wine_fn_append_file ALL_IMPORT_LIBS "dlls/imagehlp/libimagehlp.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/imagehlp/libimagehlp.$IMPLIBEXT dlls/imagehlp/libimagehlp.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/imagehlp/libimagehlp.$IMPLIBEXT dlls/imagehlp/libimagehlp.cross.a: dlls/imagehlp/imagehlp.spec dlls/imagehlp/Makefile - @cd dlls/imagehlp && \$(MAKE) \`basename \$@\` -dlls/imagehlp dlls/imagehlp/__install__ dlls/imagehlp/__install-lib__ dlls/imagehlp/__install-dev__: __builddeps__" +wine_fn_config_dll imagehlp imagehlp wine_fn_config_makefile dlls/imagehlp "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_imagehlp" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/imagehlp" @@ -14749,15 +14687,12 @@ wine_fn_config_test dlls/imagehlp/tests imagehlp_test wine_fn_config_makefile dlls/imagehlp/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/imagehlp/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/imm.dll16 dlls/imm.dll16/__install__ dlls/imm.dll16/__install-lib__ dlls/imm.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll imm.dll16 wine_fn_config_makefile dlls/imm.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/imm.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/imm32/libimm32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/imm32/libimm32.$IMPLIBEXT dlls/imm32/libimm32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/imm32/libimm32.$IMPLIBEXT dlls/imm32/libimm32.cross.a: dlls/imm32/imm32.spec dlls/imm32/Makefile - @cd dlls/imm32 && \$(MAKE) \`basename \$@\` -dlls/imm32 dlls/imm32/__install__ dlls/imm32/__install-lib__ dlls/imm32/__install-dev__: __builddeps__" +wine_fn_config_dll imm32 imm32 wine_fn_config_makefile dlls/imm32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_imm32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/imm32" @@ -14766,10 +14701,7 @@ wine_fn_config_makefile dlls/imm32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/imm32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/inetcomm/libinetcomm.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/inetcomm/libinetcomm.$IMPLIBEXT dlls/inetcomm/libinetcomm.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/inetcomm/libinetcomm.$IMPLIBEXT dlls/inetcomm/libinetcomm.cross.a: dlls/inetcomm/inetcomm.spec dlls/inetcomm/Makefile - @cd dlls/inetcomm && \$(MAKE) \`basename \$@\` -dlls/inetcomm dlls/inetcomm/__install__ dlls/inetcomm/__install-lib__ dlls/inetcomm/__install-dev__: __builddeps__" +wine_fn_config_dll inetcomm inetcomm wine_fn_config_makefile dlls/inetcomm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_inetcomm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/inetcomm" @@ -14777,7 +14709,7 @@ wine_fn_config_test dlls/inetcomm/tests inetcomm_test wine_fn_config_makefile dlls/inetcomm/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/inetcomm/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/inetmib1 dlls/inetmib1/__install__ dlls/inetmib1/__install-lib__ dlls/inetmib1/__install-dev__: __builddeps__" +wine_fn_config_dll inetmib1 wine_fn_config_makefile dlls/inetmib1 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_inetmib1" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/inetmib1" @@ -14785,7 +14717,7 @@ wine_fn_config_test dlls/inetmib1/tests inetmib1_test wine_fn_config_makefile dlls/inetmib1/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/inetmib1/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/infosoft dlls/infosoft/__install__ dlls/infosoft/__install-lib__ dlls/infosoft/__install-dev__: __builddeps__" +wine_fn_config_dll infosoft wine_fn_config_makefile dlls/infosoft "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_infosoft" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/infosoft" @@ -14793,23 +14725,20 @@ wine_fn_config_test dlls/infosoft/tests infosoft_test wine_fn_config_makefile dlls/infosoft/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/infosoft/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/initpki dlls/initpki/__install__ dlls/initpki/__install-lib__ dlls/initpki/__install-dev__: __builddeps__" +wine_fn_config_dll initpki wine_fn_config_makefile dlls/initpki "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_initpki" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/initpki" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/inkobj dlls/inkobj/__install__ dlls/inkobj/__install-lib__ dlls/inkobj/__install-dev__: __builddeps__" +wine_fn_config_dll inkobj wine_fn_config_makefile dlls/inkobj "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_inkobj" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/inkobj" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/inseng dlls/inseng/__install__ dlls/inseng/__install-lib__ dlls/inseng/__install-dev__: __builddeps__" +wine_fn_config_dll inseng wine_fn_config_makefile dlls/inseng "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_inseng" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/inseng" wine_fn_append_file ALL_IMPORT_LIBS "dlls/iphlpapi/libiphlpapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/iphlpapi/libiphlpapi.$IMPLIBEXT dlls/iphlpapi/libiphlpapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/iphlpapi/libiphlpapi.$IMPLIBEXT dlls/iphlpapi/libiphlpapi.cross.a: dlls/iphlpapi/iphlpapi.spec dlls/iphlpapi/Makefile - @cd dlls/iphlpapi && \$(MAKE) \`basename \$@\` -dlls/iphlpapi dlls/iphlpapi/__install__ dlls/iphlpapi/__install-lib__ dlls/iphlpapi/__install-dev__: __builddeps__" +wine_fn_config_dll iphlpapi iphlpapi wine_fn_config_makefile dlls/iphlpapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_iphlpapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/iphlpapi" @@ -14817,11 +14746,11 @@ wine_fn_config_test dlls/iphlpapi/tests iphlpapi_test wine_fn_config_makefile dlls/iphlpapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/iphlpapi/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/itircl dlls/itircl/__install__ dlls/itircl/__install-lib__ dlls/itircl/__install-dev__: __builddeps__" +wine_fn_config_dll itircl wine_fn_config_makefile dlls/itircl "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_itircl" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/itircl" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/itss dlls/itss/__install__ dlls/itss/__install-lib__ dlls/itss/__install-dev__: __builddeps__" +wine_fn_config_dll itss wine_fn_config_makefile dlls/itss "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_itss" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/itss" @@ -14829,7 +14758,7 @@ wine_fn_config_test dlls/itss/tests itss_test wine_fn_config_makefile dlls/itss/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/itss/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/jscript dlls/jscript/__install__ dlls/jscript/__install-lib__ dlls/jscript/__install-dev__: __builddeps__" +wine_fn_config_dll jscript wine_fn_config_makefile dlls/jscript "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_jscript" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/jscript" @@ -14838,10 +14767,7 @@ wine_fn_config_makefile dlls/jscript/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/jscript/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/kernel32/libkernel32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/kernel32/libkernel32.$IMPLIBEXT dlls/kernel32/libkernel32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/kernel32/libkernel32.$IMPLIBEXT dlls/kernel32/libkernel32.cross.a: dlls/kernel32/kernel32.spec dlls/kernel32/Makefile - @cd dlls/kernel32 && \$(MAKE) \`basename \$@\` -dlls/kernel32 dlls/kernel32/__install__ dlls/kernel32/__install-lib__ dlls/kernel32/__install-dev__: __builddeps__" +wine_fn_config_dll kernel32 kernel32 wine_fn_config_makefile dlls/kernel32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_kernel32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/kernel32" @@ -14849,33 +14775,21 @@ wine_fn_config_test dlls/kernel32/tests kernel32_test wine_fn_config_makefile dlls/kernel32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/kernel32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/keyboard.drv16 dlls/keyboard.drv16/__install__ dlls/keyboard.drv16/__install-lib__ dlls/keyboard.drv16/__install-dev__: __builddeps__" +wine_fn_config_dll keyboard.drv16 wine_fn_config_makefile dlls/keyboard.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/keyboard.drv16" test "x$enable_win16" != xno && wine_fn_append_file ALL_IMPORT_LIBS "dlls/krnl386.exe16/libkernel.$IMPLIBEXT" && wine_fn_append_file ALL_IMPORT_LIBS "dlls/libkernel.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/krnl386.exe16/libkernel.$IMPLIBEXT dlls/krnl386.exe16/libkernel.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/libkernel.$IMPLIBEXT: dlls/krnl386.exe16/libkernel.$IMPLIBEXT - \$(RM) \$@ && \$(LN_S) krnl386.exe16/libkernel.$IMPLIBEXT \$@ -dlls/libkernel.cross.a: dlls/krnl386.exe16/libkernel.cross.a - \$(RM) \$@ && \$(LN_S) krnl386.exe16/libkernel.cross.a \$@ -clean:: - \$(RM) dlls/libkernel.$IMPLIBEXT -dlls/krnl386.exe16/libkernel.$IMPLIBEXT dlls/krnl386.exe16/libkernel.cross.a: dlls/krnl386.exe16/krnl386.exe16.spec dlls/krnl386.exe16/Makefile - @cd dlls/krnl386.exe16 && \$(MAKE) \`basename \$@\` -dlls/krnl386.exe16 dlls/krnl386.exe16/__install__ dlls/krnl386.exe16/__install-lib__ dlls/krnl386.exe16/__install-dev__: __builddeps__" +wine_fn_config_dll krnl386.exe16 kernel wine_fn_config_makefile dlls/krnl386.exe16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/krnl386.exe16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/loadperf/libloadperf.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/loadperf/libloadperf.$IMPLIBEXT dlls/loadperf/libloadperf.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/loadperf/libloadperf.$IMPLIBEXT dlls/loadperf/libloadperf.cross.a: dlls/loadperf/loadperf.spec dlls/loadperf/Makefile - @cd dlls/loadperf && \$(MAKE) \`basename \$@\` -dlls/loadperf dlls/loadperf/__install__ dlls/loadperf/__install-lib__ dlls/loadperf/__install-dev__: __builddeps__" +wine_fn_config_dll loadperf loadperf wine_fn_config_makefile dlls/loadperf "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_loadperf" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/loadperf" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/localspl dlls/localspl/__install__ dlls/localspl/__install-lib__ dlls/localspl/__install-dev__: __builddeps__" +wine_fn_config_dll localspl wine_fn_config_makefile dlls/localspl "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_localspl" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/localspl" @@ -14883,7 +14797,7 @@ wine_fn_config_test dlls/localspl/tests localspl_test wine_fn_config_makefile dlls/localspl/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/localspl/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/localui dlls/localui/__install__ dlls/localui/__install-lib__ dlls/localui/__install-dev__: __builddeps__" +wine_fn_config_dll localui wine_fn_config_makefile dlls/localui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_localui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/localui" @@ -14892,10 +14806,7 @@ wine_fn_config_makefile dlls/localui/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/localui/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/lz32/liblz32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/lz32/liblz32.$IMPLIBEXT dlls/lz32/liblz32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/lz32/liblz32.$IMPLIBEXT dlls/lz32/liblz32.cross.a: dlls/lz32/lz32.spec dlls/lz32/Makefile - @cd dlls/lz32 && \$(MAKE) \`basename \$@\` -dlls/lz32 dlls/lz32/__install__ dlls/lz32/__install-lib__ dlls/lz32/__install-dev__: __builddeps__" +wine_fn_config_dll lz32 lz32 wine_fn_config_makefile dlls/lz32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_lz32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/lz32" @@ -14903,15 +14814,12 @@ wine_fn_config_test dlls/lz32/tests lz32_test wine_fn_config_makefile dlls/lz32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/lz32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/lzexpand.dll16 dlls/lzexpand.dll16/__install__ dlls/lzexpand.dll16/__install-lib__ dlls/lzexpand.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll lzexpand.dll16 wine_fn_config_makefile dlls/lzexpand.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/lzexpand.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mapi32/libmapi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mapi32/libmapi32.$IMPLIBEXT dlls/mapi32/libmapi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mapi32/libmapi32.$IMPLIBEXT dlls/mapi32/libmapi32.cross.a: dlls/mapi32/mapi32.spec dlls/mapi32/Makefile - @cd dlls/mapi32 && \$(MAKE) \`basename \$@\` -dlls/mapi32 dlls/mapi32/__install__ dlls/mapi32/__install-lib__ dlls/mapi32/__install-dev__: __builddeps__" +wine_fn_config_dll mapi32 mapi32 wine_fn_config_makefile dlls/mapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mapi32" @@ -14919,39 +14827,36 @@ wine_fn_config_test dlls/mapi32/tests mapi32_test wine_fn_config_makefile dlls/mapi32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/mapi32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mapistub dlls/mapistub/__install__ dlls/mapistub/__install-lib__ dlls/mapistub/__install-dev__: __builddeps__" +wine_fn_config_dll mapistub wine_fn_config_makefile dlls/mapistub "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mapistub" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mapistub" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mciavi32 dlls/mciavi32/__install__ dlls/mciavi32/__install-lib__ dlls/mciavi32/__install-dev__: __builddeps__" +wine_fn_config_dll mciavi32 wine_fn_config_makefile dlls/mciavi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mciavi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mciavi32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mcicda dlls/mcicda/__install__ dlls/mcicda/__install-lib__ dlls/mcicda/__install-dev__: __builddeps__" +wine_fn_config_dll mcicda wine_fn_config_makefile dlls/mcicda "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mcicda" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mcicda" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mciqtz32 dlls/mciqtz32/__install__ dlls/mciqtz32/__install-lib__ dlls/mciqtz32/__install-dev__: __builddeps__" +wine_fn_config_dll mciqtz32 wine_fn_config_makefile dlls/mciqtz32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mciqtz32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mciqtz32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mciseq dlls/mciseq/__install__ dlls/mciseq/__install-lib__ dlls/mciseq/__install-dev__: __builddeps__" +wine_fn_config_dll mciseq wine_fn_config_makefile dlls/mciseq "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mciseq" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mciseq" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mciwave dlls/mciwave/__install__ dlls/mciwave/__install-lib__ dlls/mciwave/__install-dev__: __builddeps__" +wine_fn_config_dll mciwave wine_fn_config_makefile dlls/mciwave "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mciwave" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mciwave" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/midimap dlls/midimap/__install__ dlls/midimap/__install-lib__ dlls/midimap/__install-dev__: __builddeps__" +wine_fn_config_dll midimap wine_fn_config_makefile dlls/midimap "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_midimap" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/midimap" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mlang/libmlang.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mlang/libmlang.$IMPLIBEXT dlls/mlang/libmlang.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mlang/libmlang.$IMPLIBEXT dlls/mlang/libmlang.cross.a: dlls/mlang/mlang.spec dlls/mlang/Makefile - @cd dlls/mlang && \$(MAKE) \`basename \$@\` -dlls/mlang dlls/mlang/__install__ dlls/mlang/__install-lib__ dlls/mlang/__install-dev__: __builddeps__" +wine_fn_config_dll mlang mlang wine_fn_config_makefile dlls/mlang "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mlang" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mlang" @@ -14959,7 +14864,7 @@ wine_fn_config_test dlls/mlang/tests mlang_test wine_fn_config_makefile dlls/mlang/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/mlang/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mmdevapi dlls/mmdevapi/__install__ dlls/mmdevapi/__install-lib__ dlls/mmdevapi/__install-dev__: __builddeps__" +wine_fn_config_dll mmdevapi wine_fn_config_makefile dlls/mmdevapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mmdevapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mmdevapi" @@ -14967,55 +14872,46 @@ wine_fn_config_test dlls/mmdevapi/tests mmdevapi_test wine_fn_config_makefile dlls/mmdevapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/mmdevapi/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mmdevldr.vxd dlls/mmdevldr.vxd/__install__ dlls/mmdevldr.vxd/__install-lib__ dlls/mmdevldr.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll mmdevldr.vxd wine_fn_config_makefile dlls/mmdevldr.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mmdevldr.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mmsystem.dll16 dlls/mmsystem.dll16/__install__ dlls/mmsystem.dll16/__install-lib__ dlls/mmsystem.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll mmsystem.dll16 wine_fn_config_makefile dlls/mmsystem.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mmsystem.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/monodebg.vxd dlls/monodebg.vxd/__install__ dlls/monodebg.vxd/__install-lib__ dlls/monodebg.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll monodebg.vxd wine_fn_config_makefile dlls/monodebg.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/monodebg.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mountmgr.sys dlls/mountmgr.sys/__install__ dlls/mountmgr.sys/__install-lib__ dlls/mountmgr.sys/__install-dev__: __builddeps__" +wine_fn_config_dll mountmgr.sys wine_fn_config_makefile dlls/mountmgr.sys "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mountmgr_sys" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mountmgr.sys" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mouse.drv16 dlls/mouse.drv16/__install__ dlls/mouse.drv16/__install-lib__ dlls/mouse.drv16/__install-dev__: __builddeps__" +wine_fn_config_dll mouse.drv16 wine_fn_config_makefile dlls/mouse.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mouse.drv16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mpr/libmpr.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mpr/libmpr.$IMPLIBEXT dlls/mpr/libmpr.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mpr/libmpr.$IMPLIBEXT dlls/mpr/libmpr.cross.a: dlls/mpr/mpr.spec dlls/mpr/Makefile - @cd dlls/mpr && \$(MAKE) \`basename \$@\` -dlls/mpr dlls/mpr/__install__ dlls/mpr/__install-lib__ dlls/mpr/__install-dev__: __builddeps__" +wine_fn_config_dll mpr mpr wine_fn_config_makefile dlls/mpr "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mpr" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mpr" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mprapi/libmprapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mprapi/libmprapi.$IMPLIBEXT dlls/mprapi/libmprapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mprapi/libmprapi.$IMPLIBEXT dlls/mprapi/libmprapi.cross.a: dlls/mprapi/mprapi.spec dlls/mprapi/Makefile - @cd dlls/mprapi && \$(MAKE) \`basename \$@\` -dlls/mprapi dlls/mprapi/__install__ dlls/mprapi/__install-lib__ dlls/mprapi/__install-dev__: __builddeps__" +wine_fn_config_dll mprapi mprapi wine_fn_config_makefile dlls/mprapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mprapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mprapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msacm.dll16 dlls/msacm.dll16/__install__ dlls/msacm.dll16/__install-lib__ dlls/msacm.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll msacm.dll16 wine_fn_config_makefile dlls/msacm.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msacm.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msacm32.drv dlls/msacm32.drv/__install__ dlls/msacm32.drv/__install-lib__ dlls/msacm32.drv/__install-dev__: __builddeps__" +wine_fn_config_dll msacm32.drv wine_fn_config_makefile dlls/msacm32.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msacm32_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msacm32.drv" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msacm32/libmsacm32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msacm32/libmsacm32.$IMPLIBEXT dlls/msacm32/libmsacm32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msacm32/libmsacm32.$IMPLIBEXT dlls/msacm32/libmsacm32.cross.a: dlls/msacm32/msacm32.spec dlls/msacm32/Makefile - @cd dlls/msacm32 && \$(MAKE) \`basename \$@\` -dlls/msacm32 dlls/msacm32/__install__ dlls/msacm32/__install-lib__ dlls/msacm32/__install-dev__: __builddeps__" +wine_fn_config_dll msacm32 msacm32 wine_fn_config_makefile dlls/msacm32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msacm32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msacm32" @@ -15023,19 +14919,16 @@ wine_fn_config_test dlls/msacm32/tests msacm32_test wine_fn_config_makefile dlls/msacm32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msacm32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msadp32.acm dlls/msadp32.acm/__install__ dlls/msadp32.acm/__install-lib__ dlls/msadp32.acm/__install-dev__: __builddeps__" +wine_fn_config_dll msadp32.acm wine_fn_config_makefile dlls/msadp32.acm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msadp32_acm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msadp32.acm" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mscat32 dlls/mscat32/__install__ dlls/mscat32/__install-lib__ dlls/mscat32/__install-dev__: __builddeps__" +wine_fn_config_dll mscat32 wine_fn_config_makefile dlls/mscat32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mscat32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mscat32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mscms/libmscms.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mscms/libmscms.$IMPLIBEXT dlls/mscms/libmscms.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mscms/libmscms.$IMPLIBEXT dlls/mscms/libmscms.cross.a: dlls/mscms/mscms.spec dlls/mscms/Makefile - @cd dlls/mscms && \$(MAKE) \`basename \$@\` -dlls/mscms dlls/mscms/__install__ dlls/mscms/__install-lib__ dlls/mscms/__install-dev__: __builddeps__" +wine_fn_config_dll mscms mscms wine_fn_config_makefile dlls/mscms "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mscms" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mscms" @@ -15043,11 +14936,11 @@ wine_fn_config_test dlls/mscms/tests mscms_test wine_fn_config_makefile dlls/mscms/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/mscms/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mscoree dlls/mscoree/__install__ dlls/mscoree/__install-lib__ dlls/mscoree/__install-dev__: __builddeps__" +wine_fn_config_dll mscoree wine_fn_config_makefile dlls/mscoree "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mscoree" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mscoree" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msctf dlls/msctf/__install__ dlls/msctf/__install-lib__ dlls/msctf/__install-dev__: __builddeps__" +wine_fn_config_dll msctf wine_fn_config_makefile dlls/msctf "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msctf" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msctf" @@ -15055,39 +14948,33 @@ wine_fn_config_test dlls/msctf/tests msctf_test wine_fn_config_makefile dlls/msctf/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msctf/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msdaps dlls/msdaps/__install__ dlls/msdaps/__install-lib__ dlls/msdaps/__install-dev__: __builddeps__" +wine_fn_config_dll msdaps wine_fn_config_makefile dlls/msdaps "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msdaps" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msdaps" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msdmo/libmsdmo.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msdmo/libmsdmo.$IMPLIBEXT dlls/msdmo/libmsdmo.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msdmo/libmsdmo.$IMPLIBEXT dlls/msdmo/libmsdmo.cross.a: dlls/msdmo/msdmo.spec dlls/msdmo/Makefile - @cd dlls/msdmo && \$(MAKE) \`basename \$@\` -dlls/msdmo dlls/msdmo/__install__ dlls/msdmo/__install-lib__ dlls/msdmo/__install-dev__: __builddeps__" +wine_fn_config_dll msdmo msdmo wine_fn_config_makefile dlls/msdmo "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msdmo" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msdmo" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msftedit dlls/msftedit/__install__ dlls/msftedit/__install-lib__ dlls/msftedit/__install-dev__: __builddeps__" +wine_fn_config_dll msftedit wine_fn_config_makefile dlls/msftedit "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msftedit" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msftedit" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msg711.acm dlls/msg711.acm/__install__ dlls/msg711.acm/__install-lib__ dlls/msg711.acm/__install-dev__: __builddeps__" +wine_fn_config_dll msg711.acm wine_fn_config_makefile dlls/msg711.acm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msg711_acm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msg711.acm" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msgsm32.acm dlls/msgsm32.acm/__install__ dlls/msgsm32.acm/__install-lib__ dlls/msgsm32.acm/__install-dev__: __builddeps__" +wine_fn_config_dll msgsm32.acm wine_fn_config_makefile dlls/msgsm32.acm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msgsm32_acm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msgsm32.acm" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mshtml.tlb dlls/mshtml.tlb/__install__ dlls/mshtml.tlb/__install-lib__ dlls/mshtml.tlb/__install-dev__: __builddeps__" +wine_fn_config_dll mshtml.tlb wine_fn_config_makefile dlls/mshtml.tlb "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mshtml_tlb" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mshtml.tlb" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mshtml/libmshtml.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mshtml/libmshtml.$IMPLIBEXT dlls/mshtml/libmshtml.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mshtml/libmshtml.$IMPLIBEXT dlls/mshtml/libmshtml.cross.a: dlls/mshtml/mshtml.spec dlls/mshtml/Makefile - @cd dlls/mshtml && \$(MAKE) \`basename \$@\` -dlls/mshtml dlls/mshtml/__install__ dlls/mshtml/__install-lib__ dlls/mshtml/__install-dev__: __builddeps__" +wine_fn_config_dll mshtml mshtml wine_fn_config_makefile dlls/mshtml "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mshtml" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mshtml" @@ -15096,10 +14983,7 @@ wine_fn_config_makefile dlls/mshtml/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/mshtml/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msi/libmsi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msi/libmsi.$IMPLIBEXT dlls/msi/libmsi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msi/libmsi.$IMPLIBEXT dlls/msi/libmsi.cross.a: dlls/msi/msi.spec dlls/msi/Makefile - @cd dlls/msi && \$(MAKE) \`basename \$@\` -dlls/msi dlls/msi/__install__ dlls/msi/__install-lib__ dlls/msi/__install-dev__: __builddeps__" +wine_fn_config_dll msi msi wine_fn_config_makefile dlls/msi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msi" @@ -15108,42 +14992,39 @@ wine_fn_config_makefile dlls/msi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msi/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msimg32/libmsimg32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msimg32/libmsimg32.$IMPLIBEXT dlls/msimg32/libmsimg32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msimg32/libmsimg32.$IMPLIBEXT dlls/msimg32/libmsimg32.cross.a: dlls/msimg32/msimg32.spec dlls/msimg32/Makefile - @cd dlls/msimg32 && \$(MAKE) \`basename \$@\` -dlls/msimg32 dlls/msimg32/__install__ dlls/msimg32/__install-lib__ dlls/msimg32/__install-dev__: __builddeps__" +wine_fn_config_dll msimg32 msimg32 wine_fn_config_makefile dlls/msimg32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msimg32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msimg32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msimtf dlls/msimtf/__install__ dlls/msimtf/__install-lib__ dlls/msimtf/__install-dev__: __builddeps__" +wine_fn_config_dll msimtf wine_fn_config_makefile dlls/msimtf "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msimtf" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msimtf" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msisip dlls/msisip/__install__ dlls/msisip/__install-lib__ dlls/msisip/__install-dev__: __builddeps__" +wine_fn_config_dll msisip wine_fn_config_makefile dlls/msisip "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msisip" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msisip" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msisys.ocx dlls/msisys.ocx/__install__ dlls/msisys.ocx/__install-lib__ dlls/msisys.ocx/__install-dev__: __builddeps__" +wine_fn_config_dll msisys.ocx wine_fn_config_makefile dlls/msisys.ocx "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msisys_ocx" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msisys.ocx" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msnet32 dlls/msnet32/__install__ dlls/msnet32/__install-lib__ dlls/msnet32/__install-dev__: __builddeps__" +wine_fn_config_dll msnet32 wine_fn_config_makefile dlls/msnet32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msnet32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msnet32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msrle32 dlls/msrle32/__install__ dlls/msrle32/__install-lib__ dlls/msrle32/__install-dev__: __builddeps__" +wine_fn_config_dll msrle32 wine_fn_config_makefile dlls/msrle32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msrle32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msrle32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mssign32 dlls/mssign32/__install__ dlls/mssign32/__install-lib__ dlls/mssign32/__install-dev__: __builddeps__" +wine_fn_config_dll mssign32 wine_fn_config_makefile dlls/mssign32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mssign32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mssign32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mssip32 dlls/mssip32/__install__ dlls/mssip32/__install-lib__ dlls/mssip32/__install-dev__: __builddeps__" +wine_fn_config_dll mssip32 wine_fn_config_makefile dlls/mssip32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mssip32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mssip32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mstask dlls/mstask/__install__ dlls/mstask/__install-lib__ dlls/mstask/__install-dev__: __builddeps__" +wine_fn_config_dll mstask wine_fn_config_makefile dlls/mstask "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mstask" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mstask" @@ -15151,23 +15032,32 @@ wine_fn_config_test dlls/mstask/tests mstask_test wine_fn_config_makefile dlls/mstask/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/mstask/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvcirt dlls/msvcirt/__install__ dlls/msvcirt/__install-lib__ dlls/msvcirt/__install-dev__: __builddeps__" +wine_fn_config_dll msvcirt wine_fn_config_makefile dlls/msvcirt "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvcirt" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcirt" +wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcr70/libmsvcr70.$IMPLIBEXT" +wine_fn_config_dll msvcr70 msvcr70 +wine_fn_config_makefile dlls/msvcr70 "dlls/Makedll.rules \$(MAKEDEP)" +test "x$enable_msvcr70" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcr70" + wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcr71/libmsvcr71.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvcr71/libmsvcr71.$IMPLIBEXT dlls/msvcr71/libmsvcr71.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msvcr71/libmsvcr71.$IMPLIBEXT dlls/msvcr71/libmsvcr71.cross.a: dlls/msvcr71/msvcr71.spec dlls/msvcr71/Makefile - @cd dlls/msvcr71 && \$(MAKE) \`basename \$@\` -dlls/msvcr71 dlls/msvcr71/__install__ dlls/msvcr71/__install-lib__ dlls/msvcr71/__install-dev__: __builddeps__" +wine_fn_config_dll msvcr71 msvcr71 wine_fn_config_makefile dlls/msvcr71 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvcr71" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcr71" +wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcr80/libmsvcr80.$IMPLIBEXT" +wine_fn_config_dll msvcr80 msvcr80 +wine_fn_config_makefile dlls/msvcr80 "dlls/Makedll.rules \$(MAKEDEP)" +test "x$enable_msvcr80" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcr80" + +wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcr90/libmsvcr90.$IMPLIBEXT" +wine_fn_config_dll msvcr90 msvcr90 +wine_fn_config_makefile dlls/msvcr90 "dlls/Makedll.rules \$(MAKEDEP)" +test "x$enable_msvcr90" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcr90" + wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcrt/libmsvcrt.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvcrt/libmsvcrt.$IMPLIBEXT dlls/msvcrt/libmsvcrt.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msvcrt/libmsvcrt.$IMPLIBEXT dlls/msvcrt/libmsvcrt.cross.a: dlls/msvcrt/msvcrt.spec dlls/msvcrt/Makefile - @cd dlls/msvcrt && \$(MAKE) \`basename \$@\` -dlls/msvcrt dlls/msvcrt/__install__ dlls/msvcrt/__install-lib__ dlls/msvcrt/__install-dev__: __builddeps__" +wine_fn_config_dll msvcrt msvcrt wine_fn_config_makefile dlls/msvcrt "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvcrt" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcrt" @@ -15176,26 +15066,17 @@ wine_fn_config_makefile dlls/msvcrt/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msvcrt/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcrt20/libmsvcrt20.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvcrt20/libmsvcrt20.$IMPLIBEXT dlls/msvcrt20/libmsvcrt20.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msvcrt20/libmsvcrt20.$IMPLIBEXT dlls/msvcrt20/libmsvcrt20.cross.a: dlls/msvcrt20/msvcrt20.spec dlls/msvcrt20/Makefile - @cd dlls/msvcrt20 && \$(MAKE) \`basename \$@\` -dlls/msvcrt20 dlls/msvcrt20/__install__ dlls/msvcrt20/__install-lib__ dlls/msvcrt20/__install-dev__: __builddeps__" +wine_fn_config_dll msvcrt20 msvcrt20 wine_fn_config_makefile dlls/msvcrt20 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvcrt20" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcrt20" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcrt40/libmsvcrt40.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvcrt40/libmsvcrt40.$IMPLIBEXT dlls/msvcrt40/libmsvcrt40.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msvcrt40/libmsvcrt40.$IMPLIBEXT dlls/msvcrt40/libmsvcrt40.cross.a: dlls/msvcrt40/msvcrt40.spec dlls/msvcrt40/Makefile - @cd dlls/msvcrt40 && \$(MAKE) \`basename \$@\` -dlls/msvcrt40 dlls/msvcrt40/__install__ dlls/msvcrt40/__install-lib__ dlls/msvcrt40/__install-dev__: __builddeps__" +wine_fn_config_dll msvcrt40 msvcrt40 wine_fn_config_makefile dlls/msvcrt40 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvcrt40" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcrt40" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvcrtd/libmsvcrtd.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvcrtd/libmsvcrtd.$IMPLIBEXT dlls/msvcrtd/libmsvcrtd.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msvcrtd/libmsvcrtd.$IMPLIBEXT dlls/msvcrtd/libmsvcrtd.cross.a: dlls/msvcrtd/msvcrtd.spec dlls/msvcrtd/Makefile - @cd dlls/msvcrtd && \$(MAKE) \`basename \$@\` -dlls/msvcrtd dlls/msvcrtd/__install__ dlls/msvcrtd/__install-lib__ dlls/msvcrtd/__install-dev__: __builddeps__" +wine_fn_config_dll msvcrtd msvcrtd wine_fn_config_makefile dlls/msvcrtd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvcrtd" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvcrtd" @@ -15204,10 +15085,7 @@ wine_fn_config_makefile dlls/msvcrtd/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msvcrtd/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/msvfw32/libmsvfw32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvfw32/libmsvfw32.$IMPLIBEXT dlls/msvfw32/libmsvfw32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/msvfw32/libmsvfw32.$IMPLIBEXT dlls/msvfw32/libmsvfw32.cross.a: dlls/msvfw32/msvfw32.spec dlls/msvfw32/Makefile - @cd dlls/msvfw32 && \$(MAKE) \`basename \$@\` -dlls/msvfw32 dlls/msvfw32/__install__ dlls/msvfw32/__install-lib__ dlls/msvfw32/__install-dev__: __builddeps__" +wine_fn_config_dll msvfw32 msvfw32 wine_fn_config_makefile dlls/msvfw32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvfw32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvfw32" @@ -15215,23 +15093,20 @@ wine_fn_config_test dlls/msvfw32/tests msvfw32_test wine_fn_config_makefile dlls/msvfw32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msvfw32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvidc32 dlls/msvidc32/__install__ dlls/msvidc32/__install-lib__ dlls/msvidc32/__install-dev__: __builddeps__" +wine_fn_config_dll msvidc32 wine_fn_config_makefile dlls/msvidc32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msvidc32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvidc32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msvideo.dll16 dlls/msvideo.dll16/__install__ dlls/msvideo.dll16/__install-lib__ dlls/msvideo.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll msvideo.dll16 wine_fn_config_makefile dlls/msvideo.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msvideo.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/mswsock/libmswsock.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/mswsock/libmswsock.$IMPLIBEXT dlls/mswsock/libmswsock.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/mswsock/libmswsock.$IMPLIBEXT dlls/mswsock/libmswsock.cross.a: dlls/mswsock/mswsock.spec dlls/mswsock/Makefile - @cd dlls/mswsock && \$(MAKE) \`basename \$@\` -dlls/mswsock dlls/mswsock/__install__ dlls/mswsock/__install-lib__ dlls/mswsock/__install-dev__: __builddeps__" +wine_fn_config_dll mswsock mswsock wine_fn_config_makefile dlls/mswsock "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_mswsock" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/mswsock" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msxml3 dlls/msxml3/__install__ dlls/msxml3/__install-lib__ dlls/msxml3/__install-dev__: __builddeps__" +wine_fn_config_dll msxml3 wine_fn_config_makefile dlls/msxml3 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msxml3" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msxml3" @@ -15239,23 +15114,17 @@ wine_fn_config_test dlls/msxml3/tests msxml3_test wine_fn_config_makefile dlls/msxml3/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/msxml3/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/msxml4 dlls/msxml4/__install__ dlls/msxml4/__install-lib__ dlls/msxml4/__install-dev__: __builddeps__" +wine_fn_config_dll msxml4 wine_fn_config_makefile dlls/msxml4 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_msxml4" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/msxml4" wine_fn_append_file ALL_IMPORT_LIBS "dlls/nddeapi/libnddeapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/nddeapi/libnddeapi.$IMPLIBEXT dlls/nddeapi/libnddeapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/nddeapi/libnddeapi.$IMPLIBEXT dlls/nddeapi/libnddeapi.cross.a: dlls/nddeapi/nddeapi.spec dlls/nddeapi/Makefile - @cd dlls/nddeapi && \$(MAKE) \`basename \$@\` -dlls/nddeapi dlls/nddeapi/__install__ dlls/nddeapi/__install-lib__ dlls/nddeapi/__install-dev__: __builddeps__" +wine_fn_config_dll nddeapi nddeapi wine_fn_config_makefile dlls/nddeapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_nddeapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/nddeapi" wine_fn_append_file ALL_IMPORT_LIBS "dlls/netapi32/libnetapi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/netapi32/libnetapi32.$IMPLIBEXT dlls/netapi32/libnetapi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/netapi32/libnetapi32.$IMPLIBEXT dlls/netapi32/libnetapi32.cross.a: dlls/netapi32/netapi32.spec dlls/netapi32/Makefile - @cd dlls/netapi32 && \$(MAKE) \`basename \$@\` -dlls/netapi32 dlls/netapi32/__install__ dlls/netapi32/__install-lib__ dlls/netapi32/__install-dev__: __builddeps__" +wine_fn_config_dll netapi32 netapi32 wine_fn_config_makefile dlls/netapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_netapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/netapi32" @@ -15264,18 +15133,12 @@ wine_fn_config_makefile dlls/netapi32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/netapi32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/newdev/libnewdev.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/newdev/libnewdev.$IMPLIBEXT dlls/newdev/libnewdev.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/newdev/libnewdev.$IMPLIBEXT dlls/newdev/libnewdev.cross.a: dlls/newdev/newdev.spec dlls/newdev/Makefile - @cd dlls/newdev && \$(MAKE) \`basename \$@\` -dlls/newdev dlls/newdev/__install__ dlls/newdev/__install-lib__ dlls/newdev/__install-dev__: __builddeps__" +wine_fn_config_dll newdev newdev wine_fn_config_makefile dlls/newdev "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_newdev" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/newdev" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ntdll/libntdll.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ntdll/libntdll.$IMPLIBEXT dlls/ntdll/libntdll.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ntdll/libntdll.$IMPLIBEXT dlls/ntdll/libntdll.cross.a: dlls/ntdll/ntdll.spec dlls/ntdll/Makefile - @cd dlls/ntdll && \$(MAKE) \`basename \$@\` -dlls/ntdll dlls/ntdll/__install__ dlls/ntdll/__install-lib__ dlls/ntdll/__install-dev__: __builddeps__" +wine_fn_config_dll ntdll ntdll wine_fn_config_makefile dlls/ntdll "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ntdll" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ntdll" @@ -15284,10 +15147,7 @@ wine_fn_config_makefile dlls/ntdll/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ntdll/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ntdsapi/libntdsapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ntdsapi/libntdsapi.$IMPLIBEXT dlls/ntdsapi/libntdsapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ntdsapi/libntdsapi.$IMPLIBEXT dlls/ntdsapi/libntdsapi.cross.a: dlls/ntdsapi/ntdsapi.spec dlls/ntdsapi/Makefile - @cd dlls/ntdsapi && \$(MAKE) \`basename \$@\` -dlls/ntdsapi dlls/ntdsapi/__install__ dlls/ntdsapi/__install-lib__ dlls/ntdsapi/__install-dev__: __builddeps__" +wine_fn_config_dll ntdsapi ntdsapi wine_fn_config_makefile dlls/ntdsapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ntdsapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ntdsapi" @@ -15296,14 +15156,11 @@ wine_fn_config_makefile dlls/ntdsapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ntdsapi/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ntoskrnl.exe/libntoskrnl.exe.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ntoskrnl.exe/libntoskrnl.exe.$IMPLIBEXT dlls/ntoskrnl.exe/libntoskrnl.exe.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ntoskrnl.exe/libntoskrnl.exe.$IMPLIBEXT dlls/ntoskrnl.exe/libntoskrnl.exe.cross.a: dlls/ntoskrnl.exe/ntoskrnl.exe.spec dlls/ntoskrnl.exe/Makefile - @cd dlls/ntoskrnl.exe && \$(MAKE) \`basename \$@\` -dlls/ntoskrnl.exe dlls/ntoskrnl.exe/__install__ dlls/ntoskrnl.exe/__install-lib__ dlls/ntoskrnl.exe/__install-dev__: __builddeps__" +wine_fn_config_dll ntoskrnl.exe ntoskrnl.exe wine_fn_config_makefile dlls/ntoskrnl.exe "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ntoskrnl_exe" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ntoskrnl.exe" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ntprint dlls/ntprint/__install__ dlls/ntprint/__install-lib__ dlls/ntprint/__install-dev__: __builddeps__" +wine_fn_config_dll ntprint wine_fn_config_makefile dlls/ntprint "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ntprint" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ntprint" @@ -15311,23 +15168,17 @@ wine_fn_config_test dlls/ntprint/tests ntprint_test wine_fn_config_makefile dlls/ntprint/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ntprint/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/objsel dlls/objsel/__install__ dlls/objsel/__install-lib__ dlls/objsel/__install-dev__: __builddeps__" +wine_fn_config_dll objsel wine_fn_config_makefile dlls/objsel "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_objsel" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/objsel" wine_fn_append_file ALL_IMPORT_LIBS "dlls/odbc32/libodbc32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/odbc32/libodbc32.$IMPLIBEXT dlls/odbc32/libodbc32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/odbc32/libodbc32.$IMPLIBEXT dlls/odbc32/libodbc32.cross.a: dlls/odbc32/odbc32.spec dlls/odbc32/Makefile - @cd dlls/odbc32 && \$(MAKE) \`basename \$@\` -dlls/odbc32 dlls/odbc32/__install__ dlls/odbc32/__install-lib__ dlls/odbc32/__install-dev__: __builddeps__" +wine_fn_config_dll odbc32 odbc32 wine_fn_config_makefile dlls/odbc32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_odbc32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/odbc32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/odbccp32/libodbccp32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/odbccp32/libodbccp32.$IMPLIBEXT dlls/odbccp32/libodbccp32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/odbccp32/libodbccp32.$IMPLIBEXT dlls/odbccp32/libodbccp32.cross.a: dlls/odbccp32/odbccp32.spec dlls/odbccp32/Makefile - @cd dlls/odbccp32 && \$(MAKE) \`basename \$@\` -dlls/odbccp32 dlls/odbccp32/__install__ dlls/odbccp32/__install-lib__ dlls/odbccp32/__install-dev__: __builddeps__" +wine_fn_config_dll odbccp32 odbccp32 wine_fn_config_makefile dlls/odbccp32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_odbccp32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/odbccp32" @@ -15335,35 +15186,32 @@ wine_fn_config_test dlls/odbccp32/tests odbccp32_test wine_fn_config_makefile dlls/odbccp32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/odbccp32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole2.dll16 dlls/ole2.dll16/__install__ dlls/ole2.dll16/__install-lib__ dlls/ole2.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ole2.dll16 wine_fn_config_makefile dlls/ole2.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole2.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole2conv.dll16 dlls/ole2conv.dll16/__install__ dlls/ole2conv.dll16/__install-lib__ dlls/ole2conv.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ole2conv.dll16 wine_fn_config_makefile dlls/ole2conv.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole2conv.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole2disp.dll16 dlls/ole2disp.dll16/__install__ dlls/ole2disp.dll16/__install-lib__ dlls/ole2disp.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ole2disp.dll16 wine_fn_config_makefile dlls/ole2disp.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole2disp.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole2nls.dll16 dlls/ole2nls.dll16/__install__ dlls/ole2nls.dll16/__install-lib__ dlls/ole2nls.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ole2nls.dll16 wine_fn_config_makefile dlls/ole2nls.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole2nls.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole2prox.dll16 dlls/ole2prox.dll16/__install__ dlls/ole2prox.dll16/__install-lib__ dlls/ole2prox.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ole2prox.dll16 wine_fn_config_makefile dlls/ole2prox.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole2prox.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole2thk.dll16 dlls/ole2thk.dll16/__install__ dlls/ole2thk.dll16/__install-lib__ dlls/ole2thk.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ole2thk.dll16 wine_fn_config_makefile dlls/ole2thk.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole2thk.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ole32/libole32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ole32/libole32.$IMPLIBEXT dlls/ole32/libole32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ole32/libole32.$IMPLIBEXT dlls/ole32/libole32.cross.a: dlls/ole32/ole32.spec dlls/ole32/Makefile - @cd dlls/ole32 && \$(MAKE) \`basename \$@\` -dlls/ole32 dlls/ole32/__install__ dlls/ole32/__install-lib__ dlls/ole32/__install-dev__: __builddeps__" +wine_fn_config_dll ole32 ole32 wine_fn_config_makefile dlls/ole32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ole32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ole32" @@ -15372,10 +15220,7 @@ wine_fn_config_makefile dlls/ole32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ole32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/oleacc/liboleacc.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/oleacc/liboleacc.$IMPLIBEXT dlls/oleacc/liboleacc.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/oleacc/liboleacc.$IMPLIBEXT dlls/oleacc/liboleacc.cross.a: dlls/oleacc/oleacc.spec dlls/oleacc/Makefile - @cd dlls/oleacc && \$(MAKE) \`basename \$@\` -dlls/oleacc dlls/oleacc/__install__ dlls/oleacc/__install-lib__ dlls/oleacc/__install-dev__: __builddeps__" +wine_fn_config_dll oleacc oleacc wine_fn_config_makefile dlls/oleacc "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_oleacc" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/oleacc" @@ -15384,10 +15229,7 @@ wine_fn_config_makefile dlls/oleacc/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/oleacc/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/oleaut32/liboleaut32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/oleaut32/liboleaut32.$IMPLIBEXT dlls/oleaut32/liboleaut32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/oleaut32/liboleaut32.$IMPLIBEXT dlls/oleaut32/liboleaut32.cross.a: dlls/oleaut32/oleaut32.spec dlls/oleaut32/Makefile - @cd dlls/oleaut32 && \$(MAKE) \`basename \$@\` -dlls/oleaut32 dlls/oleaut32/__install__ dlls/oleaut32/__install-lib__ dlls/oleaut32/__install-dev__: __builddeps__" +wine_fn_config_dll oleaut32 oleaut32 wine_fn_config_makefile dlls/oleaut32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_oleaut32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/oleaut32" @@ -15395,19 +15237,16 @@ wine_fn_config_test dlls/oleaut32/tests oleaut32_test wine_fn_config_makefile dlls/oleaut32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/oleaut32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/olecli.dll16 dlls/olecli.dll16/__install__ dlls/olecli.dll16/__install-lib__ dlls/olecli.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll olecli.dll16 wine_fn_config_makefile dlls/olecli.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/olecli.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/olecli32/libolecli32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/olecli32/libolecli32.$IMPLIBEXT dlls/olecli32/libolecli32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/olecli32/libolecli32.$IMPLIBEXT dlls/olecli32/libolecli32.cross.a: dlls/olecli32/olecli32.spec dlls/olecli32/Makefile - @cd dlls/olecli32 && \$(MAKE) \`basename \$@\` -dlls/olecli32 dlls/olecli32/__install__ dlls/olecli32/__install-lib__ dlls/olecli32/__install-dev__: __builddeps__" +wine_fn_config_dll olecli32 olecli32 wine_fn_config_makefile dlls/olecli32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_olecli32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/olecli32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/oledb32 dlls/oledb32/__install__ dlls/oledb32/__install-lib__ dlls/oledb32/__install-dev__: __builddeps__" +wine_fn_config_dll oledb32 wine_fn_config_makefile dlls/oledb32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_oledb32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/oledb32" @@ -15416,46 +15255,34 @@ wine_fn_config_makefile dlls/oledb32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/oledb32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/oledlg/liboledlg.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/oledlg/liboledlg.$IMPLIBEXT dlls/oledlg/liboledlg.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/oledlg/liboledlg.$IMPLIBEXT dlls/oledlg/liboledlg.cross.a: dlls/oledlg/oledlg.spec dlls/oledlg/Makefile - @cd dlls/oledlg && \$(MAKE) \`basename \$@\` -dlls/oledlg dlls/oledlg/__install__ dlls/oledlg/__install-lib__ dlls/oledlg/__install-dev__: __builddeps__" +wine_fn_config_dll oledlg oledlg wine_fn_config_makefile dlls/oledlg "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_oledlg" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/oledlg" wine_fn_append_file ALL_IMPORT_LIBS "dlls/olepro32/libolepro32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/olepro32/libolepro32.$IMPLIBEXT dlls/olepro32/libolepro32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/olepro32/libolepro32.$IMPLIBEXT dlls/olepro32/libolepro32.cross.a: dlls/olepro32/olepro32.spec dlls/olepro32/Makefile - @cd dlls/olepro32 && \$(MAKE) \`basename \$@\` -dlls/olepro32 dlls/olepro32/__install__ dlls/olepro32/__install-lib__ dlls/olepro32/__install-dev__: __builddeps__" +wine_fn_config_dll olepro32 olepro32 wine_fn_config_makefile dlls/olepro32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_olepro32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/olepro32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/olesvr.dll16 dlls/olesvr.dll16/__install__ dlls/olesvr.dll16/__install-lib__ dlls/olesvr.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll olesvr.dll16 wine_fn_config_makefile dlls/olesvr.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/olesvr.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/olesvr32/libolesvr32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/olesvr32/libolesvr32.$IMPLIBEXT dlls/olesvr32/libolesvr32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/olesvr32/libolesvr32.$IMPLIBEXT dlls/olesvr32/libolesvr32.cross.a: dlls/olesvr32/olesvr32.spec dlls/olesvr32/Makefile - @cd dlls/olesvr32 && \$(MAKE) \`basename \$@\` -dlls/olesvr32 dlls/olesvr32/__install__ dlls/olesvr32/__install-lib__ dlls/olesvr32/__install-dev__: __builddeps__" +wine_fn_config_dll olesvr32 olesvr32 wine_fn_config_makefile dlls/olesvr32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_olesvr32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/olesvr32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/olethk32 dlls/olethk32/__install__ dlls/olethk32/__install-lib__ dlls/olethk32/__install-dev__: __builddeps__" +wine_fn_config_dll olethk32 wine_fn_config_makefile dlls/olethk32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_olethk32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/olethk32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/openal32 dlls/openal32/__install__ dlls/openal32/__install-lib__ dlls/openal32/__install-dev__: __builddeps__" +wine_fn_config_dll openal32 wine_fn_config_makefile dlls/openal32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_openal32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/openal32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/opengl32/libopengl32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/opengl32/libopengl32.$IMPLIBEXT dlls/opengl32/libopengl32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/opengl32/libopengl32.$IMPLIBEXT dlls/opengl32/libopengl32.cross.a: dlls/opengl32/opengl32.spec dlls/opengl32/Makefile - @cd dlls/opengl32 && \$(MAKE) \`basename \$@\` -dlls/opengl32 dlls/opengl32/__install__ dlls/opengl32/__install-lib__ dlls/opengl32/__install-dev__: __builddeps__" +wine_fn_config_dll opengl32 opengl32 wine_fn_config_makefile dlls/opengl32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_opengl32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/opengl32" @@ -15464,10 +15291,7 @@ wine_fn_config_makefile dlls/opengl32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/opengl32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/pdh/libpdh.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/pdh/libpdh.$IMPLIBEXT dlls/pdh/libpdh.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/pdh/libpdh.$IMPLIBEXT dlls/pdh/libpdh.cross.a: dlls/pdh/pdh.spec dlls/pdh/Makefile - @cd dlls/pdh && \$(MAKE) \`basename \$@\` -dlls/pdh dlls/pdh/__install__ dlls/pdh/__install-lib__ dlls/pdh/__install-dev__: __builddeps__" +wine_fn_config_dll pdh pdh wine_fn_config_makefile dlls/pdh "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_pdh" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/pdh" @@ -15475,31 +15299,25 @@ wine_fn_config_test dlls/pdh/tests pdh_test wine_fn_config_makefile dlls/pdh/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/pdh/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/pidgen dlls/pidgen/__install__ dlls/pidgen/__install-lib__ dlls/pidgen/__install-dev__: __builddeps__" +wine_fn_config_dll pidgen wine_fn_config_makefile dlls/pidgen "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_pidgen" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/pidgen" wine_fn_append_file ALL_IMPORT_LIBS "dlls/powrprof/libpowrprof.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/powrprof/libpowrprof.$IMPLIBEXT dlls/powrprof/libpowrprof.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/powrprof/libpowrprof.$IMPLIBEXT dlls/powrprof/libpowrprof.cross.a: dlls/powrprof/powrprof.spec dlls/powrprof/Makefile - @cd dlls/powrprof && \$(MAKE) \`basename \$@\` -dlls/powrprof dlls/powrprof/__install__ dlls/powrprof/__install-lib__ dlls/powrprof/__install-dev__: __builddeps__" +wine_fn_config_dll powrprof powrprof wine_fn_config_makefile dlls/powrprof "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_powrprof" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/powrprof" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/printui dlls/printui/__install__ dlls/printui/__install-lib__ dlls/printui/__install-dev__: __builddeps__" +wine_fn_config_dll printui wine_fn_config_makefile dlls/printui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_printui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/printui" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/propsys dlls/propsys/__install__ dlls/propsys/__install-lib__ dlls/propsys/__install-dev__: __builddeps__" +wine_fn_config_dll propsys wine_fn_config_makefile dlls/propsys "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_propsys" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/propsys" wine_fn_append_file ALL_IMPORT_LIBS "dlls/psapi/libpsapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/psapi/libpsapi.$IMPLIBEXT dlls/psapi/libpsapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/psapi/libpsapi.$IMPLIBEXT dlls/psapi/libpsapi.cross.a: dlls/psapi/psapi.spec dlls/psapi/Makefile - @cd dlls/psapi && \$(MAKE) \`basename \$@\` -dlls/psapi dlls/psapi/__install__ dlls/psapi/__install-lib__ dlls/psapi/__install-dev__: __builddeps__" +wine_fn_config_dll psapi psapi wine_fn_config_makefile dlls/psapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_psapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/psapi" @@ -15507,15 +15325,15 @@ wine_fn_config_test dlls/psapi/tests psapi_test wine_fn_config_makefile dlls/psapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/psapi/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/pstorec dlls/pstorec/__install__ dlls/pstorec/__install-lib__ dlls/pstorec/__install-dev__: __builddeps__" +wine_fn_config_dll pstorec wine_fn_config_makefile dlls/pstorec "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_pstorec" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/pstorec" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/qcap dlls/qcap/__install__ dlls/qcap/__install-lib__ dlls/qcap/__install-dev__: __builddeps__" +wine_fn_config_dll qcap wine_fn_config_makefile dlls/qcap "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_qcap" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/qcap" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/qedit dlls/qedit/__install__ dlls/qedit/__install-lib__ dlls/qedit/__install-dev__: __builddeps__" +wine_fn_config_dll qedit wine_fn_config_makefile dlls/qedit "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_qedit" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/qedit" @@ -15523,7 +15341,7 @@ wine_fn_config_test dlls/qedit/tests qedit_test wine_fn_config_makefile dlls/qedit/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/qedit/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/qmgr dlls/qmgr/__install__ dlls/qmgr/__install-lib__ dlls/qmgr/__install-dev__: __builddeps__" +wine_fn_config_dll qmgr wine_fn_config_makefile dlls/qmgr "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_qmgr" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/qmgr" @@ -15531,15 +15349,12 @@ wine_fn_config_test dlls/qmgr/tests qmgr_test wine_fn_config_makefile dlls/qmgr/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/qmgr/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/qmgrprxy dlls/qmgrprxy/__install__ dlls/qmgrprxy/__install-lib__ dlls/qmgrprxy/__install-dev__: __builddeps__" +wine_fn_config_dll qmgrprxy wine_fn_config_makefile dlls/qmgrprxy "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_qmgrprxy" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/qmgrprxy" wine_fn_append_file ALL_IMPORT_LIBS "dlls/quartz/libquartz.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/quartz/libquartz.$IMPLIBEXT dlls/quartz/libquartz.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/quartz/libquartz.$IMPLIBEXT dlls/quartz/libquartz.cross.a: dlls/quartz/quartz.spec dlls/quartz/Makefile - @cd dlls/quartz && \$(MAKE) \`basename \$@\` -dlls/quartz dlls/quartz/__install__ dlls/quartz/__install-lib__ dlls/quartz/__install-dev__: __builddeps__" +wine_fn_config_dll quartz quartz wine_fn_config_makefile dlls/quartz "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_quartz" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/quartz" @@ -15547,19 +15362,16 @@ wine_fn_config_test dlls/quartz/tests quartz_test wine_fn_config_makefile dlls/quartz/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/quartz/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/query dlls/query/__install__ dlls/query/__install-lib__ dlls/query/__install-dev__: __builddeps__" +wine_fn_config_dll query wine_fn_config_makefile dlls/query "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_query" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/query" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rasapi16.dll16 dlls/rasapi16.dll16/__install__ dlls/rasapi16.dll16/__install-lib__ dlls/rasapi16.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll rasapi16.dll16 wine_fn_config_makefile dlls/rasapi16.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rasapi16.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/rasapi32/librasapi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rasapi32/librasapi32.$IMPLIBEXT dlls/rasapi32/librasapi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/rasapi32/librasapi32.$IMPLIBEXT dlls/rasapi32/librasapi32.cross.a: dlls/rasapi32/rasapi32.spec dlls/rasapi32/Makefile - @cd dlls/rasapi32 && \$(MAKE) \`basename \$@\` -dlls/rasapi32 dlls/rasapi32/__install__ dlls/rasapi32/__install-lib__ dlls/rasapi32/__install-dev__: __builddeps__" +wine_fn_config_dll rasapi32 rasapi32 wine_fn_config_makefile dlls/rasapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_rasapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rasapi32" @@ -15568,26 +15380,17 @@ wine_fn_config_makefile dlls/rasapi32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/rasapi32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/rasdlg/librasdlg.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rasdlg/librasdlg.$IMPLIBEXT dlls/rasdlg/librasdlg.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/rasdlg/librasdlg.$IMPLIBEXT dlls/rasdlg/librasdlg.cross.a: dlls/rasdlg/rasdlg.spec dlls/rasdlg/Makefile - @cd dlls/rasdlg && \$(MAKE) \`basename \$@\` -dlls/rasdlg dlls/rasdlg/__install__ dlls/rasdlg/__install-lib__ dlls/rasdlg/__install-dev__: __builddeps__" +wine_fn_config_dll rasdlg rasdlg wine_fn_config_makefile dlls/rasdlg "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_rasdlg" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rasdlg" wine_fn_append_file ALL_IMPORT_LIBS "dlls/resutils/libresutils.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/resutils/libresutils.$IMPLIBEXT dlls/resutils/libresutils.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/resutils/libresutils.$IMPLIBEXT dlls/resutils/libresutils.cross.a: dlls/resutils/resutils.spec dlls/resutils/Makefile - @cd dlls/resutils && \$(MAKE) \`basename \$@\` -dlls/resutils dlls/resutils/__install__ dlls/resutils/__install-lib__ dlls/resutils/__install-dev__: __builddeps__" +wine_fn_config_dll resutils resutils wine_fn_config_makefile dlls/resutils "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_resutils" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/resutils" wine_fn_append_file ALL_IMPORT_LIBS "dlls/riched20/libriched20.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/riched20/libriched20.$IMPLIBEXT dlls/riched20/libriched20.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/riched20/libriched20.$IMPLIBEXT dlls/riched20/libriched20.cross.a: dlls/riched20/riched20.spec dlls/riched20/Makefile - @cd dlls/riched20 && \$(MAKE) \`basename \$@\` -dlls/riched20 dlls/riched20/__install__ dlls/riched20/__install-lib__ dlls/riched20/__install-dev__: __builddeps__" +wine_fn_config_dll riched20 riched20 wine_fn_config_makefile dlls/riched20 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_riched20" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/riched20" @@ -15595,7 +15398,7 @@ wine_fn_config_test dlls/riched20/tests riched20_test wine_fn_config_makefile dlls/riched20/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/riched20/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/riched32 dlls/riched32/__install__ dlls/riched32/__install-lib__ dlls/riched32/__install-dev__: __builddeps__" +wine_fn_config_dll riched32 wine_fn_config_makefile dlls/riched32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_riched32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/riched32" @@ -15604,10 +15407,7 @@ wine_fn_config_makefile dlls/riched32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/riched32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/rpcrt4/librpcrt4.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rpcrt4/librpcrt4.$IMPLIBEXT dlls/rpcrt4/librpcrt4.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/rpcrt4/librpcrt4.$IMPLIBEXT dlls/rpcrt4/librpcrt4.cross.a: dlls/rpcrt4/rpcrt4.spec dlls/rpcrt4/Makefile - @cd dlls/rpcrt4 && \$(MAKE) \`basename \$@\` -dlls/rpcrt4 dlls/rpcrt4/__install__ dlls/rpcrt4/__install-lib__ dlls/rpcrt4/__install-dev__: __builddeps__" +wine_fn_config_dll rpcrt4 rpcrt4 wine_fn_config_makefile dlls/rpcrt4 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_rpcrt4" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rpcrt4" @@ -15615,15 +15415,12 @@ wine_fn_config_test dlls/rpcrt4/tests rpcrt4_test wine_fn_config_makefile dlls/rpcrt4/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/rpcrt4/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rsabase dlls/rsabase/__install__ dlls/rsabase/__install-lib__ dlls/rsabase/__install-dev__: __builddeps__" +wine_fn_config_dll rsabase wine_fn_config_makefile dlls/rsabase "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_rsabase" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rsabase" wine_fn_append_file ALL_IMPORT_LIBS "dlls/rsaenh/librsaenh.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rsaenh/librsaenh.$IMPLIBEXT dlls/rsaenh/librsaenh.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/rsaenh/librsaenh.$IMPLIBEXT dlls/rsaenh/librsaenh.cross.a: dlls/rsaenh/rsaenh.spec dlls/rsaenh/Makefile - @cd dlls/rsaenh && \$(MAKE) \`basename \$@\` -dlls/rsaenh dlls/rsaenh/__install__ dlls/rsaenh/__install-lib__ dlls/rsaenh/__install-dev__: __builddeps__" +wine_fn_config_dll rsaenh rsaenh wine_fn_config_makefile dlls/rsaenh "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_rsaenh" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rsaenh" @@ -15632,22 +15429,19 @@ wine_fn_config_makefile dlls/rsaenh/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/rsaenh/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/rtutils/librtutils.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/rtutils/librtutils.$IMPLIBEXT dlls/rtutils/librtutils.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/rtutils/librtutils.$IMPLIBEXT dlls/rtutils/librtutils.cross.a: dlls/rtutils/rtutils.spec dlls/rtutils/Makefile - @cd dlls/rtutils && \$(MAKE) \`basename \$@\` -dlls/rtutils dlls/rtutils/__install__ dlls/rtutils/__install-lib__ dlls/rtutils/__install-dev__: __builddeps__" +wine_fn_config_dll rtutils rtutils wine_fn_config_makefile dlls/rtutils "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_rtutils" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/rtutils" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sane.ds dlls/sane.ds/__install__ dlls/sane.ds/__install-lib__ dlls/sane.ds/__install-dev__: __builddeps__" +wine_fn_config_dll sane.ds wine_fn_config_makefile dlls/sane.ds "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sane_ds" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sane.ds" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sccbase dlls/sccbase/__install__ dlls/sccbase/__install-lib__ dlls/sccbase/__install-dev__: __builddeps__" +wine_fn_config_dll sccbase wine_fn_config_makefile dlls/sccbase "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sccbase" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sccbase" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/schannel dlls/schannel/__install__ dlls/schannel/__install-lib__ dlls/schannel/__install-dev__: __builddeps__" +wine_fn_config_dll schannel wine_fn_config_makefile dlls/schannel "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_schannel" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/schannel" @@ -15656,10 +15450,7 @@ wine_fn_config_makefile dlls/schannel/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/schannel/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/secur32/libsecur32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/secur32/libsecur32.$IMPLIBEXT dlls/secur32/libsecur32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/secur32/libsecur32.$IMPLIBEXT dlls/secur32/libsecur32.cross.a: dlls/secur32/secur32.spec dlls/secur32/Makefile - @cd dlls/secur32 && \$(MAKE) \`basename \$@\` -dlls/secur32 dlls/secur32/__install__ dlls/secur32/__install-lib__ dlls/secur32/__install-dev__: __builddeps__" +wine_fn_config_dll secur32 secur32 wine_fn_config_makefile dlls/secur32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_secur32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/secur32" @@ -15667,23 +15458,17 @@ wine_fn_config_test dlls/secur32/tests secur32_test wine_fn_config_makefile dlls/secur32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/secur32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/security dlls/security/__install__ dlls/security/__install-lib__ dlls/security/__install-dev__: __builddeps__" +wine_fn_config_dll security wine_fn_config_makefile dlls/security "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_security" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/security" wine_fn_append_file ALL_IMPORT_LIBS "dlls/sensapi/libsensapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sensapi/libsensapi.$IMPLIBEXT dlls/sensapi/libsensapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/sensapi/libsensapi.$IMPLIBEXT dlls/sensapi/libsensapi.cross.a: dlls/sensapi/sensapi.spec dlls/sensapi/Makefile - @cd dlls/sensapi && \$(MAKE) \`basename \$@\` -dlls/sensapi dlls/sensapi/__install__ dlls/sensapi/__install-lib__ dlls/sensapi/__install-dev__: __builddeps__" +wine_fn_config_dll sensapi sensapi wine_fn_config_makefile dlls/sensapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sensapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sensapi" wine_fn_append_file ALL_IMPORT_LIBS "dlls/serialui/libserialui.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/serialui/libserialui.$IMPLIBEXT dlls/serialui/libserialui.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/serialui/libserialui.$IMPLIBEXT dlls/serialui/libserialui.cross.a: dlls/serialui/serialui.spec dlls/serialui/Makefile - @cd dlls/serialui && \$(MAKE) \`basename \$@\` -dlls/serialui dlls/serialui/__install__ dlls/serialui/__install-lib__ dlls/serialui/__install-dev__: __builddeps__" +wine_fn_config_dll serialui serialui wine_fn_config_makefile dlls/serialui "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_serialui" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/serialui" @@ -15692,10 +15477,7 @@ wine_fn_config_makefile dlls/serialui/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/serialui/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/setupapi/libsetupapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/setupapi/libsetupapi.$IMPLIBEXT dlls/setupapi/libsetupapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/setupapi/libsetupapi.$IMPLIBEXT dlls/setupapi/libsetupapi.cross.a: dlls/setupapi/setupapi.spec dlls/setupapi/Makefile - @cd dlls/setupapi && \$(MAKE) \`basename \$@\` -dlls/setupapi dlls/setupapi/__install__ dlls/setupapi/__install-lib__ dlls/setupapi/__install-dev__: __builddeps__" +wine_fn_config_dll setupapi setupapi wine_fn_config_makefile dlls/setupapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_setupapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/setupapi" @@ -15703,35 +15485,26 @@ wine_fn_config_test dlls/setupapi/tests setupapi_test wine_fn_config_makefile dlls/setupapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/setupapi/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/setupx.dll16 dlls/setupx.dll16/__install__ dlls/setupx.dll16/__install-lib__ dlls/setupx.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll setupx.dll16 wine_fn_config_makefile dlls/setupx.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/setupx.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/sfc/libsfc.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sfc/libsfc.$IMPLIBEXT dlls/sfc/libsfc.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/sfc/libsfc.$IMPLIBEXT dlls/sfc/libsfc.cross.a: dlls/sfc/sfc.spec dlls/sfc/Makefile - @cd dlls/sfc && \$(MAKE) \`basename \$@\` -dlls/sfc dlls/sfc/__install__ dlls/sfc/__install-lib__ dlls/sfc/__install-dev__: __builddeps__" +wine_fn_config_dll sfc sfc wine_fn_config_makefile dlls/sfc "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sfc" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sfc" wine_fn_append_file ALL_IMPORT_LIBS "dlls/sfc_os/libsfc_os.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sfc_os/libsfc_os.$IMPLIBEXT dlls/sfc_os/libsfc_os.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/sfc_os/libsfc_os.$IMPLIBEXT dlls/sfc_os/libsfc_os.cross.a: dlls/sfc_os/sfc_os.spec dlls/sfc_os/Makefile - @cd dlls/sfc_os && \$(MAKE) \`basename \$@\` -dlls/sfc_os dlls/sfc_os/__install__ dlls/sfc_os/__install-lib__ dlls/sfc_os/__install-dev__: __builddeps__" +wine_fn_config_dll sfc_os sfc_os wine_fn_config_makefile dlls/sfc_os "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sfc_os" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sfc_os" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/shdoclc dlls/shdoclc/__install__ dlls/shdoclc/__install-lib__ dlls/shdoclc/__install-dev__: __builddeps__" +wine_fn_config_dll shdoclc wine_fn_config_makefile dlls/shdoclc "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_shdoclc" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/shdoclc" wine_fn_append_file ALL_IMPORT_LIBS "dlls/shdocvw/libshdocvw.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/shdocvw/libshdocvw.$IMPLIBEXT dlls/shdocvw/libshdocvw.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/shdocvw/libshdocvw.$IMPLIBEXT dlls/shdocvw/libshdocvw.cross.a: dlls/shdocvw/shdocvw.spec dlls/shdocvw/Makefile - @cd dlls/shdocvw && \$(MAKE) \`basename \$@\` -dlls/shdocvw dlls/shdocvw/__install__ dlls/shdocvw/__install-lib__ dlls/shdocvw/__install-dev__: __builddeps__" +wine_fn_config_dll shdocvw shdocvw wine_fn_config_makefile dlls/shdocvw "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_shdocvw" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/shdocvw" @@ -15739,15 +15512,12 @@ wine_fn_config_test dlls/shdocvw/tests shdocvw_test wine_fn_config_makefile dlls/shdocvw/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/shdocvw/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/shell.dll16 dlls/shell.dll16/__install__ dlls/shell.dll16/__install-lib__ dlls/shell.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll shell.dll16 wine_fn_config_makefile dlls/shell.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/shell.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/shell32/libshell32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/shell32/libshell32.$IMPLIBEXT dlls/shell32/libshell32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/shell32/libshell32.$IMPLIBEXT dlls/shell32/libshell32.cross.a: dlls/shell32/shell32.spec dlls/shell32/Makefile - @cd dlls/shell32 && \$(MAKE) \`basename \$@\` -dlls/shell32 dlls/shell32/__install__ dlls/shell32/__install-lib__ dlls/shell32/__install-dev__: __builddeps__" +wine_fn_config_dll shell32 shell32 wine_fn_config_makefile dlls/shell32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_shell32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/shell32" @@ -15756,18 +15526,12 @@ wine_fn_config_makefile dlls/shell32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/shell32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/shfolder/libshfolder.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/shfolder/libshfolder.$IMPLIBEXT dlls/shfolder/libshfolder.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/shfolder/libshfolder.$IMPLIBEXT dlls/shfolder/libshfolder.cross.a: dlls/shfolder/shfolder.spec dlls/shfolder/Makefile - @cd dlls/shfolder && \$(MAKE) \`basename \$@\` -dlls/shfolder dlls/shfolder/__install__ dlls/shfolder/__install-lib__ dlls/shfolder/__install-dev__: __builddeps__" +wine_fn_config_dll shfolder shfolder wine_fn_config_makefile dlls/shfolder "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_shfolder" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/shfolder" wine_fn_append_file ALL_IMPORT_LIBS "dlls/shlwapi/libshlwapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/shlwapi/libshlwapi.$IMPLIBEXT dlls/shlwapi/libshlwapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/shlwapi/libshlwapi.$IMPLIBEXT dlls/shlwapi/libshlwapi.cross.a: dlls/shlwapi/shlwapi.spec dlls/shlwapi/Makefile - @cd dlls/shlwapi && \$(MAKE) \`basename \$@\` -dlls/shlwapi dlls/shlwapi/__install__ dlls/shlwapi/__install-lib__ dlls/shlwapi/__install-dev__: __builddeps__" +wine_fn_config_dll shlwapi shlwapi wine_fn_config_makefile dlls/shlwapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_shlwapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/shlwapi" @@ -15775,23 +15539,17 @@ wine_fn_config_test dlls/shlwapi/tests shlwapi_test wine_fn_config_makefile dlls/shlwapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/shlwapi/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/slbcsp dlls/slbcsp/__install__ dlls/slbcsp/__install-lib__ dlls/slbcsp/__install-dev__: __builddeps__" +wine_fn_config_dll slbcsp wine_fn_config_makefile dlls/slbcsp "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_slbcsp" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/slbcsp" wine_fn_append_file ALL_IMPORT_LIBS "dlls/slc/libslc.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/slc/libslc.$IMPLIBEXT dlls/slc/libslc.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/slc/libslc.$IMPLIBEXT dlls/slc/libslc.cross.a: dlls/slc/slc.spec dlls/slc/Makefile - @cd dlls/slc && \$(MAKE) \`basename \$@\` -dlls/slc dlls/slc/__install__ dlls/slc/__install-lib__ dlls/slc/__install-dev__: __builddeps__" +wine_fn_config_dll slc slc wine_fn_config_makefile dlls/slc "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_slc" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/slc" wine_fn_append_file ALL_IMPORT_LIBS "dlls/snmpapi/libsnmpapi.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/snmpapi/libsnmpapi.$IMPLIBEXT dlls/snmpapi/libsnmpapi.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/snmpapi/libsnmpapi.$IMPLIBEXT dlls/snmpapi/libsnmpapi.cross.a: dlls/snmpapi/snmpapi.spec dlls/snmpapi/Makefile - @cd dlls/snmpapi && \$(MAKE) \`basename \$@\` -dlls/snmpapi dlls/snmpapi/__install__ dlls/snmpapi/__install-lib__ dlls/snmpapi/__install-dev__: __builddeps__" +wine_fn_config_dll snmpapi snmpapi wine_fn_config_makefile dlls/snmpapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_snmpapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/snmpapi" @@ -15799,19 +15557,16 @@ wine_fn_config_test dlls/snmpapi/tests snmpapi_test wine_fn_config_makefile dlls/snmpapi/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/snmpapi/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/softpub dlls/softpub/__install__ dlls/softpub/__install-lib__ dlls/softpub/__install-dev__: __builddeps__" +wine_fn_config_dll softpub wine_fn_config_makefile dlls/softpub "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_softpub" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/softpub" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sound.drv16 dlls/sound.drv16/__install__ dlls/sound.drv16/__install-lib__ dlls/sound.drv16/__install-dev__: __builddeps__" +wine_fn_config_dll sound.drv16 wine_fn_config_makefile dlls/sound.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sound.drv16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/spoolss/libspoolss.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/spoolss/libspoolss.$IMPLIBEXT dlls/spoolss/libspoolss.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/spoolss/libspoolss.$IMPLIBEXT dlls/spoolss/libspoolss.cross.a: dlls/spoolss/spoolss.spec dlls/spoolss/Makefile - @cd dlls/spoolss && \$(MAKE) \`basename \$@\` -dlls/spoolss dlls/spoolss/__install__ dlls/spoolss/__install-lib__ dlls/spoolss/__install-dev__: __builddeps__" +wine_fn_config_dll spoolss spoolss wine_fn_config_makefile dlls/spoolss "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_spoolss" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/spoolss" @@ -15819,19 +15574,16 @@ wine_fn_config_test dlls/spoolss/tests spoolss_test wine_fn_config_makefile dlls/spoolss/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/spoolss/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/stdole2.tlb dlls/stdole2.tlb/__install__ dlls/stdole2.tlb/__install-lib__ dlls/stdole2.tlb/__install-dev__: __builddeps__" +wine_fn_config_dll stdole2.tlb wine_fn_config_makefile dlls/stdole2.tlb "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_stdole2_tlb" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/stdole2.tlb" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/stdole32.tlb dlls/stdole32.tlb/__install__ dlls/stdole32.tlb/__install-lib__ dlls/stdole32.tlb/__install-dev__: __builddeps__" +wine_fn_config_dll stdole32.tlb wine_fn_config_makefile dlls/stdole32.tlb "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_stdole32_tlb" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/stdole32.tlb" wine_fn_append_file ALL_IMPORT_LIBS "dlls/sti/libsti.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sti/libsti.$IMPLIBEXT dlls/sti/libsti.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/sti/libsti.$IMPLIBEXT dlls/sti/libsti.cross.a: dlls/sti/sti.spec dlls/sti/Makefile - @cd dlls/sti && \$(MAKE) \`basename \$@\` -dlls/sti dlls/sti/__install__ dlls/sti/__install-lib__ dlls/sti/__install-dev__: __builddeps__" +wine_fn_config_dll sti sti wine_fn_config_makefile dlls/sti "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sti" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sti" @@ -15839,11 +15591,11 @@ wine_fn_config_test dlls/sti/tests sti_test wine_fn_config_makefile dlls/sti/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/sti/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/storage.dll16 dlls/storage.dll16/__install__ dlls/storage.dll16/__install-lib__ dlls/storage.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll storage.dll16 wine_fn_config_makefile dlls/storage.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/storage.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/stress.dll16 dlls/stress.dll16/__install__ dlls/stress.dll16/__install-lib__ dlls/stress.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll stress.dll16 wine_fn_config_makefile dlls/stress.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/stress.dll16" @@ -15851,43 +15603,40 @@ wine_fn_config_lib strmiids wine_fn_config_makefile dlls/strmiids "dlls/Makeimplib.rules \$(MAKEDEP)" test "x$enable_strmiids" != xno && wine_fn_append_file ALL_STATICLIB_DIRS "dlls/strmiids" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/svrapi dlls/svrapi/__install__ dlls/svrapi/__install-lib__ dlls/svrapi/__install-dev__: __builddeps__" +wine_fn_config_dll svrapi wine_fn_config_makefile dlls/svrapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_svrapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/svrapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/sxs dlls/sxs/__install__ dlls/sxs/__install-lib__ dlls/sxs/__install-dev__: __builddeps__" +wine_fn_config_dll sxs wine_fn_config_makefile dlls/sxs "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_sxs" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/sxs" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/system.drv16 dlls/system.drv16/__install__ dlls/system.drv16/__install-lib__ dlls/system.drv16/__install-dev__: __builddeps__" +wine_fn_config_dll system.drv16 wine_fn_config_makefile dlls/system.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/system.drv16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/t2embed dlls/t2embed/__install__ dlls/t2embed/__install-lib__ dlls/t2embed/__install-dev__: __builddeps__" +wine_fn_config_dll t2embed wine_fn_config_makefile dlls/t2embed "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_t2embed" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/t2embed" wine_fn_append_file ALL_IMPORT_LIBS "dlls/tapi32/libtapi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/tapi32/libtapi32.$IMPLIBEXT dlls/tapi32/libtapi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/tapi32/libtapi32.$IMPLIBEXT dlls/tapi32/libtapi32.cross.a: dlls/tapi32/tapi32.spec dlls/tapi32/Makefile - @cd dlls/tapi32 && \$(MAKE) \`basename \$@\` -dlls/tapi32 dlls/tapi32/__install__ dlls/tapi32/__install-lib__ dlls/tapi32/__install-dev__: __builddeps__" +wine_fn_config_dll tapi32 tapi32 wine_fn_config_makefile dlls/tapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_tapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/tapi32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/toolhelp.dll16 dlls/toolhelp.dll16/__install__ dlls/toolhelp.dll16/__install-lib__ dlls/toolhelp.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll toolhelp.dll16 wine_fn_config_makefile dlls/toolhelp.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/toolhelp.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/traffic dlls/traffic/__install__ dlls/traffic/__install-lib__ dlls/traffic/__install-dev__: __builddeps__" +wine_fn_config_dll traffic wine_fn_config_makefile dlls/traffic "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_traffic" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/traffic" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/twain.dll16 dlls/twain.dll16/__install__ dlls/twain.dll16/__install-lib__ dlls/twain.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll twain.dll16 wine_fn_config_makefile dlls/twain.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/twain.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/twain_32 dlls/twain_32/__install__ dlls/twain_32/__install-lib__ dlls/twain_32/__install-dev__: __builddeps__" +wine_fn_config_dll twain_32 wine_fn_config_makefile dlls/twain_32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_twain_32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/twain_32" @@ -15895,35 +15644,26 @@ wine_fn_config_test dlls/twain_32/tests twain_32_test wine_fn_config_makefile dlls/twain_32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/twain_32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/typelib.dll16 dlls/typelib.dll16/__install__ dlls/typelib.dll16/__install-lib__ dlls/typelib.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll typelib.dll16 wine_fn_config_makefile dlls/typelib.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/typelib.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/unicows/libunicows.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/unicows/libunicows.$IMPLIBEXT dlls/unicows/libunicows.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/unicows/libunicows.$IMPLIBEXT dlls/unicows/libunicows.cross.a: dlls/unicows/unicows.spec dlls/unicows/Makefile - @cd dlls/unicows && \$(MAKE) \`basename \$@\` -dlls/unicows dlls/unicows/__install__ dlls/unicows/__install-lib__ dlls/unicows/__install-dev__: __builddeps__" +wine_fn_config_dll unicows unicows wine_fn_config_makefile dlls/unicows "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_unicows" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/unicows" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/updspapi dlls/updspapi/__install__ dlls/updspapi/__install-lib__ dlls/updspapi/__install-dev__: __builddeps__" +wine_fn_config_dll updspapi wine_fn_config_makefile dlls/updspapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_updspapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/updspapi" wine_fn_append_file ALL_IMPORT_LIBS "dlls/url/liburl.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/url/liburl.$IMPLIBEXT dlls/url/liburl.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/url/liburl.$IMPLIBEXT dlls/url/liburl.cross.a: dlls/url/url.spec dlls/url/Makefile - @cd dlls/url && \$(MAKE) \`basename \$@\` -dlls/url dlls/url/__install__ dlls/url/__install-lib__ dlls/url/__install-dev__: __builddeps__" +wine_fn_config_dll url url wine_fn_config_makefile dlls/url "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_url" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/url" wine_fn_append_file ALL_IMPORT_LIBS "dlls/urlmon/liburlmon.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/urlmon/liburlmon.$IMPLIBEXT dlls/urlmon/liburlmon.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/urlmon/liburlmon.$IMPLIBEXT dlls/urlmon/liburlmon.cross.a: dlls/urlmon/urlmon.spec dlls/urlmon/Makefile - @cd dlls/urlmon && \$(MAKE) \`basename \$@\` -dlls/urlmon dlls/urlmon/__install__ dlls/urlmon/__install-lib__ dlls/urlmon/__install-dev__: __builddeps__" +wine_fn_config_dll urlmon urlmon wine_fn_config_makefile dlls/urlmon "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_urlmon" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/urlmon" @@ -15931,15 +15671,17 @@ wine_fn_config_test dlls/urlmon/tests urlmon_test wine_fn_config_makefile dlls/urlmon/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/urlmon/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/user.exe16 dlls/user.exe16/__install__ dlls/user.exe16/__install-lib__ dlls/user.exe16/__install-dev__: __builddeps__" +wine_fn_append_file ALL_IMPORT_LIBS "dlls/usbd.sys/libusbd.sys.$IMPLIBEXT" +wine_fn_config_dll usbd.sys usbd.sys +wine_fn_config_makefile dlls/usbd.sys "dlls/Makedll.rules \$(MAKEDEP)" +test "x$enable_usbd_sys" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/usbd.sys" + +wine_fn_config_dll user.exe16 wine_fn_config_makefile dlls/user.exe16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/user.exe16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/user32/libuser32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/user32/libuser32.$IMPLIBEXT dlls/user32/libuser32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/user32/libuser32.$IMPLIBEXT dlls/user32/libuser32.cross.a: dlls/user32/user32.spec dlls/user32/Makefile - @cd dlls/user32 && \$(MAKE) \`basename \$@\` -dlls/user32 dlls/user32/__install__ dlls/user32/__install-lib__ dlls/user32/__install-dev__: __builddeps__" +wine_fn_config_dll user32 user32 wine_fn_config_makefile dlls/user32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_user32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/user32" @@ -15948,10 +15690,7 @@ wine_fn_config_makefile dlls/user32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/user32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/userenv/libuserenv.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/userenv/libuserenv.$IMPLIBEXT dlls/userenv/libuserenv.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/userenv/libuserenv.$IMPLIBEXT dlls/userenv/libuserenv.cross.a: dlls/userenv/userenv.spec dlls/userenv/Makefile - @cd dlls/userenv && \$(MAKE) \`basename \$@\` -dlls/userenv dlls/userenv/__install__ dlls/userenv/__install-lib__ dlls/userenv/__install-dev__: __builddeps__" +wine_fn_config_dll userenv userenv wine_fn_config_makefile dlls/userenv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_userenv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/userenv" @@ -15960,10 +15699,7 @@ wine_fn_config_makefile dlls/userenv/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/userenv/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/usp10/libusp10.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/usp10/libusp10.$IMPLIBEXT dlls/usp10/libusp10.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/usp10/libusp10.$IMPLIBEXT dlls/usp10/libusp10.cross.a: dlls/usp10/usp10.spec dlls/usp10/Makefile - @cd dlls/usp10 && \$(MAKE) \`basename \$@\` -dlls/usp10 dlls/usp10/__install__ dlls/usp10/__install-lib__ dlls/usp10/__install-dev__: __builddeps__" +wine_fn_config_dll usp10 usp10 wine_fn_config_makefile dlls/usp10 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_usp10" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/usp10" @@ -15976,10 +15712,7 @@ wine_fn_config_makefile dlls/uuid "dlls/Makeimplib.rules \$(MAKEDEP)" test "x$enable_uuid" != xno && wine_fn_append_file ALL_STATICLIB_DIRS "dlls/uuid" wine_fn_append_file ALL_IMPORT_LIBS "dlls/uxtheme/libuxtheme.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/uxtheme/libuxtheme.$IMPLIBEXT dlls/uxtheme/libuxtheme.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/uxtheme/libuxtheme.$IMPLIBEXT dlls/uxtheme/libuxtheme.cross.a: dlls/uxtheme/uxtheme.spec dlls/uxtheme/Makefile - @cd dlls/uxtheme && \$(MAKE) \`basename \$@\` -dlls/uxtheme dlls/uxtheme/__install__ dlls/uxtheme/__install-lib__ dlls/uxtheme/__install-dev__: __builddeps__" +wine_fn_config_dll uxtheme uxtheme wine_fn_config_makefile dlls/uxtheme "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_uxtheme" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/uxtheme" @@ -15987,27 +15720,21 @@ wine_fn_config_test dlls/uxtheme/tests uxtheme_test wine_fn_config_makefile dlls/uxtheme/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/uxtheme/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vdhcp.vxd dlls/vdhcp.vxd/__install__ dlls/vdhcp.vxd/__install-lib__ dlls/vdhcp.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll vdhcp.vxd wine_fn_config_makefile dlls/vdhcp.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vdhcp.vxd" wine_fn_append_file ALL_IMPORT_LIBS "dlls/vdmdbg/libvdmdbg.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vdmdbg/libvdmdbg.$IMPLIBEXT dlls/vdmdbg/libvdmdbg.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/vdmdbg/libvdmdbg.$IMPLIBEXT dlls/vdmdbg/libvdmdbg.cross.a: dlls/vdmdbg/vdmdbg.spec dlls/vdmdbg/Makefile - @cd dlls/vdmdbg && \$(MAKE) \`basename \$@\` -dlls/vdmdbg dlls/vdmdbg/__install__ dlls/vdmdbg/__install-lib__ dlls/vdmdbg/__install-dev__: __builddeps__" +wine_fn_config_dll vdmdbg vdmdbg wine_fn_config_makefile dlls/vdmdbg "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_vdmdbg" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vdmdbg" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ver.dll16 dlls/ver.dll16/__install__ dlls/ver.dll16/__install-lib__ dlls/ver.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll ver.dll16 wine_fn_config_makefile dlls/ver.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ver.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/version/libversion.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/version/libversion.$IMPLIBEXT dlls/version/libversion.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/version/libversion.$IMPLIBEXT dlls/version/libversion.cross.a: dlls/version/version.spec dlls/version/Makefile - @cd dlls/version && \$(MAKE) \`basename \$@\` -dlls/version dlls/version/__install__ dlls/version/__install-lib__ dlls/version/__install-dev__: __builddeps__" +wine_fn_config_dll version version wine_fn_config_makefile dlls/version "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_version" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/version" @@ -16015,63 +15742,60 @@ wine_fn_config_test dlls/version/tests version_test wine_fn_config_makefile dlls/version/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/version/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vmm.vxd dlls/vmm.vxd/__install__ dlls/vmm.vxd/__install-lib__ dlls/vmm.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll vmm.vxd wine_fn_config_makefile dlls/vmm.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vmm.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vnbt.vxd dlls/vnbt.vxd/__install__ dlls/vnbt.vxd/__install-lib__ dlls/vnbt.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll vnbt.vxd wine_fn_config_makefile dlls/vnbt.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vnbt.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vnetbios.vxd dlls/vnetbios.vxd/__install__ dlls/vnetbios.vxd/__install-lib__ dlls/vnetbios.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll vnetbios.vxd wine_fn_config_makefile dlls/vnetbios.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vnetbios.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vtdapi.vxd dlls/vtdapi.vxd/__install__ dlls/vtdapi.vxd/__install-lib__ dlls/vtdapi.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll vtdapi.vxd wine_fn_config_makefile dlls/vtdapi.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vtdapi.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/vwin32.vxd dlls/vwin32.vxd/__install__ dlls/vwin32.vxd/__install-lib__ dlls/vwin32.vxd/__install-dev__: __builddeps__" +wine_fn_config_dll vwin32.vxd wine_fn_config_makefile dlls/vwin32.vxd "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/vwin32.vxd" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/w32skrnl dlls/w32skrnl/__install__ dlls/w32skrnl/__install-lib__ dlls/w32skrnl/__install-dev__: __builddeps__" +wine_fn_config_dll w32skrnl wine_fn_config_makefile dlls/w32skrnl "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/w32skrnl" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/w32sys.dll16 dlls/w32sys.dll16/__install__ dlls/w32sys.dll16/__install-lib__ dlls/w32sys.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll w32sys.dll16 wine_fn_config_makefile dlls/w32sys.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/w32sys.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wbemprox dlls/wbemprox/__install__ dlls/wbemprox/__install-lib__ dlls/wbemprox/__install-dev__: __builddeps__" +wine_fn_config_dll wbemprox wine_fn_config_makefile dlls/wbemprox "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wbemprox" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wbemprox" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wiaservc dlls/wiaservc/__install__ dlls/wiaservc/__install-lib__ dlls/wiaservc/__install-dev__: __builddeps__" +wine_fn_config_dll wiaservc wine_fn_config_makefile dlls/wiaservc "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wiaservc" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wiaservc" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/win32s16.dll16 dlls/win32s16.dll16/__install__ dlls/win32s16.dll16/__install-lib__ dlls/win32s16.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll win32s16.dll16 wine_fn_config_makefile dlls/win32s16.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/win32s16.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/win87em.dll16 dlls/win87em.dll16/__install__ dlls/win87em.dll16/__install-lib__ dlls/win87em.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll win87em.dll16 wine_fn_config_makefile dlls/win87em.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/win87em.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winaspi.dll16 dlls/winaspi.dll16/__install__ dlls/winaspi.dll16/__install-lib__ dlls/winaspi.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll winaspi.dll16 wine_fn_config_makefile dlls/winaspi.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winaspi.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/windebug.dll16 dlls/windebug.dll16/__install__ dlls/windebug.dll16/__install-lib__ dlls/windebug.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll windebug.dll16 wine_fn_config_makefile dlls/windebug.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/windebug.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/windowscodecs/libwindowscodecs.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/windowscodecs/libwindowscodecs.$IMPLIBEXT dlls/windowscodecs/libwindowscodecs.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/windowscodecs/libwindowscodecs.$IMPLIBEXT dlls/windowscodecs/libwindowscodecs.cross.a: dlls/windowscodecs/windowscodecs.spec dlls/windowscodecs/Makefile - @cd dlls/windowscodecs && \$(MAKE) \`basename \$@\` -dlls/windowscodecs dlls/windowscodecs/__install__ dlls/windowscodecs/__install-lib__ dlls/windowscodecs/__install-dev__: __builddeps__" +wine_fn_config_dll windowscodecs windowscodecs wine_fn_config_makefile dlls/windowscodecs "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_windowscodecs" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/windowscodecs" @@ -16079,15 +15803,15 @@ wine_fn_config_test dlls/windowscodecs/tests windowscodecs_test wine_fn_config_makefile dlls/windowscodecs/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/windowscodecs/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winealsa.drv dlls/winealsa.drv/__install__ dlls/winealsa.drv/__install-lib__ dlls/winealsa.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winealsa.drv wine_fn_config_makefile dlls/winealsa.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winealsa_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winealsa.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wineaudioio.drv dlls/wineaudioio.drv/__install__ dlls/wineaudioio.drv/__install-lib__ dlls/wineaudioio.drv/__install-dev__: __builddeps__" +wine_fn_config_dll wineaudioio.drv wine_fn_config_makefile dlls/wineaudioio.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wineaudioio_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wineaudioio.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winecoreaudio.drv dlls/winecoreaudio.drv/__install__ dlls/winecoreaudio.drv/__install-lib__ dlls/winecoreaudio.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winecoreaudio.drv wine_fn_config_makefile dlls/winecoreaudio.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winecoreaudio_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winecoreaudio.drv" @@ -16096,76 +15820,67 @@ wine_fn_config_makefile dlls/winecrt0 "dlls/Makeimplib.rules \$(MAKEDEP)" test "x$enable_winecrt0" != xno && wine_fn_append_file ALL_STATICLIB_DIRS "dlls/winecrt0" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wined3d/libwined3d.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wined3d/libwined3d.$IMPLIBEXT dlls/wined3d/libwined3d.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wined3d/libwined3d.$IMPLIBEXT dlls/wined3d/libwined3d.cross.a: dlls/wined3d/wined3d.spec dlls/wined3d/Makefile - @cd dlls/wined3d && \$(MAKE) \`basename \$@\` -dlls/wined3d dlls/wined3d/__install__ dlls/wined3d/__install-lib__ dlls/wined3d/__install-dev__: __builddeps__" +wine_fn_config_dll wined3d wined3d wine_fn_config_makefile dlls/wined3d "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wined3d" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wined3d" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wineesd.drv dlls/wineesd.drv/__install__ dlls/wineesd.drv/__install-lib__ dlls/wineesd.drv/__install-dev__: __builddeps__" +wine_fn_config_dll wineesd.drv wine_fn_config_makefile dlls/wineesd.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wineesd_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wineesd.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winejack.drv dlls/winejack.drv/__install__ dlls/winejack.drv/__install-lib__ dlls/winejack.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winejack.drv wine_fn_config_makefile dlls/winejack.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winejack_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winejack.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winejoystick.drv dlls/winejoystick.drv/__install__ dlls/winejoystick.drv/__install-lib__ dlls/winejoystick.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winejoystick.drv wine_fn_config_makefile dlls/winejoystick.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winejoystick_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winejoystick.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winemapi dlls/winemapi/__install__ dlls/winemapi/__install-lib__ dlls/winemapi/__install-dev__: __builddeps__" +wine_fn_config_dll winemapi wine_fn_config_makefile dlls/winemapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winemapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winemapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winemp3.acm dlls/winemp3.acm/__install__ dlls/winemp3.acm/__install-lib__ dlls/winemp3.acm/__install-dev__: __builddeps__" +wine_fn_config_dll winemp3.acm wine_fn_config_makefile dlls/winemp3.acm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winemp3_acm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winemp3.acm" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winenas.drv dlls/winenas.drv/__install__ dlls/winenas.drv/__install-lib__ dlls/winenas.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winenas.drv wine_fn_config_makefile dlls/winenas.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winenas_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winenas.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wineoss.drv dlls/wineoss.drv/__install__ dlls/wineoss.drv/__install-lib__ dlls/wineoss.drv/__install-dev__: __builddeps__" +wine_fn_config_dll wineoss.drv wine_fn_config_makefile dlls/wineoss.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wineoss_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wineoss.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wineps.drv dlls/wineps.drv/__install__ dlls/wineps.drv/__install-lib__ dlls/wineps.drv/__install-dev__: __builddeps__" +wine_fn_config_dll wineps.drv wine_fn_config_makefile dlls/wineps.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wineps_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wineps.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wineps16.drv16 dlls/wineps16.drv16/__install__ dlls/wineps16.drv16/__install-lib__ dlls/wineps16.drv16/__install-dev__: __builddeps__" +wine_fn_config_dll wineps16.drv16 wine_fn_config_makefile dlls/wineps16.drv16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wineps16.drv16" -wine_fn_append_file ALL_DIRS "dlls/winepulse.drv" +wine_fn_config_makefile dlls/winepulse.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$ALL_DLL_DIRS" != xno && wine_fn_append_file dlls "dlls/winepulse.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "\$(RECURSE_TARGETS:%=dlls/winepulse.drv/%) dlls/winepulse.drv: dlls/winepulse.drv/Makefile \$(MAKEDEP) -dlls/winepulse.drv/Makefile: dlls/winepulse.drv/Makefile.in dlls/Makedll.rules config.status" -ac_config_files="$ac_config_files dlls/winepulse.drv/Makefile" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winequartz.drv dlls/winequartz.drv/__install__ dlls/winequartz.drv/__install-lib__ dlls/winequartz.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winequartz.drv wine_fn_config_makefile dlls/winequartz.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winequartz_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winequartz.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winex11.drv dlls/winex11.drv/__install__ dlls/winex11.drv/__install-lib__ dlls/winex11.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winex11.drv wine_fn_config_makefile dlls/winex11.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winex11_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winex11.drv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wing.dll16 dlls/wing.dll16/__install__ dlls/wing.dll16/__install-lib__ dlls/wing.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll wing.dll16 wine_fn_config_makefile dlls/wing.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wing.dll16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wing32 dlls/wing32/__install__ dlls/wing32/__install-lib__ dlls/wing32/__install-dev__: __builddeps__" +wine_fn_config_dll wing32 wine_fn_config_makefile dlls/wing32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wing32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wing32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/winhttp/libwinhttp.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winhttp/libwinhttp.$IMPLIBEXT dlls/winhttp/libwinhttp.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/winhttp/libwinhttp.$IMPLIBEXT dlls/winhttp/libwinhttp.cross.a: dlls/winhttp/winhttp.spec dlls/winhttp/Makefile - @cd dlls/winhttp && \$(MAKE) \`basename \$@\` -dlls/winhttp dlls/winhttp/__install__ dlls/winhttp/__install-lib__ dlls/winhttp/__install-dev__: __builddeps__" +wine_fn_config_dll winhttp winhttp wine_fn_config_makefile dlls/winhttp "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winhttp" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winhttp" @@ -16174,10 +15889,7 @@ wine_fn_config_makefile dlls/winhttp/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/winhttp/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wininet/libwininet.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wininet/libwininet.$IMPLIBEXT dlls/wininet/libwininet.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wininet/libwininet.$IMPLIBEXT dlls/wininet/libwininet.cross.a: dlls/wininet/wininet.spec dlls/wininet/Makefile - @cd dlls/wininet && \$(MAKE) \`basename \$@\` -dlls/wininet dlls/wininet/__install__ dlls/wininet/__install-lib__ dlls/wininet/__install-dev__: __builddeps__" +wine_fn_config_dll wininet wininet wine_fn_config_makefile dlls/wininet "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wininet" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wininet" @@ -16186,10 +15898,7 @@ wine_fn_config_makefile dlls/wininet/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/wininet/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/winmm/libwinmm.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winmm/libwinmm.$IMPLIBEXT dlls/winmm/libwinmm.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/winmm/libwinmm.$IMPLIBEXT dlls/winmm/libwinmm.cross.a: dlls/winmm/winmm.spec dlls/winmm/Makefile - @cd dlls/winmm && \$(MAKE) \`basename \$@\` -dlls/winmm dlls/winmm/__install__ dlls/winmm/__install-lib__ dlls/winmm/__install-dev__: __builddeps__" +wine_fn_config_dll winmm winmm wine_fn_config_makefile dlls/winmm "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winmm" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winmm" @@ -16197,41 +15906,26 @@ wine_fn_config_test dlls/winmm/tests winmm_test wine_fn_config_makefile dlls/winmm/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/winmm/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winnls.dll16 dlls/winnls.dll16/__install__ dlls/winnls.dll16/__install-lib__ dlls/winnls.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll winnls.dll16 wine_fn_config_makefile dlls/winnls.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winnls.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/winnls32/libwinnls32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winnls32/libwinnls32.$IMPLIBEXT dlls/winnls32/libwinnls32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/winnls32/libwinnls32.$IMPLIBEXT dlls/winnls32/libwinnls32.cross.a: dlls/winnls32/winnls32.spec dlls/winnls32/Makefile - @cd dlls/winnls32 && \$(MAKE) \`basename \$@\` -dlls/winnls32 dlls/winnls32/__install__ dlls/winnls32/__install-lib__ dlls/winnls32/__install-dev__: __builddeps__" +wine_fn_config_dll winnls32 winnls32 wine_fn_config_makefile dlls/winnls32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winnls32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winnls32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/winscard/libwinscard.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winscard/libwinscard.$IMPLIBEXT dlls/winscard/libwinscard.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/winscard/libwinscard.$IMPLIBEXT dlls/winscard/libwinscard.cross.a: dlls/winscard/winscard.spec dlls/winscard/Makefile - @cd dlls/winscard && \$(MAKE) \`basename \$@\` -dlls/winscard dlls/winscard/__install__ dlls/winscard/__install-lib__ dlls/winscard/__install-dev__: __builddeps__" +wine_fn_config_dll winscard winscard wine_fn_config_makefile dlls/winscard "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winscard" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winscard" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winsock.dll16 dlls/winsock.dll16/__install__ dlls/winsock.dll16/__install-lib__ dlls/winsock.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll winsock.dll16 wine_fn_config_makefile dlls/winsock.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winsock.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/winspool.drv/libwinspool.$IMPLIBEXT" && wine_fn_append_file ALL_IMPORT_LIBS "dlls/libwinspool.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/winspool.drv/libwinspool.$IMPLIBEXT dlls/winspool.drv/libwinspool.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/libwinspool.$IMPLIBEXT: dlls/winspool.drv/libwinspool.$IMPLIBEXT - \$(RM) \$@ && \$(LN_S) winspool.drv/libwinspool.$IMPLIBEXT \$@ -dlls/libwinspool.cross.a: dlls/winspool.drv/libwinspool.cross.a - \$(RM) \$@ && \$(LN_S) winspool.drv/libwinspool.cross.a \$@ -clean:: - \$(RM) dlls/libwinspool.$IMPLIBEXT -dlls/winspool.drv/libwinspool.$IMPLIBEXT dlls/winspool.drv/libwinspool.cross.a: dlls/winspool.drv/winspool.drv.spec dlls/winspool.drv/Makefile - @cd dlls/winspool.drv && \$(MAKE) \`basename \$@\` -dlls/winspool.drv dlls/winspool.drv/__install__ dlls/winspool.drv/__install-lib__ dlls/winspool.drv/__install-dev__: __builddeps__" +wine_fn_config_dll winspool.drv winspool wine_fn_config_makefile dlls/winspool.drv "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_winspool_drv" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/winspool.drv" @@ -16239,15 +15933,12 @@ wine_fn_config_test dlls/winspool.drv/tests winspool.drv_test wine_fn_config_makefile dlls/winspool.drv/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/winspool.drv/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wintab.dll16 dlls/wintab.dll16/__install__ dlls/wintab.dll16/__install-lib__ dlls/wintab.dll16/__install-dev__: __builddeps__" +wine_fn_config_dll wintab.dll16 wine_fn_config_makefile dlls/wintab.dll16 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wintab.dll16" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wintab32/libwintab32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wintab32/libwintab32.$IMPLIBEXT dlls/wintab32/libwintab32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wintab32/libwintab32.$IMPLIBEXT dlls/wintab32/libwintab32.cross.a: dlls/wintab32/wintab32.spec dlls/wintab32/Makefile - @cd dlls/wintab32 && \$(MAKE) \`basename \$@\` -dlls/wintab32 dlls/wintab32/__install__ dlls/wintab32/__install-lib__ dlls/wintab32/__install-dev__: __builddeps__" +wine_fn_config_dll wintab32 wintab32 wine_fn_config_makefile dlls/wintab32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wintab32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wintab32" @@ -16256,10 +15947,7 @@ wine_fn_config_makefile dlls/wintab32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/wintab32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wintrust/libwintrust.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wintrust/libwintrust.$IMPLIBEXT dlls/wintrust/libwintrust.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wintrust/libwintrust.$IMPLIBEXT dlls/wintrust/libwintrust.cross.a: dlls/wintrust/wintrust.spec dlls/wintrust/Makefile - @cd dlls/wintrust && \$(MAKE) \`basename \$@\` -dlls/wintrust dlls/wintrust/__install__ dlls/wintrust/__install-lib__ dlls/wintrust/__install-dev__: __builddeps__" +wine_fn_config_dll wintrust wintrust wine_fn_config_makefile dlls/wintrust "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wintrust" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wintrust" @@ -16268,10 +15956,7 @@ wine_fn_config_makefile dlls/wintrust/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/wintrust/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wldap32/libwldap32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wldap32/libwldap32.$IMPLIBEXT dlls/wldap32/libwldap32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wldap32/libwldap32.$IMPLIBEXT dlls/wldap32/libwldap32.cross.a: dlls/wldap32/wldap32.spec dlls/wldap32/Makefile - @cd dlls/wldap32 && \$(MAKE) \`basename \$@\` -dlls/wldap32 dlls/wldap32/__install__ dlls/wldap32/__install-lib__ dlls/wldap32/__install-dev__: __builddeps__" +wine_fn_config_dll wldap32 wldap32 wine_fn_config_makefile dlls/wldap32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wldap32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wldap32" @@ -16279,35 +15964,26 @@ wine_fn_config_test dlls/wldap32/tests wldap32_test wine_fn_config_makefile dlls/wldap32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/wldap32/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wmi dlls/wmi/__install__ dlls/wmi/__install-lib__ dlls/wmi/__install-dev__: __builddeps__" +wine_fn_config_dll wmi wine_fn_config_makefile dlls/wmi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wmi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wmi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wmiutils dlls/wmiutils/__install__ dlls/wmiutils/__install-lib__ dlls/wmiutils/__install-dev__: __builddeps__" +wine_fn_config_dll wmiutils wine_fn_config_makefile dlls/wmiutils "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wmiutils" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wmiutils" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wnaspi32/libwnaspi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wnaspi32/libwnaspi32.$IMPLIBEXT dlls/wnaspi32/libwnaspi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wnaspi32/libwnaspi32.$IMPLIBEXT dlls/wnaspi32/libwnaspi32.cross.a: dlls/wnaspi32/wnaspi32.spec dlls/wnaspi32/Makefile - @cd dlls/wnaspi32 && \$(MAKE) \`basename \$@\` -dlls/wnaspi32 dlls/wnaspi32/__install__ dlls/wnaspi32/__install-lib__ dlls/wnaspi32/__install-dev__: __builddeps__" +wine_fn_config_dll wnaspi32 wnaspi32 wine_fn_config_makefile dlls/wnaspi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wnaspi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wnaspi32" test "x$enable_win16" != xno && wine_fn_append_file ALL_IMPORT_LIBS "dlls/wow32/libwow32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wow32/libwow32.$IMPLIBEXT dlls/wow32/libwow32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wow32/libwow32.$IMPLIBEXT dlls/wow32/libwow32.cross.a: dlls/wow32/wow32.spec dlls/wow32/Makefile - @cd dlls/wow32 && \$(MAKE) \`basename \$@\` -dlls/wow32 dlls/wow32/__install__ dlls/wow32/__install-lib__ dlls/wow32/__install-dev__: __builddeps__" +wine_fn_config_dll wow32 wow32 wine_fn_config_makefile dlls/wow32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wow32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/ws2_32/libws2_32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/ws2_32/libws2_32.$IMPLIBEXT dlls/ws2_32/libws2_32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/ws2_32/libws2_32.$IMPLIBEXT dlls/ws2_32/libws2_32.cross.a: dlls/ws2_32/ws2_32.spec dlls/ws2_32/Makefile - @cd dlls/ws2_32 && \$(MAKE) \`basename \$@\` -dlls/ws2_32 dlls/ws2_32/__install__ dlls/ws2_32/__install-lib__ dlls/ws2_32/__install-dev__: __builddeps__" +wine_fn_config_dll ws2_32 ws2_32 wine_fn_config_makefile dlls/ws2_32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_ws2_32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/ws2_32" @@ -16316,48 +15992,33 @@ wine_fn_config_makefile dlls/ws2_32/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/ws2_32/tests" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wsock32/libwsock32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wsock32/libwsock32.$IMPLIBEXT dlls/wsock32/libwsock32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wsock32/libwsock32.$IMPLIBEXT dlls/wsock32/libwsock32.cross.a: dlls/wsock32/wsock32.spec dlls/wsock32/Makefile - @cd dlls/wsock32 && \$(MAKE) \`basename \$@\` -dlls/wsock32 dlls/wsock32/__install__ dlls/wsock32/__install-lib__ dlls/wsock32/__install-dev__: __builddeps__" +wine_fn_config_dll wsock32 wsock32 wine_fn_config_makefile dlls/wsock32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wsock32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wsock32" wine_fn_append_file ALL_IMPORT_LIBS "dlls/wtsapi32/libwtsapi32.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wtsapi32/libwtsapi32.$IMPLIBEXT dlls/wtsapi32/libwtsapi32.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/wtsapi32/libwtsapi32.$IMPLIBEXT dlls/wtsapi32/libwtsapi32.cross.a: dlls/wtsapi32/wtsapi32.spec dlls/wtsapi32/Makefile - @cd dlls/wtsapi32 && \$(MAKE) \`basename \$@\` -dlls/wtsapi32 dlls/wtsapi32/__install__ dlls/wtsapi32/__install-lib__ dlls/wtsapi32/__install-dev__: __builddeps__" +wine_fn_config_dll wtsapi32 wtsapi32 wine_fn_config_makefile dlls/wtsapi32 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wtsapi32" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wtsapi32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wuapi dlls/wuapi/__install__ dlls/wuapi/__install-lib__ dlls/wuapi/__install-dev__: __builddeps__" +wine_fn_config_dll wuapi wine_fn_config_makefile dlls/wuapi "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wuapi" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wuapi" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/wuaueng dlls/wuaueng/__install__ dlls/wuaueng/__install-lib__ dlls/wuaueng/__install-dev__: __builddeps__" +wine_fn_config_dll wuaueng wine_fn_config_makefile dlls/wuaueng "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_wuaueng" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/wuaueng" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/xinput1_1 dlls/xinput1_1/__install__ dlls/xinput1_1/__install-lib__ dlls/xinput1_1/__install-dev__: __builddeps__" +wine_fn_config_dll xinput1_1 wine_fn_config_makefile dlls/xinput1_1 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_xinput1_1" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/xinput1_1" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/xinput1_2 dlls/xinput1_2/__install__ dlls/xinput1_2/__install-lib__ dlls/xinput1_2/__install-dev__: __builddeps__" +wine_fn_config_dll xinput1_2 wine_fn_config_makefile dlls/xinput1_2 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_xinput1_2" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/xinput1_2" wine_fn_append_file ALL_IMPORT_LIBS "dlls/xinput1_3/libxinput.$IMPLIBEXT" && wine_fn_append_file ALL_IMPORT_LIBS "dlls/libxinput.$IMPLIBEXT" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/xinput1_3/libxinput.$IMPLIBEXT dlls/xinput1_3/libxinput.cross.a: tools/widl tools/winebuild tools/winegcc include -dlls/libxinput.$IMPLIBEXT: dlls/xinput1_3/libxinput.$IMPLIBEXT - \$(RM) \$@ && \$(LN_S) xinput1_3/libxinput.$IMPLIBEXT \$@ -dlls/libxinput.cross.a: dlls/xinput1_3/libxinput.cross.a - \$(RM) \$@ && \$(LN_S) xinput1_3/libxinput.cross.a \$@ -clean:: - \$(RM) dlls/libxinput.$IMPLIBEXT -dlls/xinput1_3/libxinput.$IMPLIBEXT dlls/xinput1_3/libxinput.cross.a: dlls/xinput1_3/xinput1_3.spec dlls/xinput1_3/Makefile - @cd dlls/xinput1_3 && \$(MAKE) \`basename \$@\` -dlls/xinput1_3 dlls/xinput1_3/__install__ dlls/xinput1_3/__install-lib__ dlls/xinput1_3/__install-dev__: __builddeps__" +wine_fn_config_dll xinput1_3 xinput wine_fn_config_makefile dlls/xinput1_3 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_xinput1_3" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/xinput1_3" @@ -16365,11 +16026,11 @@ wine_fn_config_test dlls/xinput1_3/tests xinput1_3_test wine_fn_config_makefile dlls/xinput1_3/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "dlls/xinput1_3/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/xinput9_1_0 dlls/xinput9_1_0/__install__ dlls/xinput9_1_0/__install-lib__ dlls/xinput9_1_0/__install-dev__: __builddeps__" +wine_fn_config_dll xinput9_1_0 wine_fn_config_makefile dlls/xinput9_1_0 "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_xinput9_1_0" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/xinput9_1_0" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "dlls/xmllite dlls/xmllite/__install__ dlls/xmllite/__install-lib__ dlls/xmllite/__install-dev__: __builddeps__" +wine_fn_config_dll xmllite wine_fn_config_makefile dlls/xmllite "dlls/Makedll.rules \$(MAKEDEP)" test "x$enable_xmllite" != xno && wine_fn_append_file ALL_DLL_DIRS "dlls/xmllite" @@ -16401,15 +16062,19 @@ test "x$enable_loader" != xno && wine_fn_append_file ALL_TOP_DIRS "loader" wine_fn_config_makefile programs "Make.rules \$(MAKEDEP)" test "x$enable_programs" != xno && wine_fn_append_file ALL_TOP_DIRS "programs" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/cacls programs/cacls/__install__ programs/cacls/__install-lib__: __builddeps__" +wine_fn_config_program attrib +wine_fn_config_makefile programs/attrib "programs/Makeprog.rules \$(MAKEDEP)" +test "x$enable_attrib" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/attrib" && wine_fn_append_file ALL_INSTALL_DIRS "programs/attrib" + +wine_fn_config_program cacls wine_fn_config_makefile programs/cacls "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_cacls" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/cacls" && wine_fn_append_file ALL_INSTALL_DIRS "programs/cacls" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/clock programs/clock/__install__ programs/clock/__install-lib__: __builddeps__" +wine_fn_config_program clock wine_fn_config_makefile programs/clock "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_clock" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/clock" && wine_fn_append_file ALL_INSTALL_DIRS "programs/clock" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/cmd programs/cmd/__install__ programs/cmd/__install-lib__: __builddeps__" +wine_fn_config_program cmd wine_fn_config_makefile programs/cmd "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_cmd" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/cmd" && wine_fn_append_file ALL_INSTALL_DIRS "programs/cmd" @@ -16417,207 +16082,211 @@ wine_fn_config_test programs/cmd/tests cmd.exe_test wine_fn_config_makefile programs/cmd/tests "Maketest.rules \$(MAKEDEP)" test "x$enable_tests" != xno && wine_fn_append_file ALL_TEST_DIRS "programs/cmd/tests" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/cmdlgtst programs/cmdlgtst/__install__ programs/cmdlgtst/__install-lib__: __builddeps__" +wine_fn_config_program cmdlgtst wine_fn_config_makefile programs/cmdlgtst "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_cmdlgtst" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/cmdlgtst" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/control programs/control/__install__ programs/control/__install-lib__: __builddeps__" +wine_fn_config_program control wine_fn_config_makefile programs/control "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_control" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/control" && wine_fn_append_file ALL_INSTALL_DIRS "programs/control" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/dxdiag programs/dxdiag/__install__ programs/dxdiag/__install-lib__: __builddeps__" +wine_fn_config_program dxdiag wine_fn_config_makefile programs/dxdiag "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_dxdiag" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/dxdiag" && wine_fn_append_file ALL_INSTALL_DIRS "programs/dxdiag" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/eject programs/eject/__install__ programs/eject/__install-lib__: __builddeps__" +wine_fn_config_program eject wine_fn_config_makefile programs/eject "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_eject" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/eject" && wine_fn_append_file ALL_INSTALL_DIRS "programs/eject" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/expand programs/expand/__install__ programs/expand/__install-lib__: __builddeps__" +wine_fn_config_program expand wine_fn_config_makefile programs/expand "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_expand" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/expand" && wine_fn_append_file ALL_INSTALL_DIRS "programs/expand" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/explorer programs/explorer/__install__ programs/explorer/__install-lib__: __builddeps__" +wine_fn_config_program explorer wine_fn_config_makefile programs/explorer "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_explorer" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/explorer" && wine_fn_append_file ALL_INSTALL_DIRS "programs/explorer" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/extrac32 programs/extrac32/__install__ programs/extrac32/__install-lib__: __builddeps__" +wine_fn_config_program extrac32 wine_fn_config_makefile programs/extrac32 "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_extrac32" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/extrac32" && wine_fn_append_file ALL_INSTALL_DIRS "programs/extrac32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/hh programs/hh/__install__ programs/hh/__install-lib__: __builddeps__" +wine_fn_config_program hh wine_fn_config_makefile programs/hh "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_hh" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/hh" && wine_fn_append_file ALL_INSTALL_DIRS "programs/hh" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/icinfo programs/icinfo/__install__ programs/icinfo/__install-lib__: __builddeps__" +wine_fn_config_program icinfo wine_fn_config_makefile programs/icinfo "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_icinfo" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/icinfo" && wine_fn_append_file ALL_INSTALL_DIRS "programs/icinfo" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/iexplore programs/iexplore/__install__ programs/iexplore/__install-lib__: __builddeps__" +wine_fn_config_program iexplore wine_fn_config_makefile programs/iexplore "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_iexplore" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/iexplore" && wine_fn_append_file ALL_INSTALL_DIRS "programs/iexplore" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/lodctr programs/lodctr/__install__ programs/lodctr/__install-lib__: __builddeps__" +wine_fn_config_program lodctr wine_fn_config_makefile programs/lodctr "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_lodctr" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/lodctr" && wine_fn_append_file ALL_INSTALL_DIRS "programs/lodctr" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/mshta programs/mshta/__install__ programs/mshta/__install-lib__: __builddeps__" +wine_fn_config_program mshta wine_fn_config_makefile programs/mshta "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_mshta" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/mshta" && wine_fn_append_file ALL_INSTALL_DIRS "programs/mshta" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/msiexec programs/msiexec/__install__ programs/msiexec/__install-lib__: __builddeps__" +wine_fn_config_program msiexec wine_fn_config_makefile programs/msiexec "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_msiexec" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/msiexec" && wine_fn_append_file ALL_INSTALL_DIRS "programs/msiexec" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/msiexec" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/net programs/net/__install__ programs/net/__install-lib__: __builddeps__" +wine_fn_config_program net wine_fn_config_makefile programs/net "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_net" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/net" && wine_fn_append_file ALL_INSTALL_DIRS "programs/net" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/notepad programs/notepad/__install__ programs/notepad/__install-lib__: __builddeps__" +wine_fn_config_program notepad wine_fn_config_makefile programs/notepad "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_notepad" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/notepad" && wine_fn_append_file ALL_INSTALL_DIRS "programs/notepad" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/notepad" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/oleview programs/oleview/__install__ programs/oleview/__install-lib__: __builddeps__" +wine_fn_config_program oleview wine_fn_config_makefile programs/oleview "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_oleview" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/oleview" && wine_fn_append_file ALL_INSTALL_DIRS "programs/oleview" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/progman programs/progman/__install__ programs/progman/__install-lib__: __builddeps__" +wine_fn_config_program ping +wine_fn_config_makefile programs/ping "programs/Makeprog.rules \$(MAKEDEP)" +test "x$enable_ping" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/ping" && wine_fn_append_file ALL_INSTALL_DIRS "programs/ping" + +wine_fn_config_program progman wine_fn_config_makefile programs/progman "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_progman" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/progman" && wine_fn_append_file ALL_INSTALL_DIRS "programs/progman" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/reg programs/reg/__install__ programs/reg/__install-lib__: __builddeps__" +wine_fn_config_program reg wine_fn_config_makefile programs/reg "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_reg" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/reg" && wine_fn_append_file ALL_INSTALL_DIRS "programs/reg" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/regedit programs/regedit/__install__ programs/regedit/__install-lib__: __builddeps__" +wine_fn_config_program regedit wine_fn_config_makefile programs/regedit "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_regedit" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/regedit" && wine_fn_append_file ALL_INSTALL_DIRS "programs/regedit" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/regedit" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/regsvr32 programs/regsvr32/__install__ programs/regsvr32/__install-lib__: __builddeps__" +wine_fn_config_program regsvr32 wine_fn_config_makefile programs/regsvr32 "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_regsvr32" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/regsvr32" && wine_fn_append_file ALL_INSTALL_DIRS "programs/regsvr32" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/regsvr32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/rpcss programs/rpcss/__install__ programs/rpcss/__install-lib__: __builddeps__" +wine_fn_config_program rpcss wine_fn_config_makefile programs/rpcss "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_rpcss" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/rpcss" && wine_fn_append_file ALL_INSTALL_DIRS "programs/rpcss" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/rundll32 programs/rundll32/__install__ programs/rundll32/__install-lib__: __builddeps__" +wine_fn_config_program rundll32 wine_fn_config_makefile programs/rundll32 "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_rundll32" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/rundll32" && wine_fn_append_file ALL_INSTALL_DIRS "programs/rundll32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/secedit programs/secedit/__install__ programs/secedit/__install-lib__: __builddeps__" +wine_fn_config_program secedit wine_fn_config_makefile programs/secedit "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_secedit" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/secedit" && wine_fn_append_file ALL_INSTALL_DIRS "programs/secedit" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/services programs/services/__install__ programs/services/__install-lib__: __builddeps__" +wine_fn_config_program services wine_fn_config_makefile programs/services "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_services" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/services" && wine_fn_append_file ALL_INSTALL_DIRS "programs/services" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/spoolsv programs/spoolsv/__install__ programs/spoolsv/__install-lib__: __builddeps__" +wine_fn_config_program spoolsv wine_fn_config_makefile programs/spoolsv "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_spoolsv" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/spoolsv" && wine_fn_append_file ALL_INSTALL_DIRS "programs/spoolsv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/start programs/start/__install__ programs/start/__install-lib__: __builddeps__" +wine_fn_config_program start wine_fn_config_makefile programs/start "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_start" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/start" && wine_fn_append_file ALL_INSTALL_DIRS "programs/start" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/svchost programs/svchost/__install__ programs/svchost/__install-lib__: __builddeps__" +wine_fn_config_program svchost wine_fn_config_makefile programs/svchost "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_svchost" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/svchost" && wine_fn_append_file ALL_INSTALL_DIRS "programs/svchost" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/taskmgr programs/taskmgr/__install__ programs/taskmgr/__install-lib__: __builddeps__" +wine_fn_config_program taskmgr wine_fn_config_makefile programs/taskmgr "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_taskmgr" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/taskmgr" && wine_fn_append_file ALL_INSTALL_DIRS "programs/taskmgr" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/termsv programs/termsv/__install__ programs/termsv/__install-lib__: __builddeps__" +wine_fn_config_program termsv wine_fn_config_makefile programs/termsv "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_termsv" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/termsv" && wine_fn_append_file ALL_INSTALL_DIRS "programs/termsv" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/uninstaller programs/uninstaller/__install__ programs/uninstaller/__install-lib__: __builddeps__" +wine_fn_config_program uninstaller wine_fn_config_makefile programs/uninstaller "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_uninstaller" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/uninstaller" && wine_fn_append_file ALL_INSTALL_DIRS "programs/uninstaller" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/unlodctr programs/unlodctr/__install__ programs/unlodctr/__install-lib__: __builddeps__" +wine_fn_config_program unlodctr wine_fn_config_makefile programs/unlodctr "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_unlodctr" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/unlodctr" && wine_fn_append_file ALL_INSTALL_DIRS "programs/unlodctr" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/view programs/view/__install__ programs/view/__install-lib__: __builddeps__" +wine_fn_config_program view wine_fn_config_makefile programs/view "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_view" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/view" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/wineboot programs/wineboot/__install__ programs/wineboot/__install-lib__: __builddeps__" +wine_fn_config_program wineboot wine_fn_config_makefile programs/wineboot "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_wineboot" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/wineboot" && wine_fn_append_file ALL_INSTALL_DIRS "programs/wineboot" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/wineboot" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winebrowser programs/winebrowser/__install__ programs/winebrowser/__install-lib__: __builddeps__" +wine_fn_config_program winebrowser wine_fn_config_makefile programs/winebrowser "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winebrowser" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winebrowser" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winebrowser" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winecfg programs/winecfg/__install__ programs/winecfg/__install-lib__: __builddeps__" +wine_fn_config_program winecfg wine_fn_config_makefile programs/winecfg "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winecfg" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winecfg" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winecfg" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/winecfg" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/wineconsole programs/wineconsole/__install__ programs/wineconsole/__install-lib__: __builddeps__" +wine_fn_config_program wineconsole wine_fn_config_makefile programs/wineconsole "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_wineconsole" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/wineconsole" && wine_fn_append_file ALL_INSTALL_DIRS "programs/wineconsole" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/wineconsole" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winedbg programs/winedbg/__install__ programs/winedbg/__install-lib__: __builddeps__" +wine_fn_config_program winedbg wine_fn_config_makefile programs/winedbg "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winedbg" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winedbg" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winedbg" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/winedbg" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winedevice programs/winedevice/__install__ programs/winedevice/__install-lib__: __builddeps__" +wine_fn_config_program winedevice wine_fn_config_makefile programs/winedevice "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winedevice" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winedevice" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winedevice" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winefile programs/winefile/__install__ programs/winefile/__install-lib__: __builddeps__" +wine_fn_config_program winefile wine_fn_config_makefile programs/winefile "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winefile" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winefile" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winefile" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/winefile" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winemenubuilder programs/winemenubuilder/__install__ programs/winemenubuilder/__install-lib__: __builddeps__" +wine_fn_config_program winemenubuilder wine_fn_config_makefile programs/winemenubuilder "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winemenubuilder" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winemenubuilder" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winemenubuilder" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winemine programs/winemine/__install__ programs/winemine/__install-lib__: __builddeps__" +wine_fn_config_program winemine wine_fn_config_makefile programs/winemine "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winemine" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winemine" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winemine" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/winemine" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winepath programs/winepath/__install__ programs/winepath/__install-lib__: __builddeps__" +wine_fn_config_program winepath wine_fn_config_makefile programs/winepath "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winepath" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winepath" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winepath" && wine_fn_append_file ALL_PROGRAM_BIN_INSTALL_DIRS "programs/winepath" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winetest programs/winetest/__install__ programs/winetest/__install-lib__: __builddeps__" +wine_fn_config_program winetest wine_fn_config_makefile programs/winetest "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winetest" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winetest" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winevdm programs/winevdm/__install__ programs/winevdm/__install-lib__: __builddeps__" +wine_fn_config_program winevdm wine_fn_config_makefile programs/winevdm "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winevdm" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winevdm" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winhelp.exe16 programs/winhelp.exe16/__install__ programs/winhelp.exe16/__install-lib__: __builddeps__" +wine_fn_config_program winhelp.exe16 wine_fn_config_makefile programs/winhelp.exe16 "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winhelp.exe16" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winhelp.exe16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winhlp32 programs/winhlp32/__install__ programs/winhlp32/__install-lib__: __builddeps__" +wine_fn_config_program winhlp32 wine_fn_config_makefile programs/winhlp32 "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winhlp32" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winhlp32" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winhlp32" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winoldap.mod16 programs/winoldap.mod16/__install__ programs/winoldap.mod16/__install-lib__: __builddeps__" +wine_fn_config_program winoldap.mod16 wine_fn_config_makefile programs/winoldap.mod16 "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_win16" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winoldap.mod16" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winoldap.mod16" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/winver programs/winver/__install__ programs/winver/__install-lib__: __builddeps__" +wine_fn_config_program winver wine_fn_config_makefile programs/winver "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_winver" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/winver" && wine_fn_append_file ALL_INSTALL_DIRS "programs/winver" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/wordpad programs/wordpad/__install__ programs/wordpad/__install-lib__: __builddeps__" +wine_fn_config_program wordpad wine_fn_config_makefile programs/wordpad "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_wordpad" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/wordpad" && wine_fn_append_file ALL_INSTALL_DIRS "programs/wordpad" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/write programs/write/__install__ programs/write/__install-lib__: __builddeps__" +wine_fn_config_program write wine_fn_config_makefile programs/write "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_write" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/write" && wine_fn_append_file ALL_INSTALL_DIRS "programs/write" -wine_fn_append_rule ALL_MAKEFILE_DEPENDS "programs/xcopy programs/xcopy/__install__ programs/xcopy/__install-lib__: __builddeps__" +wine_fn_config_program xcopy wine_fn_config_makefile programs/xcopy "programs/Makeprog.rules \$(MAKEDEP)" test "x$enable_xcopy" != xno && wine_fn_append_file ALL_PROGRAM_DIRS "programs/xcopy" && wine_fn_append_file ALL_INSTALL_DIRS "programs/xcopy" @@ -17153,7 +16822,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Wine $as_me 1.1.40, which was +This file was extended by Wine $as_me 1.1.41, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17224,7 +16893,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Wine config.status 1.1.40 +Wine config.status 1.1.41 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" @@ -17459,6 +17128,7 @@ do "dlls/dinput8/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dinput8/Makefile" ;; "dlls/dispdib.dll16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dispdib.dll16/Makefile" ;; "dlls/dispex/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dispex/Makefile" ;; + "dlls/dispex/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dispex/tests/Makefile" ;; "dlls/display.drv16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/display.drv16/Makefile" ;; "dlls/dmband/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dmband/Makefile" ;; "dlls/dmcompos/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dmcompos/Makefile" ;; @@ -17602,7 +17272,10 @@ do "dlls/mstask/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mstask/Makefile" ;; "dlls/mstask/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mstask/tests/Makefile" ;; "dlls/msvcirt/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcirt/Makefile" ;; + "dlls/msvcr70/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcr70/Makefile" ;; "dlls/msvcr71/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcr71/Makefile" ;; + "dlls/msvcr80/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcr80/Makefile" ;; + "dlls/msvcr90/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcr90/Makefile" ;; "dlls/msvcrt/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcrt/Makefile" ;; "dlls/msvcrt/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcrt/tests/Makefile" ;; "dlls/msvcrt20/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcrt20/Makefile" ;; @@ -17744,6 +17417,7 @@ do "dlls/url/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/url/Makefile" ;; "dlls/urlmon/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/urlmon/Makefile" ;; "dlls/urlmon/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/urlmon/tests/Makefile" ;; + "dlls/usbd.sys/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/usbd.sys/Makefile" ;; "dlls/user.exe16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/user.exe16/Makefile" ;; "dlls/user32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/user32/Makefile" ;; "dlls/user32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/user32/tests/Makefile" ;; @@ -17837,6 +17511,7 @@ do "libs/wpp/Makefile") CONFIG_FILES="$CONFIG_FILES libs/wpp/Makefile" ;; "loader/Makefile") CONFIG_FILES="$CONFIG_FILES loader/Makefile" ;; "programs/Makefile") CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;; + "programs/attrib/Makefile") CONFIG_FILES="$CONFIG_FILES programs/attrib/Makefile" ;; "programs/cacls/Makefile") CONFIG_FILES="$CONFIG_FILES programs/cacls/Makefile" ;; "programs/clock/Makefile") CONFIG_FILES="$CONFIG_FILES programs/clock/Makefile" ;; "programs/cmd/Makefile") CONFIG_FILES="$CONFIG_FILES programs/cmd/Makefile" ;; @@ -17857,6 +17532,7 @@ do "programs/net/Makefile") CONFIG_FILES="$CONFIG_FILES programs/net/Makefile" ;; "programs/notepad/Makefile") CONFIG_FILES="$CONFIG_FILES programs/notepad/Makefile" ;; "programs/oleview/Makefile") CONFIG_FILES="$CONFIG_FILES programs/oleview/Makefile" ;; + "programs/ping/Makefile") CONFIG_FILES="$CONFIG_FILES programs/ping/Makefile" ;; "programs/progman/Makefile") CONFIG_FILES="$CONFIG_FILES programs/progman/Makefile" ;; "programs/reg/Makefile") CONFIG_FILES="$CONFIG_FILES programs/reg/Makefile" ;; "programs/regedit/Makefile") CONFIG_FILES="$CONFIG_FILES programs/regedit/Makefile" ;; diff --git a/configure.ac b/configure.ac index 3647c5ca24c..f56c9d38369 100644 --- a/configure.ac +++ b/configure.ac @@ -309,6 +309,9 @@ AC_SYS_LARGEFILE() AC_CHECK_HEADERS(\ AL/al.h \ + AudioToolbox/AudioConverter.h \ + AudioToolbox/AudioFile.h \ + AudioToolbox/AudioFileStream.h \ AudioUnit/AudioUnit.h \ Carbon/Carbon.h \ CoreAudio/CoreAudio.h \ @@ -557,6 +560,8 @@ AC_CHECK_HEADERS([resolv.h],,, # include #endif]) +AC_CHECK_HEADERS([ifaddrs.h],,,[#include ]) + AC_CHECK_HEADERS(ucontext.h,,,[#include ]) AC_CHECK_HEADERS([sys/thr.h],,, @@ -642,6 +647,14 @@ case $host_os in then dnl CoreServices needed by AudioUnit AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI") + ac_save_LIBS="$LIBS" + if test "$ac_cv_header_AudioToolbox_AudioFile_h" = "yes" + then + LIBS="$LIBS $COREAUDIO" + AC_CHECK_FUNCS(AudioFileStreamOpen) + LIBS="$ac_save_LIBS" + fi + test "x$ac_cv_func_AudioFileStreamOpen" = xyes || WINE_NOTICE([AudioToolbox version too old, mp3 codec won't be supported.]) fi if test "$ac_cv_header_OpenAL_al_h" = "yes" then @@ -1267,7 +1280,10 @@ test "x$FREETYPELIBS" = "x" && enable_fonts=${enable_fonts:-no} dnl **** Check for parport (currently Linux only) **** AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ioctl (1,PPCLAIM,0)]])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SYS_IOCTL_H +# include +#endif +#include ]], [[ioctl (1,PPCLAIM,0)]])], [ac_cv_c_ppdev="yes"],[ac_cv_c_ppdev="no"])) if test "$ac_cv_c_ppdev" = "yes" then @@ -1470,9 +1486,9 @@ if test "$ac_cv_header_mpg123_h" = "yes" then AC_CHECK_LIB(mpg123,mpg123_feed,[AC_SUBST(LIBMPG123,"-lmpg123")]) fi -WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes], +WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes], [libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.]) -test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no} +test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes -o "x$ac_cv_func_AudioFileStreamOpen" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no} dnl **** Check for OpenAL 1.1 **** if test "$ac_cv_header_AL_al_h" = "yes" @@ -2070,6 +2086,15 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,, #include #endif]) +dnl Check for struct ifreq.ifr_hwaddr +AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr],,, +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NET_IF_H +# include +#endif]) + dnl Check for the external timezone variables timezone and daylight AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone, AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[timezone = 1]])],[ac_cv_have_timezone="yes"],[ac_cv_have_timezone="no"])) @@ -2116,13 +2141,6 @@ esac dnl **** Generate output files **** -AC_SUBST(DEPENDENCIES,["### Dependencies: -\$(OBJS) \$(CROSSOBJS): \$(IDL_GEN_HEADERS) \$(BISON_SRCS:.y=.tab.h) -\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS) -\$(RC_SRCS:.rc=.res): \$(IDL_TLB_SRCS:.idl=.tlb) -\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c) -\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"]) - AC_SUBST(ALL_MAKERULES,"") AC_SUBST(ALL_SYMLINKS,"") AC_SUBST(ALL_MAKEFILE_DEPENDS,["# Makefile dependencies"]) @@ -2265,6 +2283,7 @@ WINE_CONFIG_TEST(dlls/dinput/tests) WINE_CONFIG_DLL(dinput8,,[dinput8]) WINE_CONFIG_DLL(dispdib.dll16,enable_win16) WINE_CONFIG_DLL(dispex) +WINE_CONFIG_TEST(dlls/dispex/tests) WINE_CONFIG_DLL(display.drv16,enable_win16) WINE_CONFIG_DLL(dmband) WINE_CONFIG_DLL(dmcompos) @@ -2408,7 +2427,10 @@ WINE_CONFIG_DLL(mssip32) WINE_CONFIG_DLL(mstask) WINE_CONFIG_TEST(dlls/mstask/tests) WINE_CONFIG_DLL(msvcirt) +WINE_CONFIG_DLL(msvcr70,,[msvcr70]) WINE_CONFIG_DLL(msvcr71,,[msvcr71]) +WINE_CONFIG_DLL(msvcr80,,[msvcr80]) +WINE_CONFIG_DLL(msvcr90,,[msvcr90]) WINE_CONFIG_DLL(msvcrt,,[msvcrt]) WINE_CONFIG_TEST(dlls/msvcrt/tests) WINE_CONFIG_DLL(msvcrt20,,[msvcrt20]) @@ -2550,6 +2572,7 @@ WINE_CONFIG_DLL(updspapi) WINE_CONFIG_DLL(url,,[url]) WINE_CONFIG_DLL(urlmon,,[urlmon]) WINE_CONFIG_TEST(dlls/urlmon/tests) +WINE_CONFIG_DLL(usbd.sys,,[usbd.sys]) WINE_CONFIG_DLL(user.exe16,enable_win16) WINE_CONFIG_DLL(user32,,[user32]) WINE_CONFIG_TEST(dlls/user32/tests) @@ -2643,6 +2666,7 @@ WINE_CONFIG_MAKEFILE([libs/wine/Makefile],[Make.rules]) WINE_CONFIG_MAKEFILE([libs/wpp/Makefile],[Make.rules]) WINE_CONFIG_MAKEFILE([loader/Makefile],[Make.rules],[ALL_TOP_DIRS]) WINE_CONFIG_MAKEFILE([programs/Makefile],[Make.rules],[ALL_TOP_DIRS]) +WINE_CONFIG_PROGRAM(attrib,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(cacls,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(clock,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(cmd,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) @@ -2663,6 +2687,7 @@ WINE_CONFIG_PROGRAM(msiexec,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS,ALL_PROGRAM_BIN_I WINE_CONFIG_PROGRAM(net,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(notepad,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS,ALL_PROGRAM_BIN_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(oleview,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) +WINE_CONFIG_PROGRAM(ping,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(progman,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(reg,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS]) WINE_CONFIG_PROGRAM(regedit,[ALL_PROGRAM_DIRS,ALL_INSTALL_DIRS,ALL_PROGRAM_BIN_INSTALL_DIRS]) diff --git a/dlls/acledit/Makefile.in b/dlls/acledit/Makefile.in index 083cd0bdf39..1e8bd0552b5 100644 --- a/dlls/acledit/Makefile.in +++ b/dlls/acledit/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/aclui/Makefile.in b/dlls/aclui/Makefile.in index 584569fd18c..c0a7e8fd534 100644 --- a/dlls/aclui/Makefile.in +++ b/dlls/aclui/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = aclui_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/activeds/Makefile.in b/dlls/activeds/Makefile.in index f96f5c36e41..f99d955fe6c 100644 --- a/dlls/activeds/Makefile.in +++ b/dlls/activeds/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = activeds_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/actxprxy/Makefile.in b/dlls/actxprxy/Makefile.in index f9e14ff4635..64f6bf1a8bb 100644 --- a/dlls/actxprxy/Makefile.in +++ b/dlls/actxprxy/Makefile.in @@ -24,5 +24,3 @@ IDL_P_SRCS = \ actxprxy_urlhist.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/adsiid/Makefile.in b/dlls/adsiid/Makefile.in index 69e5a08669f..6face7ca7a3 100644 --- a/dlls/adsiid/Makefile.in +++ b/dlls/adsiid/Makefile.in @@ -8,5 +8,3 @@ C_SRCS = \ adsiid.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index 3fb0948938c..a3d0efca33d 100644 --- a/dlls/advapi32/Makefile.in +++ b/dlls/advapi32/Makefile.in @@ -29,5 +29,3 @@ IDL_C_SRCS = svcctl.idl RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/advapi32/tests/Makefile.in b/dlls/advapi32/tests/Makefile.in index a6509ea12c7..13464d26cda 100644 --- a/dlls/advapi32/tests/Makefile.in +++ b/dlls/advapi32/tests/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ service.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index 2a5993c00d5..12288fd2168 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -856,6 +856,8 @@ static void test_set_provider_ex(void) { DWORD result; DWORD notNull = 5; + LPSTR curProvName = NULL; + DWORD curlen; /* results */ LPSTR pszProvName = NULL; @@ -867,6 +869,13 @@ static void test_set_provider_ex(void) return; } + /* store the current one */ + pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, NULL, &curlen); + if (!(curProvName = LocalAlloc(LMEM_ZEROINIT, curlen))) + return; + result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, curProvName, &curlen); + ok(result, "%d\n", GetLastError()); + /* check pdwReserved for NULL */ result = pCryptSetProviderExA(MS_DEF_PROV, PROV_RSA_FULL, ¬Null, CRYPT_MACHINE_DEFAULT); ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n", @@ -880,6 +889,7 @@ static void test_set_provider_ex(void) ok( GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == ERROR_INVALID_PARAMETER), "wrong error %u\n", GetLastError() ); skip("Not enough rights to remove the default provider\n"); + LocalFree(curProvName); return; } @@ -889,13 +899,19 @@ static void test_set_provider_ex(void) /* call CryptGetDefaultProvider to see if they match */ result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, NULL, &cbProvName); if (!(pszProvName = LocalAlloc(LMEM_ZEROINIT, cbProvName))) - return; + goto reset; result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, pszProvName, &cbProvName); ok(result && !strcmp(MS_DEF_PROV, pszProvName), "expected %s, got %s\n", MS_DEF_PROV, pszProvName); ok(result && cbProvName==(strlen(MS_DEF_PROV) + 1), "expected %i, got %d\n", (lstrlenA(MS_DEF_PROV) + 1), cbProvName); LocalFree(pszProvName); + +reset: + /* Set the provider back to it's original */ + result = pCryptSetProviderExA(curProvName, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT); + ok(result, "%d\n", GetLastError()); + LocalFree(curProvName); } static void test_machine_guid(void) diff --git a/dlls/advpack/Makefile.in b/dlls/advpack/Makefile.in index c1d96e5fb52..0d63f6ed27a 100644 --- a/dlls/advpack/Makefile.in +++ b/dlls/advpack/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ reg.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/advpack/tests/Makefile.in b/dlls/advpack/tests/Makefile.in index a1d13b626d8..746edfa1493 100644 --- a/dlls/advpack/tests/Makefile.in +++ b/dlls/advpack/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ install.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/amstream/Makefile.in b/dlls/amstream/Makefile.in index e141df0bc09..ebaa566dd16 100644 --- a/dlls/amstream/Makefile.in +++ b/dlls/amstream/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/amstream/tests/Makefile.in b/dlls/amstream/tests/Makefile.in index 46f3d2fdc73..f1581f1f8f3 100644 --- a/dlls/amstream/tests/Makefile.in +++ b/dlls/amstream/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ amstream.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/appwiz.cpl/Makefile.in b/dlls/appwiz.cpl/Makefile.in index dff803535d6..8631231ff4d 100644 --- a/dlls/appwiz.cpl/Makefile.in +++ b/dlls/appwiz.cpl/Makefile.in @@ -28,5 +28,3 @@ RC_SRCS = \ appwiz.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/atl/Makefile.in b/dlls/atl/Makefile.in index 031a855b2bb..17ca048dcd8 100644 --- a/dlls/atl/Makefile.in +++ b/dlls/atl/Makefile.in @@ -17,5 +17,3 @@ IDL_H_SRCS = \ atliface.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/authz/Makefile.in b/dlls/authz/Makefile.in index 0592efc9d13..b5dfcfacbe7 100644 --- a/dlls/authz/Makefile.in +++ b/dlls/authz/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ authz.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/avicap32/Makefile.in b/dlls/avicap32/Makefile.in index 8b9dbad17cf..cb9c6de08c6 100644 --- a/dlls/avicap32/Makefile.in +++ b/dlls/avicap32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 ntdll C_SRCS = avicap32_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/avifil32/Makefile.in b/dlls/avifil32/Makefile.in index 849bf187ab7..d26f6aed8cd 100644 --- a/dlls/avifil32/Makefile.in +++ b/dlls/avifil32/Makefile.in @@ -45,5 +45,3 @@ RC_SRCS = \ rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index dd1c2e23488..ac3c35e5a99 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -1030,14 +1030,14 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) * First filter is named "All multimedia files" and its filter is a * collection of all possible extensions except "*.*". */ - if (RegOpenKeyW(HKEY_CLASSES_ROOT, szAVIFileExtensions, &hKey) != S_OK) { + if (RegOpenKeyW(HKEY_CLASSES_ROOT, szAVIFileExtensions, &hKey) != ERROR_SUCCESS) { HeapFree(GetProcessHeap(), 0, lp); return AVIERR_ERROR; } - for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == S_OK;n++) { + for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == ERROR_SUCCESS;n++) { /* get CLSID to extension */ size = sizeof(szValue); - if (RegQueryValueW(hKey, szFileExt, szValue, &size) != S_OK) + if (RegQueryValueW(hKey, szFileExt, szValue, &size) != ERROR_SUCCESS) break; /* search if the CLSID is already known */ @@ -1078,7 +1078,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) RegCloseKey(hKey); /* 2. get descriptions for the CLSIDs and fill out szFilter */ - if (RegOpenKeyW(HKEY_CLASSES_ROOT, szClsid, &hKey) != S_OK) { + if (RegOpenKeyW(HKEY_CLASSES_ROOT, szClsid, &hKey) != ERROR_SUCCESS) { HeapFree(GetProcessHeap(), 0, lp); return AVIERR_ERROR; } @@ -1086,7 +1086,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) /* first the description */ if (n != 0) { size = sizeof(szValue); - if (RegQueryValueW(hKey, lp[n].szClsid, szValue, &size) == S_OK) { + if (RegQueryValueW(hKey, lp[n].szClsid, szValue, &size) == ERROR_SUCCESS) { size = lstrlenW(szValue); lstrcpynW(szFilter, szValue, cbFilter); } diff --git a/dlls/avifil32/tests/Makefile.in b/dlls/avifil32/tests/Makefile.in index 913d619d0b9..ee41e59482f 100644 --- a/dlls/avifil32/tests/Makefile.in +++ b/dlls/avifil32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ api.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/avifile.dll16/Makefile.in b/dlls/avifile.dll16/Makefile.in index 8776e4a73f2..b2fc399513c 100644 --- a/dlls/avifile.dll16/Makefile.in +++ b/dlls/avifile.dll16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = avifil32 kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,avifil32.dll @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/avrt/Makefile.in b/dlls/avrt/Makefile.in index dc36c89a5bc..3df047990fb 100644 --- a/dlls/avrt/Makefile.in +++ b/dlls/avrt/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in index ec262278bbf..4976f0ed5d7 100644 --- a/dlls/bcrypt/Makefile.in +++ b/dlls/bcrypt/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/browseui/Makefile.in b/dlls/browseui/Makefile.in index 92ac8310116..f22da19f286 100644 --- a/dlls/browseui/Makefile.in +++ b/dlls/browseui/Makefile.in @@ -35,5 +35,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/browseui/tests/Makefile.in b/dlls/browseui/tests/Makefile.in index ca822e52d44..06e82fe19cc 100644 --- a/dlls/browseui/tests/Makefile.in +++ b/dlls/browseui/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ autocomplete.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cabinet/Makefile.in b/dlls/cabinet/Makefile.in index 91b7eb55da0..d9db1c467b8 100644 --- a/dlls/cabinet/Makefile.in +++ b/dlls/cabinet/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = cabinet.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cabinet/tests/Makefile.in b/dlls/cabinet/tests/Makefile.in index fd2ab5f58dd..d6df0c0ce47 100644 --- a/dlls/cabinet/tests/Makefile.in +++ b/dlls/cabinet/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ fdi.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/capi2032/Makefile.in b/dlls/capi2032/Makefile.in index 188ab3bfa72..31419917f86 100644 --- a/dlls/capi2032/Makefile.in +++ b/dlls/capi2032/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = cap20wxx.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cards/Makefile.in b/dlls/cards/Makefile.in index 11ca3a8d378..25dfeb79c92 100644 --- a/dlls/cards/Makefile.in +++ b/dlls/cards/Makefile.in @@ -14,5 +14,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cfgmgr32/Makefile.in b/dlls/cfgmgr32/Makefile.in index 83545ac76c1..1041e8764cf 100644 --- a/dlls/cfgmgr32/Makefile.in +++ b/dlls/cfgmgr32/Makefile.in @@ -7,5 +7,3 @@ IMPORTLIB = cfgmgr32 IMPORTS = setupapi kernel32 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/clusapi/Makefile.in b/dlls/clusapi/Makefile.in index 70306b42947..f196b7477b7 100644 --- a/dlls/clusapi/Makefile.in +++ b/dlls/clusapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ clusapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comcat/Makefile.in b/dlls/comcat/Makefile.in index 1323ecae68b..b2dcd53b330 100644 --- a/dlls/comcat/Makefile.in +++ b/dlls/comcat/Makefile.in @@ -12,5 +12,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comcat/tests/Makefile.in b/dlls/comcat/tests/Makefile.in index e88e204fefe..e03742fb0c9 100644 --- a/dlls/comcat/tests/Makefile.in +++ b/dlls/comcat/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ comcat.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comctl32/Makefile.in b/dlls/comctl32/Makefile.in index 7a520053337..ac7a49ce942 100644 --- a/dlls/comctl32/Makefile.in +++ b/dlls/comctl32/Makefile.in @@ -76,5 +76,3 @@ RC_SRCS = \ rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index c240d4fde40..96d041ec531 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -289,7 +289,7 @@ DATETIME_SetFormatW (DATETIME_INFO *infoPtr, LPCWSTR lpszFormat) format_item = LOCALE_STIMEFORMAT; else /* DTS_SHORTDATEFORMAT */ format_item = LOCALE_SSHORTDATE; - GetLocaleInfoW( GetSystemDefaultLCID(), format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0])); + GetLocaleInfoW(LOCALE_USER_DEFAULT, format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0])); lpszFormat = format_buf; } @@ -410,12 +410,12 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int wsprintfW (result, fmt__2dW, date.wMonth); break; case THREECHARMONTH: - GetLocaleInfoW(GetSystemDefaultLCID(), LOCALE_SMONTHNAME1+date.wMonth -1, + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1, buffer, sizeof(buffer)/sizeof(buffer[0])); wsprintfW (result, fmt__3sW, buffer); break; case FULLMONTH: - GetLocaleInfoW(GetSystemDefaultLCID(),LOCALE_SMONTHNAME1+date.wMonth -1, + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1, result, resultSize); break; case ONELETTERAMPM: diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 9afbf104b61..de854911ad4 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5635,6 +5635,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL isW) { HWND hwndSelf = infoPtr->hwndSelf; + WCHAR szDispText[DISP_TEXT_SIZE] = { 0 }; NMLVDISPINFOW dispInfo; INT editedItem = infoPtr->nEditLabelItem; BOOL bSame; @@ -5665,7 +5666,9 @@ static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL dispInfo.item.iItem = editedItem; dispInfo.item.iSubItem = 0; dispInfo.item.stateMask = ~0; - if (!LISTVIEW_GetItemW(infoPtr, &dispInfo.item)) + dispInfo.item.pszText = szDispText; + dispInfo.item.cchTextMax = DISP_TEXT_SIZE; + if (!LISTVIEW_GetItemT(infoPtr, &dispInfo.item, isW)) { res = FALSE; goto cleanup; diff --git a/dlls/comctl32/tests/Makefile.in b/dlls/comctl32/tests/Makefile.in index 38f88eb0e98..343c9fd51c9 100644 --- a/dlls/comctl32/tests/Makefile.in +++ b/dlls/comctl32/tests/Makefile.in @@ -31,5 +31,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comdlg32/Makefile.in b/dlls/comdlg32/Makefile.in index bedd688b676..8e23d644eee 100644 --- a/dlls/comdlg32/Makefile.in +++ b/dlls/comdlg32/Makefile.in @@ -51,5 +51,3 @@ RC_SRCS = \ cdlg_xx.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 58b57ccbbac..5f90fe18d89 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -176,7 +176,7 @@ static SIZE MemDialogSize = { 0, 0}; /* keep size of the (resizable) dialog */ /* Internal functions used by the dialog */ static LRESULT FILEDLG95_ResizeControls(HWND hwnd, WPARAM wParam, LPARAM lParam); static LRESULT FILEDLG95_FillControls(HWND hwnd, WPARAM wParam, LPARAM lParam); -static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam); +static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam); static LRESULT FILEDLG95_OnWMGetIShellBrowser(HWND hwnd); static BOOL FILEDLG95_OnOpen(HWND hwnd); static LRESULT FILEDLG95_InitControls(HWND hwnd); @@ -991,7 +991,7 @@ static LRESULT FILEDLG95_OnWMGetMMI( HWND hwnd, LPMINMAXINFO mmiptr) * vertically or horizontally to get out of the way. Only the "grip" * is moved in both directions to stay in the corner. */ -static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam) +static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam) { RECT rc, rcview; int chgx, chgy; @@ -1223,11 +1223,11 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l return 0; } case WM_SIZE: - return FILEDLG95_OnWMSize(hwnd, wParam, lParam); + return FILEDLG95_OnWMSize(hwnd, wParam); case WM_GETMINMAXINFO: return FILEDLG95_OnWMGetMMI( hwnd, (LPMINMAXINFO)lParam); case WM_COMMAND: - return FILEDLG95_OnWMCommand(hwnd, wParam, lParam); + return FILEDLG95_OnWMCommand(hwnd, wParam); case WM_DRAWITEM: { switch(((LPDRAWITEMSTRUCT)lParam)->CtlID) @@ -1733,7 +1733,7 @@ void FILEDLG95_Clean(HWND hwnd) * * WM_COMMAND message handler */ -static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam) +static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam) { WORD wNotifyCode = HIWORD(wParam); /* notification code */ WORD wID = LOWORD(wParam); /* item, control, or accelerator identifier */ @@ -3799,7 +3799,7 @@ BOOL FD32_GetTemplate(PFD31_DATA lfs) /*********************************************************************** * FD32_WMMeasureItem [internal] */ -static LONG FD32_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) +static LONG FD32_WMMeasureItem(LPARAM lParam) { LPMEASUREITEMSTRUCT lpmeasure; @@ -3832,7 +3832,7 @@ static INT_PTR CALLBACK FD32_FileOpenDlgProc(HWND hWnd, UINT wMsg, return FD31_WMInitDialog(hWnd, wParam, lParam); case WM_MEASUREITEM: - return FD32_WMMeasureItem(hWnd, wParam, lParam); + return FD32_WMMeasureItem(lParam); case WM_DRAWITEM: return FD31_WMDrawItem(hWnd, wParam, lParam, !lfs->open, (DRAWITEMSTRUCT *)lParam); diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index 1ad881c72d2..80f1ad9345b 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -766,7 +766,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, LPARAM lParam, LPCHOOSEFONTW lpcf) /*********************************************************************** * CFn_WMMeasureItem [internal] */ -static LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) +static LRESULT CFn_WMMeasureItem(HWND hDlg, LPARAM lParam) { HDC hdc; HFONT hfontprev; @@ -794,7 +794,7 @@ static LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) /*********************************************************************** * CFn_WMDrawItem [internal] */ -static LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam) +static LRESULT CFn_WMDrawItem(LPARAM lParam) { HBRUSH hBrush; WCHAR buffer[40]; @@ -1190,9 +1190,9 @@ static INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, switch (uMsg) { case WM_MEASUREITEM: - return CFn_WMMeasureItem(hDlg, wParam, lParam); + return CFn_WMMeasureItem(hDlg,lParam); case WM_DRAWITEM: - return CFn_WMDrawItem(hDlg, wParam, lParam); + return CFn_WMDrawItem(lParam); case WM_COMMAND: return CFn_WMCommand(hDlg, wParam, lParam, lpcfw); case WM_DESTROY: @@ -1239,9 +1239,9 @@ static INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, switch (uMsg) { case WM_MEASUREITEM: - return CFn_WMMeasureItem(hDlg, wParam, lParam); + return CFn_WMMeasureItem(hDlg, lParam); case WM_DRAWITEM: - return CFn_WMDrawItem(hDlg, wParam, lParam); + return CFn_WMDrawItem(lParam); case WM_COMMAND: return CFn_WMCommand(hDlg, wParam, lParam, lpcf); case WM_DESTROY: diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index f653251ed16..74a06ffa3d5 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -1504,7 +1504,7 @@ static LRESULT PRINTDLG_WMInitDialogW(HWND hDlg, * PRINTDLG_WMCommand [internal] */ static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam, - LPARAM lParam, PRINT_PTRA* PrintStructures) + PRINT_PTRA* PrintStructures) { LPPRINTDLGA lppd = PrintStructures->lpPrintDlg; UINT PrinterComboID = (lppd->Flags & PD_PRINTSETUP) ? cmb1 : cmb4; @@ -1658,7 +1658,7 @@ static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam, } static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam, - LPARAM lParam, PRINT_PTRW* PrintStructures) + PRINT_PTRW* PrintStructures) { LPPRINTDLGW lppd = PrintStructures->lpPrintDlg; UINT PrinterComboID = (lppd->Flags & PD_PRINTSETUP) ? cmb1 : cmb4; @@ -1846,7 +1846,7 @@ static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, switch (uMsg) { case WM_COMMAND: - return PRINTDLG_WMCommandA(hDlg, wParam, lParam, PrintStructures); + return PRINTDLG_WMCommandA(hDlg, wParam, PrintStructures); case WM_DESTROY: DestroyIcon(PrintStructures->hCollateIcon); @@ -1892,7 +1892,7 @@ static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, switch (uMsg) { case WM_COMMAND: - return PRINTDLG_WMCommandW(hDlg, wParam, lParam, PrintStructures); + return PRINTDLG_WMCommandW(hDlg, wParam, PrintStructures); case WM_DESTROY: DestroyIcon(PrintStructures->hCollateIcon); diff --git a/dlls/comdlg32/tests/Makefile.in b/dlls/comdlg32/tests/Makefile.in index 82b7cd28eed..cfdecefd870 100644 --- a/dlls/comdlg32/tests/Makefile.in +++ b/dlls/comdlg32/tests/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/comm.drv16/Makefile.in b/dlls/comm.drv16/Makefile.in index b8275038774..7dffb9f5719 100644 --- a/dlls/comm.drv16/Makefile.in +++ b/dlls/comm.drv16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/commdlg.dll16/Makefile.in b/dlls/commdlg.dll16/Makefile.in index 11ce98c43ee..f4932d660ef 100644 --- a/dlls/commdlg.dll16/Makefile.in +++ b/dlls/commdlg.dll16/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ printdlg.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/compobj.dll16/Makefile.in b/dlls/compobj.dll16/Makefile.in index 48daf2fd052..f7d7e7b2a2d 100644 --- a/dlls/compobj.dll16/Makefile.in +++ b/dlls/compobj.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ole32.dll C_SRCS = compobj.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/compstui/Makefile.in b/dlls/compstui/Makefile.in index 3a2706b399e..ace41c655d5 100644 --- a/dlls/compstui/Makefile.in +++ b/dlls/compstui/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ compstui_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/credui/Makefile.in b/dlls/credui/Makefile.in index 7b6068c084a..3e4828def1b 100644 --- a/dlls/credui/Makefile.in +++ b/dlls/credui/Makefile.in @@ -31,5 +31,3 @@ RC_SRCS = \ credui_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/credui/tests/Makefile.in b/dlls/credui/tests/Makefile.in index 2b12da5f29d..3220aa100c8 100644 --- a/dlls/credui/tests/Makefile.in +++ b/dlls/credui/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ credui.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/crtdll/Makefile.in b/dlls/crtdll/Makefile.in index c53ac784379..5978ec2a117 100644 --- a/dlls/crtdll/Makefile.in +++ b/dlls/crtdll/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ crtdll_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/crypt32/Makefile.in b/dlls/crypt32/Makefile.in index 0089fe58565..26ba761f4cf 100644 --- a/dlls/crypt32/Makefile.in +++ b/dlls/crypt32/Makefile.in @@ -49,5 +49,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 6cdd103e666..1724f4254fe 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -1306,6 +1306,78 @@ static void CRYPT_CheckChainNameConstraints(PCERT_SIMPLE_CHAIN chain) } } +/* Gets cert's policies info, if any. Free with LocalFree. */ +static CERT_POLICIES_INFO *CRYPT_GetPolicies(PCCERT_CONTEXT cert) +{ + PCERT_EXTENSION ext; + CERT_POLICIES_INFO *policies = NULL; + + ext = CertFindExtension(szOID_KEY_USAGE, cert->pCertInfo->cExtension, + cert->pCertInfo->rgExtension); + if (ext) + { + DWORD size; + + CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT_POLICIES, + ext->Value.pbData, ext->Value.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, + &policies, &size); + } + return policies; +} + +static void CRYPT_CheckPolicies(CERT_POLICIES_INFO *policies, CERT_INFO *cert, + DWORD *errorStatus) +{ + DWORD i; + + for (i = 0; i < policies->cPolicyInfo; i++) + { + /* For now, the only accepted policy identifier is the anyPolicy + * identifier. + * FIXME: the policy identifiers should be compared against the + * cert's certificate policies extension, subject to the policy + * mappings extension, and the policy constraints extension. + * See RFC 5280, sections 4.2.1.4, 4.2.1.5, and 4.2.1.11. + */ + if (strcmp(policies->rgPolicyInfo[i].pszPolicyIdentifier, + szOID_ANY_CERT_POLICY)) + { + FIXME("unsupported policy %s\n", + policies->rgPolicyInfo[i].pszPolicyIdentifier); + *errorStatus |= CERT_TRUST_INVALID_POLICY_CONSTRAINTS; + } + } +} + +static void CRYPT_CheckChainPolicies(PCERT_SIMPLE_CHAIN chain) +{ + int i, j; + + for (i = chain->cElement - 1; i > 0; i--) + { + CERT_POLICIES_INFO *policies; + + if ((policies = CRYPT_GetPolicies(chain->rgpElement[i]->pCertContext))) + { + for (j = i - 1; j >= 0; j--) + { + DWORD errorStatus = 0; + + CRYPT_CheckPolicies(policies, + chain->rgpElement[j]->pCertContext->pCertInfo, &errorStatus); + if (errorStatus) + { + chain->rgpElement[i]->TrustStatus.dwErrorStatus |= + errorStatus; + CRYPT_CombineTrustStatus(&chain->TrustStatus, + &chain->rgpElement[i]->TrustStatus); + } + } + LocalFree(policies); + } + } +} + static LPWSTR name_value_to_str(const CERT_NAME_BLOB *name) { DWORD len = cert_name_to_str_with_indent(X509_ASN_ENCODING, 0, name, @@ -1739,6 +1811,8 @@ static BOOL CRYPT_CriticalExtensionsSupported(PCCERT_CONTEXT cert) ret = TRUE; else if (!strcmp(oid, szOID_SUBJECT_ALT_NAME2)) ret = TRUE; + else if (!strcmp(oid, szOID_CERT_POLICIES)) + ret = TRUE; else if (!strcmp(oid, szOID_ENHANCED_KEY_USAGE)) ret = TRUE; else @@ -1883,6 +1957,7 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine, &chain->rgpElement[i]->TrustStatus); } CRYPT_CheckChainNameConstraints(chain); + CRYPT_CheckChainPolicies(chain); if (CRYPT_IsCertificateSelfSigned(rootElement->pCertContext)) { rootElement->TrustStatus.dwInfoStatus |= diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index 5844b1841e5..db9dc1a946a 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -64,8 +64,8 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void) { HCRYPTPROV prov; - if (!CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) + if (!CryptAcquireContextW(&prov, NULL, MS_ENH_RSA_AES_PROV_W, + PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) return hDefProv; InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov, NULL); diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index ea30d9ccd45..ea7b539208b 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -1067,6 +1067,9 @@ static const WCHAR rc2[] = { 'r','c','2',0 }; static const WCHAR rc4[] = { 'r','c','4',0 }; static const WCHAR sha[] = { 's','h','a',0 }; static const WCHAR sha1[] = { 's','h','a','1',0 }; +static const WCHAR sha256[] = { 's','h','a','2','5','6',0 }; +static const WCHAR sha384[] = { 's','h','a','3','8','4',0 }; +static const WCHAR sha512[] = { 's','h','a','5','1','2',0 }; static const WCHAR RSA[] = { 'R','S','A',0 }; static const WCHAR RSA_KEYX[] = { 'R','S','A','_','K','E','Y','X',0 }; static const WCHAR RSA_SIGN[] = { 'R','S','A','_','S','I','G','N',0 }; @@ -1086,6 +1089,9 @@ static const WCHAR shaDSA[] = { 's','h','a','D','S','A',0 }; static const WCHAR sha1DSA[] = { 's','h','a','1','D','S','A',0 }; static const WCHAR shaRSA[] = { 's','h','a','R','S','A',0 }; static const WCHAR sha1RSA[] = { 's','h','a','1','R','S','A',0 }; +static const WCHAR sha256RSA[] = { 's','h','a','2','5','6','R','S','A',0 }; +static const WCHAR sha384RSA[] = { 's','h','a','3','8','4','R','S','A',0 }; +static const WCHAR sha512RSA[] = { 's','h','a','5','1','2','R','S','A',0 }; static const WCHAR mosaicUpdatedSig[] = { 'm','o','s','a','i','c','U','p','d','a','t','e','d','S','i','g',0 }; static const WCHAR CN[] = { 'C','N',0 }; @@ -1189,6 +1195,9 @@ static const struct OIDInfoConstructor { { 3, szOID_PKIX_NO_SIGNATURE, CALG_NO_SIGN, NO_SIGN, NULL }, { 4, szOID_RSA_SHA1RSA, CALG_SHA1, sha1RSA, &rsaSignBlob }, + { 4, szOID_RSA_SHA256RSA, CALG_SHA_256, sha256RSA, &rsaSignBlob }, + { 4, szOID_RSA_SHA384RSA, CALG_SHA_384, sha384RSA, &rsaSignBlob }, + { 4, szOID_RSA_SHA512RSA, CALG_SHA_512, sha512RSA, &rsaSignBlob }, { 4, szOID_RSA_MD5RSA, CALG_MD5, md5RSA, &rsaSignBlob }, { 4, szOID_X957_SHA1DSA, CALG_SHA1, sha1DSA, &dssSignBlob }, { 4, szOID_OIWSEC_sha1RSASign, CALG_SHA1, sha1RSA, &rsaSignBlob }, diff --git a/dlls/crypt32/tests/Makefile.in b/dlls/crypt32/tests/Makefile.in index ff89aa0fde6..1e182845a98 100644 --- a/dlls/crypt32/tests/Makefile.in +++ b/dlls/crypt32/tests/Makefile.in @@ -23,5 +23,3 @@ C_SRCS = \ str.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cryptdlg/Makefile.in b/dlls/cryptdlg/Makefile.in index a5d9a5a1489..9e306fe80a8 100644 --- a/dlls/cryptdlg/Makefile.in +++ b/dlls/cryptdlg/Makefile.in @@ -20,5 +20,3 @@ RC_SRCS = \ cryptdlg_Uk.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cryptdll/Makefile.in b/dlls/cryptdll/Makefile.in index 417086b2c53..aa0947ef05b 100644 --- a/dlls/cryptdll/Makefile.in +++ b/dlls/cryptdll/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ cryptdll.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cryptnet/Makefile.in b/dlls/cryptnet/Makefile.in index 749da1aad7f..3bee900897d 100644 --- a/dlls/cryptnet/Makefile.in +++ b/dlls/cryptnet/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ cryptnet_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cryptnet/tests/Makefile.in b/dlls/cryptnet/tests/Makefile.in index d4a9cc244d3..d26a092ccba 100644 --- a/dlls/cryptnet/tests/Makefile.in +++ b/dlls/cryptnet/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ cryptnet.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cryptui/Makefile.in b/dlls/cryptui/Makefile.in index d859f46db08..de96c2e69b3 100644 --- a/dlls/cryptui/Makefile.in +++ b/dlls/cryptui/Makefile.in @@ -21,5 +21,3 @@ RC_SRCS = \ cryptui_Pt.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/cryptui/tests/Makefile.in b/dlls/cryptui/tests/Makefile.in index d1817e4bfaa..97107f38b30 100644 --- a/dlls/cryptui/tests/Makefile.in +++ b/dlls/cryptui/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ cryptui.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ctapi32/Makefile.in b/dlls/ctapi32/Makefile.in index a22f27be084..1fff08f962e 100644 --- a/dlls/ctapi32/Makefile.in +++ b/dlls/ctapi32/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = advapi32 kernel32 C_SRCS = ctapi32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ctl3d.dll16/Makefile.in b/dlls/ctl3d.dll16/Makefile.in index 7c9726b8c86..3092b7cb971 100644 --- a/dlls/ctl3d.dll16/Makefile.in +++ b/dlls/ctl3d.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ctl3d32.dll C_SRCS = ctl3d.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ctl3d32/Makefile.in b/dlls/ctl3d32/Makefile.in index d0ddbc616f1..3d88c1706bf 100644 --- a/dlls/ctl3d32/Makefile.in +++ b/dlls/ctl3d32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = user32 kernel32 C_SRCS = ctl3d32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ctl3dv2.dll16/Makefile.in b/dlls/ctl3dv2.dll16/Makefile.in index 99fc9195309..d31414a6344 100644 --- a/dlls/ctl3dv2.dll16/Makefile.in +++ b/dlls/ctl3dv2.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ctl3d32.dll C_SRCS = ctl3d.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d10/Makefile.in b/dlls/d3d10/Makefile.in index f560b4ea9d3..a274e9077e1 100644 --- a/dlls/d3d10/Makefile.in +++ b/dlls/d3d10/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d10/tests/Makefile.in b/dlls/d3d10/tests/Makefile.in index 4c5c2acd07e..b63bcfabc97 100644 --- a/dlls/d3d10/tests/Makefile.in +++ b/dlls/d3d10/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ effect.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d10core/Makefile.in b/dlls/d3d10core/Makefile.in index 935e83f6dc5..a9907906131 100644 --- a/dlls/d3d10core/Makefile.in +++ b/dlls/d3d10core/Makefile.in @@ -21,5 +21,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d10core/tests/Makefile.in b/dlls/d3d10core/tests/Makefile.in index c0b46450e7f..ce1b6d1f132 100644 --- a/dlls/d3d10core/tests/Makefile.in +++ b/dlls/d3d10core/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ device.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d8/Makefile.in b/dlls/d3d8/Makefile.in index 84b477c76e3..04c1a33c1cc 100644 --- a/dlls/d3d8/Makefile.in +++ b/dlls/d3d8/Makefile.in @@ -25,5 +25,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 11697b2ff26..e9319be2b0c 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -324,6 +324,7 @@ static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { HeapFree(GetProcessHeap(), 0, This->decls); IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D8CB_DestroySwapChain); + IWineD3DDevice_ReleaseFocusWindow(This->WineD3DDevice); IWineD3DDevice_Release(This->WineD3DDevice); HeapFree(GetProcessHeap(), 0, This->handle_table.entries); HeapFree(GetProcessHeap(), 0, This); @@ -2791,6 +2792,19 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte return hr; } + if (!parameters->Windowed) + { + if (!focus_window) focus_window = parameters->hDeviceWindow; + if (FAILED(hr = IWineD3DDevice_AcquireFocusWindow(device->WineD3DDevice, focus_window))) + { + ERR("Failed to acquire focus window, hr %#x.\n", hr); + IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_mutex_unlock(); + HeapFree(GetProcessHeap(), 0, device->handle_table.entries); + return hr; + } + } + if (flags & D3DCREATE_MULTITHREADED) IWineD3DDevice_SetMultithreaded(device->WineD3DDevice); wined3d_parameters.BackBufferWidth = parameters->BackBufferWidth; @@ -2813,6 +2827,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte if (FAILED(hr)) { WARN("Failed to initialize 3D, hr %#x.\n", hr); + IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); IWineD3DDevice_Release(device->WineD3DDevice); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, device->handle_table.entries); @@ -2855,6 +2870,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte err: wined3d_mutex_lock(); IWineD3DDevice_Uninit3D(device->WineD3DDevice, D3D8CB_DestroySwapChain); + IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); IWineD3DDevice_Release(device->WineD3DDevice); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, device->handle_table.entries); diff --git a/dlls/d3d8/tests/Makefile.in b/dlls/d3d8/tests/Makefile.in index 014315a1a0c..68ea3b9e2a2 100644 --- a/dlls/d3d8/tests/Makefile.in +++ b/dlls/d3d8/tests/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ volume.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 404c564ec01..c0e198511ee 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1494,6 +1494,13 @@ struct UINT message; } expect_message; +struct wndproc_thread_param +{ + HWND dummy_window; + HANDLE window_created; + HANDLE test_finished; +}; + static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { if (filter_messages && filter_messages == hwnd) @@ -1506,14 +1513,37 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM return DefWindowProcA(hwnd, message, wparam, lparam); } +static DWORD WINAPI wndproc_thread(void *param) +{ + struct wndproc_thread_param *p = param; + DWORD res; + BOOL ret; + + p->dummy_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + + ret = SetEvent(p->window_created); + ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(p->test_finished, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + + DestroyWindow(p->dummy_window); + + return 0; +} + static void test_wndproc(void) { - HWND device_window, focus_window, dummy_window, tmp; + struct wndproc_thread_param thread_params; + HWND device_window, focus_window, tmp; IDirect3DDevice8 *device; WNDCLASSA wc = {0}; IDirect3D8 *d3d8; + HANDLE thread; LONG_PTR proc; ULONG ref; + DWORD res, tid; if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) { @@ -1525,12 +1555,20 @@ static void test_wndproc(void) wc.lpszClassName = "d3d8_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); + thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + focus_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0); - dummy_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", - WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); + ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(thread_params.window_created, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", @@ -1539,10 +1577,14 @@ static void test_wndproc(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); - trace("device_window %p, focus_window %p, dummy_window %p.\n", device_window, focus_window, dummy_window); + trace("device_window %p, focus_window %p, dummy_window %p.\n", + device_window, focus_window, thread_params.dummy_window); tmp = GetFocus(); - ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n", + thread_params.dummy_window, tmp); expect_message.window = focus_window; expect_message.message = WM_SETFOCUS; @@ -1557,7 +1599,10 @@ static void test_wndproc(void) ok(!expect_message.message, "Expected message %#x for window %p, but didn't receive it.\n", expect_message.message, expect_message.window); tmp = GetFocus(); - ok(tmp == focus_window, "Expected focus %p, got %p.\n", focus_window, tmp); + todo_wine ok(tmp == focus_window, "Expected focus %p, got %p.\n", focus_window, tmp); + tmp = GetForegroundWindow(); + todo_wine ok(tmp == focus_window, "Expected foreground window %p, got %p.\n", focus_window, tmp); + SetForegroundWindow(focus_window); filter_messages = focus_window; @@ -1607,7 +1652,13 @@ static void test_wndproc(void) done: filter_messages = NULL; IDirect3D8_Release(d3d8); - DestroyWindow(dummy_window); + + SetEvent(thread_params.test_finished); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread_params.test_finished); + CloseHandle(thread_params.window_created); + CloseHandle(thread); + DestroyWindow(device_window); DestroyWindow(focus_window); UnregisterClassA("d3d8_test_wndproc_wc", GetModuleHandleA(NULL)); @@ -1615,12 +1666,15 @@ done: static void test_wndproc_windowed(void) { - HWND device_window, focus_window, dummy_window, tmp; + struct wndproc_thread_param thread_params; + HWND device_window, focus_window, tmp; IDirect3DDevice8 *device; WNDCLASSA wc = {0}; IDirect3D8 *d3d8; + HANDLE thread; LONG_PTR proc; ULONG ref; + DWORD res, tid; if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) { @@ -1632,12 +1686,20 @@ static void test_wndproc_windowed(void) wc.lpszClassName = "d3d8_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); + thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + focus_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); - dummy_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", - WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); + ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(thread_params.window_created, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", @@ -1646,10 +1708,14 @@ static void test_wndproc_windowed(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); - trace("device_window %p, focus_window %p, dummy_window %p.\n", device_window, focus_window, dummy_window); + trace("device_window %p, focus_window %p, dummy_window %p.\n", + device_window, focus_window, thread_params.dummy_window); tmp = GetFocus(); - ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n", + thread_params.dummy_window, tmp); filter_messages = focus_window; @@ -1661,7 +1727,10 @@ static void test_wndproc_windowed(void) } tmp = GetFocus(); - ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n", + thread_params.dummy_window, tmp); proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", @@ -1699,7 +1768,13 @@ static void test_wndproc_windowed(void) done: filter_messages = NULL; IDirect3D8_Release(d3d8); - DestroyWindow(dummy_window); + + SetEvent(thread_params.test_finished); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread_params.test_finished); + CloseHandle(thread_params.window_created); + CloseHandle(thread); + DestroyWindow(device_window); DestroyWindow(focus_window); UnregisterClassA("d3d8_test_wndproc_wc", GetModuleHandleA(NULL)); diff --git a/dlls/d3d9/Makefile.in b/dlls/d3d9/Makefile.in index e53d039df87..bbaf3807db6 100644 --- a/dlls/d3d9/Makefile.in +++ b/dlls/d3d9/Makefile.in @@ -27,5 +27,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 79a9ba01834..68516cc9519 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -271,6 +271,7 @@ static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(LPDIRECT3DDEV HeapFree(GetProcessHeap(), 0, This->convertedDecls); IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D9CB_DestroySwapChain); + IWineD3DDevice_ReleaseFocusWindow(This->WineD3DDevice); IWineD3DDevice_Release(This->WineD3DDevice); wined3d_mutex_unlock(); @@ -2842,6 +2843,18 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte return hr; } + if (!parameters->Windowed) + { + if (!focus_window) focus_window = parameters->hDeviceWindow; + if (FAILED(hr = IWineD3DDevice_AcquireFocusWindow(device->WineD3DDevice, focus_window))) + { + ERR("Failed to acquire focus window, hr %#x.\n", hr); + IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_mutex_unlock(); + return hr; + } + } + if (flags & D3DCREATE_ADAPTERGROUP_DEVICE) { WINED3DCAPS caps; @@ -2885,6 +2898,7 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte if (FAILED(hr)) { WARN("Failed to initialize 3D, hr %#x.\n", hr); + IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); HeapFree(GetProcessHeap(), 0, wined3d_parameters); IWineD3DDevice_Release(device->WineD3DDevice); wined3d_mutex_unlock(); @@ -2921,6 +2935,7 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte ERR("Failed to allocate FVF vertex declaration map memory.\n"); wined3d_mutex_lock(); IWineD3DDevice_Uninit3D(device->WineD3DDevice, D3D9CB_DestroySwapChain); + IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); IWineD3DDevice_Release(device->WineD3DDevice); wined3d_mutex_unlock(); return E_OUTOFMEMORY; diff --git a/dlls/d3d9/tests/Makefile.in b/dlls/d3d9/tests/Makefile.in index 8ab1a13bf78..3afcfcbadf6 100644 --- a/dlls/d3d9/tests/Makefile.in +++ b/dlls/d3d9/tests/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ volume.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d9/tests/buffer.c b/dlls/d3d9/tests/buffer.c index 134712166c2..719ce7e96f6 100644 --- a/dlls/d3d9/tests/buffer.c +++ b/dlls/d3d9/tests/buffer.c @@ -78,7 +78,7 @@ static void lock_flag_test(IDirect3DDevice9 *device) { DWORD flags; const char *debug_string; - HRESULT result; + HRESULT win7_result; } test_data[] = { @@ -87,9 +87,9 @@ static void lock_flag_test(IDirect3DDevice9 *device) {D3DLOCK_NOOVERWRITE, "D3DLOCK_NOOVERWRITE", D3D_OK }, {D3DLOCK_NOOVERWRITE | D3DLOCK_DISCARD, "D3DLOCK_NOOVERWRITE | D3DLOCK_DISCARD", D3D_OK }, {D3DLOCK_NOOVERWRITE | D3DLOCK_READONLY, "D3DLOCK_NOOVERWRITE | D3DLOCK_READONLY", D3D_OK }, - {D3DLOCK_READONLY | D3DLOCK_DISCARD, "D3DLOCK_READONLY | D3DLOCK_DISCARD", D3D_OK }, + {D3DLOCK_READONLY | D3DLOCK_DISCARD, "D3DLOCK_READONLY | D3DLOCK_DISCARD", D3DERR_INVALIDCALL }, /* Completely bogous flags aren't an error */ - {0xdeadbeef, "0xdeadbeef", D3D_OK }, + {0xdeadbeef, "0xdeadbeef", D3DERR_INVALIDCALL }, }; hr = IDirect3DDevice9_CreateVertexBuffer(device, 1024, D3DUSAGE_DYNAMIC, 0, D3DPOOL_DEFAULT, &buffer, NULL); @@ -98,8 +98,12 @@ static void lock_flag_test(IDirect3DDevice9 *device) for(i = 0; i < (sizeof(test_data) / sizeof(*test_data)); i++) { hr = IDirect3DVertexBuffer9_Lock(buffer, 0, 0, &data, test_data[i].flags); - ok(hr == test_data[i].result, "Lock flags %s returned 0x%08x, expected 0x%08x\n", - test_data[i].debug_string, hr, test_data[i].result); + /* Windows XP always returns D3D_OK even with flags that don't make sense. Windows 7 returns + * an error. At least one game(Shaiya) depends on the Windows XP result, so mark the Windows 7 + * behavior as broken() + */ + ok(hr == D3D_OK || broken(hr == test_data[i].win7_result), "Lock flags %s returned 0x%08x, expected D3D_OK\n", + test_data[i].debug_string, hr); if(SUCCEEDED(hr)) { @@ -133,6 +137,7 @@ static void test_vertex_buffer_alignment(IDirect3DDevice9 *device) DWORD sizes[] = {1, 4, 16, 17, 32, 33, 64, 65, 1024, 1025, 1048576, 1048577}; unsigned int i, j; void *data; + unsigned int align = 16; for(i = 0; i < (sizeof(sizes) / sizeof(sizes[0])); i++) { @@ -152,8 +157,8 @@ static void test_vertex_buffer_alignment(IDirect3DDevice9 *device) hr = IDirect3DVertexBuffer9_Lock(buffer, 0, 0, &data, 0); ok(SUCCEEDED(hr), "IDirect3DVertexBuffer9_Lock failed (0x%08x)\n", hr); - ok(((DWORD_PTR) data & 31) == 0, "Vertex buffer start address is not 32 byte aligned(size: %d, pool: %s, data: %p)\n", - sizes[i], debug_d3dpool(pools[j]), data); + ok(((DWORD_PTR) data & (align - 1)) == 0, "Vertex buffer start address is not %u byte aligned(size: %d, pool: %s, data: %p)\n", + align, sizes[i], debug_d3dpool(pools[j]), data); hr = IDirect3DVertexBuffer9_Unlock(buffer); ok(SUCCEEDED(hr), "IDirect3DVertexBuffer9_Unlock failed (0x%08x)\n", hr); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index de46082248d..eb424e21348 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -2338,6 +2338,13 @@ struct UINT message; } expect_message; +struct wndproc_thread_param +{ + HWND dummy_window; + HANDLE window_created; + HANDLE test_finished; +}; + static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { if (filter_messages && filter_messages == hwnd) @@ -2351,14 +2358,37 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM return DefWindowProcA(hwnd, message, wparam, lparam); } +static DWORD WINAPI wndproc_thread(void *param) +{ + struct wndproc_thread_param *p = param; + DWORD res; + BOOL ret; + + p->dummy_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + + ret = SetEvent(p->window_created); + ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(p->test_finished, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + + DestroyWindow(p->dummy_window); + + return 0; +} + static void test_wndproc(void) { - HWND device_window, focus_window, dummy_window, tmp; + struct wndproc_thread_param thread_params; + HWND device_window, focus_window, tmp; IDirect3DDevice9 *device; WNDCLASSA wc = {0}; IDirect3D9 *d3d9; + HANDLE thread; LONG_PTR proc; ULONG ref; + DWORD res, tid; if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) { @@ -2370,12 +2400,20 @@ static void test_wndproc(void) wc.lpszClassName = "d3d9_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); + thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + focus_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); - dummy_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", - WS_MAXIMIZE | WS_CAPTION | WS_VISIBLE, 0, 0, 640, 480, 0, 0, 0, 0); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); + ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(thread_params.window_created, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", @@ -2384,10 +2422,14 @@ static void test_wndproc(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); - trace("device_window %p, focus_window %p, dummy_window %p.\n", device_window, focus_window, dummy_window); + trace("device_window %p, focus_window %p, dummy_window %p.\n", + device_window, focus_window, thread_params.dummy_window); tmp = GetFocus(); - ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n", + thread_params.dummy_window, tmp); expect_message.window = focus_window; expect_message.message = WM_SETFOCUS; @@ -2402,7 +2444,10 @@ static void test_wndproc(void) ok(!expect_message.message, "Expected message %#x for window %p, but didn't receive it.\n", expect_message.message, expect_message.window); tmp = GetFocus(); - ok(tmp == focus_window, "Expected focus %p, got %p.\n", focus_window, tmp); + todo_wine ok(tmp == focus_window, "Expected focus %p, got %p.\n", focus_window, tmp); + tmp = GetForegroundWindow(); + todo_wine ok(tmp == focus_window, "Expected foreground window %p, got %p.\n", focus_window, tmp); + SetForegroundWindow(focus_window); filter_messages = focus_window; @@ -2452,7 +2497,13 @@ static void test_wndproc(void) done: filter_messages = NULL; IDirect3D9_Release(d3d9); - DestroyWindow(dummy_window); + + SetEvent(thread_params.test_finished); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread_params.test_finished); + CloseHandle(thread_params.window_created); + CloseHandle(thread); + DestroyWindow(device_window); DestroyWindow(focus_window); UnregisterClassA("d3d9_test_wndproc_wc", GetModuleHandleA(NULL)); @@ -2460,12 +2511,15 @@ done: static void test_wndproc_windowed(void) { - HWND device_window, focus_window, dummy_window, tmp; + struct wndproc_thread_param thread_params; + HWND device_window, focus_window, tmp; IDirect3DDevice9 *device; WNDCLASSA wc = {0}; IDirect3D9 *d3d9; + HANDLE thread; LONG_PTR proc; ULONG ref; + DWORD res, tid; if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) { @@ -2477,12 +2531,20 @@ static void test_wndproc_windowed(void) wc.lpszClassName = "d3d9_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); + thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + focus_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); - dummy_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", - WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); + ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(thread_params.window_created, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", @@ -2491,10 +2553,14 @@ static void test_wndproc_windowed(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); - trace("device_window %p, focus_window %p, dummy_window %p.\n", device_window, focus_window, dummy_window); + trace("device_window %p, focus_window %p, dummy_window %p.\n", + device_window, focus_window, thread_params.dummy_window); tmp = GetFocus(); - ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n", + thread_params.dummy_window, tmp); filter_messages = focus_window; @@ -2506,7 +2572,10 @@ static void test_wndproc_windowed(void) } tmp = GetFocus(); - ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n", + thread_params.dummy_window, tmp); proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", @@ -2544,7 +2613,13 @@ static void test_wndproc_windowed(void) done: filter_messages = NULL; IDirect3D9_Release(d3d9); - DestroyWindow(dummy_window); + + SetEvent(thread_params.test_finished); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread_params.test_finished); + CloseHandle(thread_params.window_created); + CloseHandle(thread); + DestroyWindow(device_window); DestroyWindow(focus_window); UnregisterClassA("d3d9_test_wndproc_wc", GetModuleHandleA(NULL)); diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c index 396e0c43d79..c1246fcc4d8 100644 --- a/dlls/d3d9/tests/surface.c +++ b/dlls/d3d9/tests/surface.c @@ -169,8 +169,9 @@ static void test_surface_alignment(IDirect3DDevice9 *device_ptr) ok(SUCCEEDED(hr), "IDirect3DTexture9_LockRect: %08x\n", hr); hr = IDirect3DTexture9_UnlockRect(pTexture, j); ok(SUCCEEDED(hr), "IDirect3DTexture9_UnLockRect: %08x\n", hr); - hr = IDirect3DTexture9_UnlockRect(pTexture, j); -todo_wine ok(SUCCEEDED(hr), "Double IDirect3DTexture9_UnLockRect failed with %08x\n", hr); + /* Windows XP returns D3D_OK when calling UnlockRect on an unlocked surface, + * windows 7 returns an error. + */ pitch = ((descr.Width + 3) >> 2) << 3; if (i > 0) pitch <<= 1; @@ -187,8 +188,10 @@ todo_wine ok(SUCCEEDED(hr), "Double IDirect3DTexture9_UnLockRect failed with % static void test_lockrect_offset(IDirect3DDevice9 *device) { IDirect3DSurface9 *surface = 0; + IDirect3D9 *d3d; const RECT rect = {60, 60, 68, 68}; D3DLOCKED_RECT locked_rect; + int expected_pitch; unsigned int expected_offset; unsigned int offset; unsigned int i; @@ -202,14 +205,24 @@ static void test_lockrect_offset(IDirect3DDevice9 *device) unsigned int block_height; unsigned int block_size; } dxt_formats[] = { - {D3DFMT_DXT1, "D3DFMT_DXT1", 4, 4, 8}, - {D3DFMT_DXT2, "D3DFMT_DXT2", 4, 4, 16}, - {D3DFMT_DXT3, "D3DFMT_DXT3", 4, 4, 16}, - {D3DFMT_DXT4, "D3DFMT_DXT4", 4, 4, 16}, - {D3DFMT_DXT5, "D3DFMT_DXT5", 4, 4, 16}, + {D3DFMT_DXT1, "D3DFMT_DXT1", 4, 4, 8}, + {D3DFMT_DXT2, "D3DFMT_DXT2", 4, 4, 16}, + {D3DFMT_DXT3, "D3DFMT_DXT3", 4, 4, 16}, + {D3DFMT_DXT4, "D3DFMT_DXT4", 4, 4, 16}, + {D3DFMT_DXT5, "D3DFMT_DXT5", 4, 4, 16}, + {MAKEFOURCC('A','T','I','2'), "ATI2N", 1, 1, 1}, }; + hr = IDirect3DDevice9_GetDirect3D(device, &d3d); + ok(SUCCEEDED(hr), "IDirect3DDevice9_GetDirect3D failed (%08x)\n", hr); for (i = 0; i < (sizeof(dxt_formats) / sizeof(*dxt_formats)); ++i) { + hr = IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, dxt_formats[i].fmt); + if(FAILED(hr)) + { + skip("Format %s not supported, skipping lockrect offset test\n", dxt_formats[i].name); + continue; + } + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 128, 128, dxt_formats[i].fmt, D3DPOOL_SCRATCH, &surface, 0); ok(SUCCEEDED(hr), "CreateOffscreenPlainSurface failed (%08x)\n", hr); @@ -217,6 +230,9 @@ static void test_lockrect_offset(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "LockRect failed (%08x)\n", hr); base = locked_rect.pBits; + expected_pitch = (128 + dxt_formats[i].block_height - 1) / dxt_formats[i].block_width + * dxt_formats[i].block_size; + ok(locked_rect.Pitch == expected_pitch, "Got pitch %d, expected pitch %d for format %s\n", locked_rect.Pitch, expected_pitch, dxt_formats[i].name); hr = IDirect3DSurface9_UnlockRect(surface); ok(SUCCEEDED(hr), "UnlockRect failed (%08x)\n", hr); @@ -227,7 +243,7 @@ static void test_lockrect_offset(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "LockRect failed (%08x)\n", hr); offset = (BYTE *)locked_rect.pBits - base; - expected_offset = (rect.top / dxt_formats[i].block_height) * locked_rect.Pitch + expected_offset = (rect.top / dxt_formats[i].block_height) * expected_pitch + (rect.left / dxt_formats[i].block_width) * dxt_formats[i].block_size; ok(offset == expected_offset, "Got offset %u, expected offset %u for format %s\n", offset, expected_offset, dxt_formats[i].name); @@ -236,8 +252,15 @@ static void test_lockrect_offset(IDirect3DDevice9 *device) IDirect3DSurface9_Release(surface); } + IDirect3D9_Release(d3d); } +struct rect_test +{ + RECT rect; + HRESULT win7_result; +}; + static void test_lockrect_invalid(IDirect3DDevice9 *device) { IDirect3DSurface9 *surface = 0; @@ -247,20 +270,20 @@ static void test_lockrect_invalid(IDirect3DDevice9 *device) HRESULT hr; const RECT test_rect_2 = { 0, 0, 8, 8 }; - const RECT test_data[] = { - {60, 60, 68, 68}, /* Valid */ - {60, 60, 60, 68}, /* 0 height */ - {60, 60, 68, 60}, /* 0 width */ - {68, 60, 60, 68}, /* left > right */ - {60, 68, 68, 60}, /* top > bottom */ - {-8, 60, 0, 68}, /* left < surface */ - {60, -8, 68, 0}, /* top < surface */ - {-16, 60, -8, 68}, /* right < surface */ - {60, -16, 68, -8}, /* bottom < surface */ - {60, 60, 136, 68}, /* right > surface */ - {60, 60, 68, 136}, /* bottom > surface */ - {136, 60, 144, 68}, /* left > surface */ - {60, 136, 68, 144}, /* top > surface */ + const struct rect_test test_data[] = { + {{60, 60, 68, 68}, D3D_OK}, /* Valid */ + {{60, 60, 60, 68}, D3DERR_INVALIDCALL}, /* 0 height */ + {{60, 60, 68, 60}, D3DERR_INVALIDCALL}, /* 0 width */ + {{68, 60, 60, 68}, D3DERR_INVALIDCALL}, /* left > right */ + {{60, 68, 68, 60}, D3DERR_INVALIDCALL}, /* top > bottom */ + {{-8, 60, 0, 68}, D3DERR_INVALIDCALL}, /* left < surface */ + {{60, -8, 68, 0}, D3DERR_INVALIDCALL}, /* top < surface */ + {{-16, 60, -8, 68}, D3DERR_INVALIDCALL}, /* right < surface */ + {{60, -16, 68, -8}, D3DERR_INVALIDCALL}, /* bottom < surface */ + {{60, 60, 136, 68}, D3DERR_INVALIDCALL}, /* right > surface */ + {{60, 60, 68, 136}, D3DERR_INVALIDCALL}, /* bottom > surface */ + {{136, 60, 144, 68}, D3DERR_INVALIDCALL}, /* left > surface */ + {{60, 136, 68, 144}, D3DERR_INVALIDCALL}, /* top > surface */ }; hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 128, 128, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, 0); @@ -277,14 +300,18 @@ static void test_lockrect_invalid(IDirect3DDevice9 *device) for (i = 0; i < (sizeof(test_data) / sizeof(*test_data)); ++i) { unsigned int offset, expected_offset; - const RECT *rect = &test_data[i]; + const RECT *rect = &test_data[i].rect; locked_rect.pBits = (BYTE *)0xdeadbeef; locked_rect.Pitch = 0xdeadbeef; hr = IDirect3DSurface9_LockRect(surface, &locked_rect, rect, 0); - ok(SUCCEEDED(hr), "LockRect failed (0x%08x) for rect [%d, %d]->[%d, %d]\n", + /* Windows XP accepts invalid locking rectangles, windows 7 rejects them. + * Some games(C&C3) depend on the XP behavior, mark the Win7 one broken */ + ok(SUCCEEDED(hr) || broken(hr == test_data[i].win7_result), + "LockRect failed (0x%08x) for rect [%d, %d]->[%d, %d]\n", hr, rect->left, rect->top, rect->right, rect->bottom); + if(FAILED(hr)) continue; offset = (BYTE *)locked_rect.pBits - base; expected_offset = rect->top * locked_rect.Pitch + rect->left * 4; @@ -302,14 +329,14 @@ static void test_lockrect_invalid(IDirect3DDevice9 *device) hr = IDirect3DSurface9_UnlockRect(surface); ok(SUCCEEDED(hr), "UnlockRect failed (0x%08x)\n", hr); - hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &test_data[0], 0); + hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &test_data[0].rect, 0); ok(hr == D3D_OK, "LockRect failed (0x%08x) for rect [%d, %d]->[%d, %d]" - ", expected D3D_OK (0x%08x)\n", hr, test_data[0].left, test_data[0].top, - test_data[0].right, test_data[0].bottom, D3D_OK); - hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &test_data[0], 0); + ", expected D3D_OK (0x%08x)\n", hr, test_data[0].rect.left, test_data[0].rect.top, + test_data[0].rect.right, test_data[0].rect.bottom, D3D_OK); + hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &test_data[0].rect, 0); ok(hr == D3DERR_INVALIDCALL, "Double LockRect failed (0x%08x) for rect [%d, %d]->[%d, %d]" - ", expected D3DERR_INVALIDCALL (0x%08x)\n", hr, test_data[0].left, test_data[0].top, - test_data[0].right, test_data[0].bottom, D3DERR_INVALIDCALL); + ", expected D3DERR_INVALIDCALL (0x%08x)\n", hr, test_data[0].rect.left, test_data[0].rect.top, + test_data[0].rect.right, test_data[0].rect.bottom, D3DERR_INVALIDCALL); hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &test_rect_2, 0); ok(hr == D3DERR_INVALIDCALL, "Double LockRect failed (0x%08x) for rect [%d, %d]->[%d, %d]" ", expected D3DERR_INVALIDCALL (0x%08x)\n", hr, test_rect_2.left, test_rect_2.top, diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 875d2bedabe..1fa7f471cf4 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -495,9 +495,6 @@ static void clear_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_GetViewport(device, &old_vp); ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %08x\n", hr); - trace("viewport: X %u, Y %u, W %u, H %u, MinZ %.8e, MaxZ %.8e.\n", - old_vp.X, old_vp.Y, old_vp.Width, old_vp.Height, old_vp.MinZ, old_vp.MaxZ); - vp.X = 160; vp.Y = 120; vp.Width = 160; @@ -10433,7 +10430,6 @@ static void loop_index_test(IDirect3DDevice9 *device) { ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { - trace("going to draw index\n"); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); diff --git a/dlls/d3dim/Makefile.in b/dlls/d3dim/Makefile.in index 2ab352fb6d8..b21f8100849 100644 --- a/dlls/d3dim/Makefile.in +++ b/dlls/d3dim/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = d3dim_main.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3drm/Makefile.in b/dlls/d3drm/Makefile.in index 01f28f0f0e5..94118565ad2 100644 --- a/dlls/d3drm/Makefile.in +++ b/dlls/d3drm/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3drm/tests/Makefile.in b/dlls/d3drm/tests/Makefile.in index a4544809f99..eecfd387e80 100644 --- a/dlls/d3drm/tests/Makefile.in +++ b/dlls/d3drm/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ vector.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in index 7fadf575897..150f62abe7a 100644 --- a/dlls/d3dx9_24/Makefile.in +++ b/dlls/d3dx9_24/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in index 730817a13b2..e56e04941a2 100644 --- a/dlls/d3dx9_25/Makefile.in +++ b/dlls/d3dx9_25/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in index 8852fb8b3b6..40ece46cb9b 100644 --- a/dlls/d3dx9_26/Makefile.in +++ b/dlls/d3dx9_26/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in index 064fdd34293..4c8160aa22f 100644 --- a/dlls/d3dx9_27/Makefile.in +++ b/dlls/d3dx9_27/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in index 01bc95d0cbb..3abab58125b 100644 --- a/dlls/d3dx9_28/Makefile.in +++ b/dlls/d3dx9_28/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in index a3871d29e97..14b90113ed0 100644 --- a/dlls/d3dx9_29/Makefile.in +++ b/dlls/d3dx9_29/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in index 62a054ef90c..5c66d3c2c7f 100644 --- a/dlls/d3dx9_30/Makefile.in +++ b/dlls/d3dx9_30/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in index daf84d0c4b7..16a1eb768d1 100644 --- a/dlls/d3dx9_31/Makefile.in +++ b/dlls/d3dx9_31/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in index d3e98d30cb0..d0de0da36fe 100644 --- a/dlls/d3dx9_32/Makefile.in +++ b/dlls/d3dx9_32/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in index 6761464ea46..d839a933cd1 100644 --- a/dlls/d3dx9_33/Makefile.in +++ b/dlls/d3dx9_33/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in index c38c83c6acf..1a3b966ec94 100644 --- a/dlls/d3dx9_34/Makefile.in +++ b/dlls/d3dx9_34/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in index 19094d2f841..d815682ad87 100644 --- a/dlls/d3dx9_35/Makefile.in +++ b/dlls/d3dx9_35/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in index 36eca4a9b65..8bbd78df4f3 100644 --- a/dlls/d3dx9_36/Makefile.in +++ b/dlls/d3dx9_36/Makefile.in @@ -9,6 +9,7 @@ IMPORTS = d3d9 gdi32 user32 kernel32 C_SRCS = \ core.c \ d3dx9_36_main.c \ + effect.c \ font.c \ math.c \ mesh.c \ @@ -21,5 +22,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 792408194d2..fbcce68c242 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -46,7 +46,7 @@ @ stub D3DXCreateCubeTextureFromResourceExW @ stub D3DXCreateCubeTextureFromResourceW @ stub D3DXCreateCylinder -@ stub D3DXCreateEffect +@ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) @ stub D3DXCreateEffectCompiler @ stub D3DXCreateEffectCompilerFromFileA @ stub D3DXCreateEffectCompilerFromFileW @@ -97,7 +97,7 @@ @ stub D3DXCreateTextureFromFileExA @ stub D3DXCreateTextureFromFileExW @ stub D3DXCreateTextureFromFileInMemory -@ stub D3DXCreateTextureFromFileInMemoryEx +@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) @ stub D3DXCreateTextureFromFileW @ stub D3DXCreateTextureFromResourceA @ stub D3DXCreateTextureFromResourceExA diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/effect.c similarity index 51% copy from dlls/d3dx9_36/texture.c copy to dlls/d3dx9_36/effect.c index f47853a89df..92c6f785f0a 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/effect.c @@ -16,22 +16,30 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" #include "wine/debug.h" +#include "wine/unicode.h" +#include "windef.h" +#include "wingdi.h" +#include "d3dx9.h" +#include "d3dx9effect.h" #include "d3dx9_36_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -HRESULT WINAPI D3DXCreateTexture(LPDIRECT3DDEVICE9 pDevice, - UINT width, - UINT height, - UINT miplevels, - DWORD usage, - D3DFORMAT format, - D3DPOOL pool, - LPDIRECT3DTEXTURE9 *ppTexture) +HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + DWORD flags, + LPD3DXEFFECTPOOL pool, + LPD3DXEFFECT* effect, + LPD3DXBUFFER* compilation_errors) { - FIXME("(%p, %d, %d, %d, %x, %x, %x, %p): semi-stub\n", pDevice, width, height, miplevels, usage, format, - pool, ppTexture); + FIXME("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): stub\n", device, srcdata, srcdatalen, defines, include, flags, + pool, effect, compilation_errors); - return IDirect3DDevice9_CreateTexture(pDevice, width, height, miplevels, usage, format, pool, ppTexture, NULL); + return E_NOTIMPL; } diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index c2193c83eba..eb295737b98 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -793,7 +793,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *ifac return S_OK; } *ppobj = NULL; - ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + WARN("(%p)->(%s,%p), not found\n", This, debugstr_guid(riid), ppobj); return E_NOINTERFACE; } diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index e4de6b32dca..23c3cdd0055 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -281,6 +281,7 @@ typedef struct ID3DXConstantTableImpl { LONG ref; LPVOID ctab; DWORD size; + D3DXCONSTANTTABLE_DESC desc; } ID3DXConstantTableImpl; /*** IUnknown methods ***/ @@ -291,6 +292,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_QueryInterface(ID3DXConstantTable* TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject); if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXBuffer) || IsEqualGUID(riid, &IID_ID3DXConstantTable)) { ID3DXConstantTable_AddRef(iface); @@ -298,7 +300,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_QueryInterface(ID3DXConstantTable* return S_OK; } - ERR("Interface %s not found\n", debugstr_guid(riid)); + WARN("Interface %s not found.\n", debugstr_guid(riid)); return E_NOINTERFACE; } @@ -352,9 +354,14 @@ static HRESULT WINAPI ID3DXConstantTableImpl_GetDesc(ID3DXConstantTable* iface, { ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; - FIXME("(%p)->(%p): stub\n", This, desc); + TRACE("(%p)->(%p)\n", This, desc); - return E_NOTIMPL; + if (!desc) + return D3DERR_INVALIDCALL; + + memcpy(desc, &This->desc, sizeof(This->desc)); + + return D3D_OK; } static HRESULT WINAPI ID3DXConstantTableImpl_GetConstantDesc(ID3DXConstantTable* iface, D3DXHANDLE constant, @@ -367,6 +374,15 @@ static HRESULT WINAPI ID3DXConstantTableImpl_GetConstantDesc(ID3DXConstantTable* return E_NOTIMPL; } +static UINT WINAPI ID3DXConstantTableImpl_GetSamplerIndex(LPD3DXCONSTANTTABLE iface, D3DXHANDLE constant) +{ + ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + + FIXME("(%p)->(%p): stub\n", This, constant); + + return (UINT)-1; +} + static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstant(ID3DXConstantTable* iface, D3DXHANDLE constant, UINT index) { ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; @@ -385,7 +401,7 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByName(ID3DXConstantT return NULL; } -static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByElement(ID3DXConstantTable* iface, D3DXHANDLE constant, UINT index) +static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantElement(ID3DXConstantTable* iface, D3DXHANDLE constant, UINT index) { ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; @@ -564,9 +580,10 @@ static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl = /*** ID3DXConstantTable methods ***/ ID3DXConstantTableImpl_GetDesc, ID3DXConstantTableImpl_GetConstantDesc, + ID3DXConstantTableImpl_GetSamplerIndex, ID3DXConstantTableImpl_GetConstant, ID3DXConstantTableImpl_GetConstantByName, - ID3DXConstantTableImpl_GetConstantByElement, + ID3DXConstantTableImpl_GetConstantElement, ID3DXConstantTableImpl_SetDefaults, ID3DXConstantTableImpl_SetValue, ID3DXConstantTableImpl_SetBool, @@ -585,21 +602,22 @@ static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl = ID3DXConstantTableImpl_SetMatrixTransposePointerArray }; -HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* pFunction, +HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code, DWORD flags, - LPD3DXCONSTANTTABLE* ppConstantTable) + LPD3DXCONSTANTTABLE* constant_table) { - ID3DXConstantTableImpl* object; + ID3DXConstantTableImpl* object = NULL; HRESULT hr; LPCVOID data; UINT size; + D3DXSHADER_CONSTANTTABLE* ctab_header; - FIXME("(%p, %x, %p): semi-stub\n", pFunction, flags, ppConstantTable); + FIXME("(%p, %x, %p): semi-stub\n", byte_code, flags, constant_table); - if (!pFunction || !ppConstantTable) + if (!byte_code || !constant_table) return D3DERR_INVALIDCALL; - hr = D3DXFindShaderComment(pFunction, MAKEFOURCC('C','T','A','B'), &data, &size); + hr = D3DXFindShaderComment(byte_code, MAKEFOURCC('C','T','A','B'), &data, &size); if (hr != D3D_OK) return D3DXERR_INVALIDDATA; @@ -613,6 +631,9 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* pFunction, object->lpVtbl = &ID3DXConstantTable_Vtbl; object->ref = 1; + if (size < sizeof(D3DXSHADER_CONSTANTTABLE)) + goto error; + object->ctab = HeapAlloc(GetProcessHeap(), 0, size); if (!object->ctab) { @@ -623,15 +644,29 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* pFunction, object->size = size; memcpy(object->ctab, data, object->size); - *ppConstantTable = (LPD3DXCONSTANTTABLE)object; + ctab_header = (D3DXSHADER_CONSTANTTABLE*)data; + if (ctab_header->Size != sizeof(D3DXSHADER_CONSTANTTABLE)) + goto error; + object->desc.Creator = ctab_header->Creator ? (LPCSTR)object->ctab + ctab_header->Creator : NULL; + object->desc.Version = ctab_header->Version; + object->desc.Constants = ctab_header->Constants; + + *constant_table = (LPD3DXCONSTANTTABLE)object; return D3D_OK; + +error: + + HeapFree(GetProcessHeap(), 0, object->ctab); + HeapFree(GetProcessHeap(), 0, object); + + return D3DXERR_INVALIDDATA; } -HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* pFunction, - LPD3DXCONSTANTTABLE* ppConstantTable) +HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code, + LPD3DXCONSTANTTABLE* constant_table) { - TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", pFunction, ppConstantTable); + TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", byte_code, constant_table); - return D3DXGetShaderConstantTableEx(pFunction, 0, ppConstantTable); + return D3DXGetShaderConstantTableEx(byte_code, 0, constant_table); } diff --git a/dlls/d3dx9_36/tests/Makefile.in b/dlls/d3dx9_36/tests/Makefile.in index 4395bafe285..2ab1fc0f1e0 100644 --- a/dlls/d3dx9_36/tests/Makefile.in +++ b/dlls/d3dx9_36/tests/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index 8a2a5b1d809..255e84a80a1 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -43,8 +43,8 @@ static const DWORD simple_ps[] = { static const DWORD shader_with_ctab[] = { 0xfffe0300, /* vs_3_0 */ 0x0002fffe, FCC_TEXT, 0x00000000, /* TEXT comment */ - 0x0006fffe, FCC_CTAB, 0x0000001c, 0x00000000, 0xfffe0300, 0x00000000, /* CTAB comment */ - 0x00000000, + 0x0008fffe, FCC_CTAB, 0x0000001c, 0x00000010, 0xfffe0300, 0x00000000, /* CTAB comment */ + 0x00000000, 0x00000000, 0x00000000, 0x0004fffe, FCC_TEXT, 0x00000000, 0x00000000, 0x00000000, /* TEXT comment */ 0x0000ffff}; /* END */ @@ -111,7 +111,7 @@ static void test_find_shader_comment(void) hr = D3DXFindShaderComment(shader_with_ctab, MAKEFOURCC('C','T','A','B'), &data, &size); ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); ok(data == (LPCVOID)(shader_with_ctab + 6), "Got result %p, expected %p\n", data, shader_with_ctab + 6); - ok(size == 20, "Got result %d, expected 20\n", size); + ok(size == 28, "Got result %d, expected 28\n", size); } static void test_get_shader_constant_table_ex(void) @@ -120,6 +120,7 @@ static void test_get_shader_constant_table_ex(void) HRESULT hr; LPVOID data; DWORD size; + D3DXCONSTANTTABLE_DESC desc; hr = D3DXGetShaderConstantTableEx(NULL, 0, &constant_table); ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); @@ -130,7 +131,7 @@ static void test_get_shader_constant_table_ex(void) /* With invalid CTAB data */ hr = D3DXGetShaderConstantTableEx(shader_with_invalid_ctab, 0, &constant_table); - todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); if (constant_table) ID3DXConstantTable_Release(constant_table); hr = D3DXGetShaderConstantTableEx(shader_with_ctab, 0, &constant_table); @@ -139,11 +140,20 @@ static void test_get_shader_constant_table_ex(void) if (constant_table) { size = ID3DXConstantTable_GetBufferSize(constant_table); - ok(size == 20, "Got result %x, expected 20\n", size); + ok(size == 28, "Got result %x, expected 28\n", size); data = ID3DXConstantTable_GetBufferPointer(constant_table); ok(!memcmp(data, shader_with_ctab + 6, size), "Retreived wrong CTAB data\n"); + hr = ID3DXConstantTable_GetDesc(constant_table, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + + hr = ID3DXConstantTable_GetDesc(constant_table, &desc); + ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(desc.Creator == (LPCSTR)data + 0x10, "Got result %p, expected %p\n", desc.Creator, (LPCSTR)data + 0x10); + ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %x, expected %x\n", desc.Version, D3DVS_VERSION(3, 0)); + ok(desc.Constants == 0, "Got result %x, expected 0\n", desc.Constants); + ID3DXConstantTable_Release(constant_table); } } diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index f47853a89df..3ab45416137 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -30,8 +30,30 @@ HRESULT WINAPI D3DXCreateTexture(LPDIRECT3DDEVICE9 pDevice, D3DPOOL pool, LPDIRECT3DTEXTURE9 *ppTexture) { - FIXME("(%p, %d, %d, %d, %x, %x, %x, %p): semi-stub\n", pDevice, width, height, miplevels, usage, format, + FIXME("(%p, %u, %u, %u, %x, %x, %x, %p): semi-stub\n", pDevice, width, height, miplevels, usage, format, pool, ppTexture); return IDirect3DDevice9_CreateTexture(pDevice, width, height, miplevels, usage, format, pool, ppTexture, NULL); } + +HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO* srcinfo, + PALETTEENTRY* palette, + LPDIRECT3DTEXTURE9* texture) +{ + FIXME("(%p, %p, %u, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p): stub\n", device, srcdata, srcdatasize, width, + height, miplevels, usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture); + + return E_NOTIMPL; +} diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in index c4e3e222e89..400c3863f11 100644 --- a/dlls/d3dx9_37/Makefile.in +++ b/dlls/d3dx9_37/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in index 90a2f84259b..08a09578957 100644 --- a/dlls/d3dx9_38/Makefile.in +++ b/dlls/d3dx9_38/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in index a78aa1dffec..2062004b257 100644 --- a/dlls/d3dx9_39/Makefile.in +++ b/dlls/d3dx9_39/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in index 7da80675cee..c2385a88f78 100644 --- a/dlls/d3dx9_40/Makefile.in +++ b/dlls/d3dx9_40/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in index 38e92450cfc..d0ce452bd0e 100644 --- a/dlls/d3dx9_41/Makefile.in +++ b/dlls/d3dx9_41/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in index b3defb8eff1..2e4c9693695 100644 --- a/dlls/d3dx9_42/Makefile.in +++ b/dlls/d3dx9_42/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dxof/Makefile.in b/dlls/d3dxof/Makefile.in index 9ea555585e8..751349cd63a 100644 --- a/dlls/d3dxof/Makefile.in +++ b/dlls/d3dxof/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dxof/tests/Makefile.in b/dlls/d3dxof/tests/Makefile.in index 45b6fe55d6b..974f8e0aa2e 100644 --- a/dlls/d3dxof/tests/Makefile.in +++ b/dlls/d3dxof/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ d3dxof.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c index 11982295ada..f1d020a24dc 100644 --- a/dlls/d3dxof/tests/d3dxof.c +++ b/dlls/d3dxof/tests/d3dxof.c @@ -55,8 +55,15 @@ char object[] = char empty_txt_file[] = "xof 0302txt 0064"; char empty_bin_file[] = "xof 0302bin 0064"; -char empty_tzip_file[] = "xof 0302tzip0064"; -char empty_bzip_file[] = "xof 0302bzip0064"; +/* MSZip data is generated with the command "MAKECAB.EXE /D Compress=ON /D CompressionType=MSZip file packed" + * Data in cab is after the filename (null terminated) and the 32-bit checksum: + * size (16-bit), packed_size (16-bit) and compressed data (with leading 16-bit CK signature) + * Data in x files is preceding by 2 16-bit words: size with xof header (16 bytes) and a 0 value + * It does not seem possible to generate a MSZip data with no byte, so put just 1 byte here */ +/* "\n" packed with MSZip => not text */ +char empty_tzip_file[] = "xof 0302tzip0064\x11\x00\x00\x00\x01\x00\x05\x00\x43\x4b\xe3\x02\x00"; +/* "\n" packed with MSZip => not token (token are 16-bit and there is only 1 byte) */ +char empty_bzip_file[] = "xof 0302bzip0064\x11\x00\x00\x00\x01\x00\x05\x00\x43\x4b\xe3\x02\x00"; char empty_cmp_file[] = "xof 0302cmp 0064"; char empty_xxxx_file[] = "xof 0302xxxx0064"; @@ -104,11 +111,11 @@ static void test_refcount(void) ref = IDirectXFile_Release(lpDirectXFile); ok(ref == 1, "Got refcount %d, expected 1\n", ref); - hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, strlen(template)); + hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1); ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); dxflm.lpMemory = &object; - dxflm.dSize = strlen(object); + dxflm.dSize = sizeof(object) - 1; hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo); ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr); ref = getRefcount( (IUnknown *) lpDirectXFile); @@ -169,11 +176,11 @@ static void test_CreateEnumObject(void) return; } - hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, strlen(template)); + hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1); ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); dxflm.lpMemory = &object; - dxflm.dSize = strlen(object); + dxflm.dSize = sizeof(object) - 1; /* Check that only lowest 4 bits are relevant in DXFILELOADOPTIONS */ hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, 0xFFFFFFF0 + DXFILELOAD_FROMMEMORY, &lpdxfeo); ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr); @@ -218,53 +225,55 @@ static void test_file_types(void) return; } - hr = IDirectXFile_RegisterTemplates(dxfile, empty_txt_file, strlen(empty_txt_file)); + hr = IDirectXFile_RegisterTemplates(dxfile, empty_txt_file, sizeof(empty_txt_file) - 1); ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); - hr = IDirectXFile_RegisterTemplates(dxfile, empty_bin_file, strlen(empty_bin_file)); + hr = IDirectXFile_RegisterTemplates(dxfile, empty_bin_file, sizeof(empty_bin_file) - 1); ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); - hr = IDirectXFile_RegisterTemplates(dxfile, empty_tzip_file, strlen(empty_tzip_file)); - ok(hr == DXFILEERR_BADALLOC, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); + hr = IDirectXFile_RegisterTemplates(dxfile, empty_tzip_file, sizeof(empty_tzip_file) - 1); + todo_wine ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); - hr = IDirectXFile_RegisterTemplates(dxfile, empty_bzip_file, strlen(empty_bzip_file)); - ok(hr == DXFILEERR_BADALLOC, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); + hr = IDirectXFile_RegisterTemplates(dxfile, empty_bzip_file, sizeof(empty_bzip_file) - 1); + todo_wine ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); - hr = IDirectXFile_RegisterTemplates(dxfile, empty_cmp_file, strlen(empty_cmp_file)); + hr = IDirectXFile_RegisterTemplates(dxfile, empty_cmp_file, sizeof(empty_cmp_file) - 1); ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); - hr = IDirectXFile_RegisterTemplates(dxfile, empty_xxxx_file, strlen(empty_xxxx_file)); + hr = IDirectXFile_RegisterTemplates(dxfile, empty_xxxx_file, sizeof(empty_xxxx_file) - 1); ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); lminfo.lpMemory = empty_txt_file; - lminfo.dSize = strlen(empty_txt_file); + lminfo.dSize = sizeof(empty_txt_file) - 1; hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object); ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr); if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object); lminfo.lpMemory = empty_bin_file; - lminfo.dSize = strlen(empty_bin_file); + lminfo.dSize = sizeof(empty_bin_file) - 1; hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object); ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr); if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object); lminfo.lpMemory = empty_tzip_file; - lminfo.dSize = strlen(empty_tzip_file); + lminfo.dSize = sizeof(empty_tzip_file) - 1; hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object); - ok(hr == DXFILEERR_BADALLOC, "IDirectXFile_CreateEnumObject: %x\n", hr); + todo_wine ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr); + if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object); lminfo.lpMemory = empty_bzip_file; - lminfo.dSize = strlen(empty_bzip_file); + lminfo.dSize = sizeof(empty_bzip_file) - 1; hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object); - ok(hr == DXFILEERR_BADALLOC, "IDirectXFile_CreateEnumObject: %x\n", hr); + todo_wine ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr); + if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object); lminfo.lpMemory = empty_cmp_file; - lminfo.dSize = strlen(empty_cmp_file); + lminfo.dSize = sizeof(empty_cmp_file) - 1; hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object); ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFile_CreateEnumObject: %x\n", hr); lminfo.lpMemory = empty_xxxx_file; - lminfo.dSize = strlen(empty_xxxx_file); + lminfo.dSize = sizeof(empty_xxxx_file) - 1; hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object); ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFile_CreateEnumObject: %x\n", hr); @@ -412,7 +421,7 @@ static void test_dump(void) goto exit; } - hr = IDirectXFile_RegisterTemplates(lpDirectXFile, pvData, strlen(pvData)); + hr = IDirectXFile_RegisterTemplates(lpDirectXFile, pvData, cbSize); ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); hr = IDirectXFile_CreateEnumObject(lpDirectXFile, (LPVOID)"objects.txt", DXFILELOAD_FROMFILE, &lpDirectXFileEnumObject); diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in index a3b1553464e..6a794a50fda 100644 --- a/dlls/dbghelp/Makefile.in +++ b/dlls/dbghelp/Makefile.in @@ -34,5 +34,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index e7e3c7c3c37..5ea2e824b6e 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -313,6 +313,36 @@ enum module_type }; struct process; +struct module; + +/* a module can be made of several debug information formats, so we have to + * support them all + */ +enum format_info +{ + DFI_ELF, + DFI_PE, + DFI_MACHO, + DFI_DWARF, + DFI_LAST +}; + +struct module_format +{ + struct module* module; + void (*remove)(struct process* pcs, struct module_format* modfmt); + void (*loc_compute)(struct process* pcs, + const struct module_format* modfmt, + const struct symt_function* func, + struct location* loc); + union + { + struct elf_module_info* elf_info; + struct dwarf2_module_info_s* dwarf2_info; + struct pe_module_info* pe_info; + struct macho_module_info* macho_info; + } u; +}; struct module { @@ -324,10 +354,7 @@ struct module unsigned short is_virtual : 1; /* specific information for debug types */ - struct elf_module_info* elf_info; - struct dwarf2_module_info_s*dwarf2_info; - - struct macho_module_info* macho_info; + struct module_format* format_info[DFI_LAST]; /* memory allocation pool */ struct pool pool; @@ -340,10 +367,6 @@ struct module unsigned sorttab_size; struct symt_ht** addr_sorttab; struct hash_table ht_symbols; - void (*loc_compute)(struct process* pcs, - const struct module* module, - const struct symt_function* func, - struct location* loc); /* types */ struct hash_table ht_types; @@ -471,11 +494,10 @@ extern DWORD calc_crc32(int fd); typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user); /* elf_module.c */ -#define ELF_NO_MAP ((const void*)-1) extern BOOL elf_enum_modules(HANDLE hProc, enum_modules_cb, void*); extern BOOL elf_fetch_file_info(const WCHAR* name, DWORD* base, DWORD* size, DWORD* checksum); -struct elf_file_map; -extern BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap); +struct image_file_map; +extern BOOL elf_load_debug_info(struct module* module, struct image_file_map* fmap); extern struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long); extern BOOL elf_read_wine_loader_dbg_info(struct process* pcs); @@ -565,11 +587,7 @@ extern BOOL stabs_parse(struct module* module, unsigned long load_offset /* dwarf.c */ extern BOOL dwarf2_parse(struct module* module, unsigned long load_offset, const struct elf_thunk_area* thunks, - const unsigned char* debug, unsigned int debug_size, - const unsigned char* abbrev, unsigned int abbrev_size, - const unsigned char* str, unsigned int str_size, - const unsigned char* line, unsigned int line_size, - const unsigned char* loclist, unsigned int loclist_size); + struct image_file_map* fmap); /* stack.c */ extern BOOL sw_read_mem(struct cpu_stack_walk* csw, DWORD64 addr, void* ptr, DWORD sz); diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 433dca88ff4..199b3bb4b8a 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -51,6 +51,7 @@ #include "oleauto.h" #include "dbghelp_private.h" +#include "image_private.h" #include "wine/debug.h" @@ -139,6 +140,7 @@ struct attribute union { unsigned long uvalue; + ULONGLONG lluvalue; long svalue; const char* string; struct dwarf2_block block; @@ -157,6 +159,7 @@ typedef struct dwarf2_section_s { const unsigned char* address; unsigned size; + DWORD_PTR rva; } dwarf2_section_t; enum dwarf2_sections {section_debug, section_string, section_abbrev, section_line, section_max}; @@ -512,9 +515,8 @@ static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx, break; case DW_FORM_data8: - attr->u.block.size = 8; - attr->u.block.ptr = data; - data += 8; + attr->u.lluvalue = dwarf2_get_u8(data); + TRACE("data8<%s>\n", wine_dbgstr_longlong(attr->u.uvalue)); break; case DW_FORM_ref1: @@ -1480,6 +1482,11 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm, v.n1.n2.n3.lVal = value.u.uvalue; break; + case DW_FORM_data8: + v.n1.n2.vt = VT_UI8; + v.n1.n2.n3.llVal = value.u.lluvalue; + break; + case DW_FORM_sdata: v.n1.n2.vt = VT_I4; v.n1.n2.n3.lVal = value.u.svalue; @@ -1511,12 +1518,6 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm, } break; - case DW_FORM_data8: - v.n1.n2.vt = VT_I1 | VT_BYREF; - v.n1.n2.n3.byref = pool_alloc(&subpgm->ctx->module->pool, value.u.block.size); - memcpy(v.n1.n2.n3.byref, value.u.block.ptr, value.u.block.size); - break; - default: FIXME("Unsupported form for const value %s (%lx)\n", name.u.string, value.form); @@ -1952,7 +1953,7 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections, const char** p; /* section with line numbers stripped */ - if (sections[section_line].address == ELF_NO_MAP) + if (sections[section_line].address == IMAGE_NO_MAP) return FALSE; traverse.data = sections[section_line].address + offset; @@ -2211,7 +2212,7 @@ static BOOL dwarf2_parse_compilation_unit(const dwarf2_section_t* sections, return ret; } -static BOOL dwarf2_lookup_loclist(const struct module* module, const BYTE* start, +static BOOL dwarf2_lookup_loclist(const struct module_format* modfmt, const BYTE* start, unsigned long ip, dwarf2_traverse_context_t* lctx) { @@ -2219,7 +2220,7 @@ static BOOL dwarf2_lookup_loclist(const struct module* module, const BYTE* start const BYTE* ptr = start; DWORD len; - while (ptr < module->dwarf2_info->debug_loc.address + module->dwarf2_info->debug_loc.size) + while (ptr < modfmt->u.dwarf2_info->debug_loc.address + modfmt->u.dwarf2_info->debug_loc.size) { beg = dwarf2_get_u4(ptr); ptr += 4; end = dwarf2_get_u4(ptr); ptr += 4; @@ -2240,7 +2241,7 @@ static BOOL dwarf2_lookup_loclist(const struct module* module, const BYTE* start } static enum location_error loc_compute_frame(struct process* pcs, - const struct module* module, + const struct module_format* modfmt, const struct symt_function* func, DWORD ip, struct location* frame) { @@ -2266,8 +2267,8 @@ static enum location_error loc_compute_frame(struct process* pcs, break; case loc_dwarf2_location_list: WARN("Searching loclist for %s\n", func->hash_elt.name); - if (!dwarf2_lookup_loclist(module, - module->dwarf2_info->debug_loc.address + pframe->offset, + if (!dwarf2_lookup_loclist(modfmt, + modfmt->u.dwarf2_info->debug_loc.address + pframe->offset, ip, &lctx)) return loc_err_out_of_scope; if ((err = compute_location(&lctx, frame, pcs->handle, NULL)) < 0) return err; @@ -2289,7 +2290,7 @@ static enum location_error loc_compute_frame(struct process* pcs, } static void dwarf2_location_compute(struct process* pcs, - const struct module* module, + const struct module_format* modfmt, const struct symt_function* func, struct location* loc) { @@ -2308,14 +2309,14 @@ static void dwarf2_location_compute(struct process* pcs, /* instruction pointer relative to compiland's start */ ip = pcs->ctx_frame.InstructionOffset - ((struct symt_compiland*)func->container)->address; - if ((err = loc_compute_frame(pcs, module, func, ip, &frame)) == 0) + if ((err = loc_compute_frame(pcs, modfmt, func, ip, &frame)) == 0) { switch (loc->kind) { case loc_dwarf2_location_list: /* Then, if the variable has a location list, find it !! */ - if (dwarf2_lookup_loclist(module, - module->dwarf2_info->debug_loc.address + loc->offset, + if (dwarf2_lookup_loclist(modfmt, + modfmt->u.dwarf2_info->debug_loc.address + loc->offset, ip, &lctx)) goto do_compute; err = loc_err_out_of_scope; @@ -2350,56 +2351,115 @@ static void dwarf2_location_compute(struct process* pcs, } } +static void dwarf2_module_remove(struct process* pcs, struct module_format* modfmt) +{ + HeapFree(GetProcessHeap(), 0, modfmt->u.dwarf2_info); + HeapFree(GetProcessHeap(), 0, modfmt); +} + +static inline BOOL dwarf2_init_section(dwarf2_section_t* section, struct image_file_map* fmap, + const char* sectname, struct image_section_map* ism) +{ + struct image_section_map local_ism; + + if (!ism) ism = &local_ism; + if (!image_find_section(fmap, sectname, ism)) + { + section->address = NULL; + section->size = 0; + section->rva = 0; + return FALSE; + } + + section->address = (const BYTE*)image_map_section(ism); + section->size = image_get_map_size(ism); + section->rva = image_get_map_rva(ism); + return TRUE; +} + BOOL dwarf2_parse(struct module* module, unsigned long load_offset, const struct elf_thunk_area* thunks, - const unsigned char* debug, unsigned int debug_size, - const unsigned char* abbrev, unsigned int abbrev_size, - const unsigned char* str, unsigned int str_size, - const unsigned char* line, unsigned int line_size, - const unsigned char* loclist, unsigned int loclist_size) + struct image_file_map* fmap) { dwarf2_section_t section[section_max]; - unsigned char* ptr; dwarf2_traverse_context_t mod_ctx; + struct image_section_map debug_sect, debug_str_sect, debug_abbrev_sect, + debug_line_sect, debug_loclist_sect; + BOOL ret = TRUE; + struct module_format* dwarf2_modfmt; - mod_ctx.start_data = mod_ctx.data = debug; - mod_ctx.end_data = debug + debug_size; + if (!dwarf2_init_section(§ion[section_debug], fmap, ".debug_info", &debug_sect)) + { + /* no Dwarf debug info here, so there's no error */ + return TRUE; + } + dwarf2_init_section(§ion[section_abbrev], fmap, ".debug_abbrev", &debug_abbrev_sect); + dwarf2_init_section(§ion[section_string], fmap, ".debug_str", &debug_str_sect); + dwarf2_init_section(§ion[section_line], fmap, ".debug_line", &debug_line_sect); + + if (section[section_debug].address == IMAGE_NO_MAP || + section[section_abbrev].address == IMAGE_NO_MAP || + section[section_string].address == IMAGE_NO_MAP) + { + ret = FALSE; + goto leave; + } + + if (fmap->modtype == DMT_ELF) + { + /* debug info might have a different base address than .so file + * when elf file is prelinked after splitting off debug info + * adjust symbol base addresses accordingly + */ + load_offset += fmap->u.elf.elf_start - debug_sect.fmap->u.elf.elf_start; + } + + TRACE("Loading Dwarf2 information for %s\n", debugstr_w(module->module.ModuleName)); + + mod_ctx.start_data = mod_ctx.data = section[section_debug].address; + mod_ctx.end_data = mod_ctx.data + section[section_debug].size; - module->loc_compute = dwarf2_location_compute; - section[section_debug].address = debug; - section[section_debug].size = debug_size; - section[section_abbrev].address = abbrev; - section[section_abbrev].size = abbrev_size; - section[section_string].address = str; - section[section_string].size = str_size; - section[section_line].address = line; - section[section_line].size = line_size; + dwarf2_modfmt = HeapAlloc(GetProcessHeap(), 0, sizeof(*dwarf2_modfmt)); + if (!dwarf2_modfmt) return FALSE; + dwarf2_modfmt->module = module; + dwarf2_modfmt->remove = dwarf2_module_remove; + dwarf2_modfmt->loc_compute = dwarf2_location_compute; + dwarf2_modfmt->u.dwarf2_info = NULL; + dwarf2_modfmt->module->format_info[DFI_DWARF] = dwarf2_modfmt; - if (loclist_size) + image_find_section(fmap, ".debug_loc", &debug_loclist_sect); + if (image_get_map_size(&debug_loclist_sect)) { /* initialize the dwarf2 specific info block for this module. - * As we'll need later on the .debug_loc section content, we copy it in - * the module structure for later reuse + * As we'll need later the .debug_loc section content, we won't unmap this + * section upon existing this function */ - module->dwarf2_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*module->dwarf2_info) + loclist_size); - if (!module->dwarf2_info) return FALSE; - ptr = (unsigned char*)(module->dwarf2_info + 1); - memcpy(ptr, loclist, loclist_size); - module->dwarf2_info->debug_loc.address = ptr; - module->dwarf2_info->debug_loc.size = loclist_size; + dwarf2_modfmt->u.dwarf2_info = HeapAlloc(GetProcessHeap(), 0, + sizeof(*dwarf2_modfmt->u.dwarf2_info)); + if (!dwarf2_modfmt->u.dwarf2_info) goto leave; + dwarf2_modfmt->u.dwarf2_info->debug_loc.address = (const BYTE*)image_map_section(&debug_loclist_sect); + dwarf2_modfmt->u.dwarf2_info->debug_loc.size = image_get_map_size(&debug_loclist_sect); } + else image_unmap_section(&debug_loclist_sect); while (mod_ctx.data < mod_ctx.end_data) { - dwarf2_parse_compilation_unit(section, module, thunks, &mod_ctx, load_offset); + dwarf2_parse_compilation_unit(section, dwarf2_modfmt->module, thunks, &mod_ctx, load_offset); } - module->module.SymType = SymDia; - module->module.CVSig = 'D' | ('W' << 8) | ('A' << 16) | ('R' << 24); + dwarf2_modfmt->module->module.SymType = SymDia; + dwarf2_modfmt->module->module.CVSig = 'D' | ('W' << 8) | ('A' << 16) | ('R' << 24); /* FIXME: we could have a finer grain here */ - module->module.GlobalSymbols = TRUE; - module->module.TypeInfo = TRUE; - module->module.SourceIndexed = TRUE; - module->module.Publics = TRUE; - return TRUE; + dwarf2_modfmt->module->module.GlobalSymbols = TRUE; + dwarf2_modfmt->module->module.TypeInfo = TRUE; + dwarf2_modfmt->module->module.SourceIndexed = TRUE; + dwarf2_modfmt->module->module.Publics = TRUE; + +leave: + image_unmap_section(&debug_sect); + image_unmap_section(&debug_abbrev_sect); + image_unmap_section(&debug_str_sect); + image_unmap_section(&debug_line_sect); + + return ret; } diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 6a8a1515f9d..573a04065c3 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -48,40 +48,11 @@ #include "dbghelp_private.h" -#ifdef HAVE_ELF_H -# include -#endif -#ifdef HAVE_SYS_ELF32_H -# include -#endif -#ifdef HAVE_SYS_EXEC_ELF_H -# include -#endif -#if !defined(DT_NUM) -# if defined(DT_COUNT) -# define DT_NUM DT_COUNT -# else -/* this seems to be a satisfactory value on Solaris, which doesn't support this AFAICT */ -# define DT_NUM 24 -# endif -#endif -#ifdef HAVE_LINK_H -# include -#endif -#ifdef HAVE_SYS_LINK_H -# include -#endif +#include "image_private.h" #include "wine/library.h" #include "wine/debug.h" -struct elf_module_info -{ - DWORD_PTR elf_addr; - unsigned short elf_mark : 1, - elf_loader : 1; -}; - #ifdef __ELF__ #define ELF_INFO_DEBUG_HEADER 0x0001 @@ -98,44 +69,6 @@ struct elf_info const WCHAR* module_name; /* OUT found module name (if ELF_INFO_NAME is set) */ }; -#ifdef _WIN64 -#define Elf_Ehdr Elf64_Ehdr -#define Elf_Shdr Elf64_Shdr -#define Elf_Phdr Elf64_Phdr -#define Elf_Dyn Elf64_Dyn -#define Elf_Sym Elf64_Sym -#else -#define Elf_Ehdr Elf32_Ehdr -#define Elf_Shdr Elf32_Shdr -#define Elf_Phdr Elf32_Phdr -#define Elf_Dyn Elf32_Dyn -#define Elf_Sym Elf32_Sym -#endif - -/* structure holding information while handling an ELF image - * allows one by one section mapping for memory savings - */ -struct elf_file_map -{ - Elf_Ehdr elfhdr; - size_t elf_size; - size_t elf_start; - struct - { - Elf_Shdr shdr; - const char* mapped; - }* sect; - int fd; - const char* shstrtab; - struct elf_file_map* alternate; /* another ELF file (linked to this one) */ -}; - -struct elf_section_map -{ - struct elf_file_map* fmap; - long sidx; -}; - struct symtab_elt { struct hash_table_elt ht_elt; @@ -152,28 +85,39 @@ struct elf_thunk_area unsigned long rva_end; }; +struct elf_module_info +{ + unsigned long elf_addr; + unsigned short elf_mark : 1, + elf_loader : 1; + struct image_file_map file_map; +}; + /****************************************************************** * elf_map_section * * Maps a single section into memory from an ELF file */ -static const char* elf_map_section(struct elf_section_map* esm) +const char* elf_map_section(struct image_section_map* ism) { + struct elf_file_map* fmap = &ism->fmap->u.elf; + unsigned pgsz = getpagesize(); unsigned ofst, size; - if (esm->sidx < 0 || esm->sidx >= esm->fmap->elfhdr.e_shnum || - esm->fmap->sect[esm->sidx].shdr.sh_type == SHT_NOBITS) - return ELF_NO_MAP; + assert(ism->fmap->modtype == DMT_ELF); + if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.elf.elfhdr.e_shnum || + fmap->sect[ism->sidx].shdr.sh_type == SHT_NOBITS) + return IMAGE_NO_MAP; /* align required information on page size (we assume pagesize is a power of 2) */ - ofst = esm->fmap->sect[esm->sidx].shdr.sh_offset & ~(pgsz - 1); - size = ((esm->fmap->sect[esm->sidx].shdr.sh_offset + - esm->fmap->sect[esm->sidx].shdr.sh_size + pgsz - 1) & ~(pgsz - 1)) - ofst; - esm->fmap->sect[esm->sidx].mapped = mmap(NULL, size, PROT_READ, MAP_PRIVATE, - esm->fmap->fd, ofst); - if (esm->fmap->sect[esm->sidx].mapped == ELF_NO_MAP) return ELF_NO_MAP; - return esm->fmap->sect[esm->sidx].mapped + (esm->fmap->sect[esm->sidx].shdr.sh_offset & (pgsz - 1)); + ofst = fmap->sect[ism->sidx].shdr.sh_offset & ~(pgsz - 1); + size = ((fmap->sect[ism->sidx].shdr.sh_offset + + fmap->sect[ism->sidx].shdr.sh_size + pgsz - 1) & ~(pgsz - 1)) - ofst; + fmap->sect[ism->sidx].mapped = mmap(NULL, size, PROT_READ, MAP_PRIVATE, + fmap->fd, ofst); + if (fmap->sect[ism->sidx].mapped == IMAGE_NO_MAP) return IMAGE_NO_MAP; + return fmap->sect[ism->sidx].mapped + (fmap->sect[ism->sidx].shdr.sh_offset & (pgsz - 1)); } /****************************************************************** @@ -182,32 +126,34 @@ static const char* elf_map_section(struct elf_section_map* esm) * Finds a section by name (and type) into memory from an ELF file * or its alternate if any */ -static BOOL elf_find_section(struct elf_file_map* fmap, const char* name, - unsigned sht, struct elf_section_map* esm) +BOOL elf_find_section(struct image_file_map* _fmap, const char* name, + unsigned sht, struct image_section_map* ism) { + struct elf_file_map* fmap; unsigned i; - while (fmap) + while (_fmap) { - if (fmap->shstrtab == ELF_NO_MAP) + fmap = &_fmap->u.elf; + if (fmap->shstrtab == IMAGE_NO_MAP) { - struct elf_section_map hdr_esm = {fmap, fmap->elfhdr.e_shstrndx}; - if ((fmap->shstrtab = elf_map_section(&hdr_esm)) == ELF_NO_MAP) break; + struct image_section_map hdr_ism = {_fmap, fmap->elfhdr.e_shstrndx}; + if ((fmap->shstrtab = elf_map_section(&hdr_ism)) == IMAGE_NO_MAP) break; } for (i = 0; i < fmap->elfhdr.e_shnum; i++) { if (strcmp(fmap->shstrtab + fmap->sect[i].shdr.sh_name, name) == 0 && (sht == SHT_NULL || sht == fmap->sect[i].shdr.sh_type)) { - esm->fmap = fmap; - esm->sidx = i; + ism->fmap = _fmap; + ism->sidx = i; return TRUE; } } - fmap = fmap->alternate; + _fmap = fmap->alternate; } - esm->fmap = NULL; - esm->sidx = -1; + ism->fmap = NULL; + ism->sidx = -1; return FALSE; } @@ -216,46 +162,67 @@ static BOOL elf_find_section(struct elf_file_map* fmap, const char* name, * * Unmaps a single section from memory */ -static void elf_unmap_section(struct elf_section_map* esm) +void elf_unmap_section(struct image_section_map* ism) { - if (esm->sidx >= 0 && esm->sidx < esm->fmap->elfhdr.e_shnum && esm->fmap->sect[esm->sidx].mapped != ELF_NO_MAP) + struct elf_file_map* fmap = &ism->fmap->u.elf; + + if (ism->sidx >= 0 && ism->sidx < fmap->elfhdr.e_shnum && fmap->sect[ism->sidx].mapped != IMAGE_NO_MAP) { unsigned pgsz = getpagesize(); unsigned ofst, size; - ofst = esm->fmap->sect[esm->sidx].shdr.sh_offset & ~(pgsz - 1); - size = ((esm->fmap->sect[esm->sidx].shdr.sh_offset + - esm->fmap->sect[esm->sidx].shdr.sh_size + pgsz - 1) & ~(pgsz - 1)) - ofst; - if (munmap((char*)esm->fmap->sect[esm->sidx].mapped, size) < 0) + ofst = fmap->sect[ism->sidx].shdr.sh_offset & ~(pgsz - 1); + size = ((fmap->sect[ism->sidx].shdr.sh_offset + + fmap->sect[ism->sidx].shdr.sh_size + pgsz - 1) & ~(pgsz - 1)) - ofst; + if (munmap((char*)fmap->sect[ism->sidx].mapped, size) < 0) WARN("Couldn't unmap the section\n"); - esm->fmap->sect[esm->sidx].mapped = ELF_NO_MAP; + fmap->sect[ism->sidx].mapped = IMAGE_NO_MAP; } } -static void elf_end_find(struct elf_file_map* fmap) +static void elf_end_find(struct image_file_map* fmap) { - struct elf_section_map esm; + struct image_section_map ism; while (fmap) { - esm.fmap = fmap; - esm.sidx = fmap->elfhdr.e_shstrndx; - elf_unmap_section(&esm); - fmap->shstrtab = ELF_NO_MAP; - fmap = fmap->alternate; + ism.fmap = fmap; + ism.sidx = fmap->u.elf.elfhdr.e_shstrndx; + elf_unmap_section(&ism); + fmap->u.elf.shstrtab = IMAGE_NO_MAP; + fmap = fmap->u.elf.alternate; } } /****************************************************************** + * elf_get_map_rva + * + * Get the RVA of an ELF section + */ +DWORD_PTR elf_get_map_rva(const struct image_section_map* ism) +{ + if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.elf.elfhdr.e_shnum) + return 0; + return ism->fmap->u.elf.sect[ism->sidx].shdr.sh_addr - ism->fmap->u.elf.elf_start; +} + +/****************************************************************** * elf_get_map_size * * Get the size of an ELF section */ -static inline unsigned elf_get_map_size(const struct elf_section_map* esm) +unsigned elf_get_map_size(const struct image_section_map* ism) { - if (esm->sidx < 0 || esm->sidx >= esm->fmap->elfhdr.e_shnum) + if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.elf.elfhdr.e_shnum) return 0; - return esm->fmap->sect[esm->sidx].shdr.sh_size; + return ism->fmap->u.elf.sect[ism->sidx].shdr.sh_size; +} + +static inline void elf_reset_file_map(struct image_file_map* fmap) +{ + fmap->u.elf.fd = -1; + fmap->u.elf.shstrtab = IMAGE_NO_MAP; + fmap->u.elf.alternate = NULL; } /****************************************************************** @@ -263,7 +230,7 @@ static inline unsigned elf_get_map_size(const struct elf_section_map* esm) * * Maps an ELF file into memory (and checks it's a real ELF file) */ -static BOOL elf_map_file(const WCHAR* filenameW, struct elf_file_map* fmap) +static BOOL elf_map_file(const WCHAR* filenameW, struct image_file_map* fmap) { static const BYTE elf_signature[4] = { ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3 }; struct stat statbuf; @@ -278,56 +245,55 @@ static BOOL elf_map_file(const WCHAR* filenameW, struct elf_file_map* fmap) if (!(filename = HeapAlloc(GetProcessHeap(), 0, len))) return FALSE; WideCharToMultiByte(CP_UNIXCP, 0, filenameW, -1, filename, len, NULL, NULL); - fmap->fd = -1; - fmap->shstrtab = ELF_NO_MAP; - fmap->alternate = NULL; + elf_reset_file_map(fmap); + fmap->modtype = DMT_ELF; /* check that the file exists, and that the module hasn't been loaded yet */ if (stat(filename, &statbuf) == -1 || S_ISDIR(statbuf.st_mode)) goto done; /* Now open the file, so that we can mmap() it. */ - if ((fmap->fd = open(filename, O_RDONLY)) == -1) goto done; + if ((fmap->u.elf.fd = open(filename, O_RDONLY)) == -1) goto done; - if (read(fmap->fd, &fmap->elfhdr, sizeof(fmap->elfhdr)) != sizeof(fmap->elfhdr)) + if (read(fmap->u.elf.fd, &fmap->u.elf.elfhdr, sizeof(fmap->u.elf.elfhdr)) != sizeof(fmap->u.elf.elfhdr)) goto done; /* and check for an ELF header */ - if (memcmp(fmap->elfhdr.e_ident, + if (memcmp(fmap->u.elf.elfhdr.e_ident, elf_signature, sizeof(elf_signature))) goto done; /* and check 32 vs 64 size according to current machine */ #ifdef _WIN64 - if (fmap->elfhdr.e_ident[EI_CLASS] != ELFCLASS64) goto done; + if (fmap->u.elf.elfhdr.e_ident[EI_CLASS] != ELFCLASS64) goto done; #else - if (fmap->elfhdr.e_ident[EI_CLASS] != ELFCLASS32) goto done; + if (fmap->u.elf.elfhdr.e_ident[EI_CLASS] != ELFCLASS32) goto done; #endif - fmap->sect = HeapAlloc(GetProcessHeap(), 0, - fmap->elfhdr.e_shnum * sizeof(fmap->sect[0])); - if (!fmap->sect) goto done; + fmap->u.elf.sect = HeapAlloc(GetProcessHeap(), 0, + fmap->u.elf.elfhdr.e_shnum * sizeof(fmap->u.elf.sect[0])); + if (!fmap->u.elf.sect) goto done; - lseek(fmap->fd, fmap->elfhdr.e_shoff, SEEK_SET); - for (i = 0; i < fmap->elfhdr.e_shnum; i++) + lseek(fmap->u.elf.fd, fmap->u.elf.elfhdr.e_shoff, SEEK_SET); + for (i = 0; i < fmap->u.elf.elfhdr.e_shnum; i++) { - read(fmap->fd, &fmap->sect[i].shdr, sizeof(fmap->sect[i].shdr)); - fmap->sect[i].mapped = ELF_NO_MAP; + read(fmap->u.elf.fd, &fmap->u.elf.sect[i].shdr, sizeof(fmap->u.elf.sect[i].shdr)); + fmap->u.elf.sect[i].mapped = IMAGE_NO_MAP; } /* grab size of module once loaded in memory */ - lseek(fmap->fd, fmap->elfhdr.e_phoff, SEEK_SET); - fmap->elf_size = 0; - fmap->elf_start = ~0L; - for (i = 0; i < fmap->elfhdr.e_phnum; i++) + lseek(fmap->u.elf.fd, fmap->u.elf.elfhdr.e_phoff, SEEK_SET); + fmap->u.elf.elf_size = 0; + fmap->u.elf.elf_start = ~0L; + for (i = 0; i < fmap->u.elf.elfhdr.e_phnum; i++) { - if (read(fmap->fd, &phdr, sizeof(phdr)) == sizeof(phdr) && + if (read(fmap->u.elf.fd, &phdr, sizeof(phdr)) == sizeof(phdr) && phdr.p_type == PT_LOAD) { tmp = (phdr.p_vaddr + phdr.p_memsz + page_mask) & ~page_mask; - if (fmap->elf_size < tmp) fmap->elf_size = tmp; - if (phdr.p_vaddr < fmap->elf_start) fmap->elf_start = phdr.p_vaddr; + if (fmap->u.elf.elf_size < tmp) fmap->u.elf.elf_size = tmp; + if (phdr.p_vaddr < fmap->u.elf.elf_start) fmap->u.elf.elf_start = phdr.p_vaddr; } } /* if non relocatable ELF, then remove fixed address from computation * otherwise, all addresses are zero based and start has no effect */ - fmap->elf_size -= fmap->elf_start; + fmap->u.elf.elf_size -= fmap->u.elf.elf_start; ret = TRUE; done: HeapFree(GetProcessHeap(), 0, filename); @@ -339,25 +305,31 @@ done: * * Unmaps an ELF file from memory (previously mapped with elf_map_file) */ -static void elf_unmap_file(struct elf_file_map* fmap) +static void elf_unmap_file(struct image_file_map* fmap) { while (fmap) { - if (fmap->fd != -1) + if (fmap->u.elf.fd != -1) { - struct elf_section_map esm; - esm.fmap = fmap; - for (esm.sidx = 0; esm.sidx < fmap->elfhdr.e_shnum; esm.sidx++) + struct image_section_map ism; + ism.fmap = fmap; + for (ism.sidx = 0; ism.sidx < fmap->u.elf.elfhdr.e_shnum; ism.sidx++) { - elf_unmap_section(&esm); + elf_unmap_section(&ism); } - HeapFree(GetProcessHeap(), 0, fmap->sect); - close(fmap->fd); + HeapFree(GetProcessHeap(), 0, fmap->u.elf.sect); + close(fmap->u.elf.fd); } - fmap = fmap->alternate; + fmap = fmap->u.elf.alternate; } } +static void elf_module_remove(struct process* pcs, struct module_format* modfmt) +{ + elf_unmap_file(&modfmt->u.elf_info->file_map); + HeapFree(GetProcessHeap(), 0, modfmt); +} + /****************************************************************** * elf_is_in_thunk_area * @@ -382,8 +354,8 @@ int elf_is_in_thunk_area(unsigned long addr, * * creating an internal hash table to ease use ELF symtab information lookup */ -static void elf_hash_symtab(struct module* module, struct pool* pool, - struct hash_table* ht_symtab, struct elf_file_map* fmap, +static void elf_hash_symtab(struct module* module, struct pool* pool, + struct hash_table* ht_symtab, struct image_file_map* fmap, struct elf_thunk_area* thunks) { int i, j, nsym; @@ -393,16 +365,20 @@ static void elf_hash_symtab(struct module* module, struct pool* pool, const char* ptr; const Elf_Sym* symp; struct symtab_elt* ste; - struct elf_section_map esm, esm_str; - - if (!elf_find_section(fmap, ".symtab", SHT_SYMTAB, &esm) && - !elf_find_section(fmap, ".dynsym", SHT_DYNSYM, &esm)) return; - if ((symp = (const Elf_Sym*)elf_map_section(&esm)) == ELF_NO_MAP) return; - esm_str.fmap = fmap; - esm_str.sidx = fmap->sect[esm.sidx].shdr.sh_link; - if ((strp = elf_map_section(&esm_str)) == ELF_NO_MAP) return; + struct image_section_map ism, ism_str; + + if (!elf_find_section(fmap, ".symtab", SHT_SYMTAB, &ism) && + !elf_find_section(fmap, ".dynsym", SHT_DYNSYM, &ism)) return; + if ((symp = (const Elf_Sym*)image_map_section(&ism)) == IMAGE_NO_MAP) return; + ism_str.fmap = ism.fmap; + ism_str.sidx = fmap->u.elf.sect[ism.sidx].shdr.sh_link; + if ((strp = image_map_section(&ism_str)) == IMAGE_NO_MAP) + { + image_unmap_section(&ism); + return; + } - nsym = elf_get_map_size(&esm) / sizeof(*symp); + nsym = image_get_map_size(&ism) / sizeof(*symp); for (j = 0; thunks[j].symname; j++) thunks[j].rva_start = thunks[j].rva_end = 0; @@ -567,6 +543,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table void* ptr; struct symt_ht* sym; const Elf_Sym* symp; + struct elf_module_info* elf_info = module->format_info[DFI_ELF]->u.elf_info; hash_table_iter_init(&module->ht_symbols, &hti, NULL); while ((ptr = hash_table_iter_up(&hti))) @@ -575,7 +552,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table switch (sym->symt.tag) { case SymTagFunction: - if (((struct symt_function*)sym)->address != module->elf_info->elf_addr && + if (((struct symt_function*)sym)->address != elf_info->elf_addr && ((struct symt_function*)sym)->size) { break; @@ -584,18 +561,17 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table ((struct symt_function*)sym)->container); if (symp) { - if (((struct symt_function*)sym)->address != module->elf_info->elf_addr && - ((struct symt_function*)sym)->address != module->elf_info->elf_addr + symp->st_value) + if (((struct symt_function*)sym)->address != elf_info->elf_addr && + ((struct symt_function*)sym)->address != elf_info->elf_addr + symp->st_value) FIXME("Changing address for %p/%s!%s from %08lx to %08lx\n", sym, debugstr_w(module->module.ModuleName), sym->hash_elt.name, - ((struct symt_function*)sym)->address, module->elf_info->elf_addr + symp->st_value); + ((struct symt_function*)sym)->address, elf_info->elf_addr + symp->st_value); if (((struct symt_function*)sym)->size && ((struct symt_function*)sym)->size != symp->st_size) FIXME("Changing size for %p/%s!%s from %08lx to %08x\n", sym, debugstr_w(module->module.ModuleName), sym->hash_elt.name, ((struct symt_function*)sym)->size, (unsigned int)symp->st_size); - ((struct symt_function*)sym)->address = module->elf_info->elf_addr + - symp->st_value; + ((struct symt_function*)sym)->address = elf_info->elf_addr + symp->st_value; ((struct symt_function*)sym)->size = symp->st_size; } else FIXME("Couldn't find %s!%s\n", @@ -606,19 +582,18 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table { case DataIsGlobal: case DataIsFileStatic: - if (((struct symt_data*)sym)->u.var.offset != module->elf_info->elf_addr) + if (((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr) break; symp = elf_lookup_symtab(module, symtab, sym->hash_elt.name, ((struct symt_data*)sym)->container); if (symp) { - if (((struct symt_data*)sym)->u.var.offset != module->elf_info->elf_addr && - ((struct symt_data*)sym)->u.var.offset != module->elf_info->elf_addr + symp->st_value) + if (((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr && + ((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr + symp->st_value) FIXME("Changing address for %p/%s!%s from %08lx to %08lx\n", sym, debugstr_w(module->module.ModuleName), sym->hash_elt.name, - ((struct symt_function*)sym)->address, module->elf_info->elf_addr + symp->st_value); - ((struct symt_data*)sym)->u.var.offset = module->elf_info->elf_addr + - symp->st_value; + ((struct symt_function*)sym)->address, elf_info->elf_addr + symp->st_value); + ((struct symt_data*)sym)->u.var.offset = elf_info->elf_addr + symp->st_value; ((struct symt_data*)sym)->kind = (ELF32_ST_BIND(symp->st_info) == STB_LOCAL) ? DataIsFileStatic : DataIsGlobal; } else @@ -656,7 +631,7 @@ static int elf_new_wine_thunks(struct module* module, const struct hash_table* h { if (ste->used) continue; - addr = module->elf_info->elf_addr + ste->symp->st_value; + addr = module->format_info[DFI_ELF]->u.elf_info->elf_addr + ste->symp->st_value; j = elf_is_in_thunk_area(ste->symp->st_value, thunks); if (j >= 0) /* thunk found */ @@ -748,20 +723,20 @@ static int elf_new_public_symbols(struct module* module, const struct hash_table while ((ste = hash_table_iter_up(&hti))) { symt_new_public(module, ste->compiland, ste->ht_elt.name, - module->elf_info->elf_addr + ste->symp->st_value, + module->format_info[DFI_ELF]->u.elf_info->elf_addr + ste->symp->st_value, ste->symp->st_size); } return TRUE; } -static BOOL elf_check_debug_link(const WCHAR* file, struct elf_file_map* fmap, DWORD crc) +static BOOL elf_check_debug_link(const WCHAR* file, struct image_file_map* fmap, DWORD crc) { BOOL ret; if (!elf_map_file(file, fmap)) return FALSE; - if (!(ret = crc == calc_crc32(fmap->fd))) + if (!(ret = crc == calc_crc32(fmap->u.elf.fd))) { WARN("Bad CRC for file %s (got %08x while expecting %08x)\n", - debugstr_w(file), calc_crc32(fmap->fd), crc); + debugstr_w(file), calc_crc32(fmap->u.elf.fd), crc); elf_unmap_file(fmap); } return ret; @@ -786,7 +761,7 @@ static BOOL elf_check_debug_link(const WCHAR* file, struct elf_file_map* fmap, D * is the global debug file directory, and execdir has been turned * into a relative path)." (from GDB manual) */ -static BOOL elf_locate_debug_link(struct elf_file_map* fmap, const char* filename, +static BOOL elf_locate_debug_link(struct image_file_map* fmap, const char* filename, const WCHAR* loaded_file, DWORD crc) { static const WCHAR globalDebugDirW[] = {'/','u','s','r','/','l','i','b','/','d','e','b','u','g','/'}; @@ -795,7 +770,7 @@ static BOOL elf_locate_debug_link(struct elf_file_map* fmap, const char* filenam size_t filename_len; WCHAR* p = NULL; WCHAR* slash; - struct elf_file_map* fmap_link = NULL; + struct image_file_map* fmap_link = NULL; fmap_link = HeapAlloc(GetProcessHeap(), 0, sizeof(*fmap_link)); if (!fmap_link) return FALSE; @@ -838,7 +813,7 @@ static BOOL elf_locate_debug_link(struct elf_file_map* fmap, const char* filenam found: TRACE("Located debug information file %s at %s\n", filename, debugstr_w(p)); HeapFree(GetProcessHeap(), 0, p); - fmap->alternate = fmap_link; + fmap->u.elf.alternate = fmap_link; return TRUE; } @@ -848,7 +823,7 @@ found: * Parses a .gnu_debuglink section and loads the debug info from * the external file specified there. */ -static BOOL elf_debuglink_parse(struct elf_file_map* fmap, const struct module* module, +static BOOL elf_debuglink_parse(struct image_file_map* fmap, const struct module* module, const BYTE* debuglink) { /* The content of a debug link section is: @@ -877,8 +852,8 @@ static BOOL elf_debuglink_parse(struct elf_file_map* fmap, const struct module* * read or parsed) * 1 on success */ -static BOOL elf_load_debug_info_from_map(struct module* module, - struct elf_file_map* fmap, +static BOOL elf_load_debug_info_from_map(struct module* module, + struct image_file_map* fmap, struct pool* pool, struct hash_table* ht_symtab) { @@ -901,18 +876,16 @@ static BOOL elf_load_debug_info_from_map(struct module* module, if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY)) { - struct elf_section_map stab_sect, stabstr_sect; - struct elf_section_map debug_sect, debug_str_sect, debug_abbrev_sect, - debug_line_sect, debug_loclist_sect; - struct elf_section_map debuglink_sect; + struct image_section_map stab_sect, stabstr_sect; + struct image_section_map debuglink_sect; /* if present, add the .gnu_debuglink file as an alternate to current one */ if (elf_find_section(fmap, ".gnu_debuglink", SHT_NULL, &debuglink_sect)) { const BYTE* dbg_link; - dbg_link = (const BYTE*)elf_map_section(&debuglink_sect); - if (dbg_link != ELF_NO_MAP) + dbg_link = (const BYTE*)image_map_section(&debuglink_sect); + if (dbg_link != IMAGE_NO_MAP) { lret = elf_debuglink_parse(fmap, module, dbg_link); if (!lret) @@ -920,7 +893,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module, debugstr_w(module->module.ModuleName)); ret = ret || lret; } - elf_unmap_section(&debuglink_sect); + image_unmap_section(&debuglink_sect); } if (elf_find_section(fmap, ".stab", SHT_NULL, &stab_sect) && elf_find_section(fmap, ".stabstr", SHT_NULL, &stabstr_sect)) @@ -928,14 +901,14 @@ static BOOL elf_load_debug_info_from_map(struct module* module, const char* stab; const char* stabstr; - stab = elf_map_section(&stab_sect); - stabstr = elf_map_section(&stabstr_sect); - if (stab != ELF_NO_MAP && stabstr != ELF_NO_MAP) + stab = image_map_section(&stab_sect); + stabstr = image_map_section(&stabstr_sect); + if (stab != IMAGE_NO_MAP && stabstr != IMAGE_NO_MAP) { /* OK, now just parse all of the stabs. */ - lret = stabs_parse(module, module->elf_info->elf_addr, - stab, elf_get_map_size(&stab_sect), - stabstr, elf_get_map_size(&stabstr_sect), + lret = stabs_parse(module, module->format_info[DFI_ELF]->u.elf_info->elf_addr, + stab, image_get_map_size(&stab_sect), + stabstr, image_get_map_size(&stabstr_sect), NULL, NULL); if (lret) /* and fill in the missing information for stabs */ @@ -945,57 +918,12 @@ static BOOL elf_load_debug_info_from_map(struct module* module, ret = ret || lret; } else lret = FALSE; - elf_unmap_section(&stab_sect); - elf_unmap_section(&stabstr_sect); - } - if (elf_find_section(fmap, ".debug_info", SHT_NULL, &debug_sect)) - { - /* Dwarf 2 debug information */ - const BYTE* dw2_debug; - const BYTE* dw2_debug_abbrev; - const BYTE* dw2_debug_str; - const BYTE* dw2_debug_line; - const BYTE* dw2_debug_loclist; - - /* debug info might have a different base address than .so file - * when elf file is prelinked after splitting off debug info - * adjust symbol base addresses accordingly - */ - unsigned long load_offset = module->elf_info->elf_addr + - fmap->elf_start - debug_sect.fmap->elf_start; - - TRACE("Loading Dwarf2 information for %s\n", debugstr_w(module->module.ModuleName)); - - elf_find_section(fmap, ".debug_str", SHT_NULL, &debug_str_sect); - elf_find_section(fmap, ".debug_abbrev", SHT_NULL, &debug_abbrev_sect); - elf_find_section(fmap, ".debug_line", SHT_NULL, &debug_line_sect); - elf_find_section(fmap, ".debug_loc", SHT_NULL, &debug_loclist_sect); - - dw2_debug = (const BYTE*)elf_map_section(&debug_sect); - dw2_debug_abbrev = (const BYTE*)elf_map_section(&debug_abbrev_sect); - dw2_debug_str = (const BYTE*)elf_map_section(&debug_str_sect); - dw2_debug_line = (const BYTE*)elf_map_section(&debug_line_sect); - dw2_debug_loclist = (const BYTE*)elf_map_section(&debug_loclist_sect); - if (dw2_debug != ELF_NO_MAP && dw2_debug_abbrev != ELF_NO_MAP && dw2_debug_str != ELF_NO_MAP) - { - /* OK, now just parse dwarf2 debug infos. */ - lret = dwarf2_parse(module, load_offset, thunks, - dw2_debug, elf_get_map_size(&debug_sect), - dw2_debug_abbrev, elf_get_map_size(&debug_abbrev_sect), - dw2_debug_str, elf_get_map_size(&debug_str_sect), - dw2_debug_line, elf_get_map_size(&debug_line_sect), - dw2_debug_loclist, elf_get_map_size(&debug_loclist_sect)); - - if (!lret) - WARN("Couldn't correctly read dwarf2\n"); - ret = ret || lret; - } - elf_unmap_section(&debug_sect); - elf_unmap_section(&debug_abbrev_sect); - elf_unmap_section(&debug_str_sect); - elf_unmap_section(&debug_line_sect); - elf_unmap_section(&debug_loclist_sect); + image_unmap_section(&stab_sect); + image_unmap_section(&stabstr_sect); } + lret = dwarf2_parse(module, module->format_info[DFI_ELF]->u.elf_info->elf_addr, + thunks, fmap); + ret = ret || lret; } if (strstrW(module->module.ModuleName, S_ElfW) || !strcmpW(module->module.ModuleName, S_WineLoaderW)) @@ -1015,14 +943,15 @@ static BOOL elf_load_debug_info_from_map(struct module* module, * * Loads ELF debugging information from the module image file. */ -BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap) +BOOL elf_load_debug_info(struct module* module, struct image_file_map* fmap) { - BOOL ret = TRUE; - struct pool pool; - struct hash_table ht_symtab; - struct elf_file_map my_fmap; + BOOL ret = TRUE; + struct pool pool; + struct hash_table ht_symtab; + struct image_file_map my_fmap; + struct module_format* modfmt; - if (module->type != DMT_ELF || !module->elf_info) + if (module->type != DMT_ELF || !(modfmt = module->format_info[DFI_ELF]) || !modfmt->u.elf_info) { ERR("Bad elf module '%s'\n", debugstr_w(module->module.LoadedImageName)); return FALSE; @@ -1039,6 +968,12 @@ BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap) if (ret) ret = elf_load_debug_info_from_map(module, fmap, &pool, &ht_symtab); + if (ret) + { + modfmt->u.elf_info->file_map = *fmap; + elf_reset_file_map(fmap); + } + pool_destroy(&pool); if (fmap == &my_fmap) elf_unmap_file(fmap); return ret; @@ -1052,12 +987,12 @@ BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap) BOOL elf_fetch_file_info(const WCHAR* name, DWORD* base, DWORD* size, DWORD* checksum) { - struct elf_file_map fmap; + struct image_file_map fmap; if (!elf_map_file(name, &fmap)) return FALSE; - if (base) *base = fmap.elf_start; - *size = fmap.elf_size; - *checksum = calc_crc32(fmap.fd); + if (base) *base = fmap.u.elf.elf_start; + *size = fmap.u.elf.elf_size; + *checksum = calc_crc32(fmap.u.elf.fd); elf_unmap_file(&fmap); return TRUE; } @@ -1076,8 +1011,8 @@ BOOL elf_fetch_file_info(const WCHAR* name, DWORD* base, static BOOL elf_load_file(struct process* pcs, const WCHAR* filename, unsigned long load_offset, struct elf_info* elf_info) { - BOOL ret = FALSE; - struct elf_file_map fmap; + BOOL ret = FALSE; + struct image_file_map fmap; TRACE("Processing elf file '%s' at %08lx\n", debugstr_w(filename), load_offset); @@ -1087,10 +1022,10 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename, * this thing. We need the main executable header, and the section * table. */ - if (!fmap.elf_start && !load_offset) + if (!fmap.u.elf.elf_start && !load_offset) ERR("Relocatable ELF %s, but no load address. Loading at 0x0000000\n", debugstr_w(filename)); - if (fmap.elf_start && load_offset) + if (fmap.u.elf.elf_start && load_offset) { WARN("Non-relocatable ELF %s, but load address of 0x%08lx supplied. " "Assuming load address is corrupt\n", debugstr_w(filename), load_offset); @@ -1099,12 +1034,12 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename, if (elf_info->flags & ELF_INFO_DEBUG_HEADER) { - struct elf_section_map esm; + struct image_section_map ism; - if (elf_find_section(&fmap, ".dynamic", SHT_DYNAMIC, &esm)) + if (elf_find_section(&fmap, ".dynamic", SHT_DYNAMIC, &ism)) { Elf_Dyn dyn; - char* ptr = (char*)fmap.sect[esm.sidx].shdr.sh_addr; + char* ptr = (char*)fmap.u.elf.sect[ism.sidx].shdr.sh_addr; unsigned long len; do @@ -1126,29 +1061,40 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename, if (elf_info->flags & ELF_INFO_MODULE) { - struct elf_module_info *elf_module_info = - HeapAlloc(GetProcessHeap(), 0, sizeof(struct elf_module_info)); - if (!elf_module_info) goto leave; + struct elf_module_info *elf_module_info; + struct module_format* modfmt; + + modfmt = HeapAlloc(GetProcessHeap(), 0, + sizeof(struct module_format) + sizeof(struct elf_module_info)); + if (!modfmt) goto leave; elf_info->module = module_new(pcs, filename, DMT_ELF, FALSE, - (load_offset) ? load_offset : fmap.elf_start, - fmap.elf_size, 0, calc_crc32(fmap.fd)); + (load_offset) ? load_offset : fmap.u.elf.elf_start, + fmap.u.elf.elf_size, 0, calc_crc32(fmap.u.elf.fd)); if (!elf_info->module) { - HeapFree(GetProcessHeap(), 0, elf_module_info); + HeapFree(GetProcessHeap(), 0, modfmt); goto leave; } - elf_info->module->elf_info = elf_module_info; - elf_info->module->elf_info->elf_addr = load_offset; + elf_module_info = (void*)(modfmt + 1); + elf_info->module->format_info[DFI_ELF] = modfmt; + modfmt->module = elf_info->module; + modfmt->remove = elf_module_remove; + modfmt->loc_compute = NULL; + modfmt->u.elf_info = elf_module_info; + + elf_module_info->elf_addr = load_offset; if (dbghelp_options & SYMOPT_DEFERRED_LOADS) { elf_info->module->module.SymType = SymDeferred; + elf_module_info->file_map = fmap; + elf_reset_file_map(&fmap); ret = TRUE; } else ret = elf_load_debug_info(elf_info->module, &fmap); - elf_info->module->elf_info->elf_mark = 1; - elf_info->module->elf_info->elf_loader = 0; + elf_module_info->elf_mark = 1; + elf_module_info->elf_loader = 0; } else ret = TRUE; if (elf_info->flags & ELF_INFO_NAME) @@ -1260,7 +1206,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename, if ((module = module_is_already_loaded(pcs, filename))) { elf_info->module = module; - module->elf_info->elf_mark = 1; + elf_info->module->format_info[DFI_ELF]->u.elf_info->elf_mark = 1; return module->module.SymType; } @@ -1352,7 +1298,7 @@ BOOL elf_synchronize_module_list(struct process* pcs) for (module = pcs->lmodules; module; module = module->next) { if (module->type == DMT_ELF && !module->is_virtual) - module->elf_info->elf_mark = 0; + module->format_info[DFI_ELF]->u.elf_info->elf_mark = 0; } es.pcs = pcs; @@ -1363,14 +1309,19 @@ BOOL elf_synchronize_module_list(struct process* pcs) module = pcs->lmodules; while (module) { - if (module->type == DMT_ELF && !module->is_virtual && - !module->elf_info->elf_mark && !module->elf_info->elf_loader) + if (module->type == DMT_ELF && !module->is_virtual) { - module_remove(pcs, module); - /* restart all over */ - module = pcs->lmodules; + struct elf_module_info* elf_info = module->format_info[DFI_ELF]->u.elf_info; + + if (!elf_info->elf_mark && !elf_info->elf_loader) + { + module_remove(pcs, module); + /* restart all over */ + module = pcs->lmodules; + continue; + } } - else module = module->next; + module = module->next; } return TRUE; } @@ -1415,7 +1366,7 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs) elf_info.flags = ELF_INFO_DEBUG_HEADER | ELF_INFO_MODULE; if (!elf_search_loader(pcs, &elf_info)) return FALSE; - elf_info.module->elf_info->elf_loader = 1; + elf_info.module->format_info[DFI_ELF]->u.elf_info->elf_loader = 1; module_set_module(elf_info.module, S_WineLoaderW); return (pcs->dbg_hdr_addr = elf_info.dbg_hdr_addr) != 0; } @@ -1516,6 +1467,30 @@ struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned #else /* !__ELF__ */ +BOOL elf_find_section(struct image_file_map* fmap, const char* name, + unsigned sht, struct image_section_map* ism) +{ + return FALSE; +} + +const char* elf_map_section(struct image_section_map* ism) +{ + return NULL; +} + +void elf_unmap_section(struct image_section_map* ism) +{} + +unsigned elf_get_map_size(const struct image_section_map* ism) +{ + return 0; +} + +DWORD_PTR elf_get_map_rva(const struct image_section_map* ism) +{ + return 0; +} + BOOL elf_synchronize_module_list(struct process* pcs) { return FALSE; @@ -1542,7 +1517,7 @@ struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned return NULL; } -BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap) +BOOL elf_load_debug_info(struct module* module, struct image_file_map* fmap) { return FALSE; } diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h new file mode 100644 index 00000000000..b768deb91e3 --- /dev/null +++ b/dlls/dbghelp/image_private.h @@ -0,0 +1,182 @@ +/* + * File elf_private.h - definitions for processing of ELF files + * + * Copyright (C) 1996, Eric Youngdale. + * 1999-2007 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef HAVE_ELF_H +# include +#endif +#ifdef HAVE_SYS_ELF32_H +# include +#endif +#ifdef HAVE_SYS_EXEC_ELF_H +# include +#endif +#if !defined(DT_NUM) +# if defined(DT_COUNT) +# define DT_NUM DT_COUNT +# else +/* this seems to be a satisfactory value on Solaris, which doesn't support this AFAICT */ +# define DT_NUM 24 +# endif +#endif +#ifdef HAVE_LINK_H +# include +#endif +#ifdef HAVE_SYS_LINK_H +# include +#endif + +#define IMAGE_NO_MAP ((void*)-1) + +#ifdef __ELF__ + +#ifdef _WIN64 +#define Elf_Ehdr Elf64_Ehdr +#define Elf_Shdr Elf64_Shdr +#define Elf_Phdr Elf64_Phdr +#define Elf_Dyn Elf64_Dyn +#define Elf_Sym Elf64_Sym +#else +#define Elf_Ehdr Elf32_Ehdr +#define Elf_Shdr Elf32_Shdr +#define Elf_Phdr Elf32_Phdr +#define Elf_Dyn Elf32_Dyn +#define Elf_Sym Elf32_Sym +#endif +#else +#ifndef SHT_NULL +#define SHT_NULL 0 +#endif +#endif + +/* structure holding information while handling an ELF image + * allows one by one section mapping for memory savings + */ +struct image_file_map +{ + enum module_type modtype; + union + { + struct elf_file_map + { + size_t elf_size; + size_t elf_start; + int fd; + const char* shstrtab; + struct image_file_map* alternate; /* another ELF file (linked to this one) */ +#ifdef __ELF__ + Elf_Ehdr elfhdr; + struct + { + Elf_Shdr shdr; + const char* mapped; + }* sect; +#endif + } elf; + struct pe_file_map + { + HANDLE hMap; + IMAGE_NT_HEADERS ntheader; + unsigned full_count; + void* full_map; + struct + { + IMAGE_SECTION_HEADER shdr; + const char* mapped; + }* sect; + const char* strtable; + } pe; + } u; +}; + +struct image_section_map +{ + struct image_file_map* fmap; + long sidx; +}; + +extern BOOL elf_find_section(struct image_file_map* fmap, const char* name, + unsigned sht, struct image_section_map* ism); +extern const char* elf_map_section(struct image_section_map* ism); +extern void elf_unmap_section(struct image_section_map* ism); +extern DWORD_PTR elf_get_map_rva(const struct image_section_map* ism); +extern unsigned elf_get_map_size(const struct image_section_map* ism); + +extern BOOL pe_find_section(struct image_file_map* fmap, const char* name, + struct image_section_map* ism); +extern const char* pe_map_section(struct image_section_map* psm); +extern void pe_unmap_section(struct image_section_map* psm); +extern DWORD_PTR pe_get_map_rva(const struct image_section_map* psm); +extern unsigned pe_get_map_size(const struct image_section_map* psm); + +static inline BOOL image_find_section(struct image_file_map* fmap, const char* name, + struct image_section_map* ism) +{ + switch (fmap->modtype) + { + case DMT_ELF: return elf_find_section(fmap, name, SHT_NULL, ism); + case DMT_PE: return pe_find_section(fmap, name, ism); + default: assert(0); return FALSE; + } +} + +static inline const char* image_map_section(struct image_section_map* ism) +{ + if (!ism->fmap) return NULL; + switch (ism->fmap->modtype) + { + case DMT_ELF: return elf_map_section(ism); + case DMT_PE: return pe_map_section(ism); + default: assert(0); return NULL; + } +} + +static inline void image_unmap_section(struct image_section_map* ism) +{ + if (!ism->fmap) return; + switch (ism->fmap->modtype) + { + case DMT_ELF: elf_unmap_section(ism); break; + case DMT_PE: pe_unmap_section(ism); break; + default: assert(0); return; + } +} + +static inline DWORD_PTR image_get_map_rva(struct image_section_map* ism) +{ + if (!ism->fmap) return 0; + switch (ism->fmap->modtype) + { + case DMT_ELF: return elf_get_map_rva(ism); + case DMT_PE: return pe_get_map_rva(ism); + default: assert(0); return 0; + } +} + +static inline unsigned image_get_map_size(struct image_section_map* ism) +{ + if (!ism->fmap) return 0; + switch (ism->fmap->modtype) + { + case DMT_ELF: return elf_get_map_size(ism); + case DMT_PE: return pe_get_map_size(ism); + default: assert(0); return 0; + } +} diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 379596b2f58..44fa4f2da1c 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -655,9 +655,10 @@ static int macho_parse_symtab(struct macho_file_map* fmap, sc->stroff, sc->strsize, (const void**)&stab, (const void**)&stabstr)) return 0; - if (!stabs_parse(mdi->module, mdi->module->macho_info->load_addr - fmap->segs_start, - stab, sc->nsyms * sizeof(struct nlist), - stabstr, sc->strsize, macho_stabs_def_cb, mdi)) + if (!stabs_parse(mdi->module, + mdi->module->format_info[DFI_MACHO]->u.macho_info->load_addr - fmap->segs_start, + stab, sc->nsyms * sizeof(struct nlist), + stabstr, sc->strsize, macho_stabs_def_cb, mdi)) ret = -1; macho_unmap_ranges(fmap, sc->symoff, sc->nsyms * sizeof(struct nlist), @@ -703,7 +704,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt { case SymTagFunction: func = (struct symt_function*)sym; - if (func->address == module->macho_info->load_addr) + if (func->address == module->format_info[DFI_MACHO]->u.macho_info->load_addr) { TRACE("Adjusting function %p/%s!%s from 0x%08lx to 0x%08lx\n", func, debugstr_w(module->module.ModuleName), sym->hash_elt.name, @@ -720,7 +721,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt { case DataIsGlobal: case DataIsFileStatic: - if (data->u.var.offset == module->macho_info->load_addr) + if (data->u.var.offset == module->format_info[DFI_MACHO]->u.macho_info->load_addr) { TRACE("Adjusting data symbol %p/%s!%s from 0x%08lx to 0x%08lx\n", data, debugstr_w(module->module.ModuleName), sym->hash_elt.name, @@ -879,7 +880,7 @@ BOOL macho_load_debug_info(struct module* module, struct macho_file_map* fmap) TRACE("(%p, %p/%d)\n", module, fmap, fmap ? fmap->fd : -1); - if (module->type != DMT_MACHO || !module->macho_info) + if (module->type != DMT_MACHO || !module->format_info[DFI_MACHO]->u.macho_info) { ERR("Bad Mach-O module '%s'\n", debugstr_w(module->module.LoadedImageName)); return FALSE; @@ -963,26 +964,34 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename, if (macho_info->flags & MACHO_INFO_MODULE) { - struct macho_module_info *macho_module_info = - HeapAlloc(GetProcessHeap(), 0, sizeof(struct macho_module_info)); - if (!macho_module_info) goto leave; + struct macho_module_info *macho_module_info; + struct module_format* modfmt = + HeapAlloc(GetProcessHeap(), 0, sizeof(struct module_format) + sizeof(struct macho_module_info)); + if (!modfmt) goto leave; macho_info->module = module_new(pcs, filename, DMT_MACHO, FALSE, load_addr, fmap.segs_size, 0, calc_crc32(fmap.fd)); if (!macho_info->module) { - HeapFree(GetProcessHeap(), 0, macho_module_info); + HeapFree(GetProcessHeap(), 0, modfmt); goto leave; } - macho_info->module->macho_info = macho_module_info; - macho_info->module->macho_info->load_addr = load_addr; + macho_module_info = (void*)(modfmt + 1); + macho_info->module->format_info[DFI_MACHO] = modfmt; + + modfmt->module = macho_info->module; + modfmt->remove = NULL; + modfmt->loc_compute = NULL; + modfmt->u.macho_info = macho_module_info; + + macho_module_info->load_addr = load_addr; if (dbghelp_options & SYMOPT_DEFERRED_LOADS) macho_info->module->module.SymType = SymDeferred; else if (!macho_load_debug_info(macho_info->module, &fmap)) ret = FALSE; - macho_info->module->macho_info->in_use = 1; - macho_info->module->macho_info->is_loader = 0; + macho_info->module->format_info[DFI_MACHO]->u.macho_info->in_use = 1; + macho_info->module->format_info[DFI_MACHO]->u.macho_info->is_loader = 0; TRACE("module = %p\n", macho_info->module); } @@ -1109,7 +1118,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam if ((module = module_is_already_loaded(pcs, filename))) { macho_info->module = module; - module->macho_info->in_use = 1; + module->format_info[DFI_MACHO]->u.macho_info->in_use = 1; return module->module.SymType; } @@ -1231,7 +1240,7 @@ BOOL macho_synchronize_module_list(struct process* pcs) for (module = pcs->lmodules; module; module = module->next) { if (module->type == DMT_MACHO && !module->is_virtual) - module->macho_info->in_use = 0; + module->format_info[DFI_MACHO]->u.macho_info->in_use = 0; } ms.pcs = pcs; @@ -1243,7 +1252,8 @@ BOOL macho_synchronize_module_list(struct process* pcs) while (module) { if (module->type == DMT_MACHO && !module->is_virtual && - !module->macho_info->in_use && !module->macho_info->is_loader) + !module->format_info[DFI_MACHO]->u.macho_info->in_use && + !module->format_info[DFI_MACHO]->u.macho_info->is_loader) { module_remove(pcs, module); /* restart all over */ @@ -1297,7 +1307,7 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs) TRACE("(%p/%p)\n", pcs, pcs->handle); macho_info.flags = MACHO_INFO_DEBUG_HEADER | MACHO_INFO_MODULE; if (!macho_search_loader(pcs, &macho_info)) return FALSE; - macho_info.module->macho_info->is_loader = 1; + macho_info.module->format_info[DFI_MACHO]->u.macho_info->is_loader = 1; module_set_module(macho_info.module, S_WineLoaderW); return (pcs->dbg_hdr_addr = macho_info.dbg_hdr_addr) != 0; } diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 53f56c25129..250c5a5854a 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -126,6 +126,7 @@ struct module* module_new(struct process* pcs, const WCHAR* name, unsigned long stamp, unsigned long checksum) { struct module* module; + unsigned i; assert(type == DMT_ELF || type == DMT_PE || type == DMT_MACHO); if (!(module = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*module)))) @@ -168,6 +169,7 @@ struct module* module_new(struct process* pcs, const WCHAR* name, module->type = type; module->is_virtual = virtual ? TRUE : FALSE; + for (i = 0; i < DFI_LAST; i++) module->format_info[i] = NULL; module->sortlist_valid = FALSE; module->sorttab_size = 0; module->addr_sorttab = NULL; @@ -621,14 +623,21 @@ DWORD64 WINAPI SymLoadModule64(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, */ BOOL module_remove(struct process* pcs, struct module* module) { + struct module_format*modfmt; struct module** p; + unsigned i; TRACE("%s (%p)\n", debugstr_w(module->module.ModuleName), module); + + for (i = 0; i < DFI_LAST; i++) + { + if ((modfmt = module->format_info[i]) && modfmt->remove) + modfmt->remove(pcs, module->format_info[i]); + } hash_table_destroy(&module->ht_symbols); hash_table_destroy(&module->ht_types); HeapFree(GetProcessHeap(), 0, module->sources); HeapFree(GetProcessHeap(), 0, module->addr_sorttab); - HeapFree(GetProcessHeap(), 0, module->dwarf2_info); pool_destroy(&module->pool); /* native dbghelp doesn't invoke registered callback(,CBA_SYMBOLS_UNLOADED,) here * so do we diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 76d81ee5512..63a2b9a9e4e 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -30,11 +30,239 @@ #include #include "dbghelp_private.h" +#include "image_private.h" #include "winternl.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); +struct pe_module_info +{ + struct image_file_map fmap; +}; + +static void* pe_map_full(struct image_file_map* fmap, IMAGE_NT_HEADERS** nth) +{ + if (!fmap->u.pe.full_map) + { + fmap->u.pe.full_map = MapViewOfFile(fmap->u.pe.hMap, FILE_MAP_READ, 0, 0, 0); + } + if (fmap->u.pe.full_map) + { + if (nth) *nth = RtlImageNtHeader(fmap->u.pe.full_map); + fmap->u.pe.full_count++; + return fmap->u.pe.full_map; + } + return IMAGE_NO_MAP; +} + +static void pe_unmap_full(struct image_file_map* fmap) +{ + if (fmap->u.pe.full_count && !--fmap->u.pe.full_count) + { + UnmapViewOfFile(fmap->u.pe.full_map); + fmap->u.pe.full_map = NULL; + } +} + +/****************************************************************** + * pe_map_section + * + * Maps a single section into memory from an PE file + */ +const char* pe_map_section(struct image_section_map* ism) +{ + void* mapping; + struct pe_file_map* fmap = &ism->fmap->u.pe; + + if (ism->sidx >= 0 && ism->sidx < fmap->ntheader.FileHeader.NumberOfSections && + fmap->sect[ism->sidx].mapped == IMAGE_NO_MAP) + { + IMAGE_NT_HEADERS* nth; + /* FIXME: that's rather drastic, but that will do for now + * that's ok if the full file map exists, but we could be less agressive otherwise and + * only map the relevant section + */ + if ((mapping = pe_map_full(ism->fmap, &nth))) + { + fmap->sect[ism->sidx].mapped = RtlImageRvaToVa(nth, mapping, + fmap->sect[ism->sidx].shdr.VirtualAddress, + NULL); + return fmap->sect[ism->sidx].mapped; + } + } + return IMAGE_NO_MAP; +} + +/****************************************************************** + * pe_find_section + * + * Finds a section by name (and type) into memory from an PE file + * or its alternate if any + */ +BOOL pe_find_section(struct image_file_map* fmap, const char* name, + struct image_section_map* ism) +{ + const char* sectname; + unsigned i; + char tmp[IMAGE_SIZEOF_SHORT_NAME + 1]; + + for (i = 0; i < fmap->u.pe.ntheader.FileHeader.NumberOfSections; i++) + { + sectname = (const char*)fmap->u.pe.sect[i].shdr.Name; + /* long section names start with a '/' (at least on MinGW32) */ + if (sectname[0] == '/' && fmap->u.pe.strtable) + sectname = fmap->u.pe.strtable + atoi(sectname + 1); + else + { + /* the section name may not be null terminated */ + sectname = memcpy(tmp, sectname, IMAGE_SIZEOF_SHORT_NAME); + tmp[IMAGE_SIZEOF_SHORT_NAME] = '\0'; + } + if (!strcasecmp(sectname, name)) + { + ism->fmap = fmap; + ism->sidx = i; + return TRUE; + } + } + ism->fmap = NULL; + ism->sidx = -1; + + return FALSE; +} + +/****************************************************************** + * pe_unmap_section + * + * Unmaps a single section from memory + */ +void pe_unmap_section(struct image_section_map* ism) +{ + if (ism->sidx >= 0 && ism->sidx < ism->fmap->u.pe.ntheader.FileHeader.NumberOfSections && + ism->fmap->u.pe.sect[ism->sidx].mapped != IMAGE_NO_MAP) + { + pe_unmap_full(ism->fmap); + ism->fmap->u.pe.sect[ism->sidx].mapped = IMAGE_NO_MAP; + } +} + +/****************************************************************** + * pe_get_map_rva + * + * Get the RVA of an PE section + */ +DWORD_PTR pe_get_map_rva(const struct image_section_map* ism) +{ + if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.pe.ntheader.FileHeader.NumberOfSections) + return 0; + return ism->fmap->u.pe.sect[ism->sidx].shdr.VirtualAddress; +} + +/****************************************************************** + * pe_get_map_size + * + * Get the size of an PE section + */ +unsigned pe_get_map_size(const struct image_section_map* ism) +{ + if (ism->sidx < 0 || ism->sidx >= ism->fmap->u.pe.ntheader.FileHeader.NumberOfSections) + return 0; + return ism->fmap->u.pe.sect[ism->sidx].shdr.SizeOfRawData; +} + +/****************************************************************** + * pe_map_file + * + * Maps an PE file into memory (and checks it's a real PE file) + */ +static BOOL pe_map_file(HANDLE file, struct image_file_map* fmap, enum module_type mt) +{ + void* mapping; + + fmap->modtype = mt; + fmap->u.pe.hMap = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL); + if (fmap->u.pe.hMap == 0) return FALSE; + fmap->u.pe.full_count = 0; + fmap->u.pe.full_map = NULL; + if (!(mapping = pe_map_full(fmap, NULL))) goto error; + + switch (mt) + { + case DMT_PE: + { + IMAGE_NT_HEADERS* nthdr; + IMAGE_SECTION_HEADER* section; + unsigned i; + + if (!(nthdr = RtlImageNtHeader(mapping))) goto error; + memcpy(&fmap->u.pe.ntheader, nthdr, sizeof(fmap->u.pe.ntheader)); + section = (IMAGE_SECTION_HEADER*) + ((char*)&nthdr->OptionalHeader + nthdr->FileHeader.SizeOfOptionalHeader); + fmap->u.pe.sect = HeapAlloc(GetProcessHeap(), 0, + nthdr->FileHeader.NumberOfSections * sizeof(fmap->u.pe.sect[0])); + if (!fmap->u.pe.sect) goto error; + for (i = 0; i < nthdr->FileHeader.NumberOfSections; i++) + { + memcpy(&fmap->u.pe.sect[i].shdr, section + i, sizeof(IMAGE_SECTION_HEADER)); + fmap->u.pe.sect[i].mapped = IMAGE_NO_MAP; + } + if (nthdr->FileHeader.PointerToSymbolTable && nthdr->FileHeader.NumberOfSymbols) + { + /* FIXME ugly: should rather map the relevant content instead of copying it */ + const char* src = (const char*)mapping + + nthdr->FileHeader.PointerToSymbolTable + + nthdr->FileHeader.NumberOfSymbols * sizeof(IMAGE_SYMBOL); + char* dst; + DWORD sz = *(DWORD*)src; + + if ((dst = HeapAlloc(GetProcessHeap(), 0, sz))) + memcpy(dst, src, sz); + fmap->u.pe.strtable = dst; + } + else fmap->u.pe.strtable = NULL; + } + break; + default: assert(0); goto error; + } + pe_unmap_full(fmap); + + return TRUE; +error: + pe_unmap_full(fmap); + CloseHandle(fmap->u.pe.hMap); + return FALSE; +} + +/****************************************************************** + * pe_unmap_file + * + * Unmaps an PE file from memory (previously mapped with pe_map_file) + */ +static void pe_unmap_file(struct image_file_map* fmap) +{ + if (fmap->u.pe.hMap != 0) + { + struct image_section_map ism; + ism.fmap = fmap; + for (ism.sidx = 0; ism.sidx < fmap->u.pe.ntheader.FileHeader.NumberOfSections; ism.sidx++) + { + pe_unmap_section(&ism); + } + while (fmap->u.pe.full_count) pe_unmap_full(fmap); + HeapFree(GetProcessHeap(), 0, fmap->u.pe.sect); + HeapFree(GetProcessHeap(), 0, (void*)fmap->u.pe.strtable); /* FIXME ugly (see pe_map_file) */ + CloseHandle(fmap->u.pe.hMap); + fmap->u.pe.hMap = NULL; + } +} + +static void pe_module_remove(struct process* pcs, struct module_format* modfmt) +{ + pe_unmap_file(&modfmt->u.pe_info->fmap); + HeapFree(GetProcessHeap(), 0, modfmt); +} + /****************************************************************** * pe_locate_with_coff_symbol_table * @@ -43,37 +271,35 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); * Mingw32 requires this for stabs debug information as address for global variables isn't filled in * (this is similar to what is done in elf_module.c when using the .symtab ELF section) */ -static BOOL pe_locate_with_coff_symbol_table(struct module* module, IMAGE_NT_HEADERS* nth, void* mapping) +static BOOL pe_locate_with_coff_symbol_table(struct module* module) { + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; const IMAGE_SYMBOL* isym; int i, numsym, naux; - const char* strtable; char tmp[9]; const char* name; struct hash_table_iter hti; void* ptr; struct symt_data* sym; - const IMAGE_SECTION_HEADER* sect; + const char* mapping; - numsym = nth->FileHeader.NumberOfSymbols; - if (!nth->FileHeader.PointerToSymbolTable || !numsym) + numsym = fmap->u.pe.ntheader.FileHeader.NumberOfSymbols; + if (!fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable || !numsym) return TRUE; - isym = (const IMAGE_SYMBOL*)((char*)mapping + nth->FileHeader.PointerToSymbolTable); - /* FIXME: no way to get strtable size */ - strtable = (const char*)&isym[numsym]; - sect = IMAGE_FIRST_SECTION(nth); + if (!(mapping = pe_map_full(fmap, NULL))) return FALSE; + isym = (const IMAGE_SYMBOL*)(mapping + fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable); for (i = 0; i < numsym; i+= naux, isym += naux) { if (isym->StorageClass == IMAGE_SYM_CLASS_EXTERNAL && - isym->SectionNumber > 0 && isym->SectionNumber <= nth->FileHeader.NumberOfSections) + isym->SectionNumber > 0 && isym->SectionNumber <= fmap->u.pe.ntheader.FileHeader.NumberOfSections) { if (isym->N.Name.Short) { name = memcpy(tmp, isym->N.ShortName, 8); tmp[8] = '\0'; } - else name = strtable + isym->N.Name.Long; + else name = fmap->u.pe.strtable + isym->N.Name.Long; if (name[0] == '_') name++; hash_table_iter_init(&module->ht_symbols, &hti, name); while ((ptr = hash_table_iter_up(&hti))) @@ -86,15 +312,17 @@ static BOOL pe_locate_with_coff_symbol_table(struct module* module, IMAGE_NT_HEA TRACE("Changing absolute address for %d.%s: %lx -> %s\n", isym->SectionNumber, name, sym->u.var.offset, wine_dbgstr_longlong(module->module.BaseOfImage + - sect[isym->SectionNumber - 1].VirtualAddress + isym->Value)); + fmap->u.pe.sect[isym->SectionNumber - 1].shdr.VirtualAddress + + isym->Value)); sym->u.var.offset = module->module.BaseOfImage + - sect[isym->SectionNumber - 1].VirtualAddress + isym->Value; + fmap->u.pe.sect[isym->SectionNumber - 1].shdr.VirtualAddress + isym->Value; break; } } } naux = isym->NumberOfAuxSymbols + 1; } + pe_unmap_full(fmap); return TRUE; } @@ -103,8 +331,9 @@ static BOOL pe_locate_with_coff_symbol_table(struct module* module, IMAGE_NT_HEA * * Load public symbols out of the COFF symbol table (if any). */ -static BOOL pe_load_coff_symbol_table(struct module* module, IMAGE_NT_HEADERS* nth, void* mapping) +static BOOL pe_load_coff_symbol_table(struct module* module) { + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; const IMAGE_SYMBOL* isym; int i, numsym, naux; const char* strtable; @@ -113,14 +342,16 @@ static BOOL pe_load_coff_symbol_table(struct module* module, IMAGE_NT_HEADERS* n const char* lastfilename = NULL; struct symt_compiland* compiland = NULL; const IMAGE_SECTION_HEADER* sect; + const char* mapping; - numsym = nth->FileHeader.NumberOfSymbols; - if (!nth->FileHeader.PointerToSymbolTable || !numsym) + numsym = fmap->u.pe.ntheader.FileHeader.NumberOfSymbols; + if (!fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable || !numsym) return TRUE; - isym = (const IMAGE_SYMBOL*)((char*)mapping + nth->FileHeader.PointerToSymbolTable); + if (!(mapping = pe_map_full(fmap, NULL))) return FALSE; + isym = (const IMAGE_SYMBOL*)((char*)mapping + fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable); /* FIXME: no way to get strtable size */ strtable = (const char*)&isym[numsym]; - sect = IMAGE_FIRST_SECTION(nth); + sect = IMAGE_FIRST_SECTION(&fmap->u.pe.ntheader); for (i = 0; i < numsym; i+= naux, isym += naux) { @@ -130,7 +361,7 @@ static BOOL pe_load_coff_symbol_table(struct module* module, IMAGE_NT_HEADERS* n compiland = NULL; } if (isym->StorageClass == IMAGE_SYM_CLASS_EXTERNAL && - isym->SectionNumber > 0 && isym->SectionNumber <= nth->FileHeader.NumberOfSections) + isym->SectionNumber > 0 && isym->SectionNumber <= fmap->u.pe.ntheader.FileHeader.NumberOfSections) { if (isym->N.Name.Short) { @@ -143,9 +374,12 @@ static BOOL pe_load_coff_symbol_table(struct module* module, IMAGE_NT_HEADERS* n if (!compiland && lastfilename) compiland = symt_new_compiland(module, 0, source_new(module, NULL, lastfilename)); - symt_new_public(module, compiland, name, - module->module.BaseOfImage + sect[isym->SectionNumber - 1].VirtualAddress + isym->Value, - 1); + + if (!(dbghelp_options & SYMOPT_NO_PUBLICS)) + symt_new_public(module, compiland, name, + module->module.BaseOfImage + sect[isym->SectionNumber - 1].VirtualAddress + + isym->Value, + 1); } naux = isym->NumberOfAuxSymbols + 1; } @@ -155,6 +389,7 @@ static BOOL pe_load_coff_symbol_table(struct module* module, IMAGE_NT_HEADERS* n module->module.TypeInfo = FALSE; module->module.SourceIndexed = FALSE; module->module.Publics = TRUE; + pe_unmap_full(fmap); return TRUE; } @@ -176,30 +411,30 @@ static inline DWORD pe_get_sect_size(IMAGE_SECTION_HEADER* sect) * look for stabs information in PE header (it's how the mingw compiler provides * its debugging information) */ -static BOOL pe_load_stabs(const struct process* pcs, struct module* module, - void* mapping, IMAGE_NT_HEADERS* nth) +static BOOL pe_load_stabs(const struct process* pcs, struct module* module) { - IMAGE_SECTION_HEADER* section; - IMAGE_SECTION_HEADER* sect_stabs = NULL; - IMAGE_SECTION_HEADER* sect_stabstr = NULL; - int i; + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; + struct image_section_map sect_stabs, sect_stabstr; BOOL ret = FALSE; - section = (IMAGE_SECTION_HEADER*) - ((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader); - for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++) - { - if (!strcasecmp((const char*)section->Name, ".stab")) sect_stabs = section; - else if (!strncasecmp((const char*)section->Name, ".stabstr", 8)) sect_stabstr = section; - } - if (sect_stabs && sect_stabstr) + if (pe_find_section(fmap, ".stab", §_stabs) && pe_find_section(fmap, ".stabstr", §_stabstr)) { - ret = stabs_parse(module, - module->module.BaseOfImage - nth->OptionalHeader.ImageBase, - pe_get_sect(nth, mapping, sect_stabs), pe_get_sect_size(sect_stabs), - pe_get_sect(nth, mapping, sect_stabstr), pe_get_sect_size(sect_stabstr), - NULL, NULL); - if (ret) pe_locate_with_coff_symbol_table(module, nth, mapping); + const char* stab; + const char* stabstr; + + stab = image_map_section(§_stabs); + stabstr = image_map_section(§_stabstr); + if (stab != IMAGE_NO_MAP && stabstr != IMAGE_NO_MAP) + { + ret = stabs_parse(module, + module->module.BaseOfImage - fmap->u.pe.ntheader.OptionalHeader.ImageBase, + stab, image_get_map_size(§_stabs), + stabstr, image_get_map_size(§_stabstr), + NULL, NULL); + } + image_unmap_section(§_stabs); + image_unmap_section(§_stabstr); + if (ret) pe_locate_with_coff_symbol_table(module); } TRACE("%s the STABS debug info\n", ret ? "successfully loaded" : "failed to load"); @@ -212,51 +447,15 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module, * look for dwarf information in PE header (it's also a way for the mingw compiler * to provide its debugging information) */ -static BOOL pe_load_dwarf(const struct process* pcs, struct module* module, - void* mapping, IMAGE_NT_HEADERS* nth) +static BOOL pe_load_dwarf(struct module* module) { - IMAGE_SECTION_HEADER* section; - IMAGE_SECTION_HEADER* sect_debuginfo = NULL; - IMAGE_SECTION_HEADER* sect_debugstr = NULL; - IMAGE_SECTION_HEADER* sect_debugabbrev = NULL; - IMAGE_SECTION_HEADER* sect_debugline = NULL; - IMAGE_SECTION_HEADER* sect_debugloc = NULL; - int i; - const char* strtable; - const char* sectname; + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; BOOL ret = FALSE; - if (nth->FileHeader.PointerToSymbolTable && nth->FileHeader.NumberOfSymbols) - /* FIXME: no way to get strtable size */ - strtable = (const char*)mapping + nth->FileHeader.PointerToSymbolTable + - nth->FileHeader.NumberOfSymbols * sizeof(IMAGE_SYMBOL); - else strtable = NULL; - - section = (IMAGE_SECTION_HEADER*) - ((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader); - for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++) - { - sectname = (const char*)section->Name; - /* long section names start with a '/' (at least on MinGW32) */ - if (*sectname == '/' && strtable) - sectname = strtable + atoi(sectname + 1); - if (!strcasecmp(sectname, ".debug_info")) sect_debuginfo = section; - else if (!strcasecmp(sectname, ".debug_str")) sect_debugstr = section; - else if (!strcasecmp(sectname, ".debug_abbrev")) sect_debugabbrev = section; - else if (!strcasecmp(sectname, ".debug_line")) sect_debugline = section; - else if (!strcasecmp(sectname, ".debug_loc")) sect_debugloc = section; - } - if (sect_debuginfo) - { - ret = dwarf2_parse(module, - module->module.BaseOfImage - nth->OptionalHeader.ImageBase, - NULL, /* FIXME: some thunks to deal with ? */ - pe_get_sect(nth, mapping, sect_debuginfo), pe_get_sect_size(sect_debuginfo), - pe_get_sect(nth, mapping, sect_debugabbrev), pe_get_sect_size(sect_debugabbrev), - pe_get_sect(nth, mapping, sect_debugstr), pe_get_sect_size(sect_debugstr), - pe_get_sect(nth, mapping, sect_debugline), pe_get_sect_size(sect_debugline), - pe_get_sect(nth, mapping, sect_debugloc), pe_get_sect_size(sect_debugloc)); - } + ret = dwarf2_parse(module, + module->module.BaseOfImage - fmap->u.pe.ntheader.OptionalHeader.ImageBase, + NULL, /* FIXME: some thunks to deal with ? */ + fmap); TRACE("%s the DWARF debug info\n", ret ? "successfully loaded" : "failed to load"); return ret; @@ -314,19 +513,21 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module, * * Process MSC debug information in PE file. */ -static BOOL pe_load_msc_debug_info(const struct process* pcs, - struct module* module, - void* mapping, const IMAGE_NT_HEADERS* nth) +static BOOL pe_load_msc_debug_info(const struct process* pcs, struct module* module) { + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; BOOL ret = FALSE; const IMAGE_DATA_DIRECTORY* dir; const IMAGE_DEBUG_DIRECTORY*dbg = NULL; int nDbg; + void* mapping; + IMAGE_NT_HEADERS* nth; + if (!(mapping = pe_map_full(fmap, &nth))) return FALSE; /* Read in debug directory */ dir = nth->OptionalHeader.DataDirectory + IMAGE_DIRECTORY_ENTRY_DEBUG; nDbg = dir->Size / sizeof(IMAGE_DEBUG_DIRECTORY); - if (!nDbg) return FALSE; + if (!nDbg) goto done; dbg = RtlImageRvaToVa(nth, mapping, dir->VirtualAddress, NULL); @@ -353,26 +554,29 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs, const IMAGE_SECTION_HEADER *sectp = (const IMAGE_SECTION_HEADER*)((const char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader); /* Debug info is embedded into PE module */ ret = pe_load_debug_directory(pcs, module, mapping, sectp, - nth->FileHeader.NumberOfSections, dbg, nDbg); + nth->FileHeader.NumberOfSections, dbg, nDbg); } - +done: + pe_unmap_full(fmap); return ret; } /*********************************************************************** * pe_load_export_debug_info */ -static BOOL pe_load_export_debug_info(const struct process* pcs, - struct module* module, - void* mapping, const IMAGE_NT_HEADERS* nth) +static BOOL pe_load_export_debug_info(const struct process* pcs, struct module* module) { + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; unsigned int i; const IMAGE_EXPORT_DIRECTORY* exports; DWORD base = module->module.BaseOfImage; DWORD size; + IMAGE_NT_HEADERS* nth; + void* mapping; if (dbghelp_options & SYMOPT_NO_PUBLICS) return TRUE; + if (!(mapping = pe_map_full(fmap, &nth))) return FALSE; #if 0 /* Add start of DLL (better use the (yet unimplemented) Exe SymTag for this) */ /* FIXME: module.ModuleName isn't correctly set yet if it's passed in SymLoadModule */ @@ -435,6 +639,8 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, /* no real debug info, only entry points */ if (module->module.SymType == SymDeferred) module->module.SymType = SymExport; + pe_unmap_full(fmap); + return TRUE; } @@ -445,39 +651,21 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, BOOL pe_load_debug_info(const struct process* pcs, struct module* module) { BOOL ret = FALSE; - HANDLE hFile; - HANDLE hMap; - void* mapping; - IMAGE_NT_HEADERS* nth; - - hFile = CreateFileW(module->module.LoadedImageName, GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) return ret; - if ((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != 0) - { - if ((mapping = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) != NULL) - { - nth = RtlImageNtHeader(mapping); - if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY)) - { - ret = pe_load_stabs(pcs, module, mapping, nth) || - pe_load_dwarf(pcs, module, mapping, nth) || - pe_load_msc_debug_info(pcs, module, mapping, nth) || - pe_load_coff_symbol_table(module, nth, mapping); - /* if we still have no debug info (we could only get SymExport at this - * point), then do the SymExport except if we have an ELF container, - * in which case we'll rely on the export's on the ELF side - */ - } -/* FIXME shouldn't we check that? if (!module_get_debug(pcs, module))l */ - if (pe_load_export_debug_info(pcs, module, mapping, nth) && !ret) - ret = TRUE; - UnmapViewOfFile(mapping); - } - CloseHandle(hMap); + if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY)) + { + ret = pe_load_stabs(pcs, module); + ret = pe_load_dwarf(module) || ret; + ret = pe_load_msc_debug_info(pcs, module) || ret; + ret = ret || pe_load_coff_symbol_table(module); /* FIXME */ + /* if we still have no debug info (we could only get SymExport at this + * point), then do the SymExport except if we have an ELF container, + * in which case we'll rely on the export's on the ELF side + */ } - CloseHandle(hFile); + /* FIXME shouldn't we check that? if (!module_get_debug(pcs, module)) */ + if (pe_load_export_debug_info(pcs, module) && !ret) + ret = TRUE; return ret; } @@ -489,15 +677,14 @@ BOOL pe_load_debug_info(const struct process* pcs, struct module* module) struct module* pe_load_native_module(struct process* pcs, const WCHAR* name, HANDLE hFile, DWORD base, DWORD size) { - struct module* module = NULL; - BOOL opened = FALSE; - HANDLE hMap; - WCHAR loaded_name[MAX_PATH]; + struct module* module = NULL; + BOOL opened = FALSE; + struct module_format* modfmt; + WCHAR loaded_name[MAX_PATH]; loaded_name[0] = '\0'; if (!hFile) { - assert(name); if ((hFile = FindExecutableImageExW(name, pcs->search_path, loaded_name, NULL, NULL)) == NULL) @@ -507,37 +694,37 @@ struct module* pe_load_native_module(struct process* pcs, const WCHAR* name, else if (name) strcpyW(loaded_name, name); else if (dbghelp_options & SYMOPT_DEFERRED_LOADS) FIXME("Trouble ahead (no module name passed in deferred mode)\n"); - - if ((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != NULL) + if (!(modfmt = HeapAlloc(GetProcessHeap(), 0, sizeof(struct module_format) + sizeof(struct pe_module_info)))) + return NULL; + modfmt->u.pe_info = (struct pe_module_info*)(modfmt + 1); + if (pe_map_file(hFile, &modfmt->u.pe_info->fmap, DMT_PE)) { - void* mapping; + if (!base) base = modfmt->u.pe_info->fmap.u.pe.ntheader.OptionalHeader.ImageBase; + if (!size) size = modfmt->u.pe_info->fmap.u.pe.ntheader.OptionalHeader.SizeOfImage; - if ((mapping = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) != NULL) + module = module_new(pcs, loaded_name, DMT_PE, FALSE, base, size, + modfmt->u.pe_info->fmap.u.pe.ntheader.FileHeader.TimeDateStamp, + modfmt->u.pe_info->fmap.u.pe.ntheader.OptionalHeader.CheckSum); + if (module) { - IMAGE_NT_HEADERS* nth = RtlImageNtHeader(mapping); - - if (nth) - { - if (!base) base = nth->OptionalHeader.ImageBase; - if (!size) size = nth->OptionalHeader.SizeOfImage; - - module = module_new(pcs, loaded_name, DMT_PE, FALSE, base, size, - nth->FileHeader.TimeDateStamp, - nth->OptionalHeader.CheckSum); - if (module) - { - if (dbghelp_options & SYMOPT_DEFERRED_LOADS) - module->module.SymType = SymDeferred; - else - pe_load_debug_info(pcs, module); - } - else - ERR("could not load the module '%s'\n", debugstr_w(loaded_name)); - } - UnmapViewOfFile(mapping); + modfmt->module = module; + modfmt->remove = pe_module_remove; + modfmt->loc_compute = NULL; + + module->format_info[DFI_PE] = modfmt; + if (dbghelp_options & SYMOPT_DEFERRED_LOADS) + module->module.SymType = SymDeferred; + else + pe_load_debug_info(pcs, module); + } + else + { + ERR("could not load the module '%s'\n", debugstr_w(loaded_name)); + pe_unmap_file(&modfmt->u.pe_info->fmap); } - CloseHandle(hMap); } + if (!module) HeapFree(GetProcessHeap(), 0, modfmt); + if (opened) CloseHandle(hFile); return module; diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 07ba9a37cef..650f6a28086 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -693,8 +693,20 @@ static void symt_fill_sym_info(struct module_pair* pair, struct location loc = data->u.var; if (loc.kind >= loc_user) - pair->effective->loc_compute(pair->pcs, pair->effective, func, &loc); - + { + unsigned i; + struct module_format* modfmt; + + for (i = 0; i < DFI_LAST; i++) + { + modfmt = pair->effective->format_info[i]; + if (modfmt && modfmt->loc_compute) + { + modfmt->loc_compute(pair->pcs, modfmt, func, &loc); + break; + } + } + } switch (loc.kind) { case loc_error: diff --git a/dlls/dciman32/Makefile.in b/dlls/dciman32/Makefile.in index 99c42a92af9..c52561bc5ab 100644 --- a/dlls/dciman32/Makefile.in +++ b/dlls/dciman32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = dciman_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ddeml.dll16/Makefile.in b/dlls/ddeml.dll16/Makefile.in index ef242a65123..a846ed20723 100644 --- a/dlls/ddeml.dll16/Makefile.in +++ b/dlls/ddeml.dll16/Makefile.in @@ -10,5 +10,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = ddeml.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ddraw/Makefile.in b/dlls/ddraw/Makefile.in index cda0581bcb8..32f123704f3 100644 --- a/dlls/ddraw/Makefile.in +++ b/dlls/ddraw/Makefile.in @@ -30,5 +30,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 527f448b983..0a6781c5444 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -447,6 +447,8 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface, This->cooperative_level &= ~DDSCL_FULLSCREEN; This->cooperative_level &= ~DDSCL_EXCLUSIVE; This->cooperative_level &= ~DDSCL_ALLOWMODEX; + + IWineD3DDevice_ReleaseFocusWindow(This->wineD3DDevice); } /* Don't override focus windows or private device windows */ @@ -483,6 +485,13 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface, !(This->devicewindow) && (hwnd != window) ) { + HRESULT hr = IWineD3DDevice_AcquireFocusWindow(This->wineD3DDevice, hwnd); + if (FAILED(hr)) + { + ERR("Failed to acquire focus window, hr %#x.\n", hr); + LeaveCriticalSection(&ddraw_cs); + return hr; + } This->dest_window = hwnd; } } @@ -1514,11 +1523,24 @@ IDirectDrawImpl_GetSurfaceFromDC(IDirectDraw7 *iface, IDirectDrawSurface7 **Surface) { IDirectDrawImpl *This = (IDirectDrawImpl *)iface; - FIXME("(%p)->(%p,%p): Stub!\n", This, hdc, Surface); + IWineD3DSurface *wined3d_surface; + HRESULT hr; + + TRACE("iface %p, dc %p, surface %p.\n", iface, hdc, Surface); + + if (!Surface) return E_INVALIDARG; - /* Implementation idea if needed: Loop through all surfaces and compare - * their hdc with hdc. Implement it in WineD3D! */ - return DDERR_NOTFOUND; + hr = IWineD3DDevice_GetSurfaceFromDC(This->wineD3DDevice, hdc, &wined3d_surface); + if (FAILED(hr)) + { + TRACE("No surface found for dc %p.\n", hdc); + *Surface = NULL; + return DDERR_NOTFOUND; + } + + IWineD3DSurface_GetParent(wined3d_surface, (IUnknown **)Surface); + TRACE("Returning surface %p.\n", Surface); + return DD_OK; } /***************************************************************************** diff --git a/dlls/ddraw/ddraw_thunks.c b/dlls/ddraw/ddraw_thunks.c index 278d7204be2..28991d1aeed 100644 --- a/dlls/ddraw/ddraw_thunks.c +++ b/dlls/ddraw/ddraw_thunks.c @@ -1048,7 +1048,15 @@ static HRESULT WINAPI IDirectDraw4Impl_GetSurfaceFromDC(LPDIRECTDRAW4 This, HDC hDC, LPDIRECTDRAWSURFACE4 *pSurf) { - return IDirectDraw7_GetSurfaceFromDC((IDirectDraw7 *)ddraw_from_ddraw4(This), hDC, (LPDIRECTDRAWSURFACE7 *)pSurf); + IDirectDrawSurface7 *surf7; + HRESULT hr; + + if (!pSurf) return E_INVALIDARG; + + hr = IDirectDraw7_GetSurfaceFromDC((IDirectDraw7 *)ddraw_from_ddraw4(This), hDC, &surf7); + *pSurf = surf7 ? (IDirectDrawSurface4 *)&((IDirectDrawSurfaceImpl *)surf7)->IDirectDrawSurface3_vtbl : NULL; + + return hr; } static HRESULT WINAPI diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 2f426881cba..29fd65e25a9 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -489,7 +489,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, memcpy(dst, src, ci->dwCount * sizeof(D3DTLVERTEX)); } else { - ERR("Unhandled vertex processing !\n"); + ERR("Unhandled vertex processing flag %#x.\n", ci->dwFlags); } instr += size; @@ -703,7 +703,6 @@ IDirect3DExecuteBufferImpl_Lock(IDirect3DExecuteBuffer *iface, TRACE("(%p)->(%p)\n", This, lpDesc); dwSize = lpDesc->dwSize; - memset(lpDesc, 0, dwSize); memcpy(lpDesc, &This->desc, dwSize); if (TRACE_ON(d3d7)) { @@ -789,7 +788,6 @@ IDirect3DExecuteBufferImpl_GetExecuteData(IDirect3DExecuteBuffer *iface, TRACE("(%p)->(%p): stub!\n", This, lpData); dwSize = lpData->dwSize; - memset(lpData, 0, dwSize); memcpy(lpData, &This->data, dwSize); if (TRACE_ON(d3d7)) { diff --git a/dlls/ddraw/material.c b/dlls/ddraw/material.c index 6f162f7c828..d75501ecd95 100644 --- a/dlls/ddraw/material.c +++ b/dlls/ddraw/material.c @@ -294,7 +294,6 @@ IDirect3DMaterialImpl_GetMaterial(IDirect3DMaterial3 *iface, /* Copies the material structure */ EnterCriticalSection(&ddraw_cs); dwSize = lpMat->dwSize; - memset(lpMat, 0, dwSize); memcpy(lpMat, &This->mat, dwSize); LeaveCriticalSection(&ddraw_cs); diff --git a/dlls/ddraw/tests/Makefile.in b/dlls/ddraw/tests/Makefile.in index 813c6cc6683..c7c55a17d1b 100644 --- a/dlls/ddraw/tests/Makefile.in +++ b/dlls/ddraw/tests/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ visual.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 6d58c67ffb2..26dc1cfa429 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -3289,10 +3289,10 @@ static void test_wndproc(void) goto done; } - todo_wine ok(!expect_message, "Expected message %#x, but didn't receive it.\n", expect_message); + ok(!expect_message, "Expected message %#x, but didn't receive it.\n", expect_message); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - todo_wine ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw7_Release(ddraw7); @@ -3322,7 +3322,7 @@ static void test_wndproc(void) } proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - todo_wine ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw7_Release(ddraw7); diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index d53d6a0be10..bfd5eaeab86 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -3008,10 +3008,13 @@ static void GetDCTest(void) IDirectDrawSurface2 *surf2; IDirectDrawSurface4 *surf4; IDirectDrawSurface7 *surf7; + IDirectDrawSurface *tmp; + IDirectDrawSurface7 *tmp7; HRESULT hr; IDirectDraw2 *dd2; IDirectDraw4 *dd4; IDirectDraw7 *dd7; + HDC dc; memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3054,6 +3057,37 @@ static void GetDCTest(void) ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed: 0x%08x\n", hr); dctest_surf((IDirectDrawSurface *) surf4, 2); + hr = IDirectDrawSurface4_QueryInterface(surf4, &IID_IDirectDrawSurface, (void **)&surf); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + + hr = IDirectDrawSurface4_GetDC(surf4, &dc); + ok(SUCCEEDED(hr), "GetDC failed, hr %#x.\n", hr); + + hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, NULL); + ok(hr == E_INVALIDARG, "Expected hr E_INVALIDARG, got %#x.\n", hr); + + hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, (IDirectDrawSurface4 **)&tmp); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(tmp == surf, "Expected surface %p, got %p.\n\n", surf, tmp); + + hr = IDirectDrawSurface4_ReleaseDC(surf4, dc); + ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + + dc = CreateCompatibleDC(NULL); + ok(!!dc, "CreateCompatibleDC failed.\n"); + + tmp = (IDirectDrawSurface *)0xdeadbeef; + hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, (IDirectDrawSurface4 **)&tmp); + ok(hr == DDERR_NOTFOUND, "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(!tmp, "Expected surface NULL, got %p.\n", tmp); + + ok(DeleteDC(dc), "DeleteDC failed.\n"); + + tmp = (IDirectDrawSurface *)0xdeadbeef; + hr = IDirectDraw4_GetSurfaceFromDC(dd4, NULL, (IDirectDrawSurface4 **)&tmp); + ok(hr == DDERR_NOTFOUND, "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(!tmp, "Expected surface NULL, got %p.\n", tmp); + IDirectDrawSurface4_Release(surf4); IDirectDraw4_Release(dd4); @@ -3064,6 +3098,35 @@ static void GetDCTest(void) ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed: 0x%08x\n", hr); dctest_surf((IDirectDrawSurface *) surf7, 2); + hr = IDirectDrawSurface7_GetDC(surf7, &dc); + ok(SUCCEEDED(hr), "GetDC failed, hr %#x.\n", hr); + + hr = IDirectDraw7_GetSurfaceFromDC(dd7, dc, NULL); + ok(hr == E_INVALIDARG, "Expected hr E_INVALIDARG, got %#x.\n", hr); + + hr = IDirectDraw7_GetSurfaceFromDC(dd7, dc, &tmp7); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(tmp7 == surf7, "Expected surface %p, got %p.\n\n", surf7, tmp7); + IDirectDrawSurface7_Release(tmp7); + + hr = IDirectDrawSurface7_ReleaseDC(surf7, dc); + ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + + dc = CreateCompatibleDC(NULL); + ok(!!dc, "CreateCompatibleDC failed.\n"); + + tmp7 = (IDirectDrawSurface7 *)0xdeadbeef; + hr = IDirectDraw7_GetSurfaceFromDC(dd7, dc, &tmp7); + ok(hr == DDERR_NOTFOUND, "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(!tmp7, "Expected surface NULL, got %p.\n", tmp7); + + ok(DeleteDC(dc), "DeleteDC failed.\n"); + + tmp7 = (IDirectDrawSurface7 *)0xdeadbeef; + hr = IDirectDraw7_GetSurfaceFromDC(dd7, NULL, (IDirectDrawSurface7 **)&tmp7); + ok(hr == DDERR_NOTFOUND, "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(!tmp7, "Expected surface NULL, got %p.\n", tmp7); + IDirectDrawSurface7_Release(surf7); IDirectDraw7_Release(dd7); } diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c index e5b81a137fa..221e6d15aa8 100644 --- a/dlls/ddraw/tests/visual.c +++ b/dlls/ddraw/tests/visual.c @@ -113,7 +113,7 @@ static BOOL createObjects(void) U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(U4(ddsd).ddpfPixelFormat).dwZBufferBitDepth = 32; - U3(U4(ddsd).ddpfPixelFormat).dwZBitMask = 0xffffffff; + U3(U4(ddsd).ddpfPixelFormat).dwZBitMask = 0x00ffffff; ddsd.dwWidth = 640; ddsd.dwHeight = 480; hr = IDirectDraw7_CreateSurface(DirectDraw, &ddsd, &depth_buffer, NULL); diff --git a/dlls/ddrawex/Makefile.in b/dlls/ddrawex/Makefile.in index f2ec08082e7..ed533898e00 100644 --- a/dlls/ddrawex/Makefile.in +++ b/dlls/ddrawex/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ surface.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ddrawex/tests/Makefile.in b/dlls/ddrawex/tests/Makefile.in index 08a87a28dd3..e2a68584893 100644 --- a/dlls/ddrawex/tests/Makefile.in +++ b/dlls/ddrawex/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ surface.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/devenum/Makefile.in b/dlls/devenum/Makefile.in index c1ada78bec5..f2bd59853c1 100644 --- a/dlls/devenum/Makefile.in +++ b/dlls/devenum/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ RC_SRCS = devenum.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dinput/Makefile.in b/dlls/dinput/Makefile.in index 16142efb8a2..c84a44aff22 100644 --- a/dlls/dinput/Makefile.in +++ b/dlls/dinput/Makefile.in @@ -25,5 +25,3 @@ IMPLIB_SRCS = data_formats.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dinput/tests/Makefile.in b/dlls/dinput/tests/Makefile.in index 98f3a88da75..57c5fd4780b 100644 --- a/dlls/dinput/tests/Makefile.in +++ b/dlls/dinput/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ mouse.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in index 1a466398d7c..18ff6b29588 100644 --- a/dlls/dinput8/Makefile.in +++ b/dlls/dinput8/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dispdib.dll16/Makefile.in b/dlls/dispdib.dll16/Makefile.in index 6f461381eeb..53018520dd2 100644 --- a/dlls/dispdib.dll16/Makefile.in +++ b/dlls/dispdib.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = dispdib.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dispex/Makefile.in b/dlls/dispex/Makefile.in index d408d5569ad..bb7a882ec9d 100644 --- a/dlls/dispex/Makefile.in +++ b/dlls/dispex/Makefile.in @@ -15,5 +15,3 @@ IDL_P_SRCS = \ disp_ex.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dispex/tests/Makefile.in b/dlls/dispex/tests/Makefile.in new file mode 100644 index 00000000000..a160fface1b --- /dev/null +++ b/dlls/dispex/tests/Makefile.in @@ -0,0 +1,11 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = dispex.dll +IMPORTS = oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32 + +C_SRCS = \ + marshal.c + +@MAKE_TEST_RULES@ diff --git a/dlls/dispex/tests/marshal.c b/dlls/dispex/tests/marshal.c new file mode 100644 index 00000000000..e0b7127cfbd --- /dev/null +++ b/dlls/dispex/tests/marshal.c @@ -0,0 +1,416 @@ +/* + * Tests for marshaling IDispatchEx + * + * Copyright 2005-2006 Robert Shearman + * Copyright 2010 Huw Davies + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define COBJMACROS +#define CONST_VTABLE + +#include + +#include "initguid.h" +#include "objidl.h" +#include "dispex.h" + +#include "wine/test.h" + +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", (unsigned long int)hr) + +#define RELEASEMARSHALDATA WM_USER + +struct host_object_data +{ + IStream *stream; + IID iid; + IUnknown *object; + MSHLFLAGS marshal_flags; + HANDLE marshal_event; + HANDLE error_event; + IMessageFilter *filter; +}; + +static DWORD CALLBACK host_object_proc(LPVOID p) +{ + struct host_object_data *data = p; + HRESULT hr; + MSG msg; + + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + if (data->filter) + { + IMessageFilter * prev_filter = NULL; + hr = CoRegisterMessageFilter(data->filter, &prev_filter); + if (prev_filter) IMessageFilter_Release(prev_filter); + ok_ole_success(hr, CoRegisterMessageFilter); + } + + hr = CoMarshalInterface(data->stream, &data->iid, data->object, MSHCTX_INPROC, NULL, data->marshal_flags); + + /* force the message queue to be created before signaling parent thread */ + PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); + + if(hr == S_OK) + SetEvent(data->marshal_event); + else + { + win_skip("IDispatchEx marshaller not available.\n"); + SetEvent(data->error_event); + return hr; + } + + while (GetMessage(&msg, NULL, 0, 0)) + { + if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA) + { + trace("releasing marshal data\n"); + CoReleaseMarshalData(data->stream); + SetEvent((HANDLE)msg.lParam); + } + else + DispatchMessage(&msg); + } + + HeapFree(GetProcessHeap(), 0, data); + + CoUninitialize(); + + return hr; +} + +static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread) +{ + DWORD tid = 0, ret; + HANDLE events[2]; + struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); + + data->stream = stream; + data->iid = *riid; + data->object = object; + data->marshal_flags = marshal_flags; + data->marshal_event = events[0] = CreateEvent(NULL, FALSE, FALSE, NULL); + data->error_event = events[1] = CreateEvent(NULL, FALSE, FALSE, NULL); + data->filter = filter; + + *thread = CreateThread(NULL, 0, host_object_proc, data, 0, &tid); + + /* wait for marshaling to complete before returning */ + ret = WaitForMultipleObjects(2, events, FALSE, INFINITE); + CloseHandle(events[0]); + CloseHandle(events[1]); + + if(ret == WAIT_OBJECT_0) return tid; + + WaitForSingleObject(*thread, INFINITE); + CloseHandle(*thread); + *thread = INVALID_HANDLE_VALUE; + return 0; +} + +static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, HANDLE *thread) +{ + return start_host_object2(stream, riid, object, marshal_flags, NULL, thread); +} + +static void end_host_object(DWORD tid, HANDLE thread) +{ + BOOL ret = PostThreadMessage(tid, WM_QUIT, 0, 0); + ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); + /* be careful of races - don't return until hosting thread has terminated */ + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); +} + +typedef struct +{ + const IDispatchExVtbl *lpVtbl; + LONG refs; +} dispex; + +static HRESULT WINAPI dispex_QueryInterface(IDispatchEx* iface, + REFIID iid, void **obj) +{ + trace("QI {%08x-...}\n", iid->Data1); + if(IsEqualIID(iid, &IID_IUnknown) || + IsEqualIID(iid, &IID_IDispatchEx)) + { + IDispatchEx_AddRef(iface); + *obj = iface; + return S_OK; + } + else + { + *obj = NULL; + return E_NOINTERFACE; + } +} + +static ULONG WINAPI dispex_AddRef(IDispatchEx* iface) +{ + dispex *This = (dispex *)iface; + trace("AddRef\n"); + + return InterlockedIncrement(&This->refs); +} + +static ULONG WINAPI dispex_Release(IDispatchEx* iface) +{ + dispex *This = (dispex *)iface; + ULONG refs = InterlockedDecrement(&This->refs); + trace("Release\n"); + if(!refs) + { + HeapFree(GetProcessHeap(), 0, This); + } + return refs; +} + + static HRESULT WINAPI dispex_GetTypeInfoCount(IDispatchEx* iface, + UINT *pctinfo) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetTypeInfo(IDispatchEx* iface, + UINT iTInfo, + LCID lcid, + ITypeInfo **ppTInfo) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetIDsOfNames(IDispatchEx* iface, + REFIID riid, + LPOLESTR *rgszNames, + UINT cNames, + LCID lcid, + DISPID *rgDispId) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_Invoke(IDispatchEx* iface, + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS *pDispParams, + VARIANT *pVarResult, + EXCEPINFO *pExcepInfo, + UINT *puArgErr) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetDispID(IDispatchEx* iface, + BSTR bstrName, + DWORD grfdex, + DISPID *pid) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_InvokeEx(IDispatchEx* iface, + DISPID id, + LCID lcid, + WORD wFlags, + DISPPARAMS *pdp, + VARIANT *pvarRes, + EXCEPINFO *pei, + IServiceProvider *pspCaller) +{ + if(id == 1) + { + ok(pdp->cArgs == 0, "got %d\n", pdp->cArgs); +todo_wine + ok(pei == NULL, "got non-NULL excepinfo\n"); +todo_wine + ok(pvarRes == NULL, "got non-NULL result\n"); + } + else if(id == 2) + { + ok(pdp->cArgs == 2, "got %d\n", pdp->cArgs); + ok(V_VT(&pdp->rgvarg[0]) == VT_INT, "got %04x\n", V_VT(&pdp->rgvarg[0])); + ok(V_VT(&pdp->rgvarg[1]) == (VT_INT | VT_BYREF), "got %04x\n", V_VT(&pdp->rgvarg[1])); + ok(*V_INTREF(&pdp->rgvarg[1]) == 0xbeef, "got %08x\n", *V_INTREF(&pdp->rgvarg[1])); + *V_INTREF(&pdp->rgvarg[1]) = 0xdead; + } + else if(id == 3) + { + ok(pdp->cArgs == 2, "got %d\n", pdp->cArgs); + ok(V_VT(&pdp->rgvarg[0]) == VT_INT, "got %04x\n", V_VT(&pdp->rgvarg[0])); + ok(V_VT(&pdp->rgvarg[1]) == (VT_INT | VT_BYREF), "got %04x\n", V_VT(&pdp->rgvarg[1])); + V_VT(&pdp->rgvarg[0]) = VT_I4; + } + else if(id == 4) + { +todo_wine + ok(wFlags == 0xf, "got %04x\n", wFlags); + } + return S_OK; +} + +static HRESULT WINAPI dispex_DeleteMemberByName(IDispatchEx* iface, + BSTR bstrName, + DWORD grfdex) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_DeleteMemberByDispID(IDispatchEx* iface, DISPID id) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetMemberProperties(IDispatchEx* iface, DISPID id, + DWORD grfdexFetch, DWORD *pgrfdex) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetMemberName(IDispatchEx* iface, + DISPID id, BSTR *pbstrName) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetNextDispID(IDispatchEx* iface, + DWORD grfdex, + DISPID id, + DISPID *pid) +{ + trace("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI dispex_GetNameSpaceParent(IDispatchEx* iface, + IUnknown **ppunk) +{ + trace("\n"); + return E_NOTIMPL; +} + +static const IDispatchExVtbl dispex_vtable = +{ + dispex_QueryInterface, + dispex_AddRef, + dispex_Release, + dispex_GetTypeInfoCount, + dispex_GetTypeInfo, + dispex_GetIDsOfNames, + dispex_Invoke, + dispex_GetDispID, + dispex_InvokeEx, + dispex_DeleteMemberByName, + dispex_DeleteMemberByDispID, + dispex_GetMemberProperties, + dispex_GetMemberName, + dispex_GetNextDispID, + dispex_GetNameSpaceParent +}; + +static IDispatchEx *dispex_create(void) +{ + dispex *This; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + if (!This) return NULL; + This->lpVtbl = &dispex_vtable; + This->refs = 1; + return (IDispatchEx *)This; +} + +static void test_dispex(void) +{ + HRESULT hr; + IStream *stream; + DWORD tid; + HANDLE thread; + static const LARGE_INTEGER zero; + IDispatchEx *dispex = dispex_create(); + DISPPARAMS params; + VARIANTARG args[10]; + INT i; + + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got %08x\n", hr); + tid = start_host_object(stream, &IID_IDispatchEx, (IUnknown *)dispex, MSHLFLAGS_NORMAL, &thread); + IDispatchEx_Release(dispex); + if(tid == 0) + { + IStream_Release(stream); + return; + } + + IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); + hr = CoUnmarshalInterface(stream, &IID_IDispatchEx, (void **)&dispex); + ok(hr == S_OK, "got %08x\n", hr); + IStream_Release(stream); + + params.rgvarg = NULL; + params.rgdispidNamedArgs = NULL; + params.cArgs = 0; + params.cNamedArgs = 0; + hr = IDispatchEx_InvokeEx(dispex, 1, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "got %08x\n", hr); + + params.rgvarg = args; + params.rgdispidNamedArgs = NULL; + params.cArgs = 2; + params.cNamedArgs = 0; + V_VT(&args[0]) = VT_INT; + V_INT(&args[0]) = 0xcafe; + V_VT(&args[1]) = VT_INT | VT_BYREF; + V_INTREF(&args[1]) = &i; + i = 0xbeef; + hr = IDispatchEx_InvokeEx(dispex, 2, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "got %08x\n", hr); + ok(i == 0xdead, "got %08x\n", i); + + /* change one of the argument vts */ + i = 0xbeef; + hr = IDispatchEx_InvokeEx(dispex, 3, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, ¶ms, NULL, NULL, NULL); +todo_wine + ok(hr == DISP_E_BADCALLEE, "got %08x\n", hr); + + hr = IDispatchEx_InvokeEx(dispex, 4, LOCALE_SYSTEM_DEFAULT, 0xffff, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "got %08x\n", hr); + + IDispatchEx_Release(dispex); + end_host_object(tid, thread); +} + +START_TEST(marshal) +{ + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + test_dispex(); + + CoUninitialize(); +} diff --git a/dlls/dispex/usrmarshal.c b/dlls/dispex/usrmarshal.c index 899c35f3b05..cdb1b03da8b 100644 --- a/dlls/dispex/usrmarshal.c +++ b/dlls/dispex/usrmarshal.c @@ -41,18 +41,92 @@ HRESULT CALLBACK IDispatchEx_InvokeEx_Proxy(IDispatchEx* This, DISPID id, LCID l DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { - FIXME("(%p)->(%08x, %04x, %04x, %p, %p, %p, %p): stub\n", This, id, lcid, wFlags, + HRESULT hr; + VARIANT result; + EXCEPINFO excep_info; + UINT byref_args, arg; + VARIANT dummy_arg, *ref_arg = &dummy_arg, *copy_arg, *orig_arg = NULL; + UINT *ref_idx = NULL; + + TRACE("(%p)->(%08x, %04x, %04x, %p, %p, %p, %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); - return E_NOTIMPL; + + if(!pvarRes) pvarRes = &result; + if(!pei) pei = &excep_info; + + for(arg = 0, byref_args = 0; arg < pdp->cArgs; arg++) + if(V_ISBYREF(pdp->rgvarg + arg)) byref_args++; + + if(byref_args) + { + DWORD size = pdp->cArgs * sizeof(VARIANT) + + byref_args * (sizeof(VARIANT) + sizeof(UINT)); + + copy_arg = CoTaskMemAlloc(size); + if(!copy_arg) return E_OUTOFMEMORY; + + ref_arg = copy_arg + pdp->cArgs; + ref_idx = (UINT*)(ref_arg + byref_args); + + /* copy the byref args to ref_arg[], the others go to copy_arg[] */ + for(arg = 0, byref_args = 0; arg < pdp->cArgs; arg++) + { + if(V_ISBYREF(pdp->rgvarg + arg)) + { + ref_arg[byref_args] = pdp->rgvarg[arg]; + ref_idx[byref_args] = arg; + VariantInit(copy_arg + arg); + byref_args++; + } + else + copy_arg[arg] = pdp->rgvarg[arg]; + } + + orig_arg = pdp->rgvarg; + pdp->rgvarg = copy_arg; + } + + hr = IDispatchEx_RemoteInvokeEx_Proxy(This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller, + byref_args, ref_idx, ref_arg); + + if(byref_args) + { + CoTaskMemFree(pdp->rgvarg); + pdp->rgvarg = orig_arg; + } + + if(pvarRes == &result) VariantClear(pvarRes); + if(pei == &excep_info) + { + SysFreeString(pei->bstrSource); + SysFreeString(pei->bstrDescription); + SysFreeString(pei->bstrHelpFile); + } + + return hr; } HRESULT __RPC_STUB IDispatchEx_InvokeEx_Stub(IDispatchEx* This, DISPID id, LCID lcid, DWORD dwFlags, - DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, - IServiceProvider *pspCaller, UINT cvarRefArg, - UINT *rgiRefArg, VARIANT *rgvarRefArg) + DISPPARAMS *pdp, VARIANT *result, EXCEPINFO *pei, + IServiceProvider *pspCaller, UINT byref_args, + UINT *ref_idx, VARIANT *ref_arg) { - FIXME("(%p)->(%08x, %04x, %08x, %p, %p, %p, %p, %d, %p, %p): stub\n", This, id, lcid, dwFlags, - pdp, pvarRes, pei, pspCaller, cvarRefArg, rgiRefArg, rgvarRefArg); - return E_NOTIMPL; + HRESULT hr; + UINT arg; + + TRACE("(%p)->(%08x, %04x, %08x, %p, %p, %p, %p, %d, %p, %p)\n", This, id, lcid, dwFlags, + pdp, result, pei, pspCaller, byref_args, ref_idx, ref_arg); + + VariantInit(result); + memset(pei, 0, sizeof(*pei)); + + for(arg = 0; arg < byref_args; arg++) + pdp->rgvarg[ref_idx[arg]] = ref_arg[arg]; + + hr = IDispatchEx_InvokeEx(This, id, lcid, dwFlags, pdp, result, pei, pspCaller); + + for(arg = 0; arg < byref_args; arg++) + VariantInit(pdp->rgvarg + ref_idx[arg]); + return hr; } diff --git a/dlls/display.drv16/Makefile.in b/dlls/display.drv16/Makefile.in index 96194c61103..4a451fed691 100644 --- a/dlls/display.drv16/Makefile.in +++ b/dlls/display.drv16/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = display.c RC_SRCS = display.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmband/Makefile.in b/dlls/dmband/Makefile.in index f749373f914..42bb92de886 100644 --- a/dlls/dmband/Makefile.in +++ b/dlls/dmband/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmcompos/Makefile.in b/dlls/dmcompos/Makefile.in index 9b51cd9be21..6eeb8f9d329 100644 --- a/dlls/dmcompos/Makefile.in +++ b/dlls/dmcompos/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmime/Makefile.in b/dlls/dmime/Makefile.in index 1248e022741..12b0b9fd78b 100644 --- a/dlls/dmime/Makefile.in +++ b/dlls/dmime/Makefile.in @@ -27,5 +27,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmloader/Makefile.in b/dlls/dmloader/Makefile.in index 0edebeea197..f10c418b84e 100644 --- a/dlls/dmloader/Makefile.in +++ b/dlls/dmloader/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmloader/tests/Makefile.in b/dlls/dmloader/tests/Makefile.in index d05776c7878..c838c3809f7 100644 --- a/dlls/dmloader/tests/Makefile.in +++ b/dlls/dmloader/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ loader.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmscript/Makefile.in b/dlls/dmscript/Makefile.in index 1f99f5c9d07..1d4d842a431 100644 --- a/dlls/dmscript/Makefile.in +++ b/dlls/dmscript/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmstyle/Makefile.in b/dlls/dmstyle/Makefile.in index c85a76cd0ba..8b8658fe8c4 100644 --- a/dlls/dmstyle/Makefile.in +++ b/dlls/dmstyle/Makefile.in @@ -20,5 +20,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmsynth/Makefile.in b/dlls/dmsynth/Makefile.in index 03db464c81e..ba6df17699d 100644 --- a/dlls/dmsynth/Makefile.in +++ b/dlls/dmsynth/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmusic/Makefile.in b/dlls/dmusic/Makefile.in index e84696a18ff..d6a5a7a3c94 100644 --- a/dlls/dmusic/Makefile.in +++ b/dlls/dmusic/Makefile.in @@ -20,5 +20,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dmusic32/Makefile.in b/dlls/dmusic32/Makefile.in index 7d358e33d47..8fe9e25d8e6 100644 --- a/dlls/dmusic32/Makefile.in +++ b/dlls/dmusic32/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dnsapi/Makefile.in b/dlls/dnsapi/Makefile.in index a55881a48df..594db95c358 100644 --- a/dlls/dnsapi/Makefile.in +++ b/dlls/dnsapi/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ record.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dnsapi/tests/Makefile.in b/dlls/dnsapi/tests/Makefile.in index 64989b0e2e1..eb02a5fdd1d 100644 --- a/dlls/dnsapi/tests/Makefile.in +++ b/dlls/dnsapi/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ record.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dplay/Makefile.in b/dlls/dplay/Makefile.in index 59f6bf130bb..4d9505eb49c 100644 --- a/dlls/dplay/Makefile.in +++ b/dlls/dplay/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = dplayx kernel32 RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dplayx/Makefile.in b/dlls/dplayx/Makefile.in index 525ff8579c2..036c557a096 100644 --- a/dlls/dplayx/Makefile.in +++ b/dlls/dplayx/Makefile.in @@ -22,5 +22,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dplayx/tests/Makefile.in b/dlls/dplayx/tests/Makefile.in index b062a555ea4..ba381e4d264 100644 --- a/dlls/dplayx/tests/Makefile.in +++ b/dlls/dplayx/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ dplayx.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dpnaddr/Makefile.in b/dlls/dpnaddr/Makefile.in index 7bd5901afb0..517a8c21bee 100644 --- a/dlls/dpnaddr/Makefile.in +++ b/dlls/dpnaddr/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = dpnet kernel32 RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dpnet/Makefile.in b/dlls/dpnet/Makefile.in index 49ce6b68f80..f485e6c2add 100644 --- a/dlls/dpnet/Makefile.in +++ b/dlls/dpnet/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dpnhpast/Makefile.in b/dlls/dpnhpast/Makefile.in index 3cd391018dd..8750bf01b2c 100644 --- a/dlls/dpnhpast/Makefile.in +++ b/dlls/dpnhpast/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dpnlobby/Makefile.in b/dlls/dpnlobby/Makefile.in index d8a5f50118f..902eae6137a 100644 --- a/dlls/dpnlobby/Makefile.in +++ b/dlls/dpnlobby/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = dpnet kernel32 RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dpwsockx/Makefile.in b/dlls/dpwsockx/Makefile.in index bb020898dda..acc311c51bd 100644 --- a/dlls/dpwsockx/Makefile.in +++ b/dlls/dpwsockx/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ dpwsockx_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/drmclien/Makefile.in b/dlls/drmclien/Makefile.in index 86dcc389784..6f7ad12954a 100644 --- a/dlls/drmclien/Makefile.in +++ b/dlls/drmclien/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dsound/Makefile.in b/dlls/dsound/Makefile.in index bbac7f905f4..897062f8cfe 100644 --- a/dlls/dsound/Makefile.in +++ b/dlls/dsound/Makefile.in @@ -22,5 +22,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index d014c4b8655..698e5861749 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -599,7 +599,9 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD writepos, DWORD mi { /* Should *NEVER* happen */ ERR("Fatal error. Under/Overflow? primary_done=%d, mixpos=%d/%d (%d/%d), primary_mixpos=%d, writepos=%d, mixlen=%d\n", primary_done,dsb->buf_mixpos,dsb->tmp_buffer_len,dsb->sec_mixpos, dsb->buflen, dsb->primary_mixpos, writepos, mixlen); - return 0; + dsb->primary_mixpos = writepos + mixlen; + dsb->primary_mixpos %= dsb->device->buflen; + return mixlen; } /* take into account already mixed data */ diff --git a/dlls/dsound/tests/Makefile.in b/dlls/dsound/tests/Makefile.in index 340cca386eb..d686b805b16 100644 --- a/dlls/dsound/tests/Makefile.in +++ b/dlls/dsound/tests/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ propset.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dssenh/Makefile.in b/dlls/dssenh/Makefile.in index 69aa6635f4a..cdab9e71f8c 100644 --- a/dlls/dssenh/Makefile.in +++ b/dlls/dssenh/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dswave/Makefile.in b/dlls/dswave/Makefile.in index fb2e28aba10..df068a3d681 100644 --- a/dlls/dswave/Makefile.in +++ b/dlls/dswave/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dwmapi/Makefile.in b/dlls/dwmapi/Makefile.in index 1868eb2d92d..76070c4ae17 100644 --- a/dlls/dwmapi/Makefile.in +++ b/dlls/dwmapi/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxdiagn/Makefile.in b/dlls/dxdiagn/Makefile.in index c69df4e2f7f..dd0d8daad28 100644 --- a/dlls/dxdiagn/Makefile.in +++ b/dlls/dxdiagn/Makefile.in @@ -16,5 +16,3 @@ RC_SRCS = version.rc IDL_H_SRCS = fil_data.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c index e02d1d13cf3..06821454e91 100644 --- a/dlls/dxdiagn/container.c +++ b/dlls/dxdiagn/container.c @@ -88,28 +88,27 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAI IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; IDxDiagContainerImpl_SubContainer* p = NULL; DWORD i = 0; - - TRACE("(%p, %u, %s, %u)\n", iface, dwIndex, debugstr_w(pwszContainer), cchContainer); - if (NULL == pwszContainer) { + TRACE("(%p, %u, %p, %u)\n", iface, dwIndex, pwszContainer, cchContainer); + + if (NULL == pwszContainer || 0 == cchContainer) { return E_INVALIDARG; } - if (256 > cchContainer) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } - + p = This->subContainers; while (NULL != p) { - if (dwIndex == i) { - if (cchContainer <= strlenW(p->contName)) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } + if (dwIndex == i) { + TRACE("Found container name %s, copying string\n", debugstr_w(p->contName)); lstrcpynW(pwszContainer, p->contName, cchContainer); - return S_OK; + return (cchContainer <= strlenW(p->contName)) ? + DXDIAG_E_INSUFFICIENT_BUFFER : S_OK; } p = p->next; ++i; - } + } + + TRACE("Failed to find container name at specified index\n"); + *pwszContainer = '\0'; return E_INVALIDARG; } @@ -130,7 +129,7 @@ static HRESULT IDxDiagContainerImpl_GetChildContainerInternal(PDXDIAGCONTAINER i static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) { IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainer* pContainer = NULL; + IDxDiagContainer* pContainer = (PDXDIAGCONTAINER)This; LPWSTR tmp, orig_tmp; INT tmp_len; WCHAR* cur; @@ -142,7 +141,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER if return E_INVALIDARG; } - pContainer = (PDXDIAGCONTAINER) This; + *ppInstance = NULL; tmp_len = strlenW(pwszContainer) + 1; orig_tmp = tmp = HeapAlloc(GetProcessHeap(), 0, tmp_len * sizeof(WCHAR)); @@ -152,6 +151,8 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER if cur = strchrW(tmp, '.'); while (NULL != cur) { *cur = '\0'; /* cut tmp string to '.' */ + if (!*(cur + 1)) break; /* Account for a lone terminating period, as in "cont1.cont2.". */ + TRACE("Trying to get parent container %s\n", debugstr_w(tmp)); hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer); if (FAILED(hr) || NULL == pContainer) goto on_error; @@ -160,8 +161,10 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER if cur = strchrW(tmp, '.'); } + TRACE("Trying to get container %s\n", debugstr_w(tmp)); hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, ppInstance); if (SUCCEEDED(hr)) { + TRACE("Succeeded in getting the container instance\n"); IDxDiagContainerImpl_AddRef(*ppInstance); } @@ -184,28 +187,25 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; IDxDiagContainerImpl_Property* p = NULL; DWORD i = 0; - - TRACE("(%p, %u, %s, %u)\n", iface, dwIndex, debugstr_w(pwszPropName), cchPropName); - if (NULL == pwszPropName) { + TRACE("(%p, %u, %p, %u)\n", iface, dwIndex, pwszPropName, cchPropName); + + if (NULL == pwszPropName || 0 == cchPropName) { return E_INVALIDARG; } - if (256 > cchPropName) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } - + p = This->properties; while (NULL != p) { - if (dwIndex == i) { - if (cchPropName <= strlenW(p->vName)) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } + if (dwIndex == i) { + TRACE("Found property name %s, copying string\n", debugstr_w(p->vName)); lstrcpynW(pwszPropName, p->vName, cchPropName); - return S_OK; + return (cchPropName <= strlenW(p->vName)) ? + DXDIAG_E_INSUFFICIENT_BUFFER : S_OK; } p = p->next; ++i; - } + } + TRACE("Failed to find property name at specified index\n"); return E_INVALIDARG; } diff --git a/dlls/dxdiagn/tests/Makefile.in b/dlls/dxdiagn/tests/Makefile.in index 401b4ad41df..69f45fd614a 100644 --- a/dlls/dxdiagn/tests/Makefile.in +++ b/dlls/dxdiagn/tests/Makefile.in @@ -6,8 +6,7 @@ TESTDLL = dxdiagn.dll IMPORTS = ole32 kernel32 C_SRCS = \ + container.c \ provider.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c new file mode 100644 index 00000000000..e5257091ccf --- /dev/null +++ b/dlls/dxdiagn/tests/container.c @@ -0,0 +1,540 @@ +/* + * Unit tests for IDxDiagContainer + * + * Copyright 2010 Andrew Nguyen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include +#include "dxdiag.h" +#include "wine/test.h" + +static IDxDiagProvider *pddp; +static IDxDiagContainer *pddc; + +static BOOL create_root_IDxDiagContainer(void) +{ + HRESULT hr; + DXDIAG_INIT_PARAMS params; + + hr = CoCreateInstance(&CLSID_DxDiagProvider, NULL, CLSCTX_INPROC_SERVER, + &IID_IDxDiagProvider, (LPVOID*)&pddp); + if (SUCCEEDED(hr)) + { + params.dwSize = sizeof(params); + params.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION; + params.bAllowWHQLChecks = FALSE; + params.pReserved = NULL; + hr = IDxDiagProvider_Initialize(pddp, ¶ms); + if (SUCCEEDED(hr)) + { + hr = IDxDiagProvider_GetRootContainer(pddp, &pddc); + if (SUCCEEDED(hr)) + return TRUE; + } + IDxDiagProvider_Release(pddp); + } + return FALSE; +} + +static void test_GetNumberOfChildContainers(void) +{ + HRESULT hr; + DWORD count; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, NULL); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08x\n", hr); + + hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); + ok(hr == S_OK, + "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + if (hr == S_OK) + ok(count != 0, "Expected the number of child containers for the root container to be non-zero\n"); + + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + +static void test_GetNumberOfProps(void) +{ + HRESULT hr; + DWORD count; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + hr = IDxDiagContainer_GetNumberOfProps(pddc, NULL); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08x\n", hr); + + hr = IDxDiagContainer_GetNumberOfProps(pddc, &count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + if (hr == S_OK) + ok(count == 0, "Expected the number of properties for the root container to be zero\n"); + + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + +static void test_EnumChildContainerNames(void) +{ + HRESULT hr; + WCHAR container[256]; + DWORD maxcount, index; + static const WCHAR testW[] = {'t','e','s','t',0}; + static const WCHAR zerotestW[] = {0,'e','s','t',0}; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + /* Test various combinations of invalid parameters. */ + hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, NULL, 0); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + + hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, NULL, sizeof(container)/sizeof(WCHAR)); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + + /* Test the conditions in which the output buffer can be modified. */ + memcpy(container, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, 0); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(!memcmp(container, testW, sizeof(testW)), + "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container)); + + memcpy(container, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumChildContainerNames(pddc, ~0, container, 0); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(!memcmp(container, testW, sizeof(testW)), + "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container)); + + memcpy(container, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumChildContainerNames(pddc, ~0, container, sizeof(container)/sizeof(WCHAR)); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(!memcmp(container, zerotestW, sizeof(zerotestW)), + "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container)); + + hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &maxcount); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + if (FAILED(hr)) + { + skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); + goto cleanup; + } + + trace("Starting child container enumeration of the root container:\n"); + + /* We should be able to enumerate as many child containers as the value + * that IDxDiagContainer::GetNumberOfChildContainers returns. */ + for (index = 0; index <= maxcount; index++) + { + /* A buffer size of 1 is unlikely to be valid, as only a null terminator + * could be stored, and it is unlikely that a container name could be empty. */ + DWORD buffersize = 1; + memcpy(container, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, buffersize); + if (hr == E_INVALIDARG) + { + /* We should get here when index is one more than the maximum index value. */ + ok(maxcount == index, + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG " + "on the last index %d, got 0x%08x\n", index, hr); + ok(container[0] == '\0', + "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container)); + break; + } + else if (hr == DXDIAG_E_INSUFFICIENT_BUFFER) + { + WCHAR temp[256]; + + ok(container[0] == '\0', + "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container)); + + /* Get the container name to compare against. */ + hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, temp, sizeof(temp)/sizeof(WCHAR)); + ok(hr == S_OK, + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + + /* Show that the DirectX SDK's stipulation that the buffer be at + * least 256 characters long is a mere suggestion, and smaller sizes + * can be acceptable also. IDxDiagContainer::EnumChildContainerNames + * doesn't provide a way of getting the exact size required, so the + * buffersize value will be iterated to at most 256 characters. */ + for (buffersize = 2; buffersize <= 256; buffersize++) + { + memcpy(container, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, buffersize); + if (hr != DXDIAG_E_INSUFFICIENT_BUFFER) + break; + + ok(!memcmp(temp, container, sizeof(WCHAR)*(buffersize - 1)), + "Expected truncated container name string, got %s\n", wine_dbgstr_w(container)); + } + + ok(hr == S_OK, + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, " + "got hr = 0x%08x, buffersize = %d\n", hr, buffersize); + if (hr == S_OK) + trace("pddc[%d] = %s, length = %d\n", index, wine_dbgstr_w(container), buffersize); + } + else + { + ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr); + break; + } + } + +cleanup: + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + +static void test_GetChildContainer(void) +{ + HRESULT hr; + WCHAR container[256] = {0}; + IDxDiagContainer *child; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + /* Test various combinations of invalid parameters. */ + hr = IDxDiagContainer_GetChildContainer(pddc, NULL, NULL); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + + child = (void*)0xdeadbeef; + hr = IDxDiagContainer_GetChildContainer(pddc, NULL, &child); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + ok(child == (void*)0xdeadbeef, "Expected output pointer to be unchanged, got %p\n", child); + + hr = IDxDiagContainer_GetChildContainer(pddc, container, NULL); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + + child = (void*)0xdeadbeef; + hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); + ok(hr == E_INVALIDARG, + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + ok(child == NULL, "Expected output pointer to be NULL, got %p\n", child); + + /* Get the name of a suitable child container. */ + hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, sizeof(container)/sizeof(WCHAR)); + ok(hr == S_OK, + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + if (FAILED(hr)) + { + skip("IDxDiagContainer::EnumChildContainerNames failed\n"); + goto cleanup; + } + + child = (void*)0xdeadbeef; + hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); + ok(hr == S_OK, + "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(child != NULL && child != (void*)0xdeadbeef, "Expected a valid output pointer, got %p\n", child); + + if (SUCCEEDED(hr)) + { + IDxDiagContainer *ptr; + + /* Show that IDxDiagContainer::GetChildContainer returns a different pointer + * for multiple calls for the same container name. */ + hr = IDxDiagContainer_GetChildContainer(pddc, container, &ptr); + ok(hr == S_OK, + "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + if (SUCCEEDED(hr)) + todo_wine ok(ptr != child, "Expected the two pointers (%p vs. %p) to be unequal", child, ptr); + + IDxDiagContainer_Release(ptr); + IDxDiagContainer_Release(child); + } + +cleanup: + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + +static void test_dot_parsing(void) +{ + HRESULT hr; + WCHAR containerbufW[256] = {0}, childbufW[256] = {0}; + DWORD count, index; + size_t i; + static const struct + { + const char *format; + const HRESULT expect; + } test_strings[] = { + { "%s.%s", S_OK }, + { "%s.%s.", S_OK }, + { ".%s.%s", E_INVALIDARG }, + { "%s.%s..", E_INVALIDARG }, + { ".%s.%s.", E_INVALIDARG }, + { "..%s.%s", E_INVALIDARG }, + }; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + /* Find a container with a child container of its own. */ + hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + if (FAILED(hr)) + { + skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); + goto cleanup; + } + + for (index = 0; index < count; index++) + { + IDxDiagContainer *child; + + hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, containerbufW, sizeof(containerbufW)/sizeof(WCHAR)); + ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + if (FAILED(hr)) + { + skip("IDxDiagContainer::EnumChildContainerNames failed\n"); + goto cleanup; + } + + hr = IDxDiagContainer_GetChildContainer(pddc, containerbufW, &child); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + + if (SUCCEEDED(hr)) + { + hr = IDxDiagContainer_EnumChildContainerNames(child, 0, childbufW, sizeof(childbufW)/sizeof(WCHAR)); + ok(hr == S_OK || hr == E_INVALIDARG, + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr); + IDxDiagContainer_Release(child); + + if (SUCCEEDED(hr)) + break; + } + } + + if (!*containerbufW || !*childbufW) + { + skip("Unable to find a suitable container\n"); + goto cleanup; + } + + trace("Testing IDxDiagContainer::GetChildContainer dot parsing with container %s and child container %s.\n", + wine_dbgstr_w(containerbufW), wine_dbgstr_w(childbufW)); + + for (i = 0; i < sizeof(test_strings)/sizeof(test_strings[0]); i++) + { + IDxDiagContainer *child; + char containerbufA[256]; + char childbufA[256]; + char dotbufferA[255 + 255 + 3 + 1]; + WCHAR dotbufferW[255 + 255 + 3 + 1]; /* containerbuf + childbuf + dots + null terminator */ + + WideCharToMultiByte(CP_ACP, 0, containerbufW, -1, containerbufA, sizeof(containerbufA), NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, childbufW, -1, childbufA, sizeof(childbufA), NULL, NULL); + sprintf(dotbufferA, test_strings[i].format, containerbufA, childbufA); + MultiByteToWideChar(CP_ACP, 0, dotbufferA, -1, dotbufferW, sizeof(dotbufferW)/sizeof(WCHAR)); + + trace("Trying container name %s\n", wine_dbgstr_w(dotbufferW)); + hr = IDxDiagContainer_GetChildContainer(pddc, dotbufferW, &child); + ok(hr == test_strings[i].expect, + "Expected IDxDiagContainer::GetChildContainer to return 0x%08x for %s, got 0x%08x\n", + test_strings[i].expect, wine_dbgstr_w(dotbufferW), hr); + if (SUCCEEDED(hr)) + IDxDiagContainer_Release(child); + } + +cleanup: + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + +static void test_EnumPropNames(void) +{ + HRESULT hr; + WCHAR container[256], property[256]; + IDxDiagContainer *child = NULL; + DWORD count, index, propcount; + static const WCHAR testW[] = {'t','e','s','t',0}; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + /* Find a container with a non-zero number of properties. */ + hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + if (FAILED(hr)) + { + skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); + goto cleanup; + } + + for (index = 0; index < count; index++) + { + hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, sizeof(container)/sizeof(WCHAR)); + ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + if (FAILED(hr)) + { + skip("IDxDiagContainer::EnumChildContainerNames failed\n"); + goto cleanup; + } + + hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + + if (SUCCEEDED(hr)) + { + hr = IDxDiagContainer_GetNumberOfProps(child, &propcount); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + + if (!propcount) + { + IDxDiagContainer_Release(child); + child = NULL; + } + else + break; + } + } + + if (!child) + { + skip("Unable to find a container with non-zero property count\n"); + goto cleanup; + } + + hr = IDxDiagContainer_EnumPropNames(child, ~0, NULL, 0); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr); + + memcpy(property, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumPropNames(child, ~0, property, 0); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(!memcmp(property, testW, sizeof(testW)), + "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property)); + + memcpy(property, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumPropNames(child, ~0, property, sizeof(property)/sizeof(WCHAR)); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(!memcmp(property, testW, sizeof(testW)), + "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property)); + + trace("Starting property enumeration of the %s container:\n", wine_dbgstr_w(container)); + + /* We should be able to enumerate as many properties as the value that + * IDxDiagContainer::GetNumberOfProps returns. */ + for (index = 0; index <= propcount; index++) + { + /* A buffer size of 1 is unlikely to be valid, as only a null terminator + * could be stored, and it is unlikely that a property name could be empty. */ + DWORD buffersize = 1; + + memcpy(property, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumPropNames(child, index, property, buffersize); + if (hr == E_INVALIDARG) + { + /* We should get here when index is one more than the maximum index value. */ + ok(propcount == index, + "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG " + "on the last index %d, got 0x%08x\n", index, hr); + ok(!memcmp(property, testW, sizeof(testW)), + "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property)); + break; + } + else if (hr == DXDIAG_E_INSUFFICIENT_BUFFER) + { + WCHAR temp[256]; + + ok(property[0] == '\0', + "Expected the property buffer string to be empty, got %s\n", wine_dbgstr_w(property)); + hr = IDxDiagContainer_EnumPropNames(child, index, temp, sizeof(temp)/sizeof(WCHAR)); + ok(hr == S_OK, + "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08x\n", hr); + + /* Show that the DirectX SDK's stipulation that the buffer be at + * least 256 characters long is a mere suggestion, and smaller sizes + * can be acceptable also. IDxDiagContainer::EnumPropNames doesn't + * provide a way of getting the exact size required, so the buffersize + * value will be iterated to at most 256 characters. */ + for (buffersize = 2; buffersize <= 256; buffersize++) + { + memcpy(property, testW, sizeof(testW)); + hr = IDxDiagContainer_EnumPropNames(child, index, property, buffersize); + if (hr != DXDIAG_E_INSUFFICIENT_BUFFER) + break; + + ok(!memcmp(temp, property, sizeof(WCHAR)*(buffersize - 1)), + "Expected truncated property name string, got %s\n", wine_dbgstr_w(property)); + } + + ok(hr == S_OK, + "Expected IDxDiagContainer::EnumPropNames to return S_OK, " + "got hr = 0x%08x, buffersize = %d\n", hr, buffersize); + if (hr == S_OK) + trace("child[%d] = %s, length = %d\n", index, wine_dbgstr_w(property), buffersize); + } + else + { + ok(0, "IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08x\n", hr); + break; + } + } + + IDxDiagContainer_Release(child); + +cleanup: + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + +START_TEST(container) +{ + CoInitialize(NULL); + test_GetNumberOfChildContainers(); + test_GetNumberOfProps(); + test_EnumChildContainerNames(); + test_GetChildContainer(); + test_dot_parsing(); + test_EnumPropNames(); + CoUninitialize(); +} diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in index c5e6d525792..aadeffbc6ed 100644 --- a/dlls/dxerr8/Makefile.in +++ b/dlls/dxerr8/Makefile.in @@ -8,5 +8,3 @@ C_SRCS = \ dxerr8.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in index 460ff7f04a7..d7dfeb3caae 100644 --- a/dlls/dxerr9/Makefile.in +++ b/dlls/dxerr9/Makefile.in @@ -8,5 +8,3 @@ C_SRCS = \ dxerr9.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxgi/Makefile.in b/dlls/dxgi/Makefile.in index 7ad2ac26815..71b287aed66 100644 --- a/dlls/dxgi/Makefile.in +++ b/dlls/dxgi/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxgi/tests/Makefile.in b/dlls/dxgi/tests/Makefile.in index db14728de93..1a2927e0782 100644 --- a/dlls/dxgi/tests/Makefile.in +++ b/dlls/dxgi/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ device.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in index e202d3b21b4..e2192179f8d 100644 --- a/dlls/dxguid/Makefile.in +++ b/dlls/dxguid/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ dxguid.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/faultrep/Makefile.in b/dlls/faultrep/Makefile.in index f521178ccce..7e3484b17e7 100644 --- a/dlls/faultrep/Makefile.in +++ b/dlls/faultrep/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = advapi32 kernel32 C_SRCS = faultrep.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/fltlib/Makefile.in b/dlls/fltlib/Makefile.in index f0addf165ab..e114f57b8a0 100644 --- a/dlls/fltlib/Makefile.in +++ b/dlls/fltlib/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ fltlib.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/fusion/Makefile.in b/dlls/fusion/Makefile.in index 788e1883203..17ad08fc64f 100644 --- a/dlls/fusion/Makefile.in +++ b/dlls/fusion/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ fusion_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/fusion/tests/Makefile.in b/dlls/fusion/tests/Makefile.in index ea330d7c536..890c72e45e7 100644 --- a/dlls/fusion/tests/Makefile.in +++ b/dlls/fusion/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ fusion.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/fwpuclnt/Makefile.in b/dlls/fwpuclnt/Makefile.in index d682f9cdad6..7ed5d24f69a 100644 --- a/dlls/fwpuclnt/Makefile.in +++ b/dlls/fwpuclnt/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gdi.exe16/Makefile.in b/dlls/gdi.exe16/Makefile.in index c1f2e1e8caa..14198768ff2 100644 --- a/dlls/gdi.exe16/Makefile.in +++ b/dlls/gdi.exe16/Makefile.in @@ -18,5 +18,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 18dbdef6e9f..8ca4f0318be 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -53,5 +53,3 @@ EXTRASUBDIRS = \ mfdrv @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index dfb8916aa41..937a67d32ac 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -436,11 +436,13 @@ LONG WINAPI SetBitmapBits( LONG count, /* [in] Number of bytes in bitmap array */ LPCVOID bits) /* [in] Address of array with bitmap bits */ { - BITMAPOBJ *bmp = GDI_GetObjPtr( hbitmap, OBJ_BITMAP ); + BITMAPOBJ *bmp; LONG height, ret; - if ((!bmp) || (!bits)) - return 0; + if (!bits) return 0; + + bmp = GDI_GetObjPtr( hbitmap, OBJ_BITMAP ); + if (!bmp) return 0; if (count < 0) { WARN("(%d): Negative number of bytes passed???\n", count ); diff --git a/dlls/gdi32/tests/Makefile.in b/dlls/gdi32/tests/Makefile.in index f13b3ac7e80..77c8327d47d 100644 --- a/dlls/gdi32/tests/Makefile.in +++ b/dlls/gdi32/tests/Makefile.in @@ -21,5 +21,3 @@ C_SRCS = \ pen.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gdiplus/Makefile.in b/dlls/gdiplus/Makefile.in index 87f8b6a1e58..c1f9032cc67 100644 --- a/dlls/gdiplus/Makefile.in +++ b/dlls/gdiplus/Makefile.in @@ -23,5 +23,3 @@ C_SRCS = \ stringformat.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index abcc47f8666..287d9d8ce65 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -838,7 +838,10 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, (*texture)->brush.gdibrush = CreateBrushIndirect(&(*texture)->brush.lb); (*texture)->brush.bt = BrushTypeTextureFill; - (*texture)->wrap = imageattr->wrap; + if (imageattr) + (*texture)->wrap = imageattr->wrap; + else + (*texture)->wrap = WrapModeTile; (*texture)->image = new_image; exit: diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index d72d4cfbb8a..58f3c6570be 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2108,6 +2108,8 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile * metafile, if(!(calls++)) FIXME("not implemented\n"); + memset(header, 0, sizeof(MetafileHeader)); + return Ok; } @@ -2194,6 +2196,7 @@ struct image_format_dimension image_format_dimensions[] = {NULL} }; +/* FIXME: Need to handle multi-framed images */ GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image, GDIPCONST GUID* dimensionID, UINT* count) { @@ -2201,13 +2204,15 @@ GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image, TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count); - if(!image || !dimensionID || !count) + if(!image || !count) return InvalidParameter; if(!(calls++)) - FIXME("not implemented\n"); + FIXME("returning frame count of 1\n"); - return NotImplemented; + *count = 1; + + return Ok; } GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image, diff --git a/dlls/gdiplus/tests/Makefile.in b/dlls/gdiplus/tests/Makefile.in index ba6b75833f6..fd6f061e0f4 100644 --- a/dlls/gdiplus/tests/Makefile.in +++ b/dlls/gdiplus/tests/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ stringformat.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index b2dc9b299fb..e33ff5f610a 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -28,11 +28,13 @@ #define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) #define TABLE_LEN (23) +static HWND hwnd; + static void test_constructor_destructor(void) { GpStatus stat; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); stat = GdipCreateFromHDC(NULL, &graphics); expect(OutOfMemory, stat); @@ -56,7 +58,7 @@ static void test_constructor_destructor(void) stat = GdipDeleteGraphics(NULL); expect(InvalidParameter, stat); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } typedef struct node{ @@ -115,7 +117,7 @@ static void test_save_restore(void) InterpolationMode mode; GpGraphics *graphics1, *graphics2; node * state_log = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); state_a = state_b = state_c = 0xdeadbeef; /* Invalid saving. */ @@ -224,7 +226,7 @@ static void test_save_restore(void) todo_wine check_no_duplicates(state_log); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawArc(void) @@ -232,7 +234,7 @@ static void test_GdipDrawArc(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); /* make a graphics object and pen object */ ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -268,7 +270,7 @@ static void test_GdipDrawArc(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawArcI(void) @@ -276,7 +278,7 @@ static void test_GdipDrawArcI(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); /* make a graphics object and pen object */ ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -312,7 +314,7 @@ static void test_GdipDrawArcI(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_BeginContainer2(void) @@ -334,7 +336,7 @@ static void test_BeginContainer2(void) GpStatus status; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -497,7 +499,7 @@ static void test_BeginContainer2(void) expect(Ok, status); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawBezierI(void) @@ -505,7 +507,7 @@ static void test_GdipDrawBezierI(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); /* make a graphics object and pen object */ ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -535,7 +537,7 @@ static void test_GdipDrawBezierI(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawCurve3(void) @@ -543,7 +545,7 @@ static void test_GdipDrawCurve3(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPointF points[3]; points[0].X = 0; @@ -615,7 +617,7 @@ static void test_GdipDrawCurve3(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawCurve3I(void) @@ -623,7 +625,7 @@ static void test_GdipDrawCurve3I(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPoint points[3]; points[0].X = 0; @@ -695,7 +697,7 @@ static void test_GdipDrawCurve3I(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawCurve2(void) @@ -703,7 +705,7 @@ static void test_GdipDrawCurve2(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPointF points[3]; points[0].X = 0; @@ -762,7 +764,7 @@ static void test_GdipDrawCurve2(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawCurve2I(void) @@ -770,7 +772,7 @@ static void test_GdipDrawCurve2I(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPoint points[3]; points[0].X = 0; @@ -829,7 +831,7 @@ static void test_GdipDrawCurve2I(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawCurve(void) @@ -837,7 +839,7 @@ static void test_GdipDrawCurve(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPointF points[3]; points[0].X = 0; @@ -890,7 +892,7 @@ static void test_GdipDrawCurve(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawCurveI(void) @@ -898,7 +900,7 @@ static void test_GdipDrawCurveI(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPoint points[3]; points[0].X = 0; @@ -951,7 +953,7 @@ static void test_GdipDrawCurveI(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawLineI(void) @@ -959,7 +961,7 @@ static void test_GdipDrawLineI(void) GpStatus status; GpGraphics *graphics = NULL; GpPen *pen = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); /* make a graphics object and pen object */ ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -989,7 +991,7 @@ static void test_GdipDrawLineI(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawLinesI(void) @@ -998,7 +1000,7 @@ static void test_GdipDrawLinesI(void) GpGraphics *graphics = NULL; GpPen *pen = NULL; GpPoint *ptf = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); /* make a graphics object and pen object */ ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -1041,7 +1043,7 @@ static void test_GdipDrawLinesI(void) GdipDeletePen(pen); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_Get_Release_DC(void) @@ -1051,7 +1053,7 @@ static void test_Get_Release_DC(void) GpPen *pen; GpSolidFill *brush; GpPath *path; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); HDC retdc; REAL r; CompositingQuality quality; @@ -1345,14 +1347,14 @@ static void test_Get_Release_DC(void) GdipDeleteMatrix(m); DeleteObject(hrgn); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_transformpoints(void) { GpStatus status; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpPointF ptf[2]; GpPoint pt[2]; @@ -1465,14 +1467,14 @@ static void test_transformpoints(void) expect(18, pt[1].Y); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_get_set_clip(void) { GpStatus status; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpRegion *clip; GpRectF rect; BOOL res; @@ -1544,14 +1546,14 @@ static void test_get_set_clip(void) GdipDeleteRegion(clip); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_isempty(void) { GpStatus status; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpRegion *clip; BOOL res; @@ -1578,7 +1580,7 @@ static void test_isempty(void) GdipDeleteRegion(clip); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_clear(void) @@ -1592,7 +1594,7 @@ static void test_clear(void) static void test_textcontrast(void) { GpStatus status; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpGraphics *graphics; UINT contrast; @@ -1608,7 +1610,7 @@ static void test_textcontrast(void) expect(4, contrast); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipDrawString(void) @@ -1620,7 +1622,7 @@ static void test_GdipDrawString(void) GpStringFormat *format; GpBrush *brush; LOGFONTA logfont; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); static const WCHAR string[] = {'T','e','s','t',0}; memset(&logfont,0,sizeof(logfont)); @@ -1658,7 +1660,7 @@ static void test_GdipDrawString(void) GdipDeleteFont(fnt); GdipDeleteStringFormat(format); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipGetVisibleClipBounds_screen(void) @@ -1758,36 +1760,10 @@ static void test_GdipGetVisibleClipBounds_window(void) GpGraphics *graphics = NULL; GpRectF rectf, window, exp, clipr; GpRect recti; - HWND hwnd; - WNDCLASSA class; HDC hdc; PAINTSTRUCT ps; - HINSTANCE hInstance = GetModuleHandle(NULL); RECT wnd_rect; - window.X = 0; - window.Y = 0; - window.Width = 200; - window.Height = 300; - - class.lpszClassName = "ClipBoundsTestClass"; - class.style = CS_HREDRAW | CS_VREDRAW; - class.lpfnWndProc = DefWindowProcA; - class.hInstance = hInstance; - class.hIcon = LoadIcon(0, IDI_APPLICATION); - class.hCursor = LoadCursor(NULL, IDC_ARROW); - class.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - class.lpszMenuName = 0; - class.cbClsExtra = 0; - class.cbWndExtra = 0; - RegisterClass(&class); - - hwnd = CreateWindow(class.lpszClassName, "ClipboundsTest", - WS_OVERLAPPEDWINDOW, window.X, window.Y, window.Width, window.Height, - NULL, NULL, hInstance, NULL); - - ok(hwnd != NULL, "Expected window to be created\n"); - /* get client area size */ ok(GetClientRect(hwnd, &wnd_rect), "GetClientRect should have succeeded\n"); window.X = wnd_rect.left; @@ -1870,7 +1846,6 @@ static void test_GdipGetVisibleClipBounds_window(void) GdipDeleteGraphics(graphics); EndPaint(hwnd, &ps); - DestroyWindow(hwnd); } static void test_GdipGetVisibleClipBounds(void) @@ -1878,7 +1853,7 @@ static void test_GdipGetVisibleClipBounds(void) GpGraphics* graphics = NULL; GpRectF rectf; GpRect rect; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); GpStatus status; status = GdipCreateFromHDC(hdc, &graphics); @@ -1899,7 +1874,7 @@ static void test_GdipGetVisibleClipBounds(void) expect(InvalidParameter, status); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); test_GdipGetVisibleClipBounds_screen(); test_GdipGetVisibleClipBounds_window(); @@ -1933,7 +1908,7 @@ static void test_GdipIsVisiblePoint(void) { GpStatus status; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); REAL x, y; BOOL val; @@ -2105,14 +2080,14 @@ static void test_GdipIsVisiblePoint(void) ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipIsVisibleRect(void) { GpStatus status; GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); REAL x, y, width, height; BOOL val; @@ -2267,7 +2242,7 @@ static void test_GdipIsVisibleRect(void) ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } static void test_GdipGetNearestColor(void) @@ -2276,7 +2251,7 @@ static void test_GdipGetNearestColor(void) GpGraphics *graphics; GpBitmap *bitmap; ARGB color = 0xdeadbeef; - HDC hdc = GetDC(0); + HDC hdc = GetDC( hwnd ); /* create a graphics object */ ok(hdc != NULL, "Expected HDC to be initialized\n"); @@ -2415,17 +2390,34 @@ static void test_GdipGetNearestColor(void) expect(Ok, status); status = GdipGetNearestColor(graphics, &color); expect(Ok, status); - todo_wine expect(0xffa8b8e8, color); + todo_wine + ok(color == 0xffa8b8e8 || + broken(color == 0xffa0b8e0), /* Win98/WinMe */ + "Expected ffa8b8e8, got %.8x\n", color); GdipDeleteGraphics(graphics); GdipDisposeImage((GpImage*)bitmap); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); } START_TEST(graphics) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + WNDCLASSA class; + + memset( &class, 0, sizeof(class) ); + class.lpszClassName = "gdiplus_test"; + class.style = CS_HREDRAW | CS_VREDRAW; + class.lpfnWndProc = DefWindowProcA; + class.hInstance = GetModuleHandleA(0); + class.hIcon = LoadIcon(0, IDI_APPLICATION); + class.hCursor = LoadCursor(NULL, IDC_ARROW); + class.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + RegisterClassA( &class ); + hwnd = CreateWindowA( "gdiplus_test", "graphics test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, 0, 0, GetModuleHandleA(0), 0 ); + ok(hwnd != NULL, "Expected window to be created\n"); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; @@ -2462,4 +2454,5 @@ START_TEST(graphics) test_fromMemoryBitmap(); GdiplusShutdown(gdiplusToken); + DestroyWindow( hwnd ); } diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 9085ef2cf2d..5f20468fded 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -226,10 +226,23 @@ static void test_GdipImageGetFrameDimensionsCount(void) stat = GdipImageGetFrameDimensionsList((GpImage*)bm, &dimension, 0); expect(InvalidParameter, stat); + stat = GdipImageGetFrameCount(NULL, &dimension, &count); + expect(InvalidParameter, stat); + + /* WinXP crashes on this test */ + if(0) + { + stat = GdipImageGetFrameCount((GpImage*)bm, &dimension, NULL); + expect(InvalidParameter, stat); + } + + stat = GdipImageGetFrameCount((GpImage*)bm, NULL, &count); + expect(Ok, stat); + count = 12345; stat = GdipImageGetFrameCount((GpImage*)bm, &dimension, &count); - todo_wine expect(Ok, stat); - todo_wine expect(1, count); + expect(Ok, stat); + expect(1, count); GdipBitmapSetPixel(bm, 0, 0, 0xffffffff); @@ -828,6 +841,7 @@ static void test_loadwmf(void) GpRectF bounds; GpUnit unit; REAL res = 12345.0; + MetafileHeader header; hglob = GlobalAlloc (0, sizeof(wmfimage)); data = GlobalLock (hglob); @@ -863,6 +877,27 @@ static void test_loadwmf(void) expect(Ok, stat); todo_wine expectf(1440.0, res); + memset(&header, 0, sizeof(header)); + stat = GdipGetMetafileHeaderFromMetafile((GpMetafile*)img, &header); + expect(Ok, stat); + if (stat == Ok) + { + todo_wine expect(MetafileTypeWmfPlaceable, header.Type); + todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size); + todo_wine expect(0x300, header.Version); + expect(0, header.EmfPlusFlags); + todo_wine expectf(1440.0, header.DpiX); + todo_wine expectf(1440.0, header.DpiY); + expect(0, header.X); + expect(0, header.Y); + todo_wine expect(320, header.Width); + todo_wine expect(320, header.Height); + todo_wine expect(1, header.WmfHeader.mtType); + expect(0, header.EmfPlusHeaderSize); + expect(0, header.LogicalDpiX); + expect(0, header.LogicalDpiY); + } + GdipDisposeImage(img); } @@ -874,6 +909,7 @@ static void test_createfromwmf(void) GpRectF bounds; GpUnit unit; REAL res = 12345.0; + MetafileHeader header; hwmf = SetMetaFileBitsEx(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), wmfimage+sizeof(WmfPlaceableFileHeader)); @@ -899,6 +935,27 @@ static void test_createfromwmf(void) expect(Ok, stat); expectf(1440.0, res); + memset(&header, 0, sizeof(header)); + stat = GdipGetMetafileHeaderFromMetafile((GpMetafile*)img, &header); + expect(Ok, stat); + if (stat == Ok) + { + todo_wine expect(MetafileTypeWmfPlaceable, header.Type); + todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size); + todo_wine expect(0x300, header.Version); + expect(0, header.EmfPlusFlags); + todo_wine expectf(1440.0, header.DpiX); + todo_wine expectf(1440.0, header.DpiY); + expect(0, header.X); + expect(0, header.Y); + todo_wine expect(320, header.Width); + todo_wine expect(320, header.Height); + todo_wine expect(1, header.WmfHeader.mtType); + expect(0, header.EmfPlusHeaderSize); + expect(0, header.LogicalDpiX); + expect(0, header.LogicalDpiY); + } + GdipDisposeImage(img); } @@ -1544,7 +1601,7 @@ static void test_multiframegif(void) count = 12345; stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count); - todo_wine expect(Ok, stat); + expect(Ok, stat); todo_wine expect(2, count); /* SelectActiveFrame overwrites our current data */ @@ -1618,8 +1675,8 @@ static void test_multiframegif(void) count = 12345; stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count); - todo_wine expect(Ok, stat); - todo_wine expect(1, count); + expect(Ok, stat); + expect(1, count); GdipDisposeImage((GpImage*)bmp); IStream_Release(stream); diff --git a/dlls/glu32/Makefile.in b/dlls/glu32/Makefile.in index 2fdbd994854..050d2fdbb05 100644 --- a/dlls/glu32/Makefile.in +++ b/dlls/glu32/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ glu.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gphoto2.ds/Makefile.in b/dlls/gphoto2.ds/Makefile.in index 3c1b3be75f0..ef86304b33b 100644 --- a/dlls/gphoto2.ds/Makefile.in +++ b/dlls/gphoto2.ds/Makefile.in @@ -31,5 +31,3 @@ RC_SRCS = \ gphoto2_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/gpkcsp/Makefile.in b/dlls/gpkcsp/Makefile.in index 39d6a9585fe..bb37b6d251b 100644 --- a/dlls/gpkcsp/Makefile.in +++ b/dlls/gpkcsp/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/hal/Makefile.in b/dlls/hal/Makefile.in index 026268adc4e..b5d31d224e5 100644 --- a/dlls/hal/Makefile.in +++ b/dlls/hal/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/hhctrl.ocx/Makefile.in b/dlls/hhctrl.ocx/Makefile.in index 1d7f0a2b55e..52873f5814c 100644 --- a/dlls/hhctrl.ocx/Makefile.in +++ b/dlls/hhctrl.ocx/Makefile.in @@ -41,5 +41,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/hid/Makefile.in b/dlls/hid/Makefile.in index 783c99f38ac..5d69d14f43c 100644 --- a/dlls/hid/Makefile.in +++ b/dlls/hid/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/hlink/Makefile.in b/dlls/hlink/Makefile.in index 59b64de4395..0b02a6d2b6b 100644 --- a/dlls/hlink/Makefile.in +++ b/dlls/hlink/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ link.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/hlink/browse_ctx.c b/dlls/hlink/browse_ctx.c index a5b73c10bc1..1e15c13a543 100644 --- a/dlls/hlink/browse_ctx.c +++ b/dlls/hlink/browse_ctx.c @@ -155,6 +155,9 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface, HlinkBCImpl *This = (HlinkBCImpl*)iface; TRACE("(%p)->(%p)\n", This, phlbwi); + if(!phlbwi) + return E_INVALIDARG; + heap_free(This->BrowseWindowInfo); This->BrowseWindowInfo = heap_alloc(phlbwi->cbSize); memcpy(This->BrowseWindowInfo, phlbwi, phlbwi->cbSize); @@ -165,8 +168,18 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface, static HRESULT WINAPI IHlinkBC_GetBrowseWindowInfo(IHlinkBrowseContext* iface, HLBWINFO *phlbwi) { - FIXME("\n"); - return E_NOTIMPL; + HlinkBCImpl *This = (HlinkBCImpl*)iface; + TRACE("(%p)->(%p)\n", This, phlbwi); + + if(!phlbwi) + return E_INVALIDARG; + + if(!This->BrowseWindowInfo) + phlbwi->cbSize = 0; + else + memcpy(phlbwi, This->BrowseWindowInfo, This->BrowseWindowInfo->cbSize); + + return S_OK; } static HRESULT WINAPI IHlinkBC_SetInitialHlink(IHlinkBrowseContext* iface, diff --git a/dlls/hlink/hlink_main.c b/dlls/hlink/hlink_main.c index d07901aea4a..e96f206645f 100644 --- a/dlls/hlink/hlink_main.c +++ b/dlls/hlink/hlink_main.c @@ -99,6 +99,8 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation, { IHlink *hl = NULL; HRESULT r = S_OK; + WCHAR *hash, *tgt; + const WCHAR *loc; TRACE("%s %s %s %p %i %p %s %p\n", debugstr_w(pwzTarget), debugstr_w(pwzLocation), debugstr_w(pwzFriendlyName), pihlsite, @@ -108,8 +110,44 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation, if (FAILED(r)) return r; - IHlink_SetStringReference(hl, HLINKSETF_TARGET | HLINKSETF_LOCATION, - pwzTarget, pwzLocation); + if (pwzTarget) + { + hash = strchrW(pwzTarget, '#'); + if (hash) + { + if (hash == pwzTarget) + tgt = NULL; + else + { + int tgt_len = hash - pwzTarget; + tgt = heap_alloc((tgt_len + 1) * sizeof(WCHAR)); + if (!tgt) + return E_OUTOFMEMORY; + memcpy(tgt, pwzTarget, tgt_len * sizeof(WCHAR)); + tgt[tgt_len] = 0; + } + if (!pwzLocation) + loc = hash + 1; + else + loc = pwzLocation; + } + else + { + tgt = hlink_strdupW(pwzTarget); + if (!tgt) + return E_OUTOFMEMORY; + loc = pwzLocation; + } + } + else + { + tgt = NULL; + loc = pwzLocation; + } + + IHlink_SetStringReference(hl, HLINKSETF_TARGET | HLINKSETF_LOCATION, tgt, loc); + + heap_free(tgt); if (pwzFriendlyName) IHlink_SetFriendlyName(hl, pwzFriendlyName); diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c index 52197ccf6fd..ffd3cda854b 100644 --- a/dlls/hlink/link.c +++ b/dlls/hlink/link.c @@ -291,7 +291,9 @@ static HRESULT WINAPI IHlink_fnSetStringReference(IHlink* iface, if (grfHLSETF & HLINKSETF_LOCATION) { heap_free(This->Location); - This->Location = hlink_strdupW( pwzLocation ); + This->Location = NULL; + if (pwzLocation && *pwzLocation) + This->Location = hlink_strdupW( pwzLocation ); } return S_OK; diff --git a/dlls/hlink/tests/Makefile.in b/dlls/hlink/tests/Makefile.in index bb2024160ca..38a4b649f5a 100644 --- a/dlls/hlink/tests/Makefile.in +++ b/dlls/hlink/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ hlink.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/hlink/tests/browse_ctx.c b/dlls/hlink/tests/browse_ctx.c index a9b26e72fb7..30cd559402e 100644 --- a/dlls/hlink/tests/browse_ctx.c +++ b/dlls/hlink/tests/browse_ctx.c @@ -80,11 +80,58 @@ static void test_SetInitialHlink(void) IMoniker_Release(dummy); } +static void test_BrowseWindowInfo(void) +{ + IHlinkBrowseContext *bc; + HLBWINFO bwinfo_set, bwinfo_get; + HRESULT hres; + + hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc); + ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres); + + hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, NULL); + ok(hres == E_INVALIDARG, "GetBrowseWindow failed with wrong code: 0x%08x\n", hres); + + hres = IHlinkBrowseContext_SetBrowseWindowInfo(bc, NULL); + ok(hres == E_INVALIDARG, "SetBrowseWindow failed with wrong code: 0x%08x\n", hres); + + memset(&bwinfo_get, -1, sizeof(HLBWINFO)); + + hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get); + ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres); + ok(bwinfo_get.cbSize == 0, "Got wrong size: %x\n", bwinfo_get.cbSize); + + bwinfo_set.cbSize = sizeof(HLBWINFO); + bwinfo_set.grfHLBWIF = HLBWIF_WEBTOOLBARHIDDEN; + bwinfo_set.rcFramePos.left = 1; + bwinfo_set.rcFramePos.right = 2; + bwinfo_set.rcFramePos.top = 3; + bwinfo_set.rcFramePos.bottom = 4; + bwinfo_set.rcDocPos.left = 5; + bwinfo_set.rcDocPos.right = 6; + bwinfo_set.rcDocPos.top = 7; + bwinfo_set.rcDocPos.bottom = 8; + bwinfo_set.hltbinfo.uDockType = 4321; + bwinfo_set.hltbinfo.rcTbPos.left = 9; + bwinfo_set.hltbinfo.rcTbPos.right = 10; + bwinfo_set.hltbinfo.rcTbPos.top = 11; + bwinfo_set.hltbinfo.rcTbPos.bottom = 12; + hres = IHlinkBrowseContext_SetBrowseWindowInfo(bc, &bwinfo_set); + ok(hres == S_OK, "SetBrowseWindowInfo failed: 0x%08x\n", hres); + + memset(&bwinfo_get, 0, sizeof(HLBWINFO)); + + hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get); + ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres); + ok(!memcmp(&bwinfo_set, &bwinfo_get, sizeof(HLBWINFO)), "Set and Get differ"); +} + START_TEST(browse_ctx) { CoInitialize(NULL); test_SetInitialHlink(); + test_BrowseWindowInfo(); CoUninitialize(); } diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c index 30b06f093b3..d454819e57c 100644 --- a/dlls/hlink/tests/hlink.c +++ b/dlls/hlink/tests/hlink.c @@ -1272,12 +1272,12 @@ static void r_getStringRef(unsigned line, IHlink *hlink, const WCHAR *exp_tgt, c if(exp_tgt) ok_(__FILE__,line) (!lstrcmpW(fnd_tgt, exp_tgt), "Found string target should have been %s, was: %s\n", wine_dbgstr_w(exp_tgt), wine_dbgstr_w(fnd_tgt)); else - ok_(__FILE__,line) (exp_tgt == NULL, "Found string target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); + ok_(__FILE__,line) (fnd_tgt == NULL, "Found string target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); if(exp_loc) ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc)); else - ok_(__FILE__,line) (exp_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); + ok_(__FILE__,line) (fnd_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); CoTaskMemFree(fnd_tgt); CoTaskMemFree(fnd_loc); @@ -1305,7 +1305,7 @@ static IMoniker *r_getMonikerRef(unsigned line, IHlink *hlink, IMoniker *exp_tgt if(exp_loc) ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc)); else - ok_(__FILE__,line) (exp_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); + ok_(__FILE__,line) (fnd_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); CoTaskMemFree(fnd_loc); @@ -1363,6 +1363,83 @@ static void test_HlinkMoniker(void) IHlink_Release(hlink); } +static void test_HashLink(void) +{ + IHlink *hlink; + IMoniker *pmk; + const WCHAR hash_targetW[] = {'a','f','i','l','e','#','a','n','a','n','c','h','o','r',0}; + const WCHAR two_hash_targetW[] = {'a','f','i','l','e','#','a','n','a','n','c','h','o','r','#','a','n','o','t','h','e','r',0}; + const WCHAR hash_no_tgtW[] = {'#','a','n','a','n','c','h','o','r',0}; + const WCHAR tgt_partW[] = {'a','f','i','l','e',0}; + const WCHAR loc_partW[] = {'a','n','a','n','c','h','o','r',0}; + const WCHAR two_hash_loc_partW[] = {'a','n','a','n','c','h','o','r','#','a','n','o','t','h','e','r',0}; + const WCHAR test_locW[] = {'t','e','s','t','l','o','c',0}; + HRESULT hres; + + /* simple single hash test */ + hres = HlinkCreateFromString(hash_targetW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); + ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); + ok(hlink != NULL, "Didn't get an hlink\n"); + + if(hlink){ + getStringRef(hlink, tgt_partW, loc_partW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW); + ok(pmk != NULL, "Found moniker should not be NULL\n"); + if(pmk) + IMoniker_Release(pmk); + + setStringRef(hlink, HLINKSETF_TARGET, hash_targetW, NULL); + getStringRef(hlink, hash_targetW, loc_partW); + + IHlink_Release(hlink); + } + + /* two hashes in the target */ + hres = HlinkCreateFromString(two_hash_targetW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); + ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); + ok(hlink != NULL, "Didn't get an hlink\n"); + + if(hlink){ + getStringRef(hlink, tgt_partW, two_hash_loc_partW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, two_hash_loc_partW); + ok(pmk != NULL, "Found moniker should not be NULL\n"); + if(pmk) + IMoniker_Release(pmk); + + IHlink_Release(hlink); + } + + /* target with hash plus a location string */ + hres = HlinkCreateFromString(hash_targetW, test_locW, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); + ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); + ok(hlink != NULL, "Didn't get an hlink\n"); + + if(hlink){ + getStringRef(hlink, tgt_partW, test_locW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, test_locW); + ok(pmk != NULL, "Found moniker should not be NULL\n"); + if(pmk) + IMoniker_Release(pmk); + + IHlink_Release(hlink); + } + + /* target with hash containing no "target part" */ + hres = HlinkCreateFromString(hash_no_tgtW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); + ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); + ok(hlink != NULL, "Didn't get an hlink\n"); + + if(hlink){ + getStringRef(hlink, NULL, loc_partW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW); + ok(pmk == NULL, "Found moniker should be NULL\n"); + if(pmk) + IMoniker_Release(pmk); + + IHlink_Release(hlink); + } +} + START_TEST(hlink) { CoInitialize(NULL); @@ -1377,6 +1454,7 @@ START_TEST(hlink) test_HlinkGetSetMonikerReference(); test_HlinkGetSetStringReference(); test_HlinkMoniker(); + test_HashLink(); CoUninitialize(); } diff --git a/dlls/hnetcfg/Makefile.in b/dlls/hnetcfg/Makefile.in index 4f448bca515..bee4ddff91f 100644 --- a/dlls/hnetcfg/Makefile.in +++ b/dlls/hnetcfg/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ service.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/httpapi/Makefile.in b/dlls/httpapi/Makefile.in index 6d21cd6e250..6c388077243 100644 --- a/dlls/httpapi/Makefile.in +++ b/dlls/httpapi/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ httpapi_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/iccvid/Makefile.in b/dlls/iccvid/Makefile.in index 7096951b37d..e0d98ffa271 100644 --- a/dlls/iccvid/Makefile.in +++ b/dlls/iccvid/Makefile.in @@ -29,5 +29,3 @@ RC_SRCS = \ iccvid_Tr.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/icmp/Makefile.in b/dlls/icmp/Makefile.in index 966a9773cf0..7151649f35f 100644 --- a/dlls/icmp/Makefile.in +++ b/dlls/icmp/Makefile.in @@ -6,5 +6,3 @@ MODULE = icmp.dll IMPORTS = kernel32 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ifsmgr.vxd/Makefile.in b/dlls/ifsmgr.vxd/Makefile.in index 82c3abde2df..4be03dbb776 100644 --- a/dlls/ifsmgr.vxd/Makefile.in +++ b/dlls/ifsmgr.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ ifsmgr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/imaadp32.acm/Makefile.in b/dlls/imaadp32.acm/Makefile.in index 29c06f58a3b..b7daa735553 100644 --- a/dlls/imaadp32.acm/Makefile.in +++ b/dlls/imaadp32.acm/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = winmm user32 kernel32 C_SRCS = imaadp32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/imagehlp/Makefile.in b/dlls/imagehlp/Makefile.in index 6c43efb0db4..157f1d3da33 100644 --- a/dlls/imagehlp/Makefile.in +++ b/dlls/imagehlp/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ modify.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/imagehlp/tests/Makefile.in b/dlls/imagehlp/tests/Makefile.in index 326ddb8a426..3e17a0d5bcf 100644 --- a/dlls/imagehlp/tests/Makefile.in +++ b/dlls/imagehlp/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ integrity.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/imm.dll16/Makefile.in b/dlls/imm.dll16/Makefile.in index a832e39f390..c9f8a576c95 100644 --- a/dlls/imm.dll16/Makefile.in +++ b/dlls/imm.dll16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,imm32.dll @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/imm32/Makefile.in b/dlls/imm32/Makefile.in index 52a55159fbb..2a0d2b68145 100644 --- a/dlls/imm32/Makefile.in +++ b/dlls/imm32/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/imm32/tests/Makefile.in b/dlls/imm32/tests/Makefile.in index d94d556c5bf..1bb90650f5a 100644 --- a/dlls/imm32/tests/Makefile.in +++ b/dlls/imm32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ imm32.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/inetcomm/Makefile.in b/dlls/inetcomm/Makefile.in index 802b3d27f3c..1c643aa1545 100644 --- a/dlls/inetcomm/Makefile.in +++ b/dlls/inetcomm/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ smtptransport.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/inetcomm/tests/Makefile.in b/dlls/inetcomm/tests/Makefile.in index 620b62036a5..9c72c97a0da 100644 --- a/dlls/inetcomm/tests/Makefile.in +++ b/dlls/inetcomm/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ mimeole.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/inetmib1/Makefile.in b/dlls/inetmib1/Makefile.in index 3998f0023bf..70b2d03fcf9 100644 --- a/dlls/inetmib1/Makefile.in +++ b/dlls/inetmib1/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/inetmib1/tests/Makefile.in b/dlls/inetmib1/tests/Makefile.in index 727068d1d8e..2dd6f635371 100644 --- a/dlls/inetmib1/tests/Makefile.in +++ b/dlls/inetmib1/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/infosoft/Makefile.in b/dlls/infosoft/Makefile.in index 4076d6452e5..8a891c0c699 100644 --- a/dlls/infosoft/Makefile.in +++ b/dlls/infosoft/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ wordbreaker.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/infosoft/tests/Makefile.in b/dlls/infosoft/tests/Makefile.in index d4fa6b85600..989207128b8 100644 --- a/dlls/infosoft/tests/Makefile.in +++ b/dlls/infosoft/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ infosoft.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/initpki/Makefile.in b/dlls/initpki/Makefile.in index ece82489b0a..783e19bd188 100644 --- a/dlls/initpki/Makefile.in +++ b/dlls/initpki/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/inkobj/Makefile.in b/dlls/inkobj/Makefile.in index aec1ba32c83..5d723785935 100644 --- a/dlls/inkobj/Makefile.in +++ b/dlls/inkobj/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ inkobj.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/inseng/Makefile.in b/dlls/inseng/Makefile.in index e47847974fa..374c10e3154 100644 --- a/dlls/inseng/Makefile.in +++ b/dlls/inseng/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ regsvr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/iphlpapi/Makefile.in b/dlls/iphlpapi/Makefile.in index 09ed78d2780..c90e372146a 100644 --- a/dlls/iphlpapi/Makefile.in +++ b/dlls/iphlpapi/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c index d3482290a76..5a3db75c971 100644 --- a/dlls/iphlpapi/ifenum.c +++ b/dlls/iphlpapi/ifenum.c @@ -87,7 +87,12 @@ #include #endif +#ifdef HAVE_IFADDRS_H +#include +#endif + #include "ifenum.h" +#include "ws2ipdef.h" #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN #define ifreq_len(ifr) \ @@ -298,7 +303,7 @@ static DWORD getInterfaceMaskByName(const char *name) return ret; } -#if defined (SIOCGIFHWADDR) +#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR) static DWORD getInterfacePhysicalByName(const char *name, PDWORD len, PBYTE addr, PDWORD type) { @@ -788,6 +793,78 @@ DWORD getIPAddrTable(PMIB_IPADDRTABLE *ppIpAddrTable, HANDLE heap, DWORD flags) return ret; } +#ifdef HAVE_IFADDRS_H +ULONG v6addressesFromIndex(DWORD index, SOCKET_ADDRESS **addrs, ULONG *num_addrs) +{ + struct ifaddrs *ifa; + ULONG ret; + + if (!getifaddrs(&ifa)) + { + struct ifaddrs *p; + ULONG n; + char name[IFNAMSIZ]; + + getInterfaceNameByIndex(index, name); + for (p = ifa, n = 0; p; p = p->ifa_next) + if (p->ifa_addr && p->ifa_addr->sa_family == AF_INET6 && + !strcmp(name, p->ifa_name)) + n++; + if (n) + { + *addrs = HeapAlloc(GetProcessHeap(), 0, n * (sizeof(SOCKET_ADDRESS) + + sizeof(struct WS_sockaddr_in6))); + if (*addrs) + { + struct WS_sockaddr_in6 *next_addr = (struct WS_sockaddr_in6 *)( + (BYTE *)*addrs + n * sizeof(SOCKET_ADDRESS)); + + for (p = ifa, n = 0; p; p = p->ifa_next) + { + if (p->ifa_addr && p->ifa_addr->sa_family == AF_INET6 && + !strcmp(name, p->ifa_name)) + { + struct sockaddr_in6 *addr = (struct sockaddr_in6 *)p->ifa_addr; + + next_addr->sin6_family = WS_AF_INET6; + next_addr->sin6_port = addr->sin6_port; + next_addr->sin6_flowinfo = addr->sin6_flowinfo; + memcpy(&next_addr->sin6_addr, &addr->sin6_addr, + sizeof(next_addr->sin6_addr)); + next_addr->sin6_scope_id = addr->sin6_scope_id; + (*addrs)[n].lpSockaddr = (LPSOCKADDR)next_addr; + (*addrs)[n].iSockaddrLength = sizeof(struct WS_sockaddr_in6); + next_addr++; + n++; + } + } + *num_addrs = n; + ret = ERROR_SUCCESS; + } + else + ret = ERROR_OUTOFMEMORY; + } + else + { + *addrs = NULL; + *num_addrs = 0; + ret = ERROR_SUCCESS; + } + freeifaddrs(ifa); + } + else + ret = ERROR_NO_DATA; + return ret; +} +#else +ULONG v6addressesFromIndex(DWORD index, SOCKET_ADDRESS **addrs, ULONG *num_addrs) +{ + *addrs = NULL; + *num_addrs = 0; + return ERROR_SUCCESS; +} +#endif + char *toIPAddressString(unsigned int addr, char string[16]) { if (string) { diff --git a/dlls/iphlpapi/ifenum.h b/dlls/iphlpapi/ifenum.h index c348191912c..79e484b30d0 100644 --- a/dlls/iphlpapi/ifenum.h +++ b/dlls/iphlpapi/ifenum.h @@ -38,6 +38,8 @@ #include "windef.h" #include "winbase.h" #include "iprtrmib.h" +#define USE_WS_PREFIX +#include "winsock2.h" #define MAX_INTERFACE_PHYSADDR 8 #define MAX_INTERFACE_DESCRIPTION 256 @@ -105,6 +107,11 @@ DWORD getNumIPAddresses(void); */ DWORD getIPAddrTable(PMIB_IPADDRTABLE *ppIpAddrTable, HANDLE heap, DWORD flags); +/* Returns the IPv6 addresses for a particular interface index. + * Returns NO_ERROR on success, something else on failure. + */ +ULONG v6addressesFromIndex(DWORD index, SOCKET_ADDRESS **addrs, ULONG *num_addrs); + /* Converts the network-order bytes in addr to a printable string. Returns * string. */ diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 7edff9ea470..86008493611 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -49,6 +49,7 @@ #include "winreg.h" #define USE_WS_PREFIX #include "winsock2.h" +#include "ws2ipdef.h" #include "iphlpapi.h" #include "ifenum.h" #include "ipstats.h" @@ -608,7 +609,7 @@ static DWORD typeFromMibType(DWORD mib_type) } } -static ULONG addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs) +static ULONG v4addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs) { ULONG ret, i, j; MIB_IPADDRTABLE *at; @@ -632,18 +633,38 @@ static ULONG addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs) return ERROR_SUCCESS; } -static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, ULONG *size) +static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADDRESSES *aa, ULONG *size) { - ULONG ret, i, num_addrs, total_size; - DWORD *addrs; - - if ((ret = addressesFromIndex(index, &addrs, &num_addrs))) return ret; + ULONG ret, i, num_v4addrs = 0, num_v6addrs = 0, total_size; + DWORD *v4addrs = NULL; + SOCKET_ADDRESS *v6addrs = NULL; + + if (family == AF_INET) + ret = v4addressesFromIndex(index, &v4addrs, &num_v4addrs); + else if (family == AF_INET6) + ret = v6addressesFromIndex(index, &v6addrs, &num_v6addrs); + else if (family == AF_UNSPEC) + { + ret = v4addressesFromIndex(index, &v4addrs, &num_v4addrs); + if (!ret) + ret = v6addressesFromIndex(index, &v6addrs, &num_v6addrs); + } + else + { + FIXME("address family %u unsupported\n", family); + ret = ERROR_NO_DATA; + } + if (ret) return ret; total_size = sizeof(IP_ADAPTER_ADDRESSES); total_size += IF_NAMESIZE; total_size += IF_NAMESIZE * sizeof(WCHAR); - total_size += sizeof(IP_ADAPTER_UNICAST_ADDRESS) * num_addrs; - total_size += sizeof(struct sockaddr_in) * num_addrs; + total_size += sizeof(IP_ADAPTER_UNICAST_ADDRESS) * num_v4addrs; + total_size += sizeof(struct sockaddr_in) * num_v4addrs; + total_size += sizeof(IP_ADAPTER_UNICAST_ADDRESS) * num_v6addrs; + total_size += sizeof(SOCKET_ADDRESS) * num_v6addrs; + for (i = 0; i < num_v6addrs; i++) + total_size += v6addrs[i].iSockaddrLength; if (aa && *size >= total_size) { @@ -665,13 +686,13 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL *dst++ = 0; ptr = (char *)dst; - if (num_addrs) + if (num_v4addrs) { IP_ADAPTER_UNICAST_ADDRESS *ua; struct sockaddr_in *sa; ua = aa->FirstUnicastAddress = (IP_ADAPTER_UNICAST_ADDRESS *)ptr; - for (i = 0; i < num_addrs; i++) + for (i = 0; i < num_v4addrs; i++) { memset(ua, 0, sizeof(IP_ADAPTER_UNICAST_ADDRESS)); ua->u.s.Length = sizeof(IP_ADAPTER_UNICAST_ADDRESS); @@ -680,11 +701,42 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL sa = (struct sockaddr_in *)ua->Address.lpSockaddr; sa->sin_family = AF_INET; - sa->sin_addr.s_addr = addrs[i]; + sa->sin_addr.s_addr = v4addrs[i]; sa->sin_port = 0; ptr += ua->u.s.Length + ua->Address.iSockaddrLength; - if (i < num_addrs - 1) + if (i < num_v4addrs - 1) + { + ua->Next = (IP_ADAPTER_UNICAST_ADDRESS *)ptr; + ua = ua->Next; + } + } + } + if (num_v6addrs) + { + IP_ADAPTER_UNICAST_ADDRESS *ua; + struct WS_sockaddr_in6 *sa; + + if (aa->FirstUnicastAddress) + { + for (ua = aa->FirstUnicastAddress; ua->Next; ua = ua->Next) + ; + ua->Next = (IP_ADAPTER_UNICAST_ADDRESS *)ptr; + } + else + ua = aa->FirstUnicastAddress = (IP_ADAPTER_UNICAST_ADDRESS *)ptr; + for (i = 0; i < num_v6addrs; i++) + { + memset(ua, 0, sizeof(IP_ADAPTER_UNICAST_ADDRESS)); + ua->u.s.Length = sizeof(IP_ADAPTER_UNICAST_ADDRESS); + ua->Address.iSockaddrLength = v6addrs[i].iSockaddrLength; + ua->Address.lpSockaddr = (SOCKADDR *)((char *)ua + ua->u.s.Length); + + sa = (struct WS_sockaddr_in6 *)ua->Address.lpSockaddr; + memcpy(sa, v6addrs[i].lpSockaddr, sizeof(*sa)); + + ptr += ua->u.s.Length + ua->Address.iSockaddrLength; + if (i < num_v6addrs - 1) { ua->Next = (IP_ADAPTER_UNICAST_ADDRESS *)ptr; ua = ua->Next; @@ -705,7 +757,8 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL else aa->OperStatus = IfOperStatusUnknown; } *size = total_size; - HeapFree(GetProcessHeap(), 0, addrs); + HeapFree(GetProcessHeap(), 0, v6addrs); + HeapFree(GetProcessHeap(), 0, v4addrs); return ERROR_SUCCESS; } @@ -717,11 +770,6 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved, if (!buflen) return ERROR_INVALID_PARAMETER; - if (family == AF_INET6 || family == AF_UNSPEC) - FIXME("no support for IPv6 addresses\n"); - - if (family != AF_INET && family != AF_UNSPEC) return ERROR_NO_DATA; - table = getInterfaceIndexTable(); if (!table || !table->numIndexes) { @@ -732,7 +780,7 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved, for (i = 0; i < table->numIndexes; i++) { size = 0; - if ((ret = adapterAddressesFromIndex(table->indexes[i], NULL, &size))) + if ((ret = adapterAddressesFromIndex(family, table->indexes[i], NULL, &size))) { HeapFree(GetProcessHeap(), 0, table); return ret; @@ -744,7 +792,7 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved, ULONG bytes_left = size = total_size; for (i = 0; i < table->numIndexes; i++) { - if ((ret = adapterAddressesFromIndex(table->indexes[i], aa, &size))) + if ((ret = adapterAddressesFromIndex(family, table->indexes[i], aa, &size))) { HeapFree(GetProcessHeap(), 0, table); return ret; diff --git a/dlls/iphlpapi/tests/Makefile.in b/dlls/iphlpapi/tests/Makefile.in index 05868fb6333..bfcdafa7e2b 100644 --- a/dlls/iphlpapi/tests/Makefile.in +++ b/dlls/iphlpapi/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ iphlpapi.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/itircl/Makefile.in b/dlls/itircl/Makefile.in index 9787cb544a5..3ca77a1648f 100644 --- a/dlls/itircl/Makefile.in +++ b/dlls/itircl/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ itircl_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/itss/Makefile.in b/dlls/itss/Makefile.in index 28ba67a0d84..2b55715bf8c 100644 --- a/dlls/itss/Makefile.in +++ b/dlls/itss/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/itss/tests/Makefile.in b/dlls/itss/tests/Makefile.in index f402ff257a9..d73b082a5c8 100644 --- a/dlls/itss/tests/Makefile.in +++ b/dlls/itss/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/jscript/Makefile.in b/dlls/jscript/Makefile.in index e185bc72784..3d3ffff15d3 100644 --- a/dlls/jscript/Makefile.in +++ b/dlls/jscript/Makefile.in @@ -42,7 +42,3 @@ BISON_SRCS = \ parser.y @MAKE_DLL_RULES@ - -parser.tab.c: parser.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/jscript/tests/Makefile.in b/dlls/jscript/tests/Makefile.in index 3e82b0e6567..521741a9f28 100644 --- a/dlls/jscript/tests/Makefile.in +++ b/dlls/jscript/tests/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/kernel32/Makefile.in b/dlls/kernel32/Makefile.in index fbf3f2d243e..b2b66a88c5b 100644 --- a/dlls/kernel32/Makefile.in +++ b/dlls/kernel32/Makefile.in @@ -65,5 +65,3 @@ MC_SRCS = \ EXTRASUBDIRS = nls @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c index d732d8bf07c..e9b5992e7ac 100644 --- a/dlls/kernel32/debugger.c +++ b/dlls/kernel32/debugger.c @@ -21,6 +21,8 @@ #include #include +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "winerror.h" #include "wine/server.h" #include "kernel_private.h" @@ -432,13 +434,23 @@ BOOL WINAPI IsDebuggerPresent(void) */ BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE process, PBOOL DebuggerPresent) { + NTSTATUS status; + DWORD_PTR port; + if(!process || !DebuggerPresent) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - FIXME("(%p)->(%p): Stub!\n", process, DebuggerPresent); - *DebuggerPresent = FALSE; + + status = NtQueryInformationProcess(process, ProcessDebugPort, &port, sizeof(port), NULL); + if (status != STATUS_SUCCESS) + { + SetLastError(RtlNtStatusToDosError(status)); + return FALSE; + } + + *DebuggerPresent = !!port; return TRUE; } diff --git a/dlls/kernel32/oldconfig.c b/dlls/kernel32/oldconfig.c index c77e7b2ee22..02dac06f7c4 100644 --- a/dlls/kernel32/oldconfig.c +++ b/dlls/kernel32/oldconfig.c @@ -55,6 +55,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); +static NTSTATUS create_key( HANDLE root, const char *name, HANDLE *key, DWORD *disp ) +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING nameW; + NTSTATUS status; + + attr.Length = sizeof(attr); + attr.RootDirectory = root; + attr.ObjectName = &nameW; + attr.Attributes = 0; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + + if (!RtlCreateUnicodeStringFromAsciiz( &nameW, name )) return STATUS_NO_MEMORY; + status = NtCreateKey( key, KEY_ALL_ACCESS, &attr, 0, NULL, REG_OPTION_VOLATILE, disp ); + if (status) ERR("Cannot create %s registry key\n", name ); + RtlFreeUnicodeString( &nameW ); + return status; +} + /****************************************************************** * create_scsi_entry * @@ -69,7 +89,6 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD static UCHAR uCdromNumber = 0; static UCHAR uTapeNumber = 0; - OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; WCHAR dataW[50]; DWORD sizeW; @@ -83,52 +102,14 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD HANDLE lunKey; DWORD disp; - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = &nameW; - attr.Attributes = 0; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, "Machine\\HARDWARE" ) || - NtCreateKey( &scsiKey, KEY_ALL_ACCESS, &attr, 0, NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create HARDWARE registry key\n" ); - return; - } - NtClose( scsiKey ); - RtlFreeUnicodeString( &nameW ); - if (disp == REG_OPENED_EXISTING_KEY) return; - - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, "Machine\\HARDWARE\\DEVICEMAP" ) || - NtCreateKey( &scsiKey, KEY_ALL_ACCESS, &attr, 0, NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP registry key\n" ); - return; - } + if (create_key( 0, "Machine\\HARDWARE\\DEVICEMAP", &scsiKey, &disp )) return; NtClose( scsiKey ); - RtlFreeUnicodeString( &nameW ); /* Ensure there is Scsi key */ - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, "Machine\\HARDWARE\\DEVICEMAP\\Scsi" ) || - NtCreateKey( &scsiKey, KEY_ALL_ACCESS, &attr, 0, - NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP\\Scsi registry key\n" ); - return; - } - RtlFreeUnicodeString( &nameW ); + if (create_key( 0, "Machine\\HARDWARE\\DEVICEMAP\\Scsi", &scsiKey, &disp )) return; snprintf(buffer,sizeof(buffer),"Scsi Port %d",scsi_addr->PortNumber); - attr.RootDirectory = scsiKey; - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, buffer ) || - NtCreateKey( &portKey, KEY_ALL_ACCESS, &attr, 0, - NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP\\Scsi Port registry key\n" ); - return; - } - RtlFreeUnicodeString( &nameW ); + if (create_key( scsiKey, buffer, &portKey, &disp )) return; RtlCreateUnicodeStringFromAsciiz( &nameW, "Driver" ); RtlMultiByteToUnicodeN( dataW, sizeof(dataW), &sizeW, lpDriver, strlen(lpDriver)+1); @@ -158,49 +139,17 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD } snprintf(buffer, sizeof(buffer),"Scsi Bus %d", scsi_addr->PathId); - attr.RootDirectory = portKey; - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, buffer ) || - NtCreateKey( &busKey, KEY_ALL_ACCESS, &attr, 0, - NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP\\Scsi Port\\Scsi Bus registry key\n" ); - return; - } - RtlFreeUnicodeString( &nameW ); + if (create_key( portKey, buffer, &busKey, &disp )) return; - attr.RootDirectory = busKey; /* FIXME: get real controller Id for SCSI */ - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, "Initiator Id 255" ) || - NtCreateKey( &targetKey, KEY_ALL_ACCESS, &attr, 0, - NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP\\Scsi Port\\Scsi Bus\\Initiator Id 255 registry key\n" ); - return; - } - RtlFreeUnicodeString( &nameW ); + if (create_key( busKey, buffer, &targetKey, &disp )) return; NtClose( targetKey ); snprintf(buffer, sizeof(buffer),"Target Id %d", scsi_addr->TargetId); - attr.RootDirectory = busKey; - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, buffer ) || - NtCreateKey( &targetKey, KEY_ALL_ACCESS, &attr, 0, - NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP\\Scsi Port\\Scsi Bus 0\\Target Id registry key\n" ); - return; - } - RtlFreeUnicodeString( &nameW ); + if (create_key( busKey, buffer, &targetKey, &disp )) return; snprintf(buffer, sizeof(buffer),"Logical Unit Id %d", scsi_addr->Lun); - attr.RootDirectory = targetKey; - if (!RtlCreateUnicodeStringFromAsciiz( &nameW, buffer ) || - NtCreateKey( &lunKey, KEY_ALL_ACCESS, &attr, 0, - NULL, REG_OPTION_VOLATILE, &disp )) - { - ERR("Cannot create DEVICEMAP\\Scsi Port\\Scsi Bus 0\\Target Id registry key\\Logical Unit Id\n" ); - return; - } - RtlFreeUnicodeString( &nameW ); + if (create_key( targetKey, buffer, &lunKey, &disp )) return; switch (uDriveType) { @@ -445,6 +394,11 @@ static void create_hardware_branch(void) */ void convert_old_config(void) { + HANDLE key; + DWORD disp; + /* create some hardware keys (FIXME: should not be done here) */ - create_hardware_branch(); + if (create_key( 0, "Machine\\HARDWARE", &key, &disp )) return; + NtClose( key ); + if (disp != REG_OPENED_EXISTING_KEY) create_hardware_branch(); } diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index d9d452038a7..115cd059f99 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -90,6 +90,7 @@ const WCHAR *DIR_SysWow64 = NULL; #define PDB32_FILE_APIS_OEM 0x0040 /* File APIs are OEM */ #define PDB32_WIN32S_PROC 0x8000 /* Win32s process */ +static const WCHAR exeW[] = {'.','e','x','e',0}; static const WCHAR comW[] = {'.','c','o','m',0}; static const WCHAR batW[] = {'.','b','a','t',0}; static const WCHAR cmdW[] = {'.','c','m','d',0}; @@ -152,6 +153,9 @@ static BOOL get_builtin_path( const WCHAR *libname, const WCHAR *ext, WCHAR *fil void *redir_disabled = 0; unsigned int flags = (sizeof(void*) > sizeof(int) ? BINARY_FLAG_64BIT : 0); + /* builtin names cannot be empty or contain spaces */ + if (!libname[0] || strchrW( libname, ' ' ) || strchrW( libname, '\t' )) return FALSE; + if (is_wow64 && Wow64DisableWow64FsRedirection( &redir_disabled )) Wow64RevertWow64FsRedirection( redir_disabled ); @@ -198,35 +202,6 @@ static BOOL get_builtin_path( const WCHAR *libname, const WCHAR *ext, WCHAR *fil /*********************************************************************** - * open_builtin_exe_file - * - * Open an exe file for a builtin exe. - */ -static void *open_builtin_exe_file( const WCHAR *name, char *error, int error_size, - int test_only, int *file_exists ) -{ - char exename[MAX_PATH]; - WCHAR *p; - UINT i, len; - - *file_exists = 0; - if ((p = strrchrW( name, '/' ))) name = p + 1; - if ((p = strrchrW( name, '\\' ))) name = p + 1; - - /* we don't want to depend on the current codepage here */ - len = strlenW( name ) + 1; - if (len >= sizeof(exename)) return NULL; - for (i = 0; i < len; i++) - { - if (name[i] > 127) return NULL; - exename[i] = (char)name[i]; - if (exename[i] >= 'A' && exename[i] <= 'Z') exename[i] += 'a' - 'A'; - } - return wine_dll_load_main_exe( exename, error, error_size, test_only, file_exists ); -} - - -/*********************************************************************** * open_exe_file * * Open a specific exe file, taking load order into account. @@ -263,27 +238,16 @@ static HANDLE open_exe_file( const WCHAR *name, struct binary_info *binary_info static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE *handle, struct binary_info *binary_info ) { - static const WCHAR exeW[] = {'.','e','x','e',0}; - int file_exists; - TRACE("looking for %s\n", debugstr_w(name) ); if (!SearchPathW( NULL, name, exeW, buflen, buffer, NULL )) { - if (get_builtin_path( name, exeW, buffer, buflen, binary_info )) + if (contains_path( name ) && get_builtin_path( name, exeW, buffer, buflen, binary_info )) { - TRACE( "Trying built-in exe %s\n", debugstr_w(buffer) ); - open_builtin_exe_file( buffer, NULL, 0, 1, &file_exists ); - if (file_exists) - { - *handle = 0; - return TRUE; - } - return FALSE; + *handle = 0; + return TRUE; } - /* no builtin found, try native without extension in case it is a Unix app */ - if (!SearchPathW( NULL, name, NULL, buflen, buffer, NULL )) return FALSE; } @@ -1075,7 +1039,6 @@ void CDECL __wine_kernel_init(void) { static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2',0}; static const WCHAR dotW[] = {'.',0}; - static const WCHAR exeW[] = {'.','e','x','e',0}; WCHAR *p, main_exe_name[MAX_PATH+1]; PEB *peb = NtCurrentTeb()->Peb; @@ -1181,6 +1144,8 @@ void CDECL __wine_kernel_init(void) debugstr_w(__wine_main_wargv[3]) ); ExitProcess( ERROR_BAD_EXE_FORMAT ); } + MESSAGE( "wine: cannot find %s\n", debugstr_w(main_exe_name) ); + ExitProcess( ERROR_FILE_NOT_FOUND ); } args[0] = (DWORD_PTR)main_exe_name; FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY, @@ -1898,9 +1863,8 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer, { static const WCHAR quotesW[] = {'"','%','s','"',0}; - WCHAR *name, *pos, *ret = NULL; + WCHAR *name, *pos, *first_space, *ret = NULL; const WCHAR *p; - BOOL got_space; /* if we have an app name, everything is easy */ @@ -1928,8 +1892,12 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer, memcpy( name, cmdline + 1, len * sizeof(WCHAR) ); name[len] = 0; - if (find_exe_file( name, buffer, buflen, handle, binary_info )) - ret = cmdline; /* no change necessary */ + if (!find_exe_file( name, buffer, buflen, handle, binary_info )) + { + if (!get_builtin_path( name, exeW, buffer, buflen, binary_info )) goto done; + *handle = 0; + } + ret = cmdline; /* no change necessary */ goto done; } @@ -1939,28 +1907,38 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer, return NULL; pos = name; p = cmdline; - got_space = FALSE; + first_space = NULL; - while (*p) + for (;;) { - do *pos++ = *p++; while (*p && *p != ' ' && *p != '\t'); + while (*p && *p != ' ' && *p != '\t') *pos++ = *p++; *pos = 0; if (find_exe_file( name, buffer, buflen, handle, binary_info )) { ret = cmdline; break; } - if (*p) got_space = TRUE; + if (!(*pos++ = *p++)) break; + if (!first_space) first_space = pos; } - if (ret && got_space) /* now build a new command-line with quotes */ + if (!ret) + { + if (first_space) *first_space = 0; /* try only the first word as a builtin */ + if (get_builtin_path( name, exeW, buffer, buflen, binary_info )) + { + *handle = 0; + ret = cmdline; + } + else SetLastError( ERROR_FILE_NOT_FOUND ); + } + else if (first_space) /* build a new command-line with quotes */ { if (!(ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(cmdline) + 3) * sizeof(WCHAR) ))) goto done; sprintfW( ret, quotesW, name ); strcatW( ret, p ); } - else if (!ret) SetLastError( ERROR_FILE_NOT_FOUND ); done: HeapFree( GetProcessHeap(), 0, name ); diff --git a/dlls/kernel32/tests/Makefile.in b/dlls/kernel32/tests/Makefile.in index 452e690cba4..ed2d6e69b46 100644 --- a/dlls/kernel32/tests/Makefile.in +++ b/dlls/kernel32/tests/Makefile.in @@ -43,5 +43,3 @@ C_SRCS = \ RC_SRCS = resource.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index d37217a8bd3..e116c9d1fb5 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -44,6 +44,8 @@ static char** myARGV; static BOOL (WINAPI *pCheckRemoteDebuggerPresent)(HANDLE,PBOOL); static BOOL (WINAPI *pDebugActiveProcessStop)(DWORD); static BOOL (WINAPI *pDebugSetProcessKillOnExit)(BOOL); +static BOOL (WINAPI *pIsDebuggerPresent)(void); +static struct _TEB * (WINAPI *pNtCurrentTeb)(void); static LONG child_failures; @@ -498,6 +500,7 @@ static void doChild(int argc, char **argv) const char *blackbox_file; HANDLE parent; DWORD ppid; + BOOL debug; BOOL ret; blackbox_file = argv[4]; @@ -506,15 +509,46 @@ static void doChild(int argc, char **argv) parent = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ppid); child_ok(!!parent, "OpenProcess failed, last error %#x.\n", GetLastError()); + ret = pCheckRemoteDebuggerPresent(parent, &debug); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(!debug, "Expected debug == 0, got %#x.\n", debug); + ret = DebugActiveProcess(ppid); child_ok(ret, "DebugActiveProcess failed, last error %#x.\n", GetLastError()); + ret = pCheckRemoteDebuggerPresent(parent, &debug); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(debug, "Expected debug != 0, got %#x.\n", debug); + ret = pDebugActiveProcessStop(ppid); child_ok(ret, "DebugActiveProcessStop failed, last error %#x.\n", GetLastError()); + ret = pCheckRemoteDebuggerPresent(parent, &debug); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(!debug, "Expected debug == 0, got %#x.\n", debug); + ret = CloseHandle(parent); child_ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); + ret = pIsDebuggerPresent(); + child_ok(ret, "Expected ret != 0, got %#x.\n", ret); + ret = pCheckRemoteDebuggerPresent(GetCurrentProcess(), &debug); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(debug, "Expected debug != 0, got %#x.\n", debug); + + if (pNtCurrentTeb) + { + pNtCurrentTeb()->Peb->BeingDebugged = FALSE; + + ret = pIsDebuggerPresent(); + child_ok(!ret, "Expected ret != 0, got %#x.\n", ret); + ret = pCheckRemoteDebuggerPresent(GetCurrentProcess(), &debug); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(debug, "Expected debug != 0, got %#x.\n", debug); + + pNtCurrentTeb()->Peb->BeingDebugged = TRUE; + } + blackbox.failures = child_failures; save_blackbox(blackbox_file, &blackbox, sizeof(blackbox)); } @@ -526,17 +560,21 @@ static void test_debug_loop(int argc, char **argv) char blackbox_file[MAX_PATH]; PROCESS_INFORMATION pi; STARTUPINFOA si; + BOOL debug; DWORD pid; char *cmd; BOOL ret; - if (!pDebugActiveProcessStop) + if (!pDebugActiveProcessStop || !pCheckRemoteDebuggerPresent) { - win_skip("DebugActiveProcessStop not available, skipping test.\n"); + win_skip("DebugActiveProcessStop or CheckRemoteDebuggerPresent not available, skipping test.\n"); return; } pid = GetCurrentProcessId(); + ret = DebugActiveProcess(pid); + ok(!ret, "DebugActiveProcess() succeeded on own process.\n"); + get_file_name(blackbox_file); cmd = HeapAlloc(GetProcessHeap(), 0, strlen(argv[0]) + strlen(arguments) + strlen(blackbox_file) + 10); sprintf(cmd, "%s%s%08x %s", argv[0], arguments, pid, blackbox_file); @@ -548,6 +586,10 @@ static void test_debug_loop(int argc, char **argv) HeapFree(GetProcessHeap(), 0, cmd); + ret = pCheckRemoteDebuggerPresent(pi.hProcess, &debug); + ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + ok(debug, "Expected debug != 0, got %#x.\n", debug); + for (;;) { DEBUG_EVENT ev; @@ -583,6 +625,9 @@ START_TEST(debugger) pCheckRemoteDebuggerPresent=(void*)GetProcAddress(hdll, "CheckRemoteDebuggerPresent"); pDebugActiveProcessStop=(void*)GetProcAddress(hdll, "DebugActiveProcessStop"); pDebugSetProcessKillOnExit=(void*)GetProcAddress(hdll, "DebugSetProcessKillOnExit"); + pIsDebuggerPresent=(void*)GetProcAddress(hdll, "IsDebuggerPresent"); + hdll=GetModuleHandle("ntdll.dll"); + if (hdll) pNtCurrentTeb = (void*)GetProcAddress(hdll, "NtCurrentTeb"); myARGC=winetest_get_mainargs(&myARGV); if (myARGC >= 3 && strcmp(myARGV[2], "crash") == 0) diff --git a/dlls/keyboard.drv16/Makefile.in b/dlls/keyboard.drv16/Makefile.in index 85a20ea8f18..101029962eb 100644 --- a/dlls/keyboard.drv16/Makefile.in +++ b/dlls/keyboard.drv16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = keyboard.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/krnl386.exe16/Makefile.in b/dlls/krnl386.exe16/Makefile.in index 1e25735cbcf..c85c200624f 100644 --- a/dlls/krnl386.exe16/Makefile.in +++ b/dlls/krnl386.exe16/Makefile.in @@ -60,5 +60,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c index 49b527b448c..aa1c9c25e39 100644 --- a/dlls/krnl386.exe16/ne_module.c +++ b/dlls/krnl386.exe16/ne_module.c @@ -782,12 +782,9 @@ static BOOL NE_LoadDLLs( NE_MODULE *pModule ) /* its handle in the list of DLLs to initialize. */ HMODULE16 hDLL; - /* special magic for gdi and user */ - if (!NE_strcasecmp( buffer, "user" )) strcpy( buffer, "USER.EXE" ); - else if (!NE_strcasecmp( buffer, "gdi" )) strcpy( buffer, "GDI.EXE" ); /* Append .DLL to name if no extension present */ - else if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\')) - strcat( buffer, ".DLL" ); + if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\')) + strcat( buffer, ".DLL" ); if ((hDLL = MODULE_LoadModule16( buffer, TRUE, TRUE )) < 32) { diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c index 2f8562c8663..8b42619ddca 100644 --- a/dlls/krnl386.exe16/thunk.c +++ b/dlls/krnl386.exe16/thunk.c @@ -272,6 +272,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32, struct ThunkDataCommon *TD16; HMODULE16 hmod; int ordinal; + static int done; + + if (!done) + { + LoadLibrary16( "gdi.exe" ); + LoadLibrary16( "user.exe" ); + done = TRUE; + } if ((hmod = LoadLibrary16(module)) <= 32) { diff --git a/dlls/loadperf/Makefile.in b/dlls/loadperf/Makefile.in index c092f3fb3bb..093f6e4db50 100644 --- a/dlls/loadperf/Makefile.in +++ b/dlls/loadperf/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ loadperf_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/localspl/Makefile.in b/dlls/localspl/Makefile.in index 64094548a2b..1debddb586c 100644 --- a/dlls/localspl/Makefile.in +++ b/dlls/localspl/Makefile.in @@ -30,5 +30,3 @@ RC_SRCS = \ spl_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/localspl/tests/Makefile.in b/dlls/localspl/tests/Makefile.in index 9d21e63942c..1871135516a 100644 --- a/dlls/localspl/tests/Makefile.in +++ b/dlls/localspl/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ localmon.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/localui/Makefile.in b/dlls/localui/Makefile.in index 75090a18185..fc03f609e0e 100644 --- a/dlls/localui/Makefile.in +++ b/dlls/localui/Makefile.in @@ -27,5 +27,3 @@ RC_SRCS = \ ui_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/localui/tests/Makefile.in b/dlls/localui/tests/Makefile.in index e168e44cce5..aa90d574e15 100644 --- a/dlls/localui/tests/Makefile.in +++ b/dlls/localui/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ localui.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/lz32/Makefile.in b/dlls/lz32/Makefile.in index 2991f293326..123b349eb9e 100644 --- a/dlls/lz32/Makefile.in +++ b/dlls/lz32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/lz32/tests/Makefile.in b/dlls/lz32/tests/Makefile.in index 7ccf5e702cb..a324c3edccc 100644 --- a/dlls/lz32/tests/Makefile.in +++ b/dlls/lz32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ lzexpand_main.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/lzexpand.dll16/Makefile.in b/dlls/lzexpand.dll16/Makefile.in index 098a0a5c78c..e984c01f340 100644 --- a/dlls/lzexpand.dll16/Makefile.in +++ b/dlls/lzexpand.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,lz32.dll C_SRCS = lzexpand.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mapi32/Makefile.in b/dlls/mapi32/Makefile.in index 46139bdf53c..c24b9f12546 100644 --- a/dlls/mapi32/Makefile.in +++ b/dlls/mapi32/Makefile.in @@ -23,5 +23,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mapi32/tests/Makefile.in b/dlls/mapi32/tests/Makefile.in index 18f9364a161..e4d9188a8b8 100644 --- a/dlls/mapi32/tests/Makefile.in +++ b/dlls/mapi32/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ util.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mapistub/Makefile.in b/dlls/mapistub/Makefile.in index 8f56d230a08..98a6ad9b3fb 100644 --- a/dlls/mapistub/Makefile.in +++ b/dlls/mapistub/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mciavi32/Makefile.in b/dlls/mciavi32/Makefile.in index facb1eec671..248add26d7f 100644 --- a/dlls/mciavi32/Makefile.in +++ b/dlls/mciavi32/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = mciavi_res.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mciavi32/mciavi.c b/dlls/mciavi32/mciavi.c index d77525ca4ff..1c15dc55dbc 100644 --- a/dlls/mciavi32/mciavi.c +++ b/dlls/mciavi32/mciavi.c @@ -89,6 +89,7 @@ static DWORD MCIAVI_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp) wma->hStopEvent = CreateEventW(NULL, FALSE, FALSE, NULL); wma->wDevID = modp->wDeviceID; wma->wCommandTable = mciLoadCommandResource(MCIAVI_hInstance, mciAviWStr, 0); + wma->dwStatus = MCI_MODE_NOT_READY; modp->wCustomCommandTable = wma->wCommandTable; modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO; mciSetDriverData(wma->wDevID, (DWORD_PTR)wma); @@ -301,11 +302,11 @@ DWORD MCIAVI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) wma = MCIAVI_mciGetOpenDev(wDevID); if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; + MCIAVI_mciStop(wDevID, MCI_WAIT, NULL); + EnterCriticalSection(&wma->cs); if (wma->nUseCount == 1) { - if (wma->dwStatus != MCI_MODE_STOP) - dwRet = MCIAVI_mciStop(wDevID, MCI_WAIT, NULL); MCIAVI_CleanUp(wma); if ((dwFlags & MCI_NOTIFY) && lpParms) { @@ -836,14 +837,14 @@ static DWORD MCIAVI_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_P { WINE_MCIAVI *wma; - FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms); - if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; + FIXME("(%04x, %08x, %p) Item %04x: stub\n", wDevID, dwFlags, lpParms, dwFlags & MCI_DGV_SETAUDIO_ITEM ? lpParms->dwItem : 0); + wma = MCIAVI_mciGetOpenDev(wDevID); if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; - return MCIERR_UNSUPPORTED_FUNCTION; /* like w2k */ + return 0; } /****************************************************************************** @@ -870,14 +871,14 @@ static DWORD MCIAVI_mciSetVideo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETVIDEO_P { WINE_MCIAVI *wma; - FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms); - if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; + FIXME("(%04x, %08x, %p) Item %04x: stub\n", wDevID, dwFlags, lpParms, dwFlags & MCI_DGV_SETVIDEO_ITEM ? lpParms->dwItem : 0); + wma = MCIAVI_mciGetOpenDev(wDevID); if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; - return MCIERR_UNSUPPORTED_FUNCTION; /* like w2k */ + return 0; } /****************************************************************************** diff --git a/dlls/mcicda/Makefile.in b/dlls/mcicda/Makefile.in index e8e81657c9d..b77ea3003de 100644 --- a/dlls/mcicda/Makefile.in +++ b/dlls/mcicda/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ mcicda.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mcicda/mcicda.c b/dlls/mcicda/mcicda.c index 92c943584e4..5c995344c32 100644 --- a/dlls/mcicda/mcicda.c +++ b/dlls/mcicda/mcicda.c @@ -483,6 +483,8 @@ static DWORD MCICDA_Close(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParm if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID; + MCICDA_Stop(wDevID, MCI_WAIT, NULL); + if (--wmcda->nUseCount == 0) { CloseHandle(wmcda->handle); } diff --git a/dlls/mciqtz32/Makefile.in b/dlls/mciqtz32/Makefile.in index 9bac216da23..82b1c0d082e 100644 --- a/dlls/mciqtz32/Makefile.in +++ b/dlls/mciqtz32/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mciseq/Makefile.in b/dlls/mciseq/Makefile.in index 66b2956de61..64951031a2e 100644 --- a/dlls/mciseq/Makefile.in +++ b/dlls/mciseq/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ mcimidi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c index 301428d517d..87753c33dde 100644 --- a/dlls/mciseq/mcimidi.c +++ b/dlls/mciseq/mcimidi.c @@ -62,6 +62,7 @@ typedef struct tagWINE_MCIMIDI { UINT wDevID; /* the MCI one */ HMIDI hMidi; int nUseCount; /* Incremented for each shared open */ + WORD wPort; /* the WINMM device unit */ WORD wNotifyDeviceID; /* MCI device ID with a pending notification */ HANDLE hCallback; /* Callback handle for pending notification */ HMMIO hFile; /* mmio file handle open as Element */ @@ -726,6 +727,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms) wmm->hFile = 0; wmm->hMidi = 0; + wmm->wPort = MIDI_MAPPER; wmm->lpstrElementName = NULL; dwDeviceID = lpParms->wDeviceID; @@ -962,8 +964,8 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) MIDI_mciReadNextEvent(wmm, mmt); /* FIXME == 0 */ } - dwRet = midiOutOpen((LPHMIDIOUT)&wmm->hMidi, MIDIMAPPER, 0L, 0L, CALLBACK_NULL); - /* dwRet = midiInOpen(&wmm->hMidi, MIDIMAPPER, 0L, 0L, CALLBACK_NULL);*/ + dwRet = midiOutOpen((LPHMIDIOUT)&wmm->hMidi, wmm->wPort, 0L, 0L, CALLBACK_NULL); + /* dwRet = midiInOpen(&wmm->hMidi, wmm->wPort, 0L, 0L, CALLBACK_NULL);*/ if (dwRet != MMSYSERR_NOERROR) { return dwRet; } @@ -1290,7 +1292,7 @@ static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa /************************************************************************** * MIDI_mciSet [internal] */ -static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) +static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SEQ_SET_PARMS lpParms) { WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); @@ -1359,8 +1361,15 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) TRACE("MCI_SEQ_SET_SLAVE !\n"); if (dwFlags & MCI_SEQ_SET_OFFSET) TRACE("MCI_SEQ_SET_OFFSET !\n"); - if (dwFlags & MCI_SEQ_SET_PORT) - TRACE("MCI_SEQ_SET_PORT !\n"); + if (dwFlags & MCI_SEQ_SET_PORT) { + TRACE("MCI_SEQ_SET_PORT = %d\n", lpParms->dwPort); + if ((UINT16)lpParms->dwPort != (UINT16)MIDI_MAPPER && + (UINT16)lpParms->dwPort >= midiOutGetNumDevs()) + /* FIXME: input/output port distinction? */ + return MCIERR_SEQ_PORT_NONEXISTENT; + /* FIXME: Native manages to swap the device while playing! */ + wmm->wPort = lpParms->dwPort; + } if (dwFlags & MCI_SEQ_SET_TEMPO) TRACE("MCI_SEQ_SET_TEMPO !\n"); return 0; @@ -1459,8 +1468,13 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar lpParms->dwReturn = 0; break; case MCI_SEQ_STATUS_PORT: - TRACE("MCI_SEQ_STATUS_PORT (%u)!\n", wmm->wDevID); - lpParms->dwReturn = MIDI_MAPPER; + if (wmm->wPort != (UINT16)MIDI_MAPPER) + lpParms->dwReturn = wmm->wPort; + else { + lpParms->dwReturn = MAKEMCIRESOURCE(MIDI_MAPPER, MCI_SEQ_MAPPER_S); + ret = MCI_RESOURCE_RETURNED; + } + TRACE("MCI_SEQ_STATUS_PORT (%u) => %d\n", wmm->wDevID, wmm->wPort); break; case MCI_SEQ_STATUS_TEMPO: TRACE("MCI_SEQ_STATUS_TEMPO !\n"); @@ -1664,7 +1678,7 @@ LRESULT CALLBACK MCIMIDI_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, case MCI_PLAY: return MIDI_mciPlay (dwDevID, dwParam1, (LPMCI_PLAY_PARMS) dwParam2); case MCI_RECORD: return MIDI_mciRecord (dwDevID, dwParam1, (LPMCI_RECORD_PARMS) dwParam2); case MCI_STOP: return MIDI_mciStop (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); - case MCI_SET: return MIDI_mciSet (dwDevID, dwParam1, (LPMCI_SET_PARMS) dwParam2); + case MCI_SET: return MIDI_mciSet (dwDevID, dwParam1, (LPMCI_SEQ_SET_PARMS) dwParam2); case MCI_PAUSE: return MIDI_mciPause (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); case MCI_RESUME: return MIDI_mciResume (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); case MCI_STATUS: return MIDI_mciStatus (dwDevID, dwParam1, (LPMCI_STATUS_PARMS) dwParam2); diff --git a/dlls/mciwave/Makefile.in b/dlls/mciwave/Makefile.in index a87c07c0af3..226a4e4e667 100644 --- a/dlls/mciwave/Makefile.in +++ b/dlls/mciwave/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ mciwave.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/midimap/Makefile.in b/dlls/midimap/Makefile.in index 5c664845e7d..f54e615b76e 100644 --- a/dlls/midimap/Makefile.in +++ b/dlls/midimap/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ midimap.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c index 5df8472e68a..0c54d457d54 100644 --- a/dlls/midimap/midimap.c +++ b/dlls/midimap/midimap.c @@ -446,7 +446,6 @@ static DWORD modUnprepare(MIDIMAPDATA* mom, LPMIDIHDR lpMidiHdr, DWORD_PTR dwPar static DWORD modGetVolume(MIDIMAPDATA* mom, DWORD* lpdwVolume) { - if (MIDIMAP_IsBadData(mom)) return MMSYSERR_ERROR; if (!lpdwVolume) return MMSYSERR_INVALPARAM; *lpdwVolume = 0xFFFFFFFF; /* tests show this initial value */ return MMSYSERR_NOERROR; @@ -495,6 +494,9 @@ static DWORD modReset(MIDIMAPDATA* mom) return ret; } +static LRESULT MIDIMAP_drvOpen(void); +static LRESULT MIDIMAP_drvClose(void); + /************************************************************************** * modMessage (MIDIMAP.@) */ @@ -507,7 +509,9 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, switch (wMsg) { case DRVM_INIT: + return MIDIMAP_drvOpen(); case DRVM_EXIT: + return MIDIMAP_drvClose(); case DRVM_ENABLE: case DRVM_DISABLE: /* FIXME: Pretend this is supported */ @@ -539,7 +543,7 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, /************************************************************************** * MIDIMAP_drvOpen [internal] */ -static LRESULT MIDIMAP_drvOpen(LPSTR str) +static LRESULT MIDIMAP_drvOpen(void) { MIDIOUTCAPSW moc; unsigned dev, i; @@ -574,7 +578,7 @@ static LRESULT MIDIMAP_drvOpen(LPSTR str) /************************************************************************** * MIDIMAP_drvClose [internal] */ -static LRESULT MIDIMAP_drvClose(DWORD_PTR dwDevID) +static LRESULT MIDIMAP_drvClose(void) { if (midiOutPorts) { @@ -598,8 +602,8 @@ LRESULT CALLBACK MIDIMAP_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, { case DRV_LOAD: return 1; case DRV_FREE: return 1; - case DRV_OPEN: return MIDIMAP_drvOpen((LPSTR)dwParam1); - case DRV_CLOSE: return MIDIMAP_drvClose(dwDevID); + case DRV_OPEN: return 1; + case DRV_CLOSE: return 1; case DRV_ENABLE: return 1; case DRV_DISABLE: return 1; case DRV_QUERYCONFIGURE: return 1; diff --git a/dlls/mlang/Makefile.in b/dlls/mlang/Makefile.in index cc721247be1..5c08af88e76 100644 --- a/dlls/mlang/Makefile.in +++ b/dlls/mlang/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ regsvr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mlang/tests/Makefile.in b/dlls/mlang/tests/Makefile.in index 3850ba10864..859793b8b5e 100644 --- a/dlls/mlang/tests/Makefile.in +++ b/dlls/mlang/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ mlang.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mmdevapi/Makefile.in b/dlls/mmdevapi/Makefile.in index 75310608716..fcf8ef3bfd8 100644 --- a/dlls/mmdevapi/Makefile.in +++ b/dlls/mmdevapi/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ regsvr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index f5bfcf08f73..9d1adb12b2e 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -62,6 +62,14 @@ static const WCHAR reg_properties[] = static HKEY key_render; static HKEY key_capture; +typedef struct MMDevPropStoreImpl +{ + const IPropertyStoreVtbl *lpVtbl; + LONG ref; + MMDevice *parent; + DWORD access; +} MMDevPropStore; + typedef struct MMDevEnumImpl { const IMMDeviceEnumeratorVtbl *lpVtbl; @@ -75,6 +83,8 @@ static DWORD MMDevice_count; static const IMMDeviceEnumeratorVtbl MMDevEnumVtbl; static const IMMDeviceCollectionVtbl MMDevColVtbl; static const IMMDeviceVtbl MMDeviceVtbl; +static const IPropertyStoreVtbl MMDevPropVtbl; +static const IMMEndpointVtbl MMEndpointVtbl; typedef struct MMDevColImpl { @@ -84,6 +94,14 @@ typedef struct MMDevColImpl DWORD state; } MMDevColImpl; +typedef struct IPropertyBagImpl { + const IPropertyBagVtbl *lpVtbl; + GUID devguid; +} IPropertyBagImpl; +static const IPropertyBagVtbl PB_Vtbl; + +static HRESULT MMDevPropStore_Create(MMDevice *This, DWORD access, IPropertyStore **ppv); + /* Creates or updates the state of a device * If GUID is null, a random guid will be assigned * and the device will be created @@ -126,6 +144,7 @@ static void MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD state, } lstrcpyW(cur->alname, name); cur->lpVtbl = &MMDeviceVtbl; + cur->lpEndpointVtbl = &MMEndpointVtbl; cur->ref = 0; InitializeCriticalSection(&cur->crst); cur->crst.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MMDevice.crst"); @@ -148,6 +167,11 @@ static void MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD state, RegSetValueExW(key, reg_devicestate, 0, REG_DWORD, (const BYTE*)&state, sizeof(DWORD)); if (!RegCreateKeyExW(key, reg_properties, 0, NULL, 0, KEY_WRITE|KEY_READ, NULL, &keyprop, NULL)) { + PROPVARIANT pv; + pv.vt = VT_LPWSTR; + pv.u.pwszVal = name; + MMDevice_SetPropValue(id, flow, (PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv); + MMDevice_SetPropValue(id, flow, (PROPERTYKEY*)&DEVPKEY_Device_DeviceDesc, &pv); RegCloseKey(keyprop); } RegCloseKey(key); @@ -198,6 +222,8 @@ static HRESULT WINAPI MMDevice_QueryInterface(IMMDevice *iface, REFIID riid, voi if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IMMDevice)) *ppv = This; + else if (IsEqualIID(riid, &IID_IMMEndpoint)) + *ppv = &This->lpEndpointVtbl; if (*ppv) { IUnknown_AddRef((IUnknown*)*ppv); @@ -236,8 +262,80 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls if (!ppv) return E_POINTER; - FIXME("stub\n"); - hr = E_NOTIMPL; + if (IsEqualIID(riid, &IID_IAudioClient)) + { + FIXME("IID_IAudioClient unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IAudioEndpointVolume)) + { + FIXME("IID_IAudioEndpointVolume unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IAudioSessionManager) + || IsEqualIID(riid, &IID_IAudioSessionManager2)) + { + FIXME("IID_IAudioSessionManager unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IBaseFilter)) + { + if (This->flow == eRender) + hr = CoCreateInstance(&CLSID_DSoundRender, NULL, clsctx, riid, ppv); + else + ERR("Not supported for recording?\n"); + if (SUCCEEDED(hr)) + { + IPersistPropertyBag *ppb; + hr = IUnknown_QueryInterface((IUnknown*)*ppv, &IID_IPersistPropertyBag, (void*)&ppb); + if (SUCCEEDED(hr)) + { + /* ::Load cannot assume the interface stays alive after the function returns, + * so just create the interface on the stack, saves a lot of complicated code */ + IPropertyBagImpl bag = { &PB_Vtbl, This->devguid }; + hr = IPersistPropertyBag_Load(ppb, (IPropertyBag*)&bag, NULL); + IPersistPropertyBag_Release(ppb); + if (FAILED(hr)) + IBaseFilter_Release((IBaseFilter*)*ppv); + } + else + { + FIXME("Wine doesn't support IPersistPropertyBag on DSoundRender yet, ignoring..\n"); + hr = S_OK; + } + } + } + else if (IsEqualIID(riid, &IID_IDeviceTopology)) + { + FIXME("IID_IDeviceTopology unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IDirectSound) + || IsEqualIID(riid, &IID_IDirectSound8)) + { + if (This->flow == eRender) + hr = CoCreateInstance(&CLSID_DirectSound8, NULL, clsctx, riid, ppv); + if (SUCCEEDED(hr)) + { + hr = IDirectSound_Initialize((IDirectSound*)*ppv, &This->devguid); + if (FAILED(hr)) + IDirectSound_Release((IDirectSound*)*ppv); + } + } + else if (IsEqualIID(riid, &IID_IDirectSoundCapture) + || IsEqualIID(riid, &IID_IDirectSoundCapture8)) + { + if (This->flow == eCapture) + hr = CoCreateInstance(&CLSID_DirectSoundCapture8, NULL, clsctx, riid, ppv); + if (SUCCEEDED(hr)) + { + hr = IDirectSoundCapture_Initialize((IDirectSoundCapture*)*ppv, &This->devguid); + if (FAILED(hr)) + IDirectSoundCapture_Release((IDirectSoundCapture*)*ppv); + } + } + else + ERR("Invalid/unknown iid %s\n", debugstr_guid(riid)); + + if (FAILED(hr)) + *ppv = NULL; + TRACE("Returning %08x\n", hr); return hr; } @@ -249,20 +347,30 @@ static HRESULT WINAPI MMDevice_OpenPropertyStore(IMMDevice *iface, DWORD access, if (!ppv) return E_POINTER; - FIXME("stub\n"); - return E_NOTIMPL; + return MMDevPropStore_Create(This, access, ppv); } static HRESULT WINAPI MMDevice_GetId(IMMDevice *iface, WCHAR **itemid) { MMDevice *This = (MMDevice *)iface; + WCHAR *str; + GUID *id = &This->devguid; + static const WCHAR formatW[] = { '{','0','.','0','.','0','.','0','0','0','0','0','0','0','0','}','.', + '{','%','0','8','X','-','%','0','4','X','-', + '%','0','4','X','-','%','0','2','X','%','0','2','X','-', + '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X', + '%','0','2','X','%','0','2','X','}',0 }; TRACE("(%p)->(%p)\n", This, itemid); if (!itemid) return E_POINTER; - *itemid = NULL; - FIXME("stub\n"); - return E_NOTIMPL; + *itemid = str = CoTaskMemAlloc(56 * sizeof(WCHAR)); + if (!str) + return E_OUTOFMEMORY; + wsprintfW( str, formatW, id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); + return S_OK; } static HRESULT WINAPI MMDevice_GetState(IMMDevice *iface, DWORD *state) @@ -287,6 +395,46 @@ static const IMMDeviceVtbl MMDeviceVtbl = MMDevice_GetState }; +static MMDevice *get_this_from_endpoint(IMMEndpoint *iface) +{ + return (MMDevice*)((char*)iface - offsetof(MMDevice,lpEndpointVtbl)); +} + +static HRESULT WINAPI MMEndpoint_QueryInterface(IMMEndpoint *iface, REFIID riid, void **ppv) +{ + MMDevice *This = get_this_from_endpoint(iface); + return IMMDevice_QueryInterface((IMMDevice*)This, riid, ppv); +} + +static ULONG WINAPI MMEndpoint_AddRef(IMMEndpoint *iface) +{ + MMDevice *This = get_this_from_endpoint(iface); + return IMMDevice_AddRef((IMMDevice*)This); +} + +static ULONG WINAPI MMEndpoint_Release(IMMEndpoint *iface) +{ + MMDevice *This = get_this_from_endpoint(iface); + return IMMDevice_Release((IMMDevice*)This); +} + +static HRESULT WINAPI MMEndpoint_GetDataFlow(IMMEndpoint *iface, EDataFlow *flow) +{ + MMDevice *This = get_this_from_endpoint(iface); + if (!flow) + return E_POINTER; + *flow = This->flow; + return S_OK; +} + +static const IMMEndpointVtbl MMEndpointVtbl = +{ + MMEndpoint_QueryInterface, + MMEndpoint_AddRef, + MMEndpoint_Release, + MMEndpoint_GetDataFlow +}; + static HRESULT MMDevCol_Create(IMMDeviceCollection **ppv, EDataFlow flow, DWORD state) { MMDevColImpl *This; @@ -346,20 +494,45 @@ static ULONG WINAPI MMDevCol_Release(IMMDeviceCollection *iface) static HRESULT WINAPI MMDevCol_GetCount(IMMDeviceCollection *iface, UINT *numdevs) { MMDevColImpl *This = (MMDevColImpl*)iface; + DWORD i; TRACE("(%p)->(%p)\n", This, numdevs); if (!numdevs) return E_POINTER; + *numdevs = 0; + for (i = 0; i < MMDevice_count; ++i) + { + MMDevice *cur = MMDevice_head[i]; + if ((cur->flow == This->flow || This->flow == eAll) + && (cur->state & This->state)) + ++(*numdevs); + } return S_OK; } -static HRESULT WINAPI MMDevCol_Item(IMMDeviceCollection *iface, UINT i, IMMDevice **dev) +static HRESULT WINAPI MMDevCol_Item(IMMDeviceCollection *iface, UINT n, IMMDevice **dev) { MMDevColImpl *This = (MMDevColImpl*)iface; - TRACE("(%p)->(%u, %p)\n", This, i, dev); + DWORD i = 0, j = 0; + + TRACE("(%p)->(%u, %p)\n", This, n, dev); if (!dev) return E_POINTER; + + for (j = 0; j < MMDevice_count; ++j) + { + MMDevice *cur = MMDevice_head[j]; + if ((cur->flow == This->flow || This->flow == eAll) + && (cur->state & This->state) + && i++ == n) + { + *dev = (IMMDevice *)cur; + IMMDevice_AddRef(*dev); + return S_OK; + } + } + WARN("Could not obtain item %u\n", n); *dev = NULL; return E_INVALIDARG; } @@ -373,6 +546,139 @@ static const IMMDeviceCollectionVtbl MMDevColVtbl = MMDevCol_Item }; +static const WCHAR propkey_formatW[] = { + '{','%','0','8','X','-','%','0','4','X','-', + '%','0','4','X','-','%','0','2','X','%','0','2','X','-', + '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X', + '%','0','2','X','%','0','2','X','}',',','%','d',0 }; + +static HRESULT MMDevPropStore_OpenPropKey(const GUID *guid, DWORD flow, HKEY *propkey) +{ + WCHAR buffer[39]; + LONG ret; + HKEY key; + StringFromGUID2(guid, buffer, 39); + if ((ret = RegOpenKeyExW(flow == eRender ? key_render : key_capture, buffer, 0, KEY_READ|KEY_WRITE, &key)) != ERROR_SUCCESS) + { + WARN("Opening key %s failed with %u\n", debugstr_w(buffer), ret); + return E_FAIL; + } + ret = RegOpenKeyExW(key, reg_properties, 0, KEY_READ|KEY_WRITE, propkey); + RegCloseKey(key); + if (ret != ERROR_SUCCESS) + { + WARN("Opening key %s failed with %u\n", debugstr_w(reg_properties), ret); + return E_FAIL; + } + return S_OK; +} + +HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERTYKEY key, PROPVARIANT *pv) +{ + WCHAR buffer[80]; + const GUID *id = &key->fmtid; + DWORD type, size; + HRESULT hr = S_OK; + HKEY regkey; + LONG ret; + + hr = MMDevPropStore_OpenPropKey(devguid, flow, ®key); + if (FAILED(hr)) + return hr; + wsprintfW( buffer, propkey_formatW, id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], key->pid ); + ret = RegGetValueW(regkey, NULL, buffer, RRF_RT_ANY, &type, NULL, &size); + if (ret != ERROR_SUCCESS) + { + WARN("Reading %s returned %d\n", debugstr_w(buffer), ret); + RegCloseKey(regkey); + PropVariantClear(pv); + return S_OK; + } + + switch (type) + { + case REG_SZ: + { + pv->vt = VT_LPWSTR; + pv->u.pwszVal = CoTaskMemAlloc(size); + if (!pv->u.pwszVal) + hr = E_OUTOFMEMORY; + else + RegGetValueW(regkey, NULL, buffer, RRF_RT_REG_SZ, NULL, (BYTE*)pv->u.pwszVal, &size); + break; + } + case REG_DWORD: + { + pv->vt = VT_UI4; + RegGetValueW(regkey, NULL, buffer, RRF_RT_REG_DWORD, NULL, (BYTE*)&pv->u.ulVal, &size); + break; + } + case REG_BINARY: + { + pv->vt = VT_BLOB; + pv->u.blob.cbSize = size; + pv->u.blob.pBlobData = CoTaskMemAlloc(size); + if (!pv->u.blob.pBlobData) + hr = E_OUTOFMEMORY; + else + RegGetValueW(regkey, NULL, buffer, RRF_RT_REG_BINARY, NULL, (BYTE*)pv->u.blob.pBlobData, &size); + break; + } + default: + ERR("Unknown/unhandled type: %u\n", type); + PropVariantClear(pv); + break; + } + RegCloseKey(regkey); + return hr; +} + +HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERTYKEY key, REFPROPVARIANT pv) +{ + WCHAR buffer[80]; + const GUID *id = &key->fmtid; + HRESULT hr; + HKEY regkey; + LONG ret; + + hr = MMDevPropStore_OpenPropKey(devguid, flow, ®key); + if (FAILED(hr)) + return hr; + wsprintfW( buffer, propkey_formatW, id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], key->pid ); + switch (pv->vt) + { + case VT_UI4: + { + ret = RegSetValueExW(regkey, buffer, 0, REG_DWORD, (BYTE*)&pv->u.ulVal, sizeof(DWORD)); + break; + } + case VT_BLOB: + { + ret = RegSetValueExW(regkey, buffer, 0, REG_BINARY, pv->u.blob.pBlobData, pv->u.blob.cbSize); + TRACE("Blob %p %u\n", pv->u.blob.pBlobData, pv->u.blob.cbSize); + + break; + } + case VT_LPWSTR: + { + ret = RegSetValueExW(regkey, buffer, 0, REG_SZ, (BYTE*)pv->u.pwszVal, sizeof(WCHAR)*(1+lstrlenW(pv->u.pwszVal))); + break; + } + default: + ret = 0; + FIXME("Unhandled type %u\n", pv->vt); + hr = E_INVALIDARG; + break; + } + RegCloseKey(regkey); + TRACE("Writing %s returned %u\n", debugstr_w(buffer), ret); + return hr; +} + HRESULT MMDevEnum_Create(REFIID riid, void **ppv) { MMDevEnumImpl *This = MMDevEnumerator; @@ -411,6 +717,7 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv) WCHAR guidvalue[39]; GUID guid; DWORD len; + PROPVARIANT pv = { VT_EMPTY }; len = sizeof(guidvalue); ret = RegEnumKeyExW(cur, i++, guidvalue, &len, NULL, NULL, NULL, NULL); @@ -427,10 +734,14 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv) } if (ret != ERROR_SUCCESS) continue; - if (SUCCEEDED(CLSIDFromString(guidvalue, &guid))) - /* Using guid as friendly name till property store works */ - MMDevice_Create(guidvalue, &guid, curflow, + if (SUCCEEDED(CLSIDFromString(guidvalue, &guid)) + && SUCCEEDED(MMDevice_GetPropValue(&guid, curflow, (PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv)) + && pv.vt == VT_LPWSTR) + { + MMDevice_Create(pv.u.pwszVal, &guid, curflow, DEVICE_STATE_NOTPRESENT, FALSE); + CoTaskMemFree(pv.u.pwszVal); + } } while (1); } return IUnknown_QueryInterface((IUnknown*)This, riid, ppv); @@ -524,9 +835,31 @@ static HRESULT WINAPI MMDevEnum_GetDefaultAudioEndpoint(IMMDeviceEnumerator *ifa static HRESULT WINAPI MMDevEnum_GetDevice(IMMDeviceEnumerator *iface, const WCHAR *name, IMMDevice **device) { MMDevEnumImpl *This = (MMDevEnumImpl*)iface; + DWORD i=0; + IMMDevice *dev = NULL; + TRACE("(%p)->(%s,%p)\n", This, debugstr_w(name), device); - FIXME("stub\n"); - return E_NOTIMPL; + for (i = 0; i < MMDevice_count; ++i) + { + WCHAR *str; + dev = (IMMDevice*)MMDevice_head[i]; + IMMDevice_GetId(dev, &str); + + if (str && !lstrcmpW(str, name)) + { + CoTaskMemFree(str); + break; + } + CoTaskMemFree(str); + } + if (dev) + { + IUnknown_AddRef(dev); + *device = dev; + return S_OK; + } + WARN("Could not find device %s\n", debugstr_w(name)); + return E_NOTFOUND; } static HRESULT WINAPI MMDevEnum_RegisterEndpointNotificationCallback(IMMDeviceEnumerator *iface, IMMNotificationClient *client) @@ -556,3 +889,228 @@ static const IMMDeviceEnumeratorVtbl MMDevEnumVtbl = MMDevEnum_RegisterEndpointNotificationCallback, MMDevEnum_UnregisterEndpointNotificationCallback }; + +static HRESULT MMDevPropStore_Create(MMDevice *parent, DWORD access, IPropertyStore **ppv) +{ + MMDevPropStore *This; + if (access != STGM_READ + && access != STGM_WRITE + && access != STGM_READWRITE) + { + WARN("Invalid access %08x\n", access); + return E_INVALIDARG; + } + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + *ppv = (IPropertyStore*)This; + if (!This) + return E_OUTOFMEMORY; + This->lpVtbl = &MMDevPropVtbl; + This->ref = 1; + This->parent = parent; + This->access = access; + return S_OK; +} + +static void MMDevPropStore_Destroy(MMDevPropStore *This) +{ + HeapFree(GetProcessHeap(), 0, This); +} + +static HRESULT WINAPI MMDevPropStore_QueryInterface(IPropertyStore *iface, REFIID riid, void **ppv) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + + if (!ppv) + return E_POINTER; + if (IsEqualIID(riid, &IID_IUnknown) + || IsEqualIID(riid, &IID_IPropertyStore)) + *ppv = This; + else + *ppv = NULL; + if (!*ppv) + return E_NOINTERFACE; + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI MMDevPropStore_AddRef(IPropertyStore *iface) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + LONG ref = InterlockedIncrement(&This->ref); + TRACE("Refcount now %i\n", ref); + return ref; +} + +static ULONG WINAPI MMDevPropStore_Release(IPropertyStore *iface) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + LONG ref = InterlockedDecrement(&This->ref); + TRACE("Refcount now %i\n", ref); + if (!ref) + MMDevPropStore_Destroy(This); + return ref; +} + +static HRESULT WINAPI MMDevPropStore_GetCount(IPropertyStore *iface, DWORD *nprops) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + WCHAR buffer[50]; + DWORD i = 0; + HKEY propkey; + HRESULT hr; + + TRACE("(%p)->(%p)\n", iface, nprops); + if (!nprops) + return E_POINTER; + hr = MMDevPropStore_OpenPropKey(&This->parent->devguid, This->parent->flow, &propkey); + if (FAILED(hr)) + return hr; + *nprops = 0; + do { + DWORD len = sizeof(buffer)/sizeof(*buffer); + if (RegEnumKeyExW(propkey, i, buffer, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) + break; + i++; + } while (0); + RegCloseKey(propkey); + TRACE("Returning %i\n", i); + *nprops = i; + return S_OK; +} + +static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PROPERTYKEY *key) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + WCHAR buffer[50]; + DWORD len = sizeof(buffer)/sizeof(*buffer); + HRESULT hr; + HKEY propkey; + + TRACE("(%p)->(%u,%p)\n", iface, prop, key); + if (!key) + return E_POINTER; + + hr = MMDevPropStore_OpenPropKey(&This->parent->devguid, This->parent->flow, &propkey); + if (FAILED(hr)) + return hr; + + if (RegEnumKeyExW(propkey, prop, buffer, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS + || len <= 40) + { + WARN("GetAt %u failed\n", prop); + return E_INVALIDARG; + } + RegCloseKey(propkey); + buffer[39] = 0; + CLSIDFromString(buffer, &key->fmtid); + key->pid = atoiW(&buffer[40]); + return S_OK; +} + +static HRESULT WINAPI MMDevPropStore_GetValue(IPropertyStore *iface, REFPROPERTYKEY key, PROPVARIANT *pv) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + TRACE("(%p)->(\"%s,%u\", %p\n", This, debugstr_guid(&key->fmtid), key ? key->pid : 0, pv); + + if (!key || !pv) + return E_POINTER; + if (This->access != STGM_READ + && This->access != STGM_READWRITE) + return STG_E_ACCESSDENIED; + + /* Special case */ + if (IsEqualPropertyKey(*key, PKEY_AudioEndpoint_GUID)) + { + pv->u.pwszVal = CoTaskMemAlloc(39 * sizeof(WCHAR)); + if (!pv->u.pwszVal) + return E_OUTOFMEMORY; + StringFromGUID2(&This->parent->devguid, pv->u.pwszVal, 39); + return S_OK; + } + + return MMDevice_GetPropValue(&This->parent->devguid, This->parent->flow, key, pv); +} + +static HRESULT WINAPI MMDevPropStore_SetValue(IPropertyStore *iface, REFPROPERTYKEY key, REFPROPVARIANT pv) +{ + MMDevPropStore *This = (MMDevPropStore*)iface; + + if (!key || !pv) + return E_POINTER; + + if (This->access != STGM_WRITE + && This->access != STGM_READWRITE) + return STG_E_ACCESSDENIED; + return MMDevice_SetPropValue(&This->parent->devguid, This->parent->flow, key, pv); +} + +static HRESULT WINAPI MMDevPropStore_Commit(IPropertyStore *iface) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static const IPropertyStoreVtbl MMDevPropVtbl = +{ + MMDevPropStore_QueryInterface, + MMDevPropStore_AddRef, + MMDevPropStore_Release, + MMDevPropStore_GetCount, + MMDevPropStore_GetAt, + MMDevPropStore_GetValue, + MMDevPropStore_SetValue, + MMDevPropStore_Commit +}; + + +/* Property bag for IBaseFilter activation */ +static HRESULT WINAPI PB_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv) +{ + ERR("Should not be called\n"); + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI PB_AddRef(IPropertyBag *iface) +{ + ERR("Should not be called\n"); + return 2; +} + +static ULONG WINAPI PB_Release(IPropertyBag *iface) +{ + ERR("Should not be called\n"); + return 1; +} + +static HRESULT WINAPI PB_Read(IPropertyBag *iface, LPCOLESTR name, VARIANT *var, IErrorLog *log) +{ + static const WCHAR dsguid[] = { 'D','S','G','u','i','d', 0 }; + IPropertyBagImpl *This = (IPropertyBagImpl*)iface; + TRACE("Trying to read %s, type %u\n", debugstr_w(name), var->n1.n2.vt); + if (!lstrcmpW(name, dsguid)) + { + WCHAR guidstr[39]; + StringFromGUID2(&This->devguid, guidstr,sizeof(guidstr)/sizeof(*guidstr)); + var->n1.n2.vt = VT_BSTR; + var->n1.n2.n3.bstrVal = SysAllocString(guidstr); + return S_OK; + } + ERR("Unknown property '%s' queried\n", debugstr_w(name)); + return E_FAIL; +} + +static HRESULT WINAPI PB_Write(IPropertyBag *iface, LPCOLESTR name, VARIANT *var) +{ + ERR("Should not be called\n"); + return E_FAIL; +} + +static const IPropertyBagVtbl PB_Vtbl = +{ + PB_QueryInterface, + PB_AddRef, + PB_Release, + PB_Read, + PB_Write +}; diff --git a/dlls/mmdevapi/mmdevapi.h b/dlls/mmdevapi/mmdevapi.h index b1a3de2ddc2..cc4b3f26388 100644 --- a/dlls/mmdevapi/mmdevapi.h +++ b/dlls/mmdevapi/mmdevapi.h @@ -19,8 +19,12 @@ extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv); extern void MMDevEnum_Free(void); +extern HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERTYKEY key, PROPVARIANT *pv); +extern HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERTYKEY key, REFPROPVARIANT pv); + typedef struct MMDevice { const IMMDeviceVtbl *lpVtbl; + const IMMEndpointVtbl *lpEndpointVtbl; LONG ref; CRITICAL_SECTION crst; diff --git a/dlls/mmdevapi/tests/Makefile.in b/dlls/mmdevapi/tests/Makefile.in index 49ee5b394f9..da635a7a561 100644 --- a/dlls/mmdevapi/tests/Makefile.in +++ b/dlls/mmdevapi/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ render.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mmdevldr.vxd/Makefile.in b/dlls/mmdevldr.vxd/Makefile.in index 3a7750ce55e..feb853b28a6 100644 --- a/dlls/mmdevldr.vxd/Makefile.in +++ b/dlls/mmdevldr.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ mmdevldr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mmsystem.dll16/Makefile.in b/dlls/mmsystem.dll16/Makefile.in index 36bf23857c8..38bf0ef4d80 100644 --- a/dlls/mmsystem.dll16/Makefile.in +++ b/dlls/mmsystem.dll16/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ mmsystem.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/monodebg.vxd/Makefile.in b/dlls/monodebg.vxd/Makefile.in index 45ff3c2e46d..9413aa95587 100644 --- a/dlls/monodebg.vxd/Makefile.in +++ b/dlls/monodebg.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ monodebg.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mountmgr.sys/Makefile.in b/dlls/mountmgr.sys/Makefile.in index 2996c1c10aa..30b8937290d 100644 --- a/dlls/mountmgr.sys/Makefile.in +++ b/dlls/mountmgr.sys/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ mountmgr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mouse.drv16/Makefile.in b/dlls/mouse.drv16/Makefile.in index e4226946153..40f5a67b2d5 100644 --- a/dlls/mouse.drv16/Makefile.in +++ b/dlls/mouse.drv16/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = mouse.c RC_SRCS = mouse.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mpr/Makefile.in b/dlls/mpr/Makefile.in index 7150b54fb3b..471eeb6aafe 100644 --- a/dlls/mpr/Makefile.in +++ b/dlls/mpr/Makefile.in @@ -42,5 +42,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mprapi/Makefile.in b/dlls/mprapi/Makefile.in index 9dca2d4cffa..92c2ed5b5b4 100644 --- a/dlls/mprapi/Makefile.in +++ b/dlls/mprapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ mprapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msacm.dll16/Makefile.in b/dlls/msacm.dll16/Makefile.in index ae02dcfef5c..80d6f07ae83 100644 --- a/dlls/msacm.dll16/Makefile.in +++ b/dlls/msacm.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,msacm32.dll C_SRCS = msacm.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msacm32.drv/Makefile.in b/dlls/msacm32.drv/Makefile.in index dface4e765c..ca46e47a41d 100644 --- a/dlls/msacm32.drv/Makefile.in +++ b/dlls/msacm32.drv/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ wavemap.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msacm32/Makefile.in b/dlls/msacm32/Makefile.in index fc1e44f0b7a..d5a5761bcc9 100644 --- a/dlls/msacm32/Makefile.in +++ b/dlls/msacm32/Makefile.in @@ -40,5 +40,3 @@ RC_SRCS = \ msacm_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msacm32/tests/Makefile.in b/dlls/msacm32/tests/Makefile.in index 87a132c30a2..f9c0b2a9c0b 100644 --- a/dlls/msacm32/tests/Makefile.in +++ b/dlls/msacm32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ msacm.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msadp32.acm/Makefile.in b/dlls/msadp32.acm/Makefile.in index d1f4f2311e9..458554a1b3d 100644 --- a/dlls/msadp32.acm/Makefile.in +++ b/dlls/msadp32.acm/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = winmm user32 kernel32 C_SRCS = msadp32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mscat32/Makefile.in b/dlls/mscat32/Makefile.in index ba982abc03c..f0f83e9801c 100644 --- a/dlls/mscat32/Makefile.in +++ b/dlls/mscat32/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mscms/Makefile.in b/dlls/mscms/Makefile.in index 7f65b1200d1..5542fef34cd 100644 --- a/dlls/mscms/Makefile.in +++ b/dlls/mscms/Makefile.in @@ -18,5 +18,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mscms/tests/Makefile.in b/dlls/mscms/tests/Makefile.in index 594fc083ed9..15e92512322 100644 --- a/dlls/mscms/tests/Makefile.in +++ b/dlls/mscms/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ profile.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mscoree/Makefile.in b/dlls/mscoree/Makefile.in index cbdff510d50..57e98192123 100644 --- a/dlls/mscoree/Makefile.in +++ b/dlls/mscoree/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ mscoree_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msctf/Makefile.in b/dlls/msctf/Makefile.in index 22b17304c0e..bb1c35a16ea 100644 --- a/dlls/msctf/Makefile.in +++ b/dlls/msctf/Makefile.in @@ -9,6 +9,7 @@ C_SRCS = \ categorymgr.c \ compartmentmgr.c \ context.c \ + displayattributemgr.c \ documentmgr.c \ inputprocessor.c \ langbarmgr.c \ @@ -21,5 +22,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msctf/displayattributemgr.c b/dlls/msctf/displayattributemgr.c new file mode 100644 index 00000000000..75248cd4393 --- /dev/null +++ b/dlls/msctf/displayattributemgr.c @@ -0,0 +1,139 @@ +/* + * ITfDisplayAttributeMgr implementation + * + * Copyright 2010 CodeWeavers, Aric Stewart + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "wine/debug.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "msctf.h" +#include "msctf_internal.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msctf); + +typedef struct tagDisplayAttributeMgr { + const ITfDisplayAttributeMgrVtbl *DisplayAttributeMgrVtbl; + + LONG refCount; + +} DisplayAttributeMgr; + +static void DisplayAttributeMgr_Destructor(DisplayAttributeMgr *This) +{ + TRACE("destroying %p\n", This); + + HeapFree(GetProcessHeap(),0,This); +} + +static HRESULT WINAPI DisplayAttributeMgr_QueryInterface(ITfDisplayAttributeMgr *iface, REFIID iid, LPVOID *ppvOut) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + *ppvOut = NULL; + + if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfDisplayAttributeMgr)) + { + *ppvOut = This; + } + + if (*ppvOut) + { + IUnknown_AddRef(iface); + return S_OK; + } + + WARN("unsupported interface: %s\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI DisplayAttributeMgr_AddRef(ITfDisplayAttributeMgr *iface) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + return InterlockedIncrement(&This->refCount); +} + +static ULONG WINAPI DisplayAttributeMgr_Release(ITfDisplayAttributeMgr *iface) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + ULONG ret; + + ret = InterlockedDecrement(&This->refCount); + if (ret == 0) + DisplayAttributeMgr_Destructor(This); + return ret; +} + +/***************************************************** + * ITfDisplayAttributeMgr functions + *****************************************************/ + +static HRESULT WINAPI DisplayAttributeMgr_OnUpdateInfo(ITfDisplayAttributeMgr *iface) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DisplayAttributeMgr_EnumDisplayAttributeInfo(ITfDisplayAttributeMgr *iface, IEnumTfDisplayAttributeInfo **ppEnum) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttributeMgr *iface, REFGUID guid, ITfDisplayAttributeInfo **ppInfo, CLSID *pclsidOwner) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static const ITfDisplayAttributeMgrVtbl DisplayAttributeMgr_DisplayAttributeMgrVtbl = +{ + DisplayAttributeMgr_QueryInterface, + DisplayAttributeMgr_AddRef, + DisplayAttributeMgr_Release, + + DisplayAttributeMgr_OnUpdateInfo, + DisplayAttributeMgr_EnumDisplayAttributeInfo, + DisplayAttributeMgr_GetDisplayAttributeInfo +}; + +HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) +{ + DisplayAttributeMgr *This; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + This = HeapAlloc(GetProcessHeap(),0,sizeof(DisplayAttributeMgr)); + if (This == NULL) + return E_OUTOFMEMORY; + + This->DisplayAttributeMgrVtbl= &DisplayAttributeMgr_DisplayAttributeMgrVtbl; + This->refCount = 1; + + TRACE("returning %p\n", This); + *ppOut = (IUnknown *)This; + return S_OK; +} diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c index 62d1ff2abd8..759fe7ec579 100644 --- a/dlls/msctf/msctf.c +++ b/dlls/msctf/msctf.c @@ -88,6 +88,7 @@ static const struct { {&CLSID_TF_InputProcessorProfiles, InputProcessorProfiles_Constructor}, {&CLSID_TF_CategoryMgr, CategoryMgr_Constructor}, {&CLSID_TF_LangBarMgr, LangBarMgr_Constructor}, + {&CLSID_TF_DisplayAttributeMgr, DisplayAttributeMgr_Constructor}, {NULL, NULL} }; diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index 57423e996fc..9aaaad0fb1b 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -41,6 +41,7 @@ extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, extern HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut); extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This); extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); +extern HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); extern HRESULT Context_Initialize(ITfContext *cxt, ITfDocumentMgr *manager); extern HRESULT Context_Uninitialize(ITfContext *cxt); diff --git a/dlls/msctf/regsvr.c b/dlls/msctf/regsvr.c index 2af1f241154..65ebb1da122 100644 --- a/dlls/msctf/regsvr.c +++ b/dlls/msctf/regsvr.c @@ -469,6 +469,13 @@ static struct regsvr_coclass const coclass_list[] = { "msctf.dll", "Apartment" }, + { + &CLSID_TF_DisplayAttributeMgr, + "TF_DisplayAttributeMgr", + NULL, + "msctf.dll", + "Apartment" + }, { NULL } /* list terminator */ }; diff --git a/dlls/msctf/tests/Makefile.in b/dlls/msctf/tests/Makefile.in index 9ab32255940..7ce66a9876d 100644 --- a/dlls/msctf/tests/Makefile.in +++ b/dlls/msctf/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ inputprocessor.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msdaps/Makefile.in b/dlls/msdaps/Makefile.in index 8836f589b79..efa8f4abed8 100644 --- a/dlls/msdaps/Makefile.in +++ b/dlls/msdaps/Makefile.in @@ -24,5 +24,3 @@ IDL_P_SRCS = \ row_server.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msdmo/Makefile.in b/dlls/msdmo/Makefile.in index 2e50dbe278e..3565a92b5ec 100644 --- a/dlls/msdmo/Makefile.in +++ b/dlls/msdmo/Makefile.in @@ -14,5 +14,3 @@ RC_SRCS = \ rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msftedit/Makefile.in b/dlls/msftedit/Makefile.in index d00682aed6d..b741f89318c 100644 --- a/dlls/msftedit/Makefile.in +++ b/dlls/msftedit/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msg711.acm/Makefile.in b/dlls/msg711.acm/Makefile.in index 0579d37063d..4d11009c649 100644 --- a/dlls/msg711.acm/Makefile.in +++ b/dlls/msg711.acm/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = winmm user32 kernel32 C_SRCS = msg711.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msgsm32.acm/Makefile.in b/dlls/msgsm32.acm/Makefile.in index f9b6602b3a5..9164efb074f 100644 --- a/dlls/msgsm32.acm/Makefile.in +++ b/dlls/msgsm32.acm/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = winmm user32 kernel32 C_SRCS = msgsm32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mshtml.tlb/Makefile.in b/dlls/mshtml.tlb/Makefile.in index d1412639405..a58f7226d34 100644 --- a/dlls/mshtml.tlb/Makefile.in +++ b/dlls/mshtml.tlb/Makefile.in @@ -9,5 +9,3 @@ RC_SRCS = rsrc.rc IDL_TLB_SRCS = mshtml_tlb.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mshtml/Makefile.in b/dlls/mshtml/Makefile.in index 290f8aeb6bd..dcd81de7669 100644 --- a/dlls/mshtml/Makefile.in +++ b/dlls/mshtml/Makefile.in @@ -100,5 +100,3 @@ RC_SRCS = \ IDL_H_SRCS = nsiface.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 8adfdb14b43..12aa8c002dc 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -554,9 +554,12 @@ static HRESULT WINAPI HTMLDocument_get_vlinkColor(IHTMLDocument2 *iface, VARIANT static HRESULT WINAPI HTMLDocument_get_referrer(IHTMLDocument2 *iface, BSTR *p) { HTMLDocument *This = HTMLDOC_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; -} + + *p = NULL; + return S_OK; + } static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLocation **p) { @@ -1474,7 +1477,7 @@ static void HTMLDocument_on_advise(IUnknown *iface, cp_static_data_t *cp) HTMLDocument *This = HTMLDOC_THIS(iface); if(This->window) - update_cp_events(This->window, cp); + update_cp_events(This->window, &This->doc_node->node.event_target, cp, This->doc_node->node.nsnode); } #undef HTMLDOC_THIS @@ -1596,6 +1599,11 @@ static HRESULT WINAPI DocDispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID { HTMLDocument *This = DISPEX_THIS(iface); + if(This->window && id == DISPID_IHTMLDOCUMENT2_LOCATION && (wFlags & DISPATCH_PROPERTYPUT)) + return IDispatchEx_InvokeEx(DISPATCHEX(This->window), DISPID_IHTMLWINDOW2_LOCATION, lcid, wFlags, + pdp, pvarRes, pei, pspCaller); + + return IDispatchEx_InvokeEx(This->dispex, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); } diff --git a/dlls/mshtml/htmldoc3.c b/dlls/mshtml/htmldoc3.c index 9079bbc79c7..e28297fce14 100644 --- a/dlls/mshtml/htmldoc3.c +++ b/dlls/mshtml/htmldoc3.c @@ -182,7 +182,7 @@ static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR even TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult); - return attach_event(&This->doc_node->node.event_target, This, event, pDisp, pfResult); + return attach_event(&This->doc_node->node.event_target, This->doc_node->node.nsnode, This, event, pDisp, pfResult); } static HRESULT WINAPI HTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event, diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c index cd877ceaf30..548bab8b2f5 100644 --- a/dlls/mshtml/htmlelem2.c +++ b/dlls/mshtml/htmlelem2.c @@ -649,7 +649,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event, TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult); - return attach_event(get_node_event_target(&This->node), &This->node.doc->basedoc, event, pDisp, pfResult); + return attach_event(get_node_event_target(&This->node), This->node.nsnode, &This->node.doc->basedoc, event, pDisp, pfResult); } static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 54429c34a20..eef006c962c 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -40,6 +40,7 @@ typedef struct { } handler_vector_t; struct event_target_t { + DWORD node_handlers_mask; handler_vector_t *event_table[EVENTID_LAST]; }; @@ -129,6 +130,7 @@ typedef struct { #define EVENT_DEFAULTLISTENER 0x0001 #define EVENT_BUBBLE 0x0002 #define EVENT_FORWARDBODY 0x0004 +#define EVENT_NODEHANDLER 0x0008 static const event_info_t event_info[] = { {beforeunloadW, onbeforeunloadW, EVENTT_NONE, DISPID_EVMETH_ONBEFOREUNLOAD, @@ -152,7 +154,7 @@ static const event_info_t event_info[] = { {keyupW, onkeyupW, EVENTT_KEY, DISPID_EVMETH_ONKEYUP, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {loadW, onloadW, EVENTT_HTML, DISPID_EVMETH_ONLOAD, - 0}, + EVENT_NODEHANDLER}, {mousedownW, onmousedownW, EVENTT_MOUSE, DISPID_EVMETH_ONMOUSEDOWN, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {mouseoutW, onmouseoutW, EVENTT_MOUSE, DISPID_EVMETH_ONMOUSEOUT, @@ -171,6 +173,8 @@ static const event_info_t event_info[] = { 0} }; +static const eventid_t node_handled_list[] = { EVENTID_LOAD }; + eventid_t str_to_eid(LPCWSTR str) { int i; @@ -196,6 +200,19 @@ static eventid_t attr_to_eid(LPCWSTR str) return EVENTID_LAST; } +static DWORD get_node_handler_mask(eventid_t eid) +{ + DWORD i; + + for(i=0; ibasedoc.window->event; - event_obj = doc->basedoc.window->event = create_event(get_node(doc, target, TRUE), eid, nsevent); + if(set_event) + event_obj = create_event(get_node(doc, target, TRUE), eid, nsevent); + doc->basedoc.window->event = event_obj; nsIDOMNode_GetNodeType(target, &node_type); nsnode = target; @@ -949,7 +968,8 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, nsIDOMNode *target, nsIDOM if(nsnode) nsIDOMNode_Release(nsnode); - IHTMLEventObj_Release(event_obj); + if(event_obj) + IHTMLEventObj_Release(event_obj); doc->basedoc.window->event = prev_event; } @@ -971,7 +991,7 @@ HRESULT dispatch_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *even return E_NOTIMPL; } - fire_event(node->doc, eid, node->nsnode, NULL); + fire_event(node->doc, eid, TRUE, node->nsnode, NULL); *cancelled = VARIANT_TRUE; /* FIXME */ return S_OK; @@ -989,7 +1009,7 @@ HRESULT call_event(HTMLDOMNode *node, eventid_t eid) return hres; } - fire_event(node->doc, eid, node->nsnode, NULL); + fire_event(node->doc, eid, TRUE, node->nsnode, NULL); return S_OK; } @@ -1021,9 +1041,24 @@ static BOOL alloc_handler_vector(event_target_t *event_target, eventid_t eid, in return TRUE; } -static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, eventid_t eid) +static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, event_target_t *event_target, nsIDOMNode *nsnode, eventid_t eid) { - if(!doc->nsdoc || !(event_info[eid].flags & EVENT_DEFAULTLISTENER)) + if(!doc->nsdoc) + return S_OK; + + if(event_info[eid].flags & EVENT_NODEHANDLER) { + DWORD mask; + + mask = get_node_handler_mask(eid); + if(event_target->node_handlers_mask & mask) + return S_OK; + + add_nsevent_listener(doc, nsnode, event_info[eid].name); + event_target->node_handlers_mask |= mask; + return S_OK; + } + + if(!(event_info[eid].flags & EVENT_DEFAULTLISTENER)) return S_OK; if(!doc->event_vector) { @@ -1034,17 +1069,30 @@ static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, eventid_t eid) if(!doc->event_vector[eid]) { doc->event_vector[eid] = TRUE; - add_nsevent_listener(doc, event_info[eid].name); + add_nsevent_listener(doc, NULL, event_info[eid].name); } return S_OK; } -static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, HTMLDocumentNode *doc, +static HRESULT remove_event_handler(event_target_t **event_target, eventid_t eid) +{ + if(*event_target && (*event_target)->event_table[eid]->handler_prop) { + IDispatch_Release((*event_target)->event_table[eid]->handler_prop); + (*event_target)->event_table[eid]->handler_prop = NULL; + } + + return S_OK; +} + +static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, nsIDOMNode *nsnode, HTMLDocumentNode *doc, eventid_t eid, IDispatch *disp) { event_target_t *event_target; + if(!disp) + return remove_event_handler(event_target_ptr, eid); + event_target = get_event_target(event_target_ptr); if(!event_target) return E_OUTOFMEMORY; @@ -1056,25 +1104,19 @@ static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, HTMLDoc IDispatch_Release(event_target->event_table[eid]->handler_prop); event_target->event_table[eid]->handler_prop = disp; - if(!disp) - return S_OK; IDispatch_AddRef(disp); - return ensure_nsevent_handler(doc, eid); + return ensure_nsevent_handler(doc, event_target, nsnode, eid); } -HRESULT set_event_handler(event_target_t **event_target, HTMLDocumentNode *doc, eventid_t eid, VARIANT *var) +HRESULT set_event_handler(event_target_t **event_target, nsIDOMNode *nsnode, HTMLDocumentNode *doc, eventid_t eid, VARIANT *var) { switch(V_VT(var)) { case VT_NULL: - if(*event_target && (*event_target)->event_table[eid] && (*event_target)->event_table[eid]->handler_prop) { - IDispatch_Release((*event_target)->event_table[eid]->handler_prop); - (*event_target)->event_table[eid]->handler_prop = NULL; - } - break; + return remove_event_handler(event_target, eid); case VT_DISPATCH: - return set_event_handler_disp(event_target, doc, eid, V_DISPATCH(var)); + return set_event_handler_disp(event_target, nsnode, doc, eid, V_DISPATCH(var)); default: FIXME("not supported vt=%d\n", V_VT(var)); @@ -1098,7 +1140,8 @@ HRESULT get_event_handler(event_target_t **event_target, eventid_t eid, VARIANT return S_OK; } -HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR name, IDispatch *disp, VARIANT_BOOL *res) +HRESULT attach_event(event_target_t **event_target_ptr, nsIDOMNode *nsnode, HTMLDocument *doc, BSTR name, + IDispatch *disp, VARIANT_BOOL *res) { event_target_t *event_target; eventid_t eid; @@ -1128,7 +1171,7 @@ HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR event_target->event_table[eid]->handlers[i] = disp; *res = VARIANT_TRUE; - return ensure_nsevent_handler(doc->doc_node, eid); + return ensure_nsevent_handler(doc->doc_node, event_target, nsnode, eid); } HRESULT detach_event(event_target_t *event_target, HTMLDocument *doc, BSTR name, IDispatch *disp) @@ -1159,13 +1202,18 @@ HRESULT detach_event(event_target_t *event_target, HTMLDocument *doc, BSTR name, return S_OK; } -void update_cp_events(HTMLWindow *window, cp_static_data_t *cp) +void update_cp_events(HTMLWindow *window, event_target_t **event_target_ptr, cp_static_data_t *cp, nsIDOMNode *nsnode) { + event_target_t *event_target; int i; + event_target = get_event_target(event_target_ptr); + if(!event_target) + return; /* FIXME */ + for(i=0; i < EVENTID_LAST; i++) { if((event_info[i].flags & EVENT_DEFAULTLISTENER) && is_cp_event(cp, event_info[i].dispid)) - ensure_nsevent_handler(window->doc, i); + ensure_nsevent_handler(window->doc, event_target, nsnode, i); } } @@ -1194,7 +1242,7 @@ void check_event_attr(HTMLDocumentNode *doc, nsIDOMElement *nselem) disp = script_parse_event(doc->basedoc.window, attr_value); if(disp) { node = get_node(doc, (nsIDOMNode*)nselem, TRUE); - set_event_handler_disp(get_node_event_target(node), node->doc, i, disp); + set_event_handler_disp(get_node_event_target(node), node->nsnode, node->doc, i, disp); IDispatch_Release(disp); } } diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index 96ff4cdab5b..6ba2fe29dc7 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -42,14 +42,14 @@ typedef enum { eventid_t str_to_eid(LPCWSTR); void check_event_attr(HTMLDocumentNode*,nsIDOMElement*); void release_event_target(event_target_t*); -void fire_event(HTMLDocumentNode*,eventid_t,nsIDOMNode*,nsIDOMEvent*); -HRESULT set_event_handler(event_target_t**,HTMLDocumentNode*,eventid_t,VARIANT*); +void fire_event(HTMLDocumentNode*,eventid_t,BOOL,nsIDOMNode*,nsIDOMEvent*); +HRESULT set_event_handler(event_target_t**,nsIDOMNode*,HTMLDocumentNode*,eventid_t,VARIANT*); HRESULT get_event_handler(event_target_t**,eventid_t,VARIANT*); -HRESULT attach_event(event_target_t**,HTMLDocument*,BSTR,IDispatch*,VARIANT_BOOL*); +HRESULT attach_event(event_target_t**,nsIDOMNode*,HTMLDocument*,BSTR,IDispatch*,VARIANT_BOOL*); HRESULT detach_event(event_target_t*,HTMLDocument*,BSTR,IDispatch*); HRESULT dispatch_event(HTMLDOMNode*,const WCHAR*,VARIANT*,VARIANT_BOOL*); HRESULT call_event(HTMLDOMNode*,eventid_t); -void update_cp_events(HTMLWindow*,cp_static_data_t*); +void update_cp_events(HTMLWindow*,event_target_t**,cp_static_data_t*,nsIDOMNode*); static inline event_target_t **get_node_event_target(HTMLDOMNode *node) { @@ -58,7 +58,7 @@ static inline event_target_t **get_node_event_target(HTMLDOMNode *node) static inline HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var) { - return set_event_handler(get_node_event_target(node), node->doc, eid, var); + return set_event_handler(get_node_event_target(node), node->nsnode, node->doc, eid, var); } static inline HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var) diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c index 17b6cceac95..a4448f9588f 100644 --- a/dlls/mshtml/htmlimg.c +++ b/dlls/mshtml/htmlimg.c @@ -28,6 +28,7 @@ #include "wine/debug.h" #include "mshtml_private.h" +#include "htmlevent.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); @@ -388,15 +389,19 @@ static HRESULT WINAPI HTMLImgElement_get_align(IHTMLImgElement *iface, BSTR *p) static HRESULT WINAPI HTMLImgElement_put_onload(IHTMLImgElement *iface, VARIANT v) { HTMLImgElement *This = HTMLIMG_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + return set_node_event(&This->element.node, EVENTID_LOAD, &v); } static HRESULT WINAPI HTMLImgElement_get_onload(IHTMLImgElement *iface, VARIANT *p) { HTMLImgElement *This = HTMLIMG_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_event(&This->element.node, EVENTID_LOAD, p); } static HRESULT WINAPI HTMLImgElement_put_onerror(IHTMLImgElement *iface, VARIANT v) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 491625ed241..2aafaa3e4b4 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -126,7 +126,7 @@ static inline HRESULT set_window_event(HTMLWindow *window, eventid_t eid, VARIAN return E_FAIL; } - return set_event_handler(&window->doc->body_event_target, window->doc, eid, var); + return set_event_handler(&window->doc->body_event_target, NULL, window->doc, eid, var); } static inline HRESULT get_window_event(HTMLWindow *window, eventid_t eid, VARIANT *var) @@ -1419,7 +1419,7 @@ static HRESULT WINAPI HTMLWindow3_attachEvent(IHTMLWindow3 *iface, BSTR event, I return E_FAIL; } - return attach_event(&This->doc->body_event_target, &This->doc->basedoc, event, pDisp, pfResult); + return attach_event(&This->doc->body_event_target, NULL, &This->doc->basedoc, event, pDisp, pfResult); } static HRESULT WINAPI HTMLWindow3_detachEvent(IHTMLWindow3 *iface, BSTR event, IDispatch *pDisp) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 5a409b3cae5..228be35864e 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -736,7 +736,7 @@ nsresult get_nsinterface(nsISupports*,REFIID,void**); void init_nsevents(HTMLDocumentNode*); void release_nsevents(HTMLDocumentNode*); -void add_nsevent_listener(HTMLDocumentNode*,LPCWSTR); +void add_nsevent_listener(HTMLDocumentNode*,nsIDOMNode*,LPCWSTR); void set_window_bscallback(HTMLWindow*,nsChannelBSC*); void set_current_mon(HTMLWindow*,IMoniker*); diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 61ceca83525..a7942043557 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -338,6 +338,9 @@ static void handle_end_load(HTMLDocumentNode *This) TRACE("\n"); + if(!This->basedoc.doc_obj) + return; + if(This != This->basedoc.doc_obj->basedoc.doc_node) { set_ready_state(This->basedoc.window, READYSTATE_INTERACTIVE); return; diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index a09ea7f64d6..cc2aeb3f6c2 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -972,8 +972,11 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream) on_start_nsrequest(This); - if(This->window) + if(This->window) { update_window_doc(This->window); + if(This->window->readystate != READYSTATE_LOADING) + set_ready_state(This->window, READYSTATE_LOADING); + } } This->bsc.readed += This->nsstream->buf_size; diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index 65bcae05c31..c491424fdd4 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -216,7 +216,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event TRACE("(%p)\n", doc); - if(!doc) + if(!doc || !doc->basedoc.window) return NS_ERROR_FAILURE; doc_obj = doc->basedoc.doc_obj; @@ -254,7 +254,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event nsIDOMHTMLDocument_GetBody(doc->nsdoc, &nsbody); if(nsbody) { - fire_event(doc, EVENTID_LOAD, (nsIDOMNode*)nsbody, event); + fire_event(doc, EVENTID_LOAD, TRUE, (nsIDOMNode*)nsbody, event); nsIDOMHTMLElement_Release(nsbody); } @@ -271,6 +271,8 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent * eventid_t eid; nsresult nsres; + TRACE("\n"); + nsAString_Init(&type_str, NULL); nsIDOMEvent_GetType(event, &type_str); nsAString_GetData(&type_str, &type); @@ -290,7 +292,7 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent * return NS_OK; } - fire_event(doc, eid, nsnode, event); + fire_event(doc, eid, TRUE, nsnode, event); nsIDOMNode_Release(nsnode); @@ -334,12 +336,15 @@ static void init_listener(nsEventListener *This, nsDocumentEventListener *listen This->This = listener; } -void add_nsevent_listener(HTMLDocumentNode *doc, LPCWSTR type) +void add_nsevent_listener(HTMLDocumentNode *doc, nsIDOMNode *nsnode, LPCWSTR type) { nsIDOMEventTarget *target; nsresult nsres; - nsres = nsIDOMWindow_QueryInterface(doc->basedoc.window->nswindow, &IID_nsIDOMEventTarget, (void**)&target); + if(nsnode) + nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMEventTarget, (void**)&target); + else + nsres = nsIDOMWindow_QueryInterface(doc->basedoc.window->nswindow, &IID_nsIDOMEventTarget, (void**)&target); if(NS_FAILED(nsres)) { ERR("Could not get nsIDOMEventTarget interface: %08x\n", nsres); return; diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index f4e6f4bcb56..88a4e55254b 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -904,7 +904,7 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen open = FALSE; }else { - open = before_async_open(This, window->doc_obj->nscontainer); + open = !before_async_open(This, window->doc_obj->nscontainer); if(!open) { TRACE("canceled\n"); nsres = NS_ERROR_UNEXPECTED; diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index dc0fb4a8ca4..d127eef57f7 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -160,19 +160,28 @@ static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p) { OmNavigator *This = OMNAVIGATOR_THIS(iface); - /* FIXME: Should we return something smarter? */ - static const WCHAR app_verW[] = - {'4','.','0',' ','(','c','o','m','p','a','t','i','b','l','e',';', - ' ','M','S','I','E',' ','7','.','0',';', - ' ','W','i','n','d','o','w','s',' ','N','T',' ','5','.','1',';', - ' ','M','o','z','i','l','l','a','/','4','.','0',')',0}; + char user_agent[512]; + DWORD size; + HRESULT hres; TRACE("(%p)->(%p)\n", This, p); - *p = SysAllocString(app_verW); + size = sizeof(user_agent); + hres = ObtainUserAgentString(0, user_agent, &size); + if(FAILED(hres)) + return hres; + + if(strncmp(user_agent, "Mozilla/", 8)) { + FIXME("Unsupported user agent\n"); + return E_FAIL; + } + + size = MultiByteToWideChar(CP_ACP, 0, user_agent+8, -1, NULL, 0); + *p = SysAllocStringLen(NULL, size-1); if(!*p) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, user_agent+8, -1, *p, size); return S_OK; } diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 720a58edbf8..44ccd0f6b2c 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -108,6 +108,7 @@ static void set_progress_proc(task_t *_task) V_I4(&progress) = 0; /* FIXME */ IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER, &progress, NULL); + IOleCommandTarget_Release(olecmd); } if(doc->usermode == EDITMODE && doc->hostui) { @@ -282,11 +283,15 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel void set_ready_state(HTMLWindow *window, READYSTATE readystate) { window->readystate = readystate; + if(window->doc_obj && window->doc_obj->basedoc.window == window) call_property_onchanged(&window->doc_obj->basedoc.cp_propnotif, DISPID_READYSTATE); + + fire_event(window->doc, EVENTID_READYSTATECHANGE, FALSE, window->doc->node.nsnode, NULL); + if(window->frame_element) fire_event(window->frame_element->element.node.doc, EVENTID_READYSTATECHANGE, - window->frame_element->element.node.nsnode, NULL); + TRUE, window->frame_element->element.node.nsnode, NULL); } static HRESULT get_doc_string(HTMLDocumentNode *This, char **str) diff --git a/dlls/mshtml/tests/Makefile.in b/dlls/mshtml/tests/Makefile.in index a671ed9e5af..2c867660381 100644 --- a/dlls/mshtml/tests/Makefile.in +++ b/dlls/mshtml/tests/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 25bf7641eb1..c6f54793ce5 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -3173,6 +3173,16 @@ static void test_navigator(IHTMLDocument2 *doc) ok(!strcmp_wa(bstr, buf), "userAgent returned %s, expected \"%s\"\n", wine_dbgstr_w(bstr), buf); SysFreeString(bstr); + if(!strncmp(buf, "Mozilla/", 8)) { + bstr = NULL; + hres = IOmNavigator_get_appVersion(navigator, &bstr); + ok(hres == S_OK, "get_appVersion failed: %08x\n", hres); + ok(!strcmp_wa(bstr, buf+8), "appVersion returned %s, expected \"%s\"\n", wine_dbgstr_w(bstr), buf+8); + SysFreeString(bstr); + }else { + skip("nonstandard user agent\n"); + } + ref = IOmNavigator_Release(navigator); ok(!ref, "navigator should be destroyed here\n"); } @@ -3185,8 +3195,6 @@ static void test_screen(IHTMLWindow2 *window) HDC hdc; HRESULT hres; - static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0}; - screen = NULL; hres = IHTMLWindow2_get_screen(window, &screen); ok(hres == S_OK, "get_screen failed: %08x\n", hres); @@ -3206,7 +3214,7 @@ static void test_screen(IHTMLWindow2 *window) IDispatchEx_Release(dispex); } - hdc = CreateICW(displayW, NULL, NULL, NULL); + hdc = CreateICA("DISPLAY", NULL, NULL, NULL); exl = GetDeviceCaps(hdc, HORZRES); l = 0xdeadbeef; diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index 16f727fdec7..d62df7a3b0b 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -67,6 +67,8 @@ DEFINE_EXPECT(div_onclick_disp); DEFINE_EXPECT(iframe_onreadystatechange_loading); DEFINE_EXPECT(iframe_onreadystatechange_interactive); DEFINE_EXPECT(iframe_onreadystatechange_complete); +DEFINE_EXPECT(iframedoc_onreadystatechange); +DEFINE_EXPECT(img_onload); static HWND container_hwnd = NULL; static IHTMLWindow2 *window; @@ -92,7 +94,10 @@ static const char click_doc_str[] = ""; static const char readystate_doc_str[] = - "<"; + ""; + +static const char img_doc_str[] = + ""; static const char *debugstr_guid(REFIID riid) { @@ -879,14 +884,46 @@ static HRESULT WINAPI body_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WOR EVENT_HANDLER_FUNC_OBJ(body_onclick); +static HRESULT WINAPI img_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + CHECK_EXPECT(img_onload); + test_event_args(&DIID_DispHTMLImg, id, wFlags, pdp, pvarRes, pei, pspCaller); + test_event_src("IMG"); + return S_OK; +} + +EVENT_HANDLER_FUNC_OBJ(img_onload); + +static HRESULT WINAPI iframedoc_onreadystatechange(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + IHTMLEventObj *event = NULL; + HRESULT hres; + + CHECK_EXPECT2(iframedoc_onreadystatechange); + test_event_args(&DIID_DispHTMLDocument, id, wFlags, pdp, pvarRes, pei, pspCaller); + + event = (void*)0xdeadbeef; + hres = IHTMLWindow2_get_event(window, &event); + ok(hres == S_OK, "get_event failed: %08x\n", hres); + ok(!event, "event = %p\n", event); + + return S_OK; +} + +EVENT_HANDLER_FUNC_OBJ(iframedoc_onreadystatechange); + static HRESULT WINAPI iframe_onreadystatechange(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { + IHTMLWindow2 *iframe_window; + IHTMLDocument2 *iframe_doc; IHTMLFrameBase2 *iframe; IHTMLElement2 *elem2; IHTMLElement *elem; VARIANT v; - BSTR str; + BSTR str, str2; HRESULT hres; test_event_args(&DIID_DispHTMLIFrame, id, wFlags, pdp, pvarRes, pei, pspCaller); @@ -913,15 +950,33 @@ static HRESULT WINAPI iframe_onreadystatechange(IDispatchEx *iface, DISPID id, L ok(!lstrcmpW(str, V_BSTR(&v)), "ready states differ\n"); VariantClear(&v); - if(!strcmp_wa(str, "loading")) + hres = IHTMLFrameBase2_get_contentWindow(iframe, &iframe_window); + ok(hres == S_OK, "get_contentDocument failed: %08x\n", hres); + + hres = IHTMLWindow2_get_document(iframe_window, &iframe_doc); + IHTMLWindow2_Release(iframe_window); + ok(hres == S_OK, "get_document failed: %08x\n", hres); + + hres = IHTMLDocument2_get_readyState(iframe_doc, &str2); + ok(!lstrcmpW(str, str2), "unexpected document readyState %s\n", wine_dbgstr_w(str2)); + SysFreeString(str2); + + if(!strcmp_wa(str, "loading")) { CHECK_EXPECT(iframe_onreadystatechange_loading); - else if(!strcmp_wa(str, "interactive")) + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = (IDispatch*)&iframedoc_onreadystatechange_obj; + hres = IHTMLDocument2_put_onreadystatechange(iframe_doc, v); + ok(hres == S_OK, "put_onreadystatechange: %08x\n", hres); + }else if(!strcmp_wa(str, "interactive")) CHECK_EXPECT(iframe_onreadystatechange_interactive); else if(!strcmp_wa(str, "complete")) CHECK_EXPECT(iframe_onreadystatechange_complete); else ok(0, "unexpected state %s\n", wine_dbgstr_w(str)); + IHTMLDocument2_Release(iframe_doc); + IHTMLFrameBase2_Release(iframe); return S_OK; } @@ -1307,17 +1362,60 @@ static void test_onreadystatechange(IHTMLDocument2 *doc) ok(hres == S_OK, "put_src failed: %08x\n", hres); SET_EXPECT(iframe_onreadystatechange_loading); + SET_EXPECT(iframedoc_onreadystatechange); SET_EXPECT(iframe_onreadystatechange_interactive); SET_EXPECT(iframe_onreadystatechange_complete); pump_msgs(&called_iframe_onreadystatechange_complete); - todo_wine CHECK_CALLED(iframe_onreadystatechange_loading); + CHECK_CALLED(iframedoc_onreadystatechange); CHECK_CALLED(iframe_onreadystatechange_interactive); CHECK_CALLED(iframe_onreadystatechange_complete); IHTMLFrameBase_Release(iframe); } +static void test_imgload(IHTMLDocument2 *doc) +{ + IHTMLImgElement *img; + IHTMLElement *elem; + VARIANT v; + BSTR str; + HRESULT hres; + + elem = get_elem_id(doc, "imgid"); + hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLImgElement, (void**)&img); + IHTMLElement_Release(elem); + ok(hres == S_OK, "Could not get IHTMLImgElement iface: %08x\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLImgElement_get_onload(img, &v); + ok(hres == S_OK, "get_onload failed: %08x\n", hres); + ok(V_VT(&v) == VT_NULL, "V_VT(onload) = %d\n", V_VT(&v)); + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = (IDispatch*)&img_onload_obj; + hres = IHTMLImgElement_put_onload(img, v); + ok(hres == S_OK, "put_onload failed: %08x\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLImgElement_get_onload(img, &v); + ok(hres == S_OK, "get_onload failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(onload) = %d\n", V_VT(&v)); + ok(V_DISPATCH(&v) == (IDispatch*)&img_onload_obj, "V_DISPATCH(onload) != onloadkFunc\n"); + VariantClear(&v); + + str = a2bstr("http://www.winehq.org/images/winehq_logo_text.png"); + hres = IHTMLImgElement_put_src(img, str); + ok(hres == S_OK, "put_src failed: %08x\n", hres); + SysFreeString(str); + + SET_EXPECT(img_onload); + pump_msgs(&called_img_onload); + CHECK_CALLED(img_onload); + + IHTMLImgElement_Release(img); +} + static void test_timeout(IHTMLDocument2 *doc) { IHTMLWindow3 *win3; @@ -1957,6 +2055,7 @@ START_TEST(events) run_test(empty_doc_str, test_timeout); run_test(click_doc_str, test_onclick); run_test(readystate_doc_str, test_onreadystatechange); + run_test(img_doc_str, test_imgload); DestroyWindow(container_hwnd); CoUninitialize(); diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in index ec0de402c89..194c1a2887d 100644 --- a/dlls/msi/Makefile.in +++ b/dlls/msi/Makefile.in @@ -87,7 +87,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -sql.tab.c: sql.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 8ec2411cb59..cfa11e97ed5 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -2057,7 +2057,7 @@ static ULONG WINAPI mrd_Release( IWineMsiRemoteDatabase *iface ) } static HRESULT WINAPI mrd_IsTablePersistent( IWineMsiRemoteDatabase *iface, - BSTR table, MSICONDITION *persistent ) + LPCWSTR table, MSICONDITION *persistent ) { msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface ); *persistent = MsiDatabaseIsTablePersistentW(This->database, table); @@ -2065,7 +2065,7 @@ static HRESULT WINAPI mrd_IsTablePersistent( IWineMsiRemoteDatabase *iface, } static HRESULT WINAPI mrd_GetPrimaryKeys( IWineMsiRemoteDatabase *iface, - BSTR table, MSIHANDLE *keys ) + LPCWSTR table, MSIHANDLE *keys ) { msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface ); UINT r = MsiDatabaseGetPrimaryKeysW(This->database, table, keys); @@ -2081,7 +2081,7 @@ static HRESULT WINAPI mrd_GetSummaryInformation( IWineMsiRemoteDatabase *iface, } static HRESULT WINAPI mrd_OpenView( IWineMsiRemoteDatabase *iface, - BSTR query, MSIHANDLE *view ) + LPCWSTR query, MSIHANDLE *view ) { msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface ); UINT r = MsiDatabaseOpenViewW(This->database, query, view); diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index b673832b0c4..f2723affca9 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -262,7 +262,7 @@ UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb, if ( !remote_database ) return ERROR_INVALID_HANDLE; - hr = IWineMsiRemoteDatabase_OpenView( remote_database, (BSTR)szQuery, phView ); + hr = IWineMsiRemoteDatabase_OpenView( remote_database, szQuery, phView ); IWineMsiRemoteDatabase_Release( remote_database ); if (FAILED(hr)) @@ -943,7 +943,7 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, if ( !remote_database ) return ERROR_INVALID_HANDLE; - hr = IWineMsiRemoteDatabase_GetPrimaryKeys( remote_database, (BSTR)table, phRec ); + hr = IWineMsiRemoteDatabase_GetPrimaryKeys( remote_database, table, phRec ); IWineMsiRemoteDatabase_Release( remote_database ); if (FAILED(hr)) @@ -1030,7 +1030,7 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( return MSICONDITION_ERROR; hr = IWineMsiRemoteDatabase_IsTablePersistent( remote_database, - (BSTR)szTableName, &condition ); + szTableName, &condition ); IWineMsiRemoteDatabase_Release( remote_database ); if (FAILED(hr)) diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index 25210fee155..e74c22c0b19 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -38,10 +38,10 @@ cpp_quote("#endif") ] interface IWineMsiRemoteDatabase : IUnknown { - HRESULT IsTablePersistent( [in] BSTR table, [out] MSICONDITION *persistent ); - HRESULT GetPrimaryKeys( [in] BSTR table, [out] MSIHANDLE *keys ); + HRESULT IsTablePersistent( [in] LPCWSTR table, [out] MSICONDITION *persistent ); + HRESULT GetPrimaryKeys( [in] LPCWSTR table, [out] MSIHANDLE *keys ); HRESULT GetSummaryInformation( [in] UINT updatecount, [out] MSIHANDLE *suminfo ); - HRESULT OpenView( [in] BSTR query, [out] MSIHANDLE *view ); + HRESULT OpenView( [in] LPCWSTR query, [out] MSIHANDLE *view ); HRESULT SetMsiHandle( [in] MSIHANDLE handle ); } diff --git a/dlls/msi/tests/Makefile.in b/dlls/msi/tests/Makefile.in index 3ce28adac03..2b7141aab39 100644 --- a/dlls/msi/tests/Makefile.in +++ b/dlls/msi/tests/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ suminfo.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 62d1ef64279..23b4564ae1d 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -8171,6 +8171,8 @@ static void test_feature_override(void) ok(delete_pf("msitest", FALSE), "File not installed\n"); delete_test_files(); + + RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest"); } static void test_create_folder(void) diff --git a/dlls/msimg32/Makefile.in b/dlls/msimg32/Makefile.in index b2d85e4010e..e9f2fa9a811 100644 --- a/dlls/msimg32/Makefile.in +++ b/dlls/msimg32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = gdi32 kernel32 C_SRCS = msimg32_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msimtf/Makefile.in b/dlls/msimtf/Makefile.in index e00c59d4a8a..7abe924d580 100644 --- a/dlls/msimtf/Makefile.in +++ b/dlls/msimtf/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msisip/Makefile.in b/dlls/msisip/Makefile.in index 13bcfdd07a0..715fe8030da 100644 --- a/dlls/msisip/Makefile.in +++ b/dlls/msisip/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msisys.ocx/Makefile.in b/dlls/msisys.ocx/Makefile.in index 915aa9466f9..31fda2b3477 100644 --- a/dlls/msisys.ocx/Makefile.in +++ b/dlls/msisys.ocx/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = uuid kernel32 C_SRCS = msisys.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msnet32/Makefile.in b/dlls/msnet32/Makefile.in index 852ad09e0f1..ff61dc88a77 100644 --- a/dlls/msnet32/Makefile.in +++ b/dlls/msnet32/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = kernel32 C_SRCS = msnet_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msrle32/Makefile.in b/dlls/msrle32/Makefile.in index 330a07607e2..1c0828ea97c 100644 --- a/dlls/msrle32/Makefile.in +++ b/dlls/msrle32/Makefile.in @@ -32,5 +32,3 @@ RC_SRCS = \ msrle_Uk.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mssign32/Makefile.in b/dlls/mssign32/Makefile.in index 0579acf9844..509277e3d4d 100644 --- a/dlls/mssign32/Makefile.in +++ b/dlls/mssign32/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ mssign32_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mssip32/Makefile.in b/dlls/mssip32/Makefile.in index 2bbb94d829c..860380e46c1 100644 --- a/dlls/mssip32/Makefile.in +++ b/dlls/mssip32/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mstask/Makefile.in b/dlls/mstask/Makefile.in index c28ff36790c..fc3d8d1fdde 100644 --- a/dlls/mstask/Makefile.in +++ b/dlls/mstask/Makefile.in @@ -17,5 +17,3 @@ RC_SRCS = rsrc.rc IDL_I_SRCS = mstask_local.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mstask/tests/Makefile.in b/dlls/mstask/tests/Makefile.in index 988d62412b4..8a500a56aaa 100644 --- a/dlls/mstask/tests/Makefile.in +++ b/dlls/mstask/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ task_trigger.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcirt/Makefile.in b/dlls/msvcirt/Makefile.in index d8c1ab08bff..f0433b8d20b 100644 --- a/dlls/msvcirt/Makefile.in +++ b/dlls/msvcirt/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ msvcirt.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcirt/Makefile.in b/dlls/msvcr70/Makefile.in similarity index 56% copy from dlls/msvcirt/Makefile.in copy to dlls/msvcr70/Makefile.in index d8c1ab08bff..7b9a3bf9519 100644 --- a/dlls/msvcirt/Makefile.in +++ b/dlls/msvcr70/Makefile.in @@ -2,12 +2,11 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = msvcirt.dll +MODULE = msvcr70.dll +IMPORTLIB = msvcr70 IMPORTS = msvcrt kernel32 C_SRCS = \ - msvcirt.c + msvcr70.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mmdevapi/mmdevapi.h b/dlls/msvcr70/msvcr70.c similarity index 65% copy from dlls/mmdevapi/mmdevapi.h copy to dlls/msvcr70/msvcr70.c index b1a3de2ddc2..e0f3cfd639b 100644 --- a/dlls/mmdevapi/mmdevapi.h +++ b/dlls/msvcr70/msvcr70.c @@ -1,5 +1,7 @@ /* - * Copyright 2009 Maarten Lankhorst + * msvcr70 specific functions + * + * Copyright 2010 Detlef Riekenberg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,17 +18,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv); -extern void MMDevEnum_Free(void); +#include -typedef struct MMDevice { - const IMMDeviceVtbl *lpVtbl; - LONG ref; +#include "windef.h" +#include "winbase.h" - CRITICAL_SECTION crst; +BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) +{ + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ - EDataFlow flow; - DWORD state; - GUID devguid; - WCHAR *alname; -} MMDevice; + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hdll); + } + return TRUE; +} diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec new file mode 100644 index 00000000000..e25437b8eb8 --- /dev/null +++ b/dlls/msvcr70/msvcr70.spec @@ -0,0 +1,841 @@ +# MS VC++2002 runtime library + +@ cdecl -i386 -norelay ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0__non_rtti_object@@QAE@PBD@Z(ptr) msvcrt.??0__non_rtti_object@@QAE@PBD@Z +@ stub ??0bad_cast@@AAE@PBQBD@Z +@ cdecl -i386 -norelay ??0bad_cast@@QAE@ABQBD@Z(ptr) msvcrt.??0bad_cast@@QAE@ABQBD@Z +@ cdecl -i386 -norelay ??0bad_cast@@QAE@ABV0@@Z(ptr) msvcrt.??0bad_cast@@QAE@ABV0@@Z +@ stub ??0bad_cast@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0bad_typeid@@QAE@ABV0@@Z(ptr) msvcrt.??0bad_typeid@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0bad_typeid@@QAE@PBD@Z(ptr) msvcrt.??0bad_typeid@@QAE@PBD@Z +@ cdecl -i386 -norelay ??0exception@@QAE@ABQBD@Z(ptr) msvcrt.??0exception@@QAE@ABQBD@Z +@ cdecl -i386 -norelay ??0exception@@QAE@ABV0@@Z(ptr) msvcrt.??0exception@@QAE@ABV0@@Z +@ cdecl -i386 -norelay ??0exception@@QAE@XZ() msvcrt.??0exception@@QAE@XZ +@ cdecl -i386 -norelay ??1__non_rtti_object@@UAE@XZ() msvcrt.??1__non_rtti_object@@UAE@XZ +@ cdecl -i386 -norelay ??1bad_cast@@UAE@XZ() msvcrt.??1bad_cast@@UAE@XZ +@ cdecl -i386 -norelay ??1bad_typeid@@UAE@XZ() msvcrt.??1bad_typeid@@UAE@XZ +@ cdecl -i386 -norelay ??1exception@@UAE@XZ() msvcrt.??1exception@@UAE@XZ +@ cdecl -i386 -norelay ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ +@ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z +@ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z +@ cdecl -i386 -norelay ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4__non_rtti_object@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4bad_cast@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4bad_typeid@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4bad_typeid@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??4exception@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4exception@@QAEAAV0@ABV0@@Z +@ cdecl -i386 -norelay ??8type_info@@QBEHABV0@@Z(ptr) msvcrt.??8type_info@@QBEHABV0@@Z +@ cdecl -i386 -norelay ??9type_info@@QBEHABV0@@Z(ptr) msvcrt.??9type_info@@QBEHABV0@@Z +@ extern -i386 ??_7__non_rtti_object@@6B@ msvcrt.??_7__non_rtti_object@@6B@ +@ extern -i386 ??_7bad_cast@@6B@ msvcrt.??_7bad_cast@@6B@ +@ extern -i386 ??_7bad_typeid@@6B@ msvcrt.??_7bad_typeid@@6B@ +@ extern -i386 ??_7exception@@6B@ msvcrt.??_7exception@@6B@ +@ cdecl -i386 -norelay ??_E__non_rtti_object@@UAEPAXI@Z(long) msvcrt.??_E__non_rtti_object@@UAEPAXI@Z +@ cdecl -i386 -norelay ??_Ebad_cast@@UAEPAXI@Z(long) msvcrt.??_Ebad_cast@@UAEPAXI@Z +@ cdecl -i386 -norelay ??_Ebad_typeid@@UAEPAXI@Z(long) msvcrt.??_Ebad_typeid@@UAEPAXI@Z +@ cdecl -i386 -norelay ??_Eexception@@UAEPAXI@Z(long) msvcrt.??_Eexception@@UAEPAXI@Z +@ stub ??_Fbad_cast@@QAEXXZ +@ stub ??_Fbad_typeid@@QAEXXZ +@ cdecl -i386 -norelay ??_G__non_rtti_object@@UAEPAXI@Z(long) msvcrt.??_G__non_rtti_object@@UAEPAXI@Z +@ cdecl -i386 -norelay ??_Gbad_cast@@UAEPAXI@Z(long) msvcrt.??_Gbad_cast@@UAEPAXI@Z +@ cdecl -i386 -norelay ??_Gbad_typeid@@UAEPAXI@Z(long) msvcrt.??_Gbad_typeid@@UAEPAXI@Z +@ cdecl -i386 -norelay ??_Gexception@@UAEPAXI@Z(long) msvcrt.??_Gexception@@UAEPAXI@Z +@ cdecl ??_U@YAPAXI@Z(long) msvcrt.??_U@YAPAXI@Z +@ cdecl ??_V@YAXPAX@Z(ptr) msvcrt.??_V@YAXPAX@Z +@ cdecl __uncaught_exception() msvcrt.__uncaught_exception +@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() msvcrt.?_query_new_handler@@YAP6AHI@ZXZ +@ cdecl ?_query_new_mode@@YAHXZ() msvcrt.?_query_new_mode@@YAHXZ +@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) msvcrt.?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z +@ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z +@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z +@ cdecl -i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ cdecl -i386 -norelay ?name@type_info@@QBEPBDXZ() msvcrt.?name@type_info@@QBEPBDXZ +@ cdecl -i386 -norelay ?raw_name@type_info@@QBEPBDXZ() msvcrt.?raw_name@type_info@@QBEPBDXZ +@ cdecl ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_new_handler@@YAP6AXXZP6AXXZ@Z +@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z +@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ@Z +@ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ +@ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ +@ cdecl -i386 -norelay ?what@exception@@UBEPBDXZ() msvcrt.?what@exception@@UBEPBDXZ +@ cdecl $I10_OUTPUT() msvcrt.$I10_OUTPUT +@ cdecl -arch=i386 _CIacos() msvcrt._CIacos +@ cdecl -arch=i386 _CIasin() msvcrt._CIasin +@ cdecl -arch=i386 _CIatan() msvcrt._CIatan +@ cdecl -arch=i386 _CIatan2() msvcrt._CIatan2 +@ cdecl -arch=i386 _CIcos() msvcrt._CIcos +@ cdecl -arch=i386 _CIcosh() msvcrt._CIcosh +@ cdecl -arch=i386 _CIexp() msvcrt._CIexp +@ cdecl -arch=i386 _CIfmod() msvcrt._CIfmod +@ cdecl -arch=i386 _CIlog() msvcrt._CIlog +@ cdecl -arch=i386 _CIlog10() msvcrt._CIlog10 +@ cdecl -arch=i386 _CIpow() msvcrt._CIpow +@ cdecl -arch=i386 _CIsin() msvcrt._CIsin +@ cdecl -arch=i386 _CIsinh() msvcrt._CIsinh +@ cdecl -arch=i386 _CIsqrt() msvcrt._CIsqrt +@ cdecl -arch=i386 _CItan() msvcrt._CItan +@ cdecl -arch=i386 _CItanh() msvcrt._CItanh +@ stub _CRT_RTC_INIT +@ cdecl _CxxThrowException(long long) msvcrt._CxxThrowException +@ cdecl -i386 -norelay _EH_prolog() msvcrt._EH_prolog +@ cdecl _Getdays() msvcrt._Getdays +@ cdecl _Getmonths() msvcrt._Getmonths +@ cdecl _Gettnames() msvcrt._Gettnames +@ extern _HUGE msvcrt._HUGE +@ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime +@ cdecl _XcptFilter(long ptr) msvcrt._XcptFilter +@ stub __CxxCallUnwindDtor +@ stub __CxxCallUnwindVecDtor +@ cdecl __CxxDetectRethrow(ptr) msvcrt.__CxxDetectRethrow +@ stub __CxxExceptionFilter +@ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler +@ stdcall -i386 __CxxLongjmpUnwind(ptr) msvcrt.__CxxLongjmpUnwind +@ cdecl __CxxQueryExceptionSize() msvcrt.__CxxQueryExceptionSize +@ stub __CxxRegisterExceptionObject +@ stub __CxxUnregisterExceptionObject +@ stub __DestructExceptionObject +@ cdecl __RTCastToVoid(ptr) msvcrt.__RTCastToVoid +@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast +@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid +@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD +@ cdecl ___lc_codepage_func() msvcrt.___lc_codepage_func +@ cdecl ___lc_collate_cp_func() msvcrt.___lc_collate_cp_func +@ cdecl ___lc_handle_func() msvcrt.___lc_handle_func +@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func +@ cdecl ___setlc_active_func() msvcrt.___setlc_active_func +@ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func +@ extern __argc msvcrt.__argc +@ extern __argv msvcrt.__argv +@ extern __badioinfo msvcrt.__badioinfo +@ stub __buffer_overrun +@ cdecl __crtCompareStringA(long long str long str long) msvcrt.__crtCompareStringA +@ cdecl __crtCompareStringW(long long wstr long wstr long) msvcrt.__crtCompareStringW +@ cdecl __crtGetLocaleInfoW(long long ptr long) msvcrt.__crtGetLocaleInfoW +@ stub __crtGetStringTypeW +@ cdecl __crtLCMapStringA(long long str long ptr long long long) msvcrt.__crtLCMapStringA +@ stub __crtLCMapStringW +@ cdecl __dllonexit(ptr ptr ptr) msvcrt.__dllonexit +@ cdecl __doserrno() msvcrt.__doserrno +@ cdecl __fpecode() msvcrt.__fpecode +@ cdecl __getmainargs(ptr ptr ptr long ptr) msvcrt.__getmainargs +@ extern __initenv msvcrt.__initenv +@ cdecl __iob_func() msvcrt.__iob_func +@ cdecl __isascii(long) msvcrt.__isascii +@ cdecl __iscsym(long) msvcrt.__iscsym +@ cdecl __iscsymf(long) msvcrt.__iscsymf +@ stub __lc_clike +@ extern __lc_codepage msvcrt.__lc_codepage +@ extern __lc_collate_cp msvcrt.__lc_collate_cp +@ extern __lc_handle msvcrt.__lc_handle +@ cdecl __lconv_init() msvcrt.__lconv_init +@ extern __mb_cur_max msvcrt.__mb_cur_max +@ cdecl -arch=i386 __p___argc() msvcrt.__p___argc +@ cdecl -arch=i386 __p___argv() msvcrt.__p___argv +@ cdecl -arch=i386 __p___initenv() msvcrt.__p___initenv +@ cdecl -arch=i386 __p___mb_cur_max() msvcrt.__p___mb_cur_max +@ cdecl -arch=i386 __p___wargv() msvcrt.__p___wargv +@ cdecl -arch=i386 __p___winitenv() msvcrt.__p___winitenv +@ cdecl -arch=i386 __p__acmdln() msvcrt.__p__acmdln +@ cdecl -arch=i386 __p__amblksiz() msvcrt.__p__amblksiz +@ cdecl -arch=i386 __p__commode() msvcrt.__p__commode +@ cdecl -arch=i386 __p__daylight() msvcrt.__p__daylight +@ cdecl -arch=i386 __p__dstbias() msvcrt.__p__dstbias +@ cdecl -arch=i386 __p__environ() msvcrt.__p__environ +@ stub __p__fileinfo +@ cdecl -arch=i386 __p__fmode() msvcrt.__p__fmode +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob +@ stub __p__mbcasemap +@ cdecl -arch=i386 __p__mbctype() msvcrt.__p__mbctype +@ cdecl -arch=i386 __p__osver() msvcrt.__p__osver +@ cdecl -arch=i386 __p__pctype() msvcrt.__p__pctype +@ cdecl -arch=i386 __p__pgmptr() msvcrt.__p__pgmptr +@ stub __p__pwctype +@ cdecl -arch=i386 __p__timezone() msvcrt.__p__timezone +@ cdecl -arch=i386 __p__tzname() msvcrt.__p__tzname +@ cdecl -arch=i386 __p__wcmdln() msvcrt.__p__wcmdln +@ cdecl -arch=i386 __p__wenviron() msvcrt.__p__wenviron +@ cdecl -arch=i386 __p__winmajor() msvcrt.__p__winmajor +@ cdecl -arch=i386 __p__winminor() msvcrt.__p__winminor +@ cdecl -arch=i386 __p__winver() msvcrt.__p__winver +@ cdecl -arch=i386 __p__wpgmptr() msvcrt.__p__wpgmptr +@ cdecl __pctype_func() msvcrt.__pctype_func +@ extern __pioinfo msvcrt.__pioinfo +@ stub __pwctype_func +@ stub __pxcptinfoptrs +@ stub __security_error_handler +@ cdecl __set_app_type(long) msvcrt.__set_app_type +@ stub __set_buffer_overrun_handler +@ extern __setlc_active msvcrt.__setlc_active +@ cdecl __setusermatherr(ptr) msvcrt.__setusermatherr +@ cdecl __threadhandle() msvcrt.__threadhandle +@ cdecl __threadid() msvcrt.__threadid +@ cdecl __toascii(long) msvcrt.__toascii +@ cdecl __unDName(ptr str long ptr ptr long) msvcrt.__unDName +@ cdecl __unDNameEx(ptr str long ptr ptr ptr long) msvcrt.__unDNameEx +@ extern __unguarded_readlc_active msvcrt.__unguarded_readlc_active +@ extern __wargv msvcrt.__wargv +@ stub __wcserror +@ cdecl __wgetmainargs(ptr ptr ptr long ptr) msvcrt.__wgetmainargs +@ extern __winitenv msvcrt.__winitenv +@ cdecl _abnormal_termination() msvcrt._abnormal_termination +@ cdecl _access(str long) msvcrt._access +@ extern _acmdln msvcrt._acmdln +@ stdcall -arch=i386 _adj_fdiv_m16i(long) msvcrt._adj_fdiv_m16i +@ stdcall -arch=i386 _adj_fdiv_m32(long) msvcrt._adj_fdiv_m32 +@ stdcall -arch=i386 _adj_fdiv_m32i(long) msvcrt._adj_fdiv_m32i +@ stdcall -arch=i386 _adj_fdiv_m64(double) msvcrt._adj_fdiv_m64 +@ cdecl -arch=i386 _adj_fdiv_r() msvcrt._adj_fdiv_r +@ stdcall -arch=i386 _adj_fdivr_m16i(long) msvcrt._adj_fdivr_m16i +@ stdcall -arch=i386 _adj_fdivr_m32(long) msvcrt._adj_fdivr_m32 +@ stdcall -arch=i386 _adj_fdivr_m32i(long) msvcrt._adj_fdivr_m32i +@ stdcall -arch=i386 _adj_fdivr_m64(double) msvcrt._adj_fdivr_m64 +@ cdecl -arch=i386 _adj_fpatan() msvcrt._adj_fpatan +@ cdecl -arch=i386 _adj_fprem() msvcrt._adj_fprem +@ cdecl -arch=i386 _adj_fprem1() msvcrt._adj_fprem1 +@ cdecl -arch=i386 _adj_fptan() msvcrt._adj_fptan +@ extern -arch=i386 _adjust_fdiv msvcrt._adjust_fdiv +@ stub _aexit_rtn +@ cdecl _aligned_free(ptr) msvcrt._aligned_free +@ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc +@ cdecl _aligned_offset_malloc(long long long) msvcrt._aligned_offset_malloc +@ cdecl _aligned_offset_realloc(ptr long long long) msvcrt._aligned_offset_realloc +@ cdecl _aligned_realloc(ptr long long) msvcrt._aligned_realloc +@ cdecl _amsg_exit(long) msvcrt._amsg_exit +@ cdecl _assert(str str long) msvcrt._assert +@ stub _atodbl +@ cdecl -ret64 _atoi64(str) msvcrt._atoi64 +@ cdecl _atoldbl(ptr str) msvcrt._atoldbl +@ cdecl _beep(long long) msvcrt._beep +@ cdecl _beginthread(ptr long ptr) msvcrt._beginthread +@ cdecl _beginthreadex(ptr long ptr ptr long ptr) msvcrt._beginthreadex +@ cdecl _c_exit() msvcrt._c_exit +@ cdecl _cabs(long) msvcrt._cabs +@ cdecl _callnewh(long) msvcrt._callnewh +@ cdecl _cexit() msvcrt._cexit +@ cdecl _cgets(str) msvcrt._cgets +@ stub _cgetws +@ cdecl _chdir(str) msvcrt._chdir +@ cdecl _chdrive(long) msvcrt._chdrive +@ cdecl _chgsign( double ) msvcrt._chgsign +@ cdecl -i386 -norelay _chkesp() msvcrt._chkesp +@ cdecl _chmod(str long) msvcrt._chmod +@ cdecl _chsize(long long) msvcrt._chsize +@ cdecl _clearfp() msvcrt._clearfp +@ cdecl _close(long) msvcrt._close +@ cdecl _commit(long) msvcrt._commit +@ extern _commode msvcrt._commode +@ cdecl _control87(long long) msvcrt._control87 +@ cdecl _controlfp(long long) msvcrt._controlfp +@ cdecl _copysign( double double ) msvcrt._copysign +@ varargs _cprintf(str) msvcrt._cprintf +@ cdecl _cputs(str) msvcrt._cputs +@ stub _cputws +@ cdecl _creat(str long) msvcrt._creat +@ varargs _cscanf(str) msvcrt._cscanf +@ cdecl _ctime64(ptr) msvcrt._ctime64 +@ extern _ctype msvcrt._ctype +@ cdecl _cwait(ptr long long) msvcrt._cwait +@ stub _cwprintf +@ stub _cwscanf +@ extern _daylight msvcrt._daylight +@ extern _dstbias msvcrt._dstbias +@ cdecl _dup(long) msvcrt._dup +@ cdecl _dup2(long long) msvcrt._dup2 +@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt +@ cdecl _endthread() msvcrt._endthread +@ cdecl _endthreadex(long) msvcrt._endthreadex +@ extern _environ msvcrt._environ +@ cdecl _eof(long) msvcrt._eof +@ cdecl _errno() msvcrt._errno +@ cdecl _except_handler2(ptr ptr ptr ptr) msvcrt._except_handler2 +@ cdecl _except_handler3(ptr ptr ptr ptr) msvcrt._except_handler3 +@ varargs _execl(str str) msvcrt._execl +@ varargs _execle(str str) msvcrt._execle +@ varargs _execlp(str str) msvcrt._execlp +@ varargs _execlpe(str str) msvcrt._execlpe +@ cdecl _execv(str ptr) msvcrt._execv +@ cdecl _execve(str ptr ptr) msvcrt._execve +@ cdecl _execvp(str ptr) msvcrt._execvp +@ cdecl _execvpe(str ptr ptr) msvcrt._execvpe +@ cdecl _exit(long) msvcrt._exit +@ cdecl _expand(ptr long) msvcrt._expand +@ cdecl _fcloseall() msvcrt._fcloseall +@ cdecl _fcvt(double long ptr ptr) msvcrt._fcvt +@ cdecl _fdopen(long str) msvcrt._fdopen +@ cdecl _fgetchar() msvcrt._fgetchar +@ cdecl _fgetwchar() msvcrt._fgetwchar +@ cdecl _filbuf(ptr) msvcrt._filbuf +@ stub _fileinfo +@ cdecl _filelength(long) msvcrt._filelength +@ cdecl -ret64 _filelengthi64(long) msvcrt._filelengthi64 +@ cdecl _fileno(ptr) msvcrt._fileno +@ cdecl _findclose(long) msvcrt._findclose +@ cdecl _findfirst(str ptr) msvcrt._findfirst +@ stub _findfirst64 +@ cdecl _findfirsti64(str ptr) msvcrt._findfirsti64 +@ cdecl _findnext(long ptr) msvcrt._findnext +@ stub _findnext64 +@ cdecl _findnexti64(long ptr) msvcrt._findnexti64 +@ cdecl _finite( double ) msvcrt._finite +@ cdecl _flsbuf(long ptr) msvcrt._flsbuf +@ cdecl _flushall() msvcrt._flushall +@ extern _fmode msvcrt._fmode +@ cdecl _fpclass(double) msvcrt._fpclass +@ stub _fpieee_flt +@ cdecl _fpreset() msvcrt._fpreset +@ cdecl _fputchar(long) msvcrt._fputchar +@ cdecl _fputwchar(long) msvcrt._fputwchar +@ cdecl _fsopen(str str long) msvcrt._fsopen +@ cdecl _fstat(long ptr) msvcrt._fstat +@ cdecl _fstat64(long ptr) msvcrt._fstat64 +@ cdecl _fstati64(long ptr) msvcrt._fstati64 +@ cdecl _ftime(ptr) msvcrt._ftime +@ cdecl _ftime64(ptr) msvcrt._ftime64 +@ cdecl -ret64 _ftol() msvcrt._ftol +@ cdecl _fullpath(ptr str long) msvcrt._fullpath +@ cdecl _futime(long ptr) msvcrt._futime +@ cdecl _futime64(long ptr) msvcrt._futime64 +@ cdecl _gcvt(double long str) msvcrt._gcvt +@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle +@ cdecl _get_sbh_threshold() msvcrt._get_sbh_threshold +@ cdecl _getch() msvcrt._getch +@ cdecl _getche() msvcrt._getche +@ cdecl _getcwd(str long) msvcrt._getcwd +@ cdecl _getdcwd(long str long) msvcrt._getdcwd +@ cdecl _getdiskfree(long ptr) msvcrt._getdiskfree +@ cdecl _getdllprocaddr(long str long) msvcrt._getdllprocaddr +@ cdecl _getdrive() msvcrt._getdrive +@ cdecl _getdrives() msvcrt._getdrives +@ cdecl _getmaxstdio() msvcrt._getmaxstdio +@ cdecl _getmbcp() msvcrt._getmbcp +@ cdecl _getpid() msvcrt._getpid +@ stub _getsystime +@ cdecl _getw(ptr) msvcrt._getw +@ stub _getwch +@ stub _getwche +@ cdecl _getws(ptr) msvcrt._getws +@ cdecl _global_unwind2(ptr) msvcrt._global_unwind2 +@ cdecl _gmtime64(ptr) msvcrt._gmtime64 +@ cdecl _heapadd(ptr long) msvcrt._heapadd +@ cdecl _heapchk() msvcrt._heapchk +@ cdecl _heapmin() msvcrt._heapmin +@ cdecl _heapset(long) msvcrt._heapset +@ stub _heapused +@ cdecl _heapwalk(ptr) msvcrt._heapwalk +@ cdecl _hypot(double double) msvcrt._hypot +@ cdecl _i64toa(long long ptr long) msvcrt._i64toa +@ cdecl _i64tow(long long ptr long) msvcrt._i64tow +@ cdecl _initterm(ptr ptr) msvcrt._initterm +@ stub _inp +@ stub _inpd +@ stub _inpw +@ extern _iob msvcrt._iob +@ cdecl _isatty(long) msvcrt._isatty +@ cdecl _isctype(long long) msvcrt._isctype +@ stub _ismbbalnum +@ stub _ismbbalpha +@ stub _ismbbgraph +@ stub _ismbbkalnum +@ cdecl _ismbbkana(long) msvcrt._ismbbkana +@ stub _ismbbkprint +@ stub _ismbbkpunct +@ cdecl _ismbblead(long) msvcrt._ismbblead +@ stub _ismbbprint +@ stub _ismbbpunct +@ cdecl _ismbbtrail(long) msvcrt._ismbbtrail +@ cdecl _ismbcalnum(long) msvcrt._ismbcalnum +@ cdecl _ismbcalpha(long) msvcrt._ismbcalpha +@ cdecl _ismbcdigit(long) msvcrt._ismbcdigit +@ cdecl _ismbcgraph(long) msvcrt._ismbcgraph +@ cdecl _ismbchira(long) msvcrt._ismbchira +@ cdecl _ismbckata(long) msvcrt._ismbckata +@ stub _ismbcl0 +@ stub _ismbcl1 +@ stub _ismbcl2 +@ cdecl _ismbclegal(long) msvcrt._ismbclegal +@ cdecl _ismbclower(long) msvcrt._ismbclower +@ cdecl _ismbcprint(long) msvcrt._ismbcprint +@ cdecl _ismbcpunct(long) msvcrt._ismbcpunct +@ cdecl _ismbcspace(long) msvcrt._ismbcspace +@ cdecl _ismbcsymbol(long) msvcrt._ismbcsymbol +@ cdecl _ismbcupper(long) msvcrt._ismbcupper +@ cdecl _ismbslead(ptr ptr) msvcrt._ismbslead +@ cdecl _ismbstrail(ptr ptr) msvcrt._ismbstrail +@ cdecl _isnan( double ) msvcrt._isnan +@ cdecl _itoa(long ptr long) msvcrt._itoa +@ cdecl _itow(long ptr long) msvcrt._itow +@ cdecl _j0(double) msvcrt._j0 +@ cdecl _j1(double) msvcrt._j1 +@ cdecl _jn(long double) msvcrt._jn +@ cdecl _kbhit() msvcrt._kbhit +@ cdecl _lfind(ptr ptr ptr long ptr) msvcrt._lfind +@ cdecl _loaddll(str) msvcrt._loaddll +@ cdecl -i386 _local_unwind2(ptr long) msvcrt._local_unwind2 +@ cdecl _localtime64(ptr) msvcrt._localtime64 +@ cdecl _lock(long) msvcrt._lock +@ cdecl _locking(long long long) msvcrt._locking +@ cdecl _logb( double ) msvcrt._logb +@ cdecl -i386 _longjmpex(ptr long) msvcrt._longjmpex +@ cdecl _lrotl(long long) msvcrt._lrotl +@ cdecl _lrotr(long long) msvcrt._lrotr +@ cdecl _lsearch(ptr ptr long long ptr) msvcrt._lsearch +@ cdecl _lseek(long long long) msvcrt._lseek +@ cdecl -ret64 _lseeki64(long double long) msvcrt._lseeki64 +@ cdecl _ltoa(long ptr long) msvcrt._ltoa +@ cdecl _ltow(long ptr long) msvcrt._ltow +@ cdecl _makepath(ptr str str str str) msvcrt._makepath +@ cdecl _mbbtombc(long) msvcrt._mbbtombc +@ cdecl _mbbtype(long long) msvcrt._mbbtype +@ stub _mbcasemap +@ cdecl _mbccpy(str str) msvcrt._mbccpy +@ cdecl _mbcjistojms(long) msvcrt._mbcjistojms +@ stub _mbcjmstojis +@ cdecl _mbclen(ptr) msvcrt._mbclen +@ stub _mbctohira +@ stub _mbctokata +@ cdecl _mbctolower(long) msvcrt._mbctolower +@ cdecl _mbctombb(long) msvcrt._mbctombb +@ cdecl _mbctoupper(long) msvcrt._mbctoupper +@ extern _mbctype msvcrt._mbctype +@ cdecl _mbsbtype(str long) msvcrt._mbsbtype +@ cdecl _mbscat(str str) msvcrt._mbscat +@ cdecl _mbschr(str long) msvcrt._mbschr +@ cdecl _mbscmp(str str) msvcrt._mbscmp +@ cdecl _mbscoll(str str) msvcrt._mbscoll +@ cdecl _mbscpy(ptr str) msvcrt._mbscpy +@ cdecl _mbscspn(str str) msvcrt._mbscspn +@ cdecl _mbsdec(ptr ptr) msvcrt._mbsdec +@ cdecl _mbsdup(str) msvcrt._mbsdup +@ cdecl _mbsicmp(str str) msvcrt._mbsicmp +@ cdecl _mbsicoll(str str) msvcrt._mbsicoll +@ cdecl _mbsinc(str) msvcrt._mbsinc +@ cdecl _mbslen(str) msvcrt._mbslen +@ cdecl _mbslwr(str) msvcrt._mbslwr +@ cdecl _mbsnbcat(str str long) msvcrt._mbsnbcat +@ cdecl _mbsnbcmp(str str long) msvcrt._mbsnbcmp +@ cdecl _mbsnbcnt(ptr long) msvcrt._mbsnbcnt +@ stub _mbsnbcoll +@ cdecl _mbsnbcpy(ptr str long) msvcrt._mbsnbcpy +@ cdecl _mbsnbicmp(str str long) msvcrt._mbsnbicmp +@ stub _mbsnbicoll +@ cdecl _mbsnbset(str long long) msvcrt._mbsnbset +@ cdecl _mbsncat(str str long) msvcrt._mbsncat +@ cdecl _mbsnccnt(str long) msvcrt._mbsnccnt +@ cdecl _mbsncmp(str str long) msvcrt._mbsncmp +@ stub _mbsncoll +@ cdecl _mbsncpy(str str long) msvcrt._mbsncpy +@ cdecl _mbsnextc(str) msvcrt._mbsnextc +@ cdecl _mbsnicmp(str str long) msvcrt._mbsnicmp +@ stub _mbsnicoll +@ cdecl _mbsninc(str long) msvcrt._mbsninc +@ cdecl _mbsnset(str long long) msvcrt._mbsnset +@ cdecl _mbspbrk(str str) msvcrt._mbspbrk +@ cdecl _mbsrchr(str long) msvcrt._mbsrchr +@ cdecl _mbsrev(str) msvcrt._mbsrev +@ cdecl _mbsset(str long) msvcrt._mbsset +@ cdecl _mbsspn(str str) msvcrt._mbsspn +@ cdecl _mbsspnp(str str) msvcrt._mbsspnp +@ cdecl _mbsstr(str str) msvcrt._mbsstr +@ cdecl _mbstok(str str) msvcrt._mbstok +@ cdecl _mbstrlen(str) msvcrt._mbstrlen +@ cdecl _mbsupr(str) msvcrt._mbsupr +@ cdecl _memccpy(ptr ptr long long) msvcrt._memccpy +@ cdecl _memicmp(str str long) msvcrt._memicmp +@ cdecl _mkdir(str) msvcrt._mkdir +@ cdecl _mktemp(str) msvcrt._mktemp +@ cdecl _mktime64(ptr) msvcrt._mktime64 +@ cdecl _msize(ptr) msvcrt._msize +@ cdecl _nextafter(double double) msvcrt._nextafter +@ cdecl _onexit(ptr) msvcrt._onexit +@ varargs _open(str long) msvcrt._open +@ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle +@ stub _osplatform +@ extern _osver msvcrt._osver +@ stub _outp +@ stub _outpd +@ stub _outpw +@ cdecl _pclose(ptr) msvcrt._pclose +@ extern _pctype msvcrt._pctype +@ extern _pgmptr msvcrt._pgmptr +@ cdecl _pipe(ptr long long) msvcrt._pipe +@ cdecl _popen(str str) msvcrt._popen +@ cdecl _purecall() msvcrt._purecall +@ cdecl _putch(long) msvcrt._putch +@ cdecl _putenv(str) msvcrt._putenv +@ cdecl _putw(long ptr) msvcrt._putw +@ stub _putwch +@ cdecl _putws(wstr) msvcrt._putws +@ stub _pwctype +@ cdecl _read(long ptr long) msvcrt._read +@ stub _resetstkoflw +@ cdecl _rmdir(str) msvcrt._rmdir +@ cdecl _rmtmp() msvcrt._rmtmp +@ cdecl _rotl(long long) msvcrt._rotl +@ cdecl _rotr(long long) msvcrt._rotr +@ cdecl -arch=i386 _safe_fdiv() msvcrt._safe_fdiv +@ cdecl -arch=i386 _safe_fdivr() msvcrt._safe_fdivr +@ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem +@ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1 +@ cdecl _scalb( double long) msvcrt._scalb +@ stub _scprintf +@ stub _scwprintf +@ cdecl _searchenv(str str ptr) msvcrt._searchenv +@ stdcall -i386 _seh_longjmp_unwind(ptr) msvcrt._seh_longjmp_unwind +@ stub _set_SSE2_enable +@ cdecl _set_error_mode(long) msvcrt._set_error_mode +@ cdecl _set_sbh_threshold(long) msvcrt._set_sbh_threshold +@ stub _set_security_error_handler +@ cdecl _seterrormode(long) msvcrt._seterrormode +@ cdecl -i386 -norelay _setjmp(ptr) msvcrt._setjmp +@ cdecl -i386 -norelay _setjmp3(ptr long) msvcrt._setjmp3 +@ cdecl _setmaxstdio(long) msvcrt._setmaxstdio +@ cdecl _setmbcp(long) msvcrt._setmbcp +@ cdecl _setmode(long long) msvcrt._setmode +@ stub _setsystime +@ cdecl _sleep(long) msvcrt._sleep +@ varargs _snprintf(ptr long str) msvcrt._snprintf +@ stub _snscanf +@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf +@ stub _snwscanf +@ varargs _sopen(str long long) msvcrt._sopen +@ varargs _spawnl(long str str) msvcrt._spawnl +@ varargs _spawnle(long str str) msvcrt._spawnle +@ varargs _spawnlp(long str str) msvcrt._spawnlp +@ varargs _spawnlpe(long str str) msvcrt._spawnlpe +@ cdecl _spawnv(long str ptr) msvcrt._spawnv +@ cdecl _spawnve(long str ptr ptr) msvcrt._spawnve +@ cdecl _spawnvp(long str ptr) msvcrt._spawnvp +@ cdecl _spawnvpe(long str ptr ptr) msvcrt._spawnvpe +@ cdecl _splitpath(str ptr ptr ptr ptr) msvcrt._splitpath +@ cdecl _stat(str ptr) msvcrt._stat +@ cdecl _stat64(str ptr) msvcrt._stat64 +@ cdecl _stati64(str ptr) msvcrt._stati64 +@ cdecl _statusfp() msvcrt._statusfp +@ cdecl _strcmpi(str str) msvcrt._strcmpi +@ cdecl _strdate(ptr) msvcrt._strdate +@ cdecl _strdup(str) msvcrt._strdup +@ cdecl _strerror(long) msvcrt._strerror +@ cdecl _stricmp(str str) msvcrt._stricmp +@ cdecl _stricoll(str str) msvcrt._stricoll +@ cdecl _strlwr(str) msvcrt._strlwr +@ stub _strncoll +@ cdecl _strnicmp(str str long) msvcrt._strnicmp +@ stub _strnicoll +@ cdecl _strnset(str long long) msvcrt._strnset +@ cdecl _strrev(str) msvcrt._strrev +@ cdecl _strset(str long) msvcrt._strset +@ cdecl _strtime(ptr) msvcrt._strtime +@ stub _strtoi64 +@ stub _strtoui64 +@ cdecl _strupr(str) msvcrt._strupr +@ cdecl _swab(str str long) msvcrt._swab +@ extern _sys_errlist msvcrt._sys_errlist +@ extern _sys_nerr msvcrt._sys_nerr +@ cdecl _tell(long) msvcrt._tell +@ cdecl -ret64 _telli64(long) msvcrt._telli64 +@ cdecl _tempnam(str str) msvcrt._tempnam +@ cdecl _time64(ptr) msvcrt._time64 +@ extern _timezone msvcrt._timezone +@ cdecl _tolower(long) msvcrt._tolower +@ cdecl _toupper(long) msvcrt._toupper +@ extern _tzname msvcrt._tzname +@ cdecl _tzset() msvcrt._tzset +@ cdecl _ui64toa(long long ptr long) msvcrt._ui64toa +@ cdecl _ui64tow(long long ptr long) msvcrt._ui64tow +@ cdecl _ultoa(long ptr long) msvcrt._ultoa +@ cdecl _ultow(long ptr long) msvcrt._ultow +@ cdecl _umask(long) msvcrt._umask +@ cdecl _ungetch(long) msvcrt._ungetch +@ stub _ungetwch +@ cdecl _unlink(str) msvcrt._unlink +@ cdecl _unloaddll(long) msvcrt._unloaddll +@ cdecl _unlock(long) msvcrt._unlock +@ cdecl _utime(str ptr) msvcrt._utime +@ cdecl _utime64(str ptr) msvcrt._utime64 +@ cdecl _vscprintf(str ptr) msvcrt._vscprintf +@ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf +@ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf +@ cdecl _vsnwprintf(ptr long wstr ptr) msvcrt._vsnwprintf +@ cdecl _waccess(wstr long) msvcrt._waccess +@ cdecl _wasctime(ptr) msvcrt._wasctime +@ cdecl _wchdir(wstr) msvcrt._wchdir +@ cdecl _wchmod(wstr long) msvcrt._wchmod +@ extern _wcmdln msvcrt._wcmdln +@ cdecl _wcreat(wstr long) msvcrt._wcreat +@ cdecl _wcsdup(wstr) msvcrt._wcsdup +@ stub _wcserror +@ cdecl _wcsicmp(wstr wstr) msvcrt._wcsicmp +@ cdecl _wcsicoll(wstr wstr) msvcrt._wcsicoll +@ cdecl _wcslwr(wstr) msvcrt._wcslwr +@ stub _wcsncoll +@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp +@ stub _wcsnicoll +@ cdecl _wcsnset(wstr long long) msvcrt._wcsnset +@ cdecl _wcsrev(wstr) msvcrt._wcsrev +@ cdecl _wcsset(wstr long) msvcrt._wcsset +@ stub _wcstoi64 +@ stub _wcstoui64 +@ cdecl _wcsupr(wstr) msvcrt._wcsupr +@ cdecl _wctime(ptr) msvcrt._wctime +@ cdecl _wctime64(ptr) msvcrt._wctime64 +@ stub _wctype +@ extern _wenviron msvcrt._wenviron +@ varargs _wexecl(wstr wstr) msvcrt._wexecl +@ varargs _wexecle(wstr wstr) msvcrt._wexecle +@ varargs _wexeclp(wstr wstr) msvcrt._wexeclp +@ varargs _wexeclpe(wstr wstr) msvcrt._wexeclpe +@ cdecl _wexecv(wstr ptr) msvcrt._wexecv +@ cdecl _wexecve(wstr ptr ptr) msvcrt._wexecve +@ cdecl _wexecvp(wstr ptr) msvcrt._wexecvp +@ cdecl _wexecvpe(wstr ptr ptr) msvcrt._wexecvpe +@ cdecl _wfdopen(long wstr) msvcrt._wfdopen +@ cdecl _wfindfirst(wstr ptr) msvcrt._wfindfirst +@ stub _wfindfirst64 +@ cdecl _wfindfirsti64(wstr ptr) msvcrt._wfindfirsti64 +@ cdecl _wfindnext(long ptr) msvcrt._wfindnext +@ stub _wfindnext64 +@ cdecl _wfindnexti64(long ptr) msvcrt._wfindnexti64 +@ cdecl _wfopen(wstr wstr) msvcrt._wfopen +@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen +@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen +@ cdecl _wfullpath(ptr wstr long) msvcrt._wfullpath +@ cdecl _wgetcwd(wstr long) msvcrt._wgetcwd +@ cdecl _wgetdcwd(long wstr long) msvcrt._wgetdcwd +@ cdecl _wgetenv(wstr) msvcrt._wgetenv +@ extern _winmajor msvcrt._winmajor +@ extern _winminor msvcrt._winminor +@ extern _winver msvcrt._winver +@ cdecl _wmakepath(wstr wstr wstr wstr wstr) msvcrt._wmakepath +@ cdecl _wmkdir(wstr) msvcrt._wmkdir +@ cdecl _wmktemp(wstr) msvcrt._wmktemp +@ varargs _wopen(wstr long) msvcrt._wopen +@ stub _wperror +@ extern _wpgmptr msvcrt._wpgmptr +@ cdecl _wpopen(wstr wstr) msvcrt._wpopen +@ cdecl _wputenv(wstr) msvcrt._wputenv +@ cdecl _wremove(wstr) msvcrt._wremove +@ cdecl _wrename(wstr wstr) msvcrt._wrename +@ cdecl _write(long ptr long) msvcrt._write +@ cdecl _wrmdir(wstr) msvcrt._wrmdir +@ cdecl _wsearchenv(wstr wstr ptr) msvcrt._wsearchenv +@ cdecl _wsetlocale(long wstr) msvcrt._wsetlocale +@ varargs _wsopen(wstr long long) msvcrt._wsopen +@ varargs _wspawnl(long wstr wstr) msvcrt._wspawnl +@ varargs _wspawnle(long wstr wstr) msvcrt._wspawnle +@ varargs _wspawnlp(long wstr wstr) msvcrt._wspawnlp +@ varargs _wspawnlpe(long wstr wstr) msvcrt._wspawnlpe +@ cdecl _wspawnv(long wstr ptr) msvcrt._wspawnv +@ cdecl _wspawnve(long wstr ptr ptr) msvcrt._wspawnve +@ cdecl _wspawnvp(long wstr ptr) msvcrt._wspawnvp +@ cdecl _wspawnvpe(long wstr ptr ptr) msvcrt._wspawnvpe +@ cdecl _wsplitpath(wstr ptr ptr ptr ptr) msvcrt._wsplitpath +@ cdecl _wstat(wstr ptr) msvcrt._wstat +@ cdecl _wstat64(wstr ptr) msvcrt._wstat64 +@ cdecl _wstati64(wstr ptr) msvcrt._wstati64 +@ cdecl _wstrdate(ptr) msvcrt._wstrdate +@ cdecl _wstrtime(ptr) msvcrt._wstrtime +@ cdecl _wsystem(wstr) msvcrt._wsystem +@ cdecl _wtempnam(wstr wstr) msvcrt._wtempnam +@ stub _wtmpnam +@ stub _wtof +@ cdecl _wtoi(wstr) msvcrt._wtoi +@ cdecl _wtoi64(wstr) msvcrt._wtoi64 +@ cdecl _wtol(wstr) msvcrt._wtol +@ cdecl _wunlink(wstr) msvcrt._wunlink +@ cdecl _wutime(wstr ptr) msvcrt._wutime +@ cdecl _wutime64(wstr ptr) msvcrt._wutime64 +@ cdecl _y0(double) msvcrt._y0 +@ cdecl _y1(double) msvcrt._y1 +@ cdecl _yn(long double ) msvcrt._yn +@ cdecl abort() msvcrt.abort +@ cdecl abs(long) msvcrt.abs +@ cdecl acos(double) msvcrt.acos +@ cdecl asctime(ptr) msvcrt.asctime +@ cdecl asin(double) msvcrt.asin +@ cdecl atan(double) msvcrt.atan +@ cdecl atan2(double double) msvcrt.atan2 +@ cdecl atexit(ptr) msvcrt.atexit +@ cdecl atof(str) msvcrt.atof +@ cdecl atoi(str) msvcrt.atoi +@ cdecl atol(str) msvcrt.atol +@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch +@ cdecl calloc(long long) msvcrt.calloc +@ cdecl ceil(double) msvcrt.ceil +@ cdecl clearerr(ptr) msvcrt.clearerr +@ cdecl clock() msvcrt.clock +@ cdecl cos(double) msvcrt.cos +@ cdecl cosh(double) msvcrt.cosh +@ cdecl ctime(ptr) msvcrt.ctime +@ cdecl difftime(long long) msvcrt.difftime +@ cdecl div(long long) msvcrt.div +@ cdecl exit(long) msvcrt.exit +@ cdecl exp(double) msvcrt.exp +@ cdecl fabs(double) msvcrt.fabs +@ cdecl fclose(ptr) msvcrt.fclose +@ cdecl feof(ptr) msvcrt.feof +@ cdecl ferror(ptr) msvcrt.ferror +@ cdecl fflush(ptr) msvcrt.fflush +@ cdecl fgetc(ptr) msvcrt.fgetc +@ cdecl fgetpos(ptr ptr) msvcrt.fgetpos +@ cdecl fgets(ptr long ptr) msvcrt.fgets +@ cdecl fgetwc(ptr) msvcrt.fgetwc +@ cdecl fgetws(ptr long ptr) msvcrt.fgetws +@ cdecl floor(double) msvcrt.floor +@ cdecl fmod(double double) msvcrt.fmod +@ cdecl fopen(str str) msvcrt.fopen +@ varargs fprintf(ptr str) msvcrt.fprintf +@ cdecl fputc(long ptr) msvcrt.fputc +@ cdecl fputs(str ptr) msvcrt.fputs +@ cdecl fputwc(long ptr) msvcrt.fputwc +@ cdecl fputws(wstr ptr) msvcrt.fputws +@ cdecl fread(ptr long long ptr) msvcrt.fread +@ cdecl free(ptr) msvcrt.free +@ cdecl freopen(str str ptr) msvcrt.freopen +@ cdecl frexp(double ptr) msvcrt.frexp +@ varargs fscanf(ptr str) msvcrt.fscanf +@ cdecl fseek(ptr long long) msvcrt.fseek +@ cdecl fsetpos(ptr ptr) msvcrt.fsetpos +@ cdecl ftell(ptr) msvcrt.ftell +@ varargs fwprintf(ptr wstr) msvcrt.fwprintf +@ cdecl fwrite(ptr long long ptr) msvcrt.fwrite +@ varargs fwscanf(ptr wstr) msvcrt.fwscanf +@ cdecl getc(ptr) msvcrt.getc +@ cdecl getchar() msvcrt.getchar +@ cdecl getenv(str) msvcrt.getenv +@ cdecl gets(str) msvcrt.gets +@ cdecl getwc(ptr) msvcrt.getwc +@ cdecl getwchar() msvcrt.getwchar +@ cdecl gmtime(ptr) msvcrt.gmtime +@ cdecl is_wctype(long long) msvcrt.is_wctype +@ cdecl isalnum(long) msvcrt.isalnum +@ cdecl isalpha(long) msvcrt.isalpha +@ cdecl iscntrl(long) msvcrt.iscntrl +@ cdecl isdigit(long) msvcrt.isdigit +@ cdecl isgraph(long) msvcrt.isgraph +@ cdecl isleadbyte(long) msvcrt.isleadbyte +@ cdecl islower(long) msvcrt.islower +@ cdecl isprint(long) msvcrt.isprint +@ cdecl ispunct(long) msvcrt.ispunct +@ cdecl isspace(long) msvcrt.isspace +@ cdecl isupper(long) msvcrt.isupper +@ cdecl iswalnum(long) msvcrt.iswalnum +@ cdecl iswalpha(long) msvcrt.iswalpha +@ cdecl iswascii(long) msvcrt.iswascii +@ cdecl iswcntrl(long) msvcrt.iswcntrl +@ cdecl iswctype(long long) msvcrt.iswctype +@ cdecl iswdigit(long) msvcrt.iswdigit +@ cdecl iswgraph(long) msvcrt.iswgraph +@ cdecl iswlower(long) msvcrt.iswlower +@ cdecl iswprint(long) msvcrt.iswprint +@ cdecl iswpunct(long) msvcrt.iswpunct +@ cdecl iswspace(long) msvcrt.iswspace +@ cdecl iswupper(long) msvcrt.iswupper +@ cdecl iswxdigit(long) msvcrt.iswxdigit +@ cdecl isxdigit(long) msvcrt.isxdigit +@ cdecl labs(long) msvcrt.labs +@ cdecl ldexp( double long) msvcrt.ldexp +@ cdecl ldiv(long long) msvcrt.ldiv +@ cdecl localeconv() msvcrt.localeconv +@ cdecl localtime(ptr) msvcrt.localtime +@ cdecl log(double) msvcrt.log +@ cdecl log10(double) msvcrt.log10 +@ cdecl -i386 longjmp(ptr long) msvcrt.longjmp +@ cdecl malloc(long) msvcrt.malloc +@ cdecl mblen(ptr long) msvcrt.mblen +@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs +@ cdecl mbtowc(wstr str long) msvcrt.mbtowc +@ cdecl memchr(ptr long long) msvcrt.memchr +@ cdecl memcmp(ptr ptr long) msvcrt.memcmp +@ cdecl memcpy(ptr ptr long) msvcrt.memcpy +@ cdecl memmove(ptr ptr long) msvcrt.memmove +@ cdecl memset(ptr long long) msvcrt.memset +@ cdecl mktime(ptr) msvcrt.mktime +@ cdecl modf(double ptr) msvcrt.modf +@ cdecl perror(str) msvcrt.perror +@ cdecl pow(double double) msvcrt.pow +@ varargs printf(str) msvcrt.printf +@ cdecl putc(long ptr) msvcrt.putc +@ cdecl putchar(long) msvcrt.putchar +@ cdecl puts(str) msvcrt.puts +@ cdecl putwc(long ptr) msvcrt.putwc +@ cdecl putwchar(long) msvcrt.putwchar +@ cdecl qsort(ptr long long ptr) msvcrt.qsort +@ cdecl raise(long) msvcrt.raise +@ cdecl rand() msvcrt.rand +@ cdecl realloc(ptr long) msvcrt.realloc +@ cdecl remove(str) msvcrt.remove +@ cdecl rename(str str) msvcrt.rename +@ cdecl rewind(ptr) msvcrt.rewind +@ varargs scanf(str) msvcrt.scanf +@ cdecl setbuf(ptr ptr) msvcrt.setbuf +@ cdecl setlocale(long str) msvcrt.setlocale +@ cdecl setvbuf(ptr str long long) msvcrt.setvbuf +@ cdecl signal(long long) msvcrt.signal +@ cdecl sin(double) msvcrt.sin +@ cdecl sinh(double) msvcrt.sinh +@ varargs sprintf(ptr str) msvcrt.sprintf +@ cdecl sqrt(double) msvcrt.sqrt +@ cdecl srand(long) msvcrt.srand +@ varargs sscanf(str str) msvcrt.sscanf +@ cdecl strcat(str str) msvcrt.strcat +@ cdecl strchr(str long) msvcrt.strchr +@ cdecl strcmp(str str) msvcrt.strcmp +@ cdecl strcoll(str str) msvcrt.strcoll +@ cdecl strcpy(ptr str) msvcrt.strcpy +@ cdecl strcspn(str str) msvcrt.strcspn +@ cdecl strerror(long) msvcrt.strerror +@ cdecl strftime(str long str ptr) msvcrt.strftime +@ cdecl strlen(str) msvcrt.strlen +@ cdecl strncat(str str long) msvcrt.strncat +@ cdecl strncmp(str str long) msvcrt.strncmp +@ cdecl strncpy(ptr str long) msvcrt.strncpy +@ cdecl strpbrk(str str) msvcrt.strpbrk +@ cdecl strrchr(str long) msvcrt.strrchr +@ cdecl strspn(str str) msvcrt.strspn +@ cdecl strstr(str str) msvcrt.strstr +@ cdecl strtod(str ptr) msvcrt.strtod +@ cdecl strtok(str str) msvcrt.strtok +@ cdecl strtol(str ptr long) msvcrt.strtol +@ cdecl strtoul(str ptr long) msvcrt.strtoul +@ cdecl strxfrm(ptr str long) msvcrt.strxfrm +@ varargs swprintf(ptr wstr) msvcrt.swprintf +@ varargs swscanf(wstr wstr) msvcrt.swscanf +@ cdecl system(str) msvcrt.system +@ cdecl tan(double) msvcrt.tan +@ cdecl tanh(double) msvcrt.tanh +@ cdecl time(ptr) msvcrt.time +@ cdecl tmpfile() msvcrt.tmpfile +@ cdecl tmpnam(ptr) msvcrt.tmpnam +@ cdecl tolower(long) msvcrt.tolower +@ cdecl toupper(long) msvcrt.toupper +@ cdecl towlower(long) msvcrt.towlower +@ cdecl towupper(long) msvcrt.towupper +@ cdecl ungetc(long ptr) msvcrt.ungetc +@ cdecl ungetwc(long ptr) msvcrt.ungetwc +@ cdecl vfprintf(ptr str ptr) msvcrt.vfprintf +@ cdecl vfwprintf(ptr wstr ptr) msvcrt.vfwprintf +@ cdecl vprintf(str ptr) msvcrt.vprintf +@ cdecl vsprintf(ptr str ptr) msvcrt.vsprintf +@ cdecl vswprintf(ptr wstr ptr) msvcrt.vswprintf +@ cdecl vwprintf(wstr ptr) msvcrt.vwprintf +@ cdecl wcscat(wstr wstr) msvcrt.wcscat +@ cdecl wcschr(wstr long) msvcrt.wcschr +@ cdecl wcscmp(wstr wstr) msvcrt.wcscmp +@ cdecl wcscoll(wstr wstr) msvcrt.wcscoll +@ cdecl wcscpy(ptr wstr) msvcrt.wcscpy +@ cdecl wcscspn(wstr wstr) msvcrt.wcscspn +@ cdecl wcsftime(ptr long wstr ptr) msvcrt.wcsftime +@ cdecl wcslen(wstr) msvcrt.wcslen +@ cdecl wcsncat(wstr wstr long) msvcrt.wcsncat +@ cdecl wcsncmp(wstr wstr long) msvcrt.wcsncmp +@ cdecl wcsncpy(ptr wstr long) msvcrt.wcsncpy +@ cdecl wcspbrk(wstr wstr) msvcrt.wcspbrk +@ cdecl wcsrchr(wstr long) msvcrt.wcsrchr +@ cdecl wcsspn(wstr wstr) msvcrt.wcsspn +@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr +@ cdecl wcstod(wstr ptr) msvcrt.wcstod +@ cdecl wcstok(wstr wstr) msvcrt.wcstok +@ cdecl wcstol(wstr ptr long) msvcrt.wcstol +@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs +@ cdecl wcstoul(wstr ptr long) msvcrt.wcstoul +@ stub wcsxfrm +@ cdecl wctomb(ptr long) msvcrt.wctomb +@ varargs wprintf(wstr) msvcrt.wprintf +@ varargs wscanf(wstr) msvcrt.wscanf diff --git a/dlls/msvcr71/Makefile.in b/dlls/msvcr71/Makefile.in index 5492e8383ec..5eeec4815f5 100644 --- a/dlls/msvcr71/Makefile.in +++ b/dlls/msvcr71/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ msvcr71.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcr80/Makefile.in b/dlls/msvcr80/Makefile.in new file mode 100644 index 00000000000..31dae6a0b23 --- /dev/null +++ b/dlls/msvcr80/Makefile.in @@ -0,0 +1,12 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = msvcr80.dll +IMPORTLIB = msvcr80 +IMPORTS = msvcrt msvcr90 kernel32 + +C_SRCS = \ + msvcr80.c + +@MAKE_DLL_RULES@ diff --git a/dlls/mmdevapi/mmdevapi.h b/dlls/msvcr80/msvcr80.c similarity index 65% copy from dlls/mmdevapi/mmdevapi.h copy to dlls/msvcr80/msvcr80.c index b1a3de2ddc2..3f81dcb216d 100644 --- a/dlls/mmdevapi/mmdevapi.h +++ b/dlls/msvcr80/msvcr80.c @@ -1,5 +1,7 @@ /* - * Copyright 2009 Maarten Lankhorst + * msvcr80 specific functions + * + * Copyright 2010 Detlef Riekenberg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,17 +18,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv); -extern void MMDevEnum_Free(void); +#include -typedef struct MMDevice { - const IMMDeviceVtbl *lpVtbl; - LONG ref; +#include "windef.h" +#include "winbase.h" - CRITICAL_SECTION crst; +BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) +{ + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ - EDataFlow flow; - DWORD state; - GUID devguid; - WCHAR *alname; -} MMDevice; + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hdll); + } + return TRUE; +} diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec new file mode 100644 index 00000000000..ed283d9aa74 --- /dev/null +++ b/dlls/msvcr80/msvcr80.spec @@ -0,0 +1,1468 @@ +# MS VC++2005 runtime library + +@ stub ??0__non_rtti_object@std@@QAE@ABV01@@Z +@ stub ??0bad_cast@std@@QAE@ABV01@@Z +@ stub ??0bad_cast@std@@QAE@PBD@Z +@ stub ??0bad_typeid@std@@QAE@ABV01@@Z +@ stub ??0bad_typeid@std@@QAE@PBD@Z +@ stub ??0exception@std@@QAE@ABQBD@Z +@ stub ??0exception@std@@QAE@ABQBDH@Z +@ stub ??0exception@std@@QAE@ABV01@@Z +@ stub ??0exception@std@@QAE@XZ +@ stub ??1__non_rtti_object@std@@UAE@XZ +@ stub ??1bad_cast@std@@UAE@XZ +@ stub ??1bad_typeid@std@@UAE@XZ +@ stub ??1exception@std@@UAE@XZ +@ cdecl -i386 -norelay ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ +@ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z +@ stub ??2@YAPAXIHPBDH@Z +@ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z +@ stub ??4__non_rtti_object@std@@QAEAAV01@ABV01@@Z +@ stub ??4bad_cast@std@@QAEAAV01@ABV01@@Z +@ stub ??4bad_typeid@std@@QAEAAV01@ABV01@@Z +@ stub ??4exception@std@@QAEAAV01@ABV01@@Z +@ stub ??8type_info@@QBE_NABV0@@Z +@ stub ??9type_info@@QBE_NABV0@@Z +@ stub ??_7__non_rtti_object@std@@6B@ +@ stub ??_7bad_cast@std@@6B@ +@ stub ??_7bad_typeid@std@@6B@ +@ extern -i386 ??_7exception@@6B@ msvcrt.??_7exception@@6B@ +@ stub ??_7exception@std@@6B@ +@ stub ??_Fbad_cast@std@@QAEXXZ +@ stub ??_Fbad_typeid@std@@QAEXXZ +@ cdecl ??_U@YAPAXI@Z(long) msvcrt.??_U@YAPAXI@Z +@ stub ??_U@YAPAXIHPBDH@Z +@ cdecl ??_V@YAXPAX@Z(ptr) msvcrt.??_V@YAXPAX@Z +@ stub ?_Name_base@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z +@ stub ?_Name_base_internal@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z +@ stub ?_Type_info_dtor@type_info@@CAXPAV1@@Z +@ stub ?_Type_info_dtor_internal@type_info@@CAXPAV1@@Z +@ stub ?_ValidateExecute@@YAHP6GHXZ@Z +@ stub ?_ValidateRead@@YAHPBXI@Z +@ stub ?_ValidateWrite@@YAHPAXI@Z +@ cdecl __uncaught_exception() msvcrt.__uncaught_exception +@ stub ?_inconsistency@@YAXXZ +@ stub ?_invalid_parameter@@YAXPBG00II@Z +@ stub ?_is_exception_typeof@@YAHABVtype_info@@PAU_EXCEPTION_POINTERS@@@Z +@ stub ?_name_internal_method@type_info@@QBEPBDPAU__type_info_node@@@Z +@ stub ?_open@@YAHPBDHH@Z +@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() msvcrt.?_query_new_handler@@YAP6AHI@ZXZ +@ cdecl ?_query_new_mode@@YAHXZ() msvcrt.?_query_new_mode@@YAHXZ +@ stub ?_set_new_handler@@YAP6AHI@ZH@Z +@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) msvcrt.?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z +@ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z +@ stub ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZH@Z +@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z +@ stub ?_sopen@@YAHPBDHHH@Z +@ stub ?_type_info_dtor_internal_method@type_info@@QAEXXZ +@ stub ?_wopen@@YAHPB_WHH@Z +@ stub ?_wsopen@@YAHPB_WHHH@Z +@ cdecl -i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ stub ?name@type_info@@QBEPBDPAU__type_info_node@@@Z +@ cdecl -i386 -norelay ?raw_name@type_info@@QBEPBDXZ() msvcrt.?raw_name@type_info@@QBEPBDXZ +@ cdecl ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_new_handler@@YAP6AXXZP6AXXZ@Z +@ stub ?set_terminate@@YAP6AXXZH@Z +@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z +@ stub ?set_unexpected@@YAP6AXXZH@Z +@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ@Z +@ stub ?swprintf@@YAHPAGIPBGZZ +@ stub ?swprintf@@YAHPA_WIPB_WZZ +@ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ +@ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ +@ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z +@ stub ?what@exception@std@@UBEPBDXZ +@ stub @_calloc_crt@8 +@ cdecl _malloc_crt@4(long) msvcrt.malloc +@ stub @_realloc_crt@8 +@ cdecl $I10_OUTPUT() msvcrt.$I10_OUTPUT +@ cdecl -arch=i386 _CIacos() msvcrt._CIacos +@ cdecl -arch=i386 _CIasin() msvcrt._CIasin +@ cdecl -arch=i386 _CIatan() msvcrt._CIatan +@ cdecl -arch=i386 _CIatan2() msvcrt._CIatan2 +@ cdecl -arch=i386 _CIcos() msvcrt._CIcos +@ cdecl -arch=i386 _CIcosh() msvcrt._CIcosh +@ cdecl -arch=i386 _CIexp() msvcrt._CIexp +@ cdecl -arch=i386 _CIfmod() msvcrt._CIfmod +@ cdecl -arch=i386 _CIlog() msvcrt._CIlog +@ cdecl -arch=i386 _CIlog10() msvcrt._CIlog10 +@ cdecl -arch=i386 _CIpow() msvcrt._CIpow +@ cdecl -arch=i386 _CIsin() msvcrt._CIsin +@ cdecl -arch=i386 _CIsinh() msvcrt._CIsinh +@ cdecl -arch=i386 _CIsqrt() msvcrt._CIsqrt +@ cdecl -arch=i386 _CItan() msvcrt._CItan +@ cdecl -arch=i386 _CItanh() msvcrt._CItanh +@ stub _CRT_RTC_INIT +@ stub _CRT_RTC_INITW +@ stub _CreateFrameInfo +@ cdecl _CxxThrowException(long long) msvcrt._CxxThrowException +@ cdecl -i386 -norelay _EH_prolog() msvcrt._EH_prolog +@ stub _FindAndUnlinkFrame +@ cdecl _Getdays() msvcrt._Getdays +@ cdecl _Getmonths() msvcrt._Getmonths +@ cdecl _Gettnames() msvcrt._Gettnames +@ extern _HUGE msvcrt._HUGE +@ stub _IsExceptionObjectToBeDestroyed +@ stub _NLG_Dispatch2 +@ stub _NLG_Return +@ stub _NLG_Return2 +@ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime +@ cdecl _XcptFilter(long ptr) msvcrt._XcptFilter +@ stub __AdjustPointer +@ stub __BuildCatchObject +@ stub __BuildCatchObjectHelper +@ cdecl __CppXcptFilter(long ptr) msvcrt.__CppXcptFilter +@ stub __CxxCallUnwindDelDtor +@ stub __CxxCallUnwindDtor +@ stub __CxxCallUnwindStdDelDtor +@ stub __CxxCallUnwindVecDtor +@ cdecl __CxxDetectRethrow(ptr) msvcrt.__CxxDetectRethrow +@ stub __CxxExceptionFilter +@ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler +@ stub __CxxFrameHandler2 +@ stub __CxxFrameHandler3 +@ stdcall -i386 __CxxLongjmpUnwind(ptr) msvcrt.__CxxLongjmpUnwind +@ cdecl __CxxQueryExceptionSize() msvcrt.__CxxQueryExceptionSize +@ stub __CxxRegisterExceptionObject +@ stub __CxxUnregisterExceptionObject +@ stub __DestructExceptionObject +@ stub __FrameUnwindFilter +@ cdecl __RTCastToVoid(ptr) msvcrt.__RTCastToVoid +@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast +@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid +@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD +@ stub __STRINGTOLD_L +@ stub __TypeMatch +@ cdecl ___lc_codepage_func() msvcrt.___lc_codepage_func +@ cdecl ___lc_collate_cp_func() msvcrt.___lc_collate_cp_func +@ cdecl ___lc_handle_func() msvcrt.___lc_handle_func +@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func +@ stub ___mb_cur_max_l_func +@ cdecl ___setlc_active_func() msvcrt.___setlc_active_func +@ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func +@ extern __argc msvcrt.__argc +@ extern __argv msvcrt.__argv +@ extern __badioinfo msvcrt.__badioinfo +@ stub __clean_type_info_names_internal +@ stub __control87_2 +@ stub __create_locale +@ cdecl __crtCompareStringA(long long str long str long) msvcrt.__crtCompareStringA +@ cdecl __crtCompareStringW(long long wstr long wstr long) msvcrt.__crtCompareStringW +@ cdecl __crtGetLocaleInfoW(long long ptr long) msvcrt.__crtGetLocaleInfoW +@ stub __crtGetStringTypeW +@ cdecl __crtLCMapStringA(long long str long ptr long long long) msvcrt.__crtLCMapStringA +@ stub __crtLCMapStringW +@ stub __daylight +@ cdecl __dllonexit(ptr ptr ptr) msvcrt.__dllonexit +@ cdecl __doserrno() msvcrt.__doserrno +@ stub __dstbias +@ stub ___fls_getvalue@4 +@ stub ___fls_setvalue@8 +@ cdecl __fpecode() msvcrt.__fpecode +@ stub __free_locale +@ stub __get_app_type +@ stub __get_current_locale +@ stub __get_flsindex +@ stub __get_tlsindex +@ cdecl __getmainargs(ptr ptr ptr long ptr) msvcrt.__getmainargs +@ extern __initenv msvcrt.__initenv +@ cdecl __iob_func() msvcrt.__iob_func +@ cdecl __isascii(long) msvcrt.__isascii +@ cdecl __iscsym(long) msvcrt.__iscsym +@ cdecl __iscsymf(long) msvcrt.__iscsymf +@ stub __iswcsym +@ stub __iswcsymf +@ stub __lc_clike +@ extern __lc_codepage msvcrt.__lc_codepage +@ extern __lc_collate_cp msvcrt.__lc_collate_cp +@ extern __lc_handle msvcrt.__lc_handle +@ stub __lconv +@ cdecl __lconv_init() msvcrt.__lconv_init +@ stub __libm_sse2_acos +@ stub __libm_sse2_acosf +@ stub __libm_sse2_asin +@ stub __libm_sse2_asinf +@ stub __libm_sse2_atan +@ stub __libm_sse2_atan2 +@ stub __libm_sse2_atanf +@ stub __libm_sse2_cos +@ stub __libm_sse2_cosf +@ stub __libm_sse2_exp +@ stub __libm_sse2_expf +@ stub __libm_sse2_log +@ stub __libm_sse2_log10 +@ stub __libm_sse2_log10f +@ stub __libm_sse2_logf +@ stub __libm_sse2_pow +@ stub __libm_sse2_powf +@ stub __libm_sse2_sin +@ stub __libm_sse2_sinf +@ stub __libm_sse2_tan +@ stub __libm_sse2_tanf +@ extern __mb_cur_max msvcrt.__mb_cur_max +@ cdecl -arch=i386 __p___argc() msvcrt.__p___argc +@ cdecl -arch=i386 __p___argv() msvcrt.__p___argv +@ cdecl -arch=i386 __p___initenv() msvcrt.__p___initenv +@ cdecl -arch=i386 __p___mb_cur_max() msvcrt.__p___mb_cur_max +@ cdecl -arch=i386 __p___wargv() msvcrt.__p___wargv +@ cdecl -arch=i386 __p___winitenv() msvcrt.__p___winitenv +@ cdecl -arch=i386 __p__acmdln() msvcrt.__p__acmdln +@ cdecl -arch=i386 __p__amblksiz() msvcrt.__p__amblksiz +@ cdecl -arch=i386 __p__commode() msvcrt.__p__commode +@ cdecl -arch=i386 __p__daylight() msvcrt.__p__daylight +@ cdecl -arch=i386 __p__dstbias() msvcrt.__p__dstbias +@ cdecl -arch=i386 __p__environ() msvcrt.__p__environ +@ cdecl -arch=i386 __p__fmode() msvcrt.__p__fmode +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob +@ stub __p__mbcasemap +@ cdecl -arch=i386 __p__mbctype() msvcrt.__p__mbctype +@ stub __p__osplatform +@ cdecl -arch=i386 __p__osver() msvcrt.__p__osver +@ cdecl -arch=i386 __p__pctype() msvcrt.__p__pctype +@ cdecl -arch=i386 __p__pgmptr() msvcrt.__p__pgmptr +@ stub __p__pwctype +@ cdecl -arch=i386 __p__timezone() msvcrt.__p__timezone +@ cdecl -arch=i386 __p__tzname() msvcrt.__p__tzname +@ cdecl -arch=i386 __p__wcmdln() msvcrt.__p__wcmdln +@ cdecl -arch=i386 __p__wenviron() msvcrt.__p__wenviron +@ cdecl -arch=i386 __p__winmajor() msvcrt.__p__winmajor +@ cdecl -arch=i386 __p__winminor() msvcrt.__p__winminor +@ cdecl -arch=i386 __p__winver() msvcrt.__p__winver +@ cdecl -arch=i386 __p__wpgmptr() msvcrt.__p__wpgmptr +@ cdecl __pctype_func() msvcrt.__pctype_func +@ extern __pioinfo msvcrt.__pioinfo +@ stub __pwctype_func +@ stub __pxcptinfoptrs +@ stub __report_gsfailure +@ cdecl __set_app_type(long) msvcrt.__set_app_type +@ stub __set_flsgetvalue +@ extern __setlc_active msvcrt.__setlc_active +@ cdecl __setusermatherr(ptr) msvcrt.__setusermatherr +@ stub __strncnt +@ stub __swprintf_l +@ stub __sys_errlist +@ stub __sys_nerr +@ cdecl __threadhandle() msvcrt.__threadhandle +@ cdecl __threadid() msvcrt.__threadid +@ stub __timezone +@ cdecl __toascii(long) msvcrt.__toascii +@ stub __tzname +@ cdecl __unDName(ptr str long ptr ptr long) msvcrt.__unDName +@ cdecl __unDNameEx(ptr str long ptr ptr ptr long) msvcrt.__unDNameEx +@ stub __unDNameHelper +@ extern __unguarded_readlc_active msvcrt.__unguarded_readlc_active +@ stub __vswprintf_l +@ extern __wargv msvcrt.__wargv +@ stub __wcserror +@ stub __wcserror_s +@ stub __wcsncnt +@ cdecl __wgetmainargs(ptr ptr ptr long ptr) msvcrt.__wgetmainargs +@ extern __winitenv msvcrt.__winitenv +@ cdecl _abnormal_termination() msvcrt._abnormal_termination +@ stub _abs64 +@ cdecl _access(str long) msvcrt._access +@ stub _access_s +@ extern _acmdln msvcrt._acmdln +@ stdcall -arch=i386 _adj_fdiv_m16i(long) msvcrt._adj_fdiv_m16i +@ stdcall -arch=i386 _adj_fdiv_m32(long) msvcrt._adj_fdiv_m32 +@ stdcall -arch=i386 _adj_fdiv_m32i(long) msvcrt._adj_fdiv_m32i +@ stdcall -arch=i386 _adj_fdiv_m64(double) msvcrt._adj_fdiv_m64 +@ cdecl -arch=i386 _adj_fdiv_r() msvcrt._adj_fdiv_r +@ stdcall -arch=i386 _adj_fdivr_m16i(long) msvcrt._adj_fdivr_m16i +@ stdcall -arch=i386 _adj_fdivr_m32(long) msvcrt._adj_fdivr_m32 +@ stdcall -arch=i386 _adj_fdivr_m32i(long) msvcrt._adj_fdivr_m32i +@ stdcall -arch=i386 _adj_fdivr_m64(double) msvcrt._adj_fdivr_m64 +@ cdecl -arch=i386 _adj_fpatan() msvcrt._adj_fpatan +@ cdecl -arch=i386 _adj_fprem() msvcrt._adj_fprem +@ cdecl -arch=i386 _adj_fprem1() msvcrt._adj_fprem1 +@ cdecl -arch=i386 _adj_fptan() msvcrt._adj_fptan +@ extern -arch=i386 _adjust_fdiv msvcrt._adjust_fdiv +@ stub _aexit_rtn +@ cdecl _aligned_free(ptr) msvcrt._aligned_free +@ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc +@ stub _aligned_msize +@ cdecl _aligned_offset_malloc(long long long) msvcrt._aligned_offset_malloc +@ cdecl _aligned_offset_realloc(ptr long long long) msvcrt._aligned_offset_realloc +@ stub _aligned_offset_recalloc +@ cdecl _aligned_realloc(ptr long long) msvcrt._aligned_realloc +@ stub _aligned_recalloc +@ cdecl _amsg_exit(long) msvcrt._amsg_exit +@ cdecl _assert(str str long) msvcrt._assert +@ stub _atodbl +@ stub _atodbl_l +@ stub _atof_l +@ stub _atoflt +@ stub _atoflt_l +@ cdecl -ret64 _atoi64(str) msvcrt._atoi64 +@ stub _atoi64_l +@ stub _atoi_l +@ stub _atol_l +@ cdecl _atoldbl(ptr str) msvcrt._atoldbl +@ stub _atoldbl_l +@ cdecl _beep(long long) msvcrt._beep +@ cdecl _beginthread(ptr long ptr) msvcrt._beginthread +@ cdecl _beginthreadex(ptr long ptr ptr long ptr) msvcrt._beginthreadex +@ stub _byteswap_uint64 +@ stub _byteswap_ulong +@ stub _byteswap_ushort +@ cdecl _c_exit() msvcrt._c_exit +@ cdecl _cabs(long) msvcrt._cabs +@ cdecl _callnewh(long) msvcrt._callnewh +@ stub _calloc_crt +@ cdecl _cexit() msvcrt._cexit +@ cdecl _cgets(str) msvcrt._cgets +@ stub _cgets_s +@ stub _cgetws +@ stub _cgetws_s +@ cdecl _chdir(str) msvcrt._chdir +@ cdecl _chdrive(long) msvcrt._chdrive +@ cdecl _chgsign( double ) msvcrt._chgsign +@ cdecl -i386 -norelay _chkesp() msvcrt._chkesp +@ cdecl _chmod(str long) msvcrt._chmod +@ cdecl _chsize(long long) msvcrt._chsize +@ stub _chsize_s +@ cdecl _clearfp() msvcrt._clearfp +@ cdecl _close(long) msvcrt._close +@ cdecl _commit(long) msvcrt._commit +@ extern _commode msvcrt._commode +@ stub _configthreadlocale +@ cdecl _control87(long long) msvcrt._control87 +@ cdecl _controlfp(long long) msvcrt._controlfp +@ stub _controlfp_s +@ cdecl _copysign( double double ) msvcrt._copysign +@ varargs _cprintf(str) msvcrt._cprintf +@ stub _cprintf_l +@ stub _cprintf_p +@ stub _cprintf_p_l +@ stub _cprintf_s +@ stub _cprintf_s_l +@ cdecl _cputs(str) msvcrt._cputs +@ stub _cputws +@ cdecl _creat(str long) msvcrt._creat +@ stub _create_locale +@ stub _crt_debugger_hook +@ varargs _cscanf(str) msvcrt._cscanf +@ stub _cscanf_l +@ stub _cscanf_s +@ stub _cscanf_s_l +@ cdecl _ctime32(ptr) msvcrt._ctime32 +@ stub _ctime32_s +@ cdecl _ctime64(ptr) msvcrt._ctime64 +@ stub _ctime64_s +@ cdecl _cwait(ptr long long) msvcrt._cwait +@ stub _cwprintf +@ stub _cwprintf_l +@ stub _cwprintf_p +@ stub _cwprintf_p_l +@ stub _cwprintf_s +@ stub _cwprintf_s_l +@ stub _cwscanf +@ stub _cwscanf_l +@ stub _cwscanf_s +@ stub _cwscanf_s_l +@ extern _daylight msvcrt._daylight +@ stub _decode_pointer +@ cdecl _difftime32(long long) msvcrt._difftime32 +@ cdecl _difftime64(long long) msvcrt._difftime64 +@ stub _dosmaperr +@ extern _dstbias msvcrt._dstbias +@ cdecl _dup(long) msvcrt._dup +@ cdecl _dup2(long long) msvcrt._dup2 +@ stub _dupenv_s +@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt +@ stub _ecvt_s +@ stub _encode_pointer +@ stub _encoded_null +@ cdecl _endthread() msvcrt._endthread +@ cdecl _endthreadex(long) msvcrt._endthreadex +@ extern _environ msvcrt._environ +@ cdecl _eof(long) msvcrt._eof +@ cdecl _errno() msvcrt._errno +@ cdecl _except_handler2(ptr ptr ptr ptr) msvcrt._except_handler2 +@ cdecl _except_handler3(ptr ptr ptr ptr) msvcrt._except_handler3 +@ stub _except_handler4_common +@ varargs _execl(str str) msvcrt._execl +@ varargs _execle(str str) msvcrt._execle +@ varargs _execlp(str str) msvcrt._execlp +@ varargs _execlpe(str str) msvcrt._execlpe +@ cdecl _execv(str ptr) msvcrt._execv +@ cdecl _execve(str ptr ptr) msvcrt._execve +@ cdecl _execvp(str ptr) msvcrt._execvp +@ cdecl _execvpe(str ptr ptr) msvcrt._execvpe +@ cdecl _exit(long) msvcrt._exit +@ cdecl _expand(ptr long) msvcrt._expand +@ stub _fclose_nolock +@ cdecl _fcloseall() msvcrt._fcloseall +@ cdecl _fcvt(double long ptr ptr) msvcrt._fcvt +@ stub _fcvt_s +@ cdecl _fdopen(long str) msvcrt._fdopen +@ stub _fflush_nolock +@ cdecl _fgetchar() msvcrt._fgetchar +@ stub _fgetwc_nolock +@ cdecl _fgetwchar() msvcrt._fgetwchar +@ cdecl _filbuf(ptr) msvcrt._filbuf +@ cdecl _filelength(long) msvcrt._filelength +@ cdecl -ret64 _filelengthi64(long) msvcrt._filelengthi64 +@ cdecl _fileno(ptr) msvcrt._fileno +@ cdecl _findclose(long) msvcrt._findclose +@ stub _findfirst32 +@ stub _findfirst32i64 +@ stub _findfirst64 +@ stub _findfirst64i32 +@ stub _findnext32 +@ stub _findnext32i64 +@ stub _findnext64 +@ stub _findnext64i32 +@ cdecl _finite( double ) msvcrt._finite +@ cdecl _flsbuf(long ptr) msvcrt._flsbuf +@ cdecl _flushall() msvcrt._flushall +@ extern _fmode msvcrt._fmode +@ cdecl _fpclass(double) msvcrt._fpclass +@ stub _fpieee_flt +@ cdecl _fpreset() msvcrt._fpreset +@ stub _fprintf_l +@ stub _fprintf_p +@ stub _fprintf_p_l +@ stub _fprintf_s_l +@ cdecl _fputchar(long) msvcrt._fputchar +@ stub _fputwc_nolock +@ cdecl _fputwchar(long) msvcrt._fputwchar +@ stub _fread_nolock +@ stub _fread_nolock_s +@ stub _free_locale +@ stub _freea +@ stub _freea_s +@ stub _freefls +@ stub _fscanf_l +@ stub _fscanf_s_l +@ stub _fseek_nolock +@ stub _fseeki64 +@ stub _fseeki64_nolock +@ cdecl _fsopen(str str long) msvcrt._fsopen +@ stub _fstat32 +@ stub _fstat32i64 +@ cdecl _fstat64(long ptr) msvcrt._fstat64 +@ stub _fstat64i32 +@ stub _ftell_nolock +@ stub _ftelli64 +@ stub _ftelli64_nolock +@ cdecl _ftime32(ptr) msvcrt._ftime32 +@ stub _ftime32_s +@ cdecl _ftime64(ptr) msvcrt._ftime64 +@ stub _ftime64_s +@ cdecl -ret64 _ftol() msvcrt._ftol +@ cdecl _fullpath(ptr str long) msvcrt._fullpath +@ cdecl _futime32(long ptr) msvcrt._futime32 +@ cdecl _futime64(long ptr) msvcrt._futime64 +@ stub _fwprintf_l +@ stub _fwprintf_p +@ stub _fwprintf_p_l +@ stub _fwprintf_s_l +@ stub _fwrite_nolock +@ stub _fwscanf_l +@ stub _fwscanf_s_l +@ cdecl _gcvt(double long str) msvcrt._gcvt +@ stub _gcvt_s +@ stub _get_amblksiz +@ stub _get_current_locale +@ stub _get_daylight +@ stub _get_doserrno +@ stub _get_dstbias +@ stub _get_errno +@ stub _get_fmode +@ stub _get_heap_handle +@ stub _get_invalid_parameter_handler +@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle +@ stub _get_osplatform +@ stub _get_osver +@ stub _get_output_format +@ stub _get_pgmptr +@ stub _get_printf_count_output +@ stub _get_purecall_handler +@ cdecl _get_sbh_threshold() msvcrt._get_sbh_threshold +@ stub _get_terminate +@ stub _get_timezone +@ stub _get_tzname +@ stub _get_unexpected +@ stub _get_winmajor +@ stub _get_winminor +@ stub _get_winver +@ stub _get_wpgmptr +@ cdecl _getch() msvcrt._getch +@ stub _getch_nolock +@ cdecl _getche() msvcrt._getche +@ stub _getche_nolock +@ cdecl _getcwd(str long) msvcrt._getcwd +@ cdecl _getdcwd(long str long) msvcrt._getdcwd +@ stub _getdcwd_nolock +@ cdecl _getdiskfree(long ptr) msvcrt._getdiskfree +@ cdecl _getdllprocaddr(long str long) msvcrt._getdllprocaddr +@ cdecl _getdrive() msvcrt._getdrive +@ cdecl _getdrives() msvcrt._getdrives +@ cdecl _getmaxstdio() msvcrt._getmaxstdio +@ cdecl _getmbcp() msvcrt._getmbcp +@ cdecl _getpid() msvcrt._getpid +@ stub _getptd +@ stub _getsystime +@ cdecl _getw(ptr) msvcrt._getw +@ stub _getwch +@ stub _getwch_nolock +@ stub _getwche +@ stub _getwche_nolock +@ cdecl _getws(ptr) msvcrt._getws +@ stub _getws_s +@ cdecl _global_unwind2(ptr) msvcrt._global_unwind2 +@ cdecl _gmtime32(ptr) msvcrt._gmtime32 +@ stub _gmtime32_s +@ cdecl _gmtime64(ptr) msvcrt._gmtime64 +@ stub _gmtime64_s +@ cdecl _heapadd(ptr long) msvcrt._heapadd +@ cdecl _heapchk() msvcrt._heapchk +@ cdecl _heapmin() msvcrt._heapmin +@ cdecl _heapset(long) msvcrt._heapset +@ stub _heapused +@ cdecl _heapwalk(ptr) msvcrt._heapwalk +@ cdecl _hypot(double double) msvcrt._hypot +@ stub _hypotf +@ cdecl _i64toa(long long ptr long) msvcrt._i64toa +@ stub _i64toa_s +@ cdecl _i64tow(long long ptr long) msvcrt._i64tow +@ stub _i64tow_s +@ stub _initptd +@ cdecl _initterm(ptr ptr) msvcrt._initterm +@ cdecl _initterm_e(ptr ptr) msvcr90._initterm_e +@ stub _inp +@ stub _inpd +@ stub _inpw +@ stub _invalid_parameter +@ stub _invalid_parameter_noinfo +@ stub _invoke_watson +@ extern _iob msvcrt._iob +@ stub _isalnum_l +@ stub _isalpha_l +@ cdecl _isatty(long) msvcrt._isatty +@ stub _iscntrl_l +@ cdecl _isctype(long long) msvcrt._isctype +@ stub _isctype_l +@ stub _isdigit_l +@ stub _isgraph_l +@ stub _isleadbyte_l +@ stub _islower_l +@ stub _ismbbalnum +@ stub _ismbbalnum_l +@ stub _ismbbalpha +@ stub _ismbbalpha_l +@ stub _ismbbgraph +@ stub _ismbbgraph_l +@ stub _ismbbkalnum +@ stub _ismbbkalnum_l +@ cdecl _ismbbkana(long) msvcrt._ismbbkana +@ stub _ismbbkana_l +@ stub _ismbbkprint +@ stub _ismbbkprint_l +@ stub _ismbbkpunct +@ stub _ismbbkpunct_l +@ cdecl _ismbblead(long) msvcrt._ismbblead +@ stub _ismbblead_l +@ stub _ismbbprint +@ stub _ismbbprint_l +@ stub _ismbbpunct +@ stub _ismbbpunct_l +@ cdecl _ismbbtrail(long) msvcrt._ismbbtrail +@ stub _ismbbtrail_l +@ cdecl _ismbcalnum(long) msvcrt._ismbcalnum +@ stub _ismbcalnum_l +@ cdecl _ismbcalpha(long) msvcrt._ismbcalpha +@ stub _ismbcalpha_l +@ cdecl _ismbcdigit(long) msvcrt._ismbcdigit +@ stub _ismbcdigit_l +@ cdecl _ismbcgraph(long) msvcrt._ismbcgraph +@ stub _ismbcgraph_l +@ cdecl _ismbchira(long) msvcrt._ismbchira +@ stub _ismbchira_l +@ cdecl _ismbckata(long) msvcrt._ismbckata +@ stub _ismbckata_l +@ stub _ismbcl0 +@ stub _ismbcl0_l +@ stub _ismbcl1 +@ stub _ismbcl1_l +@ stub _ismbcl2 +@ stub _ismbcl2_l +@ cdecl _ismbclegal(long) msvcrt._ismbclegal +@ stub _ismbclegal_l +@ cdecl _ismbclower(long) msvcrt._ismbclower +@ stub _ismbclower_l +@ cdecl _ismbcprint(long) msvcrt._ismbcprint +@ stub _ismbcprint_l +@ cdecl _ismbcpunct(long) msvcrt._ismbcpunct +@ stub _ismbcpunct_l +@ cdecl _ismbcspace(long) msvcrt._ismbcspace +@ stub _ismbcspace_l +@ cdecl _ismbcsymbol(long) msvcrt._ismbcsymbol +@ stub _ismbcsymbol_l +@ cdecl _ismbcupper(long) msvcrt._ismbcupper +@ stub _ismbcupper_l +@ cdecl _ismbslead(ptr ptr) msvcrt._ismbslead +@ stub _ismbslead_l +@ cdecl _ismbstrail(ptr ptr) msvcrt._ismbstrail +@ stub _ismbstrail_l +@ cdecl _isnan( double ) msvcrt._isnan +@ stub _isprint_l +@ stub _ispunct_l +@ stub _isspace_l +@ stub _isupper_l +@ stub _iswalnum_l +@ stub _iswalpha_l +@ stub _iswcntrl_l +@ stub _iswcsym_l +@ stub _iswcsymf_l +@ stub _iswctype_l +@ stub _iswdigit_l +@ stub _iswgraph_l +@ stub _iswlower_l +@ stub _iswprint_l +@ stub _iswpunct_l +@ stub _iswspace_l +@ stub _iswupper_l +@ stub _iswxdigit_l +@ stub _isxdigit_l +@ cdecl _itoa(long ptr long) msvcrt._itoa +@ stub _itoa_s +@ cdecl _itow(long ptr long) msvcrt._itow +@ stub _itow_s +@ cdecl _j0(double) msvcrt._j0 +@ cdecl _j1(double) msvcrt._j1 +@ cdecl _jn(long double) msvcrt._jn +@ cdecl _kbhit() msvcrt._kbhit +@ cdecl _lfind(ptr ptr ptr long ptr) msvcrt._lfind +@ stub _lfind_s +@ cdecl _loaddll(str) msvcrt._loaddll +@ cdecl -i386 _local_unwind2(ptr long) msvcrt._local_unwind2 +@ stub _local_unwind4 +@ cdecl _localtime32(ptr) msvcrt._localtime32 +@ stub _localtime32_s +@ cdecl _localtime64(ptr) msvcrt._localtime64 +@ stub _localtime64_s +@ cdecl _lock(long) msvcrt._lock +@ stub _lock_file +@ cdecl _locking(long long long) msvcrt._locking +@ cdecl _logb( double ) msvcrt._logb +@ cdecl -i386 _longjmpex(ptr long) msvcrt._longjmpex +@ cdecl _lrotl(long long) msvcrt._lrotl +@ cdecl _lrotr(long long) msvcrt._lrotr +@ cdecl _lsearch(ptr ptr long long ptr) msvcrt._lsearch +@ stub _lsearch_s +@ cdecl _lseek(long long long) msvcrt._lseek +@ cdecl -ret64 _lseeki64(long double long) msvcrt._lseeki64 +@ cdecl _ltoa(long ptr long) msvcrt._ltoa +@ stub _ltoa_s +@ cdecl _ltow(long ptr long) msvcrt._ltow +@ stub _ltow_s +@ cdecl _makepath(ptr str str str str) msvcrt._makepath +@ stub _makepath_s +@ cdecl _malloc_crt(long) msvcrt.malloc +@ cdecl _mbbtombc(long) msvcrt._mbbtombc +@ stub _mbbtombc_l +@ cdecl _mbbtype(long long) msvcrt._mbbtype +@ stub _mbbtype_l +@ stub _mbcasemap +@ cdecl _mbccpy(str str) msvcrt._mbccpy +@ stub _mbccpy_l +@ stub _mbccpy_s +@ stub _mbccpy_s_l +@ cdecl _mbcjistojms(long) msvcrt._mbcjistojms +@ stub _mbcjistojms_l +@ stub _mbcjmstojis +@ stub _mbcjmstojis_l +@ cdecl _mbclen(ptr) msvcrt._mbclen +@ stub _mbclen_l +@ stub _mbctohira +@ stub _mbctohira_l +@ stub _mbctokata +@ stub _mbctokata_l +@ cdecl _mbctolower(long) msvcrt._mbctolower +@ stub _mbctolower_l +@ cdecl _mbctombb(long) msvcrt._mbctombb +@ stub _mbctombb_l +@ cdecl _mbctoupper(long) msvcrt._mbctoupper +@ stub _mbctoupper_l +@ extern _mbctype msvcrt._mbctype +@ stub _mblen_l +@ cdecl _mbsbtype(str long) msvcrt._mbsbtype +@ stub _mbsbtype_l +@ stub _mbscat_s +@ stub _mbscat_s_l +@ cdecl _mbschr(str long) msvcrt._mbschr +@ stub _mbschr_l +@ cdecl _mbscmp(str str) msvcrt._mbscmp +@ stub _mbscmp_l +@ cdecl _mbscoll(str str) msvcrt._mbscoll +@ stub _mbscoll_l +@ stub _mbscpy_s +@ stub _mbscpy_s_l +@ cdecl _mbscspn(str str) msvcrt._mbscspn +@ stub _mbscspn_l +@ cdecl _mbsdec(ptr ptr) msvcrt._mbsdec +@ stub _mbsdec_l +@ cdecl _mbsicmp(str str) msvcrt._mbsicmp +@ stub _mbsicmp_l +@ cdecl _mbsicoll(str str) msvcrt._mbsicoll +@ stub _mbsicoll_l +@ cdecl _mbsinc(str) msvcrt._mbsinc +@ stub _mbsinc_l +@ cdecl _mbslen(str) msvcrt._mbslen +@ stub _mbslen_l +@ cdecl _mbslwr(str) msvcrt._mbslwr +@ stub _mbslwr_l +@ stub _mbslwr_s +@ stub _mbslwr_s_l +@ cdecl _mbsnbcat(str str long) msvcrt._mbsnbcat +@ stub _mbsnbcat_l +@ stub _mbsnbcat_s +@ stub _mbsnbcat_s_l +@ cdecl _mbsnbcmp(str str long) msvcrt._mbsnbcmp +@ stub _mbsnbcmp_l +@ cdecl _mbsnbcnt(ptr long) msvcrt._mbsnbcnt +@ stub _mbsnbcnt_l +@ stub _mbsnbcoll +@ stub _mbsnbcoll_l +@ cdecl _mbsnbcpy(ptr str long) msvcrt._mbsnbcpy +@ stub _mbsnbcpy_l +@ cdecl _mbsnbcpy_s(ptr long str long) msvcrt._mbsnbcpy_s +@ stub _mbsnbcpy_s_l +@ cdecl _mbsnbicmp(str str long) msvcrt._mbsnbicmp +@ stub _mbsnbicmp_l +@ stub _mbsnbicoll +@ stub _mbsnbicoll_l +@ cdecl _mbsnbset(str long long) msvcrt._mbsnbset +@ stub _mbsnbset_l +@ stub _mbsnbset_s +@ stub _mbsnbset_s_l +@ cdecl _mbsncat(str str long) msvcrt._mbsncat +@ stub _mbsncat_l +@ stub _mbsncat_s +@ stub _mbsncat_s_l +@ cdecl _mbsnccnt(str long) msvcrt._mbsnccnt +@ stub _mbsnccnt_l +@ cdecl _mbsncmp(str str long) msvcrt._mbsncmp +@ stub _mbsncmp_l +@ stub _mbsncoll +@ stub _mbsncoll_l +@ cdecl _mbsncpy(str str long) msvcrt._mbsncpy +@ stub _mbsncpy_l +@ stub _mbsncpy_s +@ stub _mbsncpy_s_l +@ cdecl _mbsnextc(str) msvcrt._mbsnextc +@ stub _mbsnextc_l +@ cdecl _mbsnicmp(str str long) msvcrt._mbsnicmp +@ stub _mbsnicmp_l +@ stub _mbsnicoll +@ stub _mbsnicoll_l +@ cdecl _mbsninc(str long) msvcrt._mbsninc +@ stub _mbsninc_l +@ stub _mbsnlen +@ stub _mbsnlen_l +@ cdecl _mbsnset(str long long) msvcrt._mbsnset +@ stub _mbsnset_l +@ stub _mbsnset_s +@ stub _mbsnset_s_l +@ cdecl _mbspbrk(str str) msvcrt._mbspbrk +@ stub _mbspbrk_l +@ cdecl _mbsrchr(str long) msvcrt._mbsrchr +@ stub _mbsrchr_l +@ cdecl _mbsrev(str) msvcrt._mbsrev +@ stub _mbsrev_l +@ cdecl _mbsset(str long) msvcrt._mbsset +@ stub _mbsset_l +@ stub _mbsset_s +@ stub _mbsset_s_l +@ cdecl _mbsspn(str str) msvcrt._mbsspn +@ stub _mbsspn_l +@ cdecl _mbsspnp(str str) msvcrt._mbsspnp +@ stub _mbsspnp_l +@ cdecl _mbsstr(str str) msvcrt._mbsstr +@ stub _mbsstr_l +@ cdecl _mbstok(str str) msvcrt._mbstok +@ stub _mbstok_l +@ stub _mbstok_s +@ stub _mbstok_s_l +@ stub _mbstowcs_l +@ stub _mbstowcs_s_l +@ cdecl _mbstrlen(str) msvcrt._mbstrlen +@ stub _mbstrlen_l +@ stub _mbstrnlen +@ stub _mbstrnlen_l +@ cdecl _mbsupr(str) msvcrt._mbsupr +@ stub _mbsupr_l +@ stub _mbsupr_s +@ stub _mbsupr_s_l +@ stub _mbtowc_l +@ cdecl _memccpy(ptr ptr long long) msvcrt._memccpy +@ cdecl _memicmp(str str long) msvcrt._memicmp +@ stub _memicmp_l +@ cdecl _mkdir(str) msvcrt._mkdir +@ stub _mkgmtime32 +@ stub _mkgmtime64 +@ cdecl _mktemp(str) msvcrt._mktemp +@ stub _mktemp_s +@ cdecl _mktime32(ptr) msvcrt._mktime32 +@ cdecl _mktime64(ptr) msvcrt._mktime64 +@ cdecl _msize(ptr) msvcrt._msize +@ cdecl _nextafter(double double) msvcrt._nextafter +@ cdecl _onexit(ptr) msvcrt._onexit +@ varargs _open(str long) msvcrt._open +@ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle +@ stub _osplatform +@ extern _osver msvcrt._osver +@ stub _outp +@ stub _outpd +@ stub _outpw +@ cdecl _pclose(ptr) msvcrt._pclose +@ extern _pctype msvcrt._pctype +@ extern _pgmptr msvcrt._pgmptr +@ cdecl _pipe(ptr long long) msvcrt._pipe +@ cdecl _popen(str str) msvcrt._popen +@ stub _printf_l +@ stub _printf_p +@ stub _printf_p_l +@ stub _printf_s_l +@ cdecl _purecall() msvcrt._purecall +@ cdecl _putch(long) msvcrt._putch +@ stub _putch_nolock +@ cdecl _putenv(str) msvcrt._putenv +@ stub _putenv_s +@ cdecl _putw(long ptr) msvcrt._putw +@ stub _putwch +@ stub _putwch_nolock +@ cdecl _putws(wstr) msvcrt._putws +@ stub _pwctype +@ cdecl _read(long ptr long) msvcrt._read +@ stub _realloc_crt +@ stub _recalloc +@ stub _recalloc_crt +@ stub _resetstkoflw +@ cdecl _rmdir(str) msvcrt._rmdir +@ cdecl _rmtmp() msvcrt._rmtmp +@ cdecl _rotl(long long) msvcrt._rotl +@ stub _rotl64 +@ cdecl _rotr(long long) msvcrt._rotr +@ stub _rotr64 +@ cdecl -arch=i386 _safe_fdiv() msvcrt._safe_fdiv +@ cdecl -arch=i386 _safe_fdivr() msvcrt._safe_fdivr +@ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem +@ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1 +@ cdecl _scalb( double long) msvcrt._scalb +@ stub _scanf_l +@ stub _scanf_s_l +@ stub _scprintf +@ stub _scprintf_l +@ stub _scprintf_p +@ stub _scprintf_p_l +@ stub _scwprintf +@ stub _scwprintf_l +@ stub _scwprintf_p +@ stub _scwprintf_p_l +@ cdecl _searchenv(str str ptr) msvcrt._searchenv +@ stub _searchenv_s +@ stub _seh_longjmp_unwind4 +@ stdcall -i386 _seh_longjmp_unwind(ptr) msvcrt._seh_longjmp_unwind +@ stub _set_SSE2_enable +@ stub _set_abort_behavior +@ stub _set_amblksiz +@ stub _set_controlfp +@ stub _set_doserrno +@ stub _set_errno +@ cdecl _set_error_mode(long) msvcrt._set_error_mode +@ stub _set_fmode +@ stub _set_invalid_parameter_handler +@ stub _set_malloc_crt_max_wait +@ stub _set_output_format +@ stub _set_printf_count_output +@ stub _set_purecall_handler +@ cdecl _set_sbh_threshold(long) msvcrt._set_sbh_threshold +@ cdecl _seterrormode(long) msvcrt._seterrormode +@ cdecl -i386 -norelay _setjmp(ptr) msvcrt._setjmp +@ cdecl -i386 -norelay _setjmp3(ptr long) msvcrt._setjmp3 +@ cdecl _setmaxstdio(long) msvcrt._setmaxstdio +@ cdecl _setmbcp(long) msvcrt._setmbcp +@ cdecl _setmode(long long) msvcrt._setmode +@ stub _setsystime +@ cdecl _sleep(long) msvcrt._sleep +@ varargs _snprintf(ptr long str) msvcrt._snprintf +@ stub _snprintf_c +@ stub _snprintf_c_l +@ stub _snprintf_l +@ stub _snprintf_s +@ stub _snprintf_s_l +@ stub _snscanf +@ stub _snscanf_l +@ stub _snscanf_s +@ stub _snscanf_s_l +@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf +@ stub _snwprintf_l +@ stub _snwprintf_s +@ stub _snwprintf_s_l +@ stub _snwscanf +@ stub _snwscanf_l +@ stub _snwscanf_s +@ stub _snwscanf_s_l +@ varargs _sopen(str long long) msvcrt._sopen +@ stub _sopen_s +@ varargs _spawnl(long str str) msvcrt._spawnl +@ varargs _spawnle(long str str) msvcrt._spawnle +@ varargs _spawnlp(long str str) msvcrt._spawnlp +@ varargs _spawnlpe(long str str) msvcrt._spawnlpe +@ cdecl _spawnv(long str ptr) msvcrt._spawnv +@ cdecl _spawnve(long str ptr ptr) msvcrt._spawnve +@ cdecl _spawnvp(long str ptr) msvcrt._spawnvp +@ cdecl _spawnvpe(long str ptr ptr) msvcrt._spawnvpe +@ cdecl _splitpath(str ptr ptr ptr ptr) msvcrt._splitpath +@ stub _splitpath_s +@ stub _sprintf_l +@ stub _sprintf_p +@ stub _sprintf_p_l +@ stub _sprintf_s_l +@ stub _sscanf_l +@ stub _sscanf_s_l +@ stub _stat32 +@ stub _stat32i64 +@ cdecl _stat64(str ptr) msvcrt._stat64 +@ stub _stat64i32 +@ cdecl _statusfp() msvcrt._statusfp +@ stub _statusfp2 +@ stub _strcoll_l +@ cdecl _strdate(ptr) msvcrt._strdate +@ stub _strdate_s +@ cdecl _strdup(str) msvcrt._strdup +@ cdecl _strerror(long) msvcrt._strerror +@ stub _strerror_s +@ stub _strftime_l +@ cdecl _stricmp(str str) msvcrt._stricmp +@ stub _stricmp_l +@ cdecl _stricoll(str str) msvcrt._stricoll +@ stub _stricoll_l +@ cdecl _strlwr(str) msvcrt._strlwr +@ stub _strlwr_l +@ stub _strlwr_s +@ stub _strlwr_s_l +@ stub _strncoll +@ stub _strncoll_l +@ cdecl _strnicmp(str str long) msvcrt._strnicmp +@ stub _strnicmp_l +@ stub _strnicoll +@ stub _strnicoll_l +@ cdecl _strnset(str long long) msvcrt._strnset +@ stub _strnset_s +@ cdecl _strrev(str) msvcrt._strrev +@ cdecl _strset(str long) msvcrt._strset +@ stub _strset_s +@ cdecl _strtime(ptr) msvcrt._strtime +@ stub _strtime_s +@ stub _strtod_l +@ stub _strtoi64 +@ stub _strtoi64_l +@ stub _strtol_l +@ stub _strtoui64 +@ stub _strtoui64_l +@ stub _strtoul_l +@ cdecl _strupr(str) msvcrt._strupr +@ stub _strupr_l +@ stub _strupr_s +@ stub _strupr_s_l +@ stub _strxfrm_l +@ cdecl _swab(str str long) msvcrt._swab +@ stub _swprintf +@ stub _swprintf_c +@ stub _swprintf_p +@ stub _swprintf_p_l +@ stub _swprintf_s_l +@ stub _swscanf_l +@ stub _swscanf_s_l +@ extern _sys_errlist msvcrt._sys_errlist +@ extern _sys_nerr msvcrt._sys_nerr +@ cdecl _tell(long) msvcrt._tell +@ cdecl -ret64 _telli64(long) msvcrt._telli64 +@ cdecl _tempnam(str str) msvcrt._tempnam +@ cdecl _time32(ptr) msvcrt._time32 +@ cdecl _time64(ptr) msvcrt._time64 +@ extern _timezone msvcrt._timezone +@ cdecl _tolower(long) msvcrt._tolower +@ stub _tolower_l +@ cdecl _toupper(long) msvcrt._toupper +@ stub _toupper_l +@ stub _towlower_l +@ stub _towupper_l +@ extern _tzname msvcrt._tzname +@ cdecl _tzset() msvcrt._tzset +@ cdecl _ui64toa(long long ptr long) msvcrt._ui64toa +@ stub _ui64toa_s +@ cdecl _ui64tow(long long ptr long) msvcrt._ui64tow +@ stub _ui64tow_s +@ cdecl _ultoa(long ptr long) msvcrt._ultoa +@ stub _ultoa_s +@ cdecl _ultow(long ptr long) msvcrt._ultow +@ stub _ultow_s +@ cdecl _umask(long) msvcrt._umask +@ stub _umask_s +@ stub _ungetc_nolock +@ cdecl _ungetch(long) msvcrt._ungetch +@ stub _ungetch_nolock +@ stub _ungetwc_nolock +@ stub _ungetwch +@ stub _ungetwch_nolock +@ cdecl _unlink(str) msvcrt._unlink +@ cdecl _unloaddll(long) msvcrt._unloaddll +@ cdecl _unlock(long) msvcrt._unlock +@ stub _unlock_file +@ cdecl _utime32(str ptr) msvcrt._utime32 +@ cdecl _utime64(str ptr) msvcrt._utime64 +@ stub _vcprintf +@ stub _vcprintf_l +@ stub _vcprintf_p +@ stub _vcprintf_p_l +@ stub _vcprintf_s +@ stub _vcprintf_s_l +@ stub _vcwprintf +@ stub _vcwprintf_l +@ stub _vcwprintf_p +@ stub _vcwprintf_p_l +@ stub _vcwprintf_s +@ stub _vcwprintf_s_l +@ stub _vfprintf_l +@ stub _vfprintf_p +@ stub _vfprintf_p_l +@ stub _vfprintf_s_l +@ stub _vfwprintf_l +@ stub _vfwprintf_p +@ stub _vfwprintf_p_l +@ stub _vfwprintf_s_l +@ stub _vprintf_l +@ stub _vprintf_p +@ stub _vprintf_p_l +@ stub _vprintf_s_l +@ cdecl _vscprintf(str ptr) msvcrt._vscprintf +@ stub _vscprintf_l +@ stub _vscprintf_p +@ stub _vscprintf_p_l +@ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf +@ stub _vscwprintf_l +@ stub _vscwprintf_p +@ stub _vscwprintf_p_l +@ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf +@ stub _vsnprintf_c +@ stub _vsnprintf_c_l +@ stub _vsnprintf_l +@ stub _vsnprintf_s +@ stub _vsnprintf_s_l +@ cdecl _vsnwprintf(ptr long wstr ptr) msvcrt._vsnwprintf +@ stub _vsnwprintf_l +@ stub _vsnwprintf_s +@ stub _vsnwprintf_s_l +@ stub _vsprintf_l +@ stub _vsprintf_p +@ stub _vsprintf_p_l +@ stub _vsprintf_s_l +@ stub _vswprintf +@ stub _vswprintf_c +@ stub _vswprintf_c_l +@ stub _vswprintf_l +@ stub _vswprintf_p +@ stub _vswprintf_p_l +@ stub _vswprintf_s_l +@ stub _vwprintf_l +@ stub _vwprintf_p +@ stub _vwprintf_p_l +@ stub _vwprintf_s_l +@ cdecl _waccess(wstr long) msvcrt._waccess +@ stub _waccess_s +@ cdecl _wasctime(ptr) msvcrt._wasctime +@ stub _wasctime_s +@ stub _wassert +@ cdecl _wchdir(wstr) msvcrt._wchdir +@ cdecl _wchmod(wstr long) msvcrt._wchmod +@ extern _wcmdln msvcrt._wcmdln +@ cdecl _wcreat(wstr long) msvcrt._wcreat +@ stub _wcscoll_l +@ cdecl _wcsdup(wstr) msvcrt._wcsdup +@ stub _wcserror +@ stub _wcserror_s +@ stub _wcsftime_l +@ cdecl _wcsicmp(wstr wstr) msvcrt._wcsicmp +@ stub _wcsicmp_l +@ cdecl _wcsicoll(wstr wstr) msvcrt._wcsicoll +@ stub _wcsicoll_l +@ cdecl _wcslwr(wstr) msvcrt._wcslwr +@ stub _wcslwr_l +@ stub _wcslwr_s +@ stub _wcslwr_s_l +@ stub _wcsncoll +@ stub _wcsncoll_l +@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp +@ stub _wcsnicmp_l +@ stub _wcsnicoll +@ stub _wcsnicoll_l +@ cdecl _wcsnset(wstr long long) msvcrt._wcsnset +@ stub _wcsnset_s +@ cdecl _wcsrev(wstr) msvcrt._wcsrev +@ cdecl _wcsset(wstr long) msvcrt._wcsset +@ stub _wcsset_s +@ stub _wcstod_l +@ stub _wcstoi64 +@ stub _wcstoi64_l +@ stub _wcstol_l +@ stub _wcstombs_l +@ stub _wcstombs_s_l +@ stub _wcstoui64 +@ stub _wcstoui64_l +@ stub _wcstoul_l +@ cdecl _wcsupr(wstr) msvcrt._wcsupr +@ stub _wcsupr_l +@ cdecl _wcsupr_s(wstr long) msvcrt._wcsupr_s +@ stub _wcsupr_s_l +@ stub _wcsxfrm_l +@ cdecl _wctime32(ptr) msvcrt._wctime32 +@ stub _wctime32_s +@ cdecl _wctime64(ptr) msvcrt._wctime64 +@ stub _wctime64_s +@ stub _wctomb_l +@ stub _wctomb_s_l +@ stub _wctype +@ stub _wdupenv_s +@ extern _wenviron msvcrt._wenviron +@ varargs _wexecl(wstr wstr) msvcrt._wexecl +@ varargs _wexecle(wstr wstr) msvcrt._wexecle +@ varargs _wexeclp(wstr wstr) msvcrt._wexeclp +@ varargs _wexeclpe(wstr wstr) msvcrt._wexeclpe +@ cdecl _wexecv(wstr ptr) msvcrt._wexecv +@ cdecl _wexecve(wstr ptr ptr) msvcrt._wexecve +@ cdecl _wexecvp(wstr ptr) msvcrt._wexecvp +@ cdecl _wexecvpe(wstr ptr ptr) msvcrt._wexecvpe +@ cdecl _wfdopen(long wstr) msvcrt._wfdopen +@ stub _wfindfirst32 +@ stub _wfindfirst32i64 +@ stub _wfindfirst64 +@ stub _wfindfirst64i32 +@ stub _wfindnext32 +@ stub _wfindnext32i64 +@ stub _wfindnext64 +@ stub _wfindnext64i32 +@ cdecl _wfopen(wstr wstr) msvcrt._wfopen +@ stub _wfopen_s +@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen +@ stub _wfreopen_s +@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen +@ cdecl _wfullpath(ptr wstr long) msvcrt._wfullpath +@ cdecl _wgetcwd(wstr long) msvcrt._wgetcwd +@ cdecl _wgetdcwd(long wstr long) msvcrt._wgetdcwd +@ stub _wgetdcwd_nolock +@ cdecl _wgetenv(wstr) msvcrt._wgetenv +@ stub _wgetenv_s +@ extern _winmajor msvcrt._winmajor +@ extern _winminor msvcrt._winminor +@ extern _winver msvcrt._winver +@ cdecl _wmakepath(wstr wstr wstr wstr wstr) msvcrt._wmakepath +@ stub _wmakepath_s +@ cdecl _wmkdir(wstr) msvcrt._wmkdir +@ cdecl _wmktemp(wstr) msvcrt._wmktemp +@ stub _wmktemp_s +@ varargs _wopen(wstr long) msvcrt._wopen +@ stub _wperror +@ extern _wpgmptr msvcrt._wpgmptr +@ cdecl _wpopen(wstr wstr) msvcrt._wpopen +@ stub _wprintf_l +@ stub _wprintf_p +@ stub _wprintf_p_l +@ stub _wprintf_s_l +@ cdecl _wputenv(wstr) msvcrt._wputenv +@ stub _wputenv_s +@ cdecl _wremove(wstr) msvcrt._wremove +@ cdecl _wrename(wstr wstr) msvcrt._wrename +@ cdecl _write(long ptr long) msvcrt._write +@ cdecl _wrmdir(wstr) msvcrt._wrmdir +@ stub _wscanf_l +@ stub _wscanf_s_l +@ cdecl _wsearchenv(wstr wstr ptr) msvcrt._wsearchenv +@ stub _wsearchenv_s +@ cdecl _wsetlocale(long wstr) msvcrt._wsetlocale +@ varargs _wsopen(wstr long long) msvcrt._wsopen +@ stub _wsopen_s +@ varargs _wspawnl(long wstr wstr) msvcrt._wspawnl +@ varargs _wspawnle(long wstr wstr) msvcrt._wspawnle +@ varargs _wspawnlp(long wstr wstr) msvcrt._wspawnlp +@ varargs _wspawnlpe(long wstr wstr) msvcrt._wspawnlpe +@ cdecl _wspawnv(long wstr ptr) msvcrt._wspawnv +@ cdecl _wspawnve(long wstr ptr ptr) msvcrt._wspawnve +@ cdecl _wspawnvp(long wstr ptr) msvcrt._wspawnvp +@ cdecl _wspawnvpe(long wstr ptr ptr) msvcrt._wspawnvpe +@ cdecl _wsplitpath(wstr ptr ptr ptr ptr) msvcrt._wsplitpath +@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) msvcrt._wsplitpath_s +@ stub _wstat32 +@ stub _wstat32i64 +@ cdecl _wstat64(wstr ptr) msvcrt._wstat64 +@ stub _wstat64i32 +@ cdecl _wstrdate(ptr) msvcrt._wstrdate +@ stub _wstrdate_s +@ cdecl _wstrtime(ptr) msvcrt._wstrtime +@ stub _wstrtime_s +@ cdecl _wsystem(wstr) msvcrt._wsystem +@ cdecl _wtempnam(wstr wstr) msvcrt._wtempnam +@ stub _wtmpnam +@ stub _wtmpnam_s +@ stub _wtof +@ stub _wtof_l +@ cdecl _wtoi(wstr) msvcrt._wtoi +@ cdecl _wtoi64(wstr) msvcrt._wtoi64 +@ stub _wtoi64_l +@ stub _wtoi_l +@ cdecl _wtol(wstr) msvcrt._wtol +@ stub _wtol_l +@ cdecl _wunlink(wstr) msvcrt._wunlink +@ cdecl _wutime32(wstr ptr) msvcrt._wutime32 +@ cdecl _wutime64(wstr ptr) msvcrt._wutime64 +@ cdecl _y0(double) msvcrt._y0 +@ cdecl _y1(double) msvcrt._y1 +@ cdecl _yn(long double ) msvcrt._yn +@ cdecl abort() msvcrt.abort +@ cdecl abs(long) msvcrt.abs +@ cdecl acos(double) msvcrt.acos +@ cdecl asctime(ptr) msvcrt.asctime +@ stub asctime_s +@ cdecl asin(double) msvcrt.asin +@ cdecl atan(double) msvcrt.atan +@ cdecl atan2(double double) msvcrt.atan2 +@ cdecl atexit(ptr) msvcrt.atexit +@ cdecl atof(str) msvcrt.atof +@ cdecl atoi(str) msvcrt.atoi +@ cdecl atol(str) msvcrt.atol +@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch +@ stub bsearch_s +@ stub btowc +@ cdecl calloc(long long) msvcrt.calloc +@ cdecl ceil(double) msvcrt.ceil +@ cdecl clearerr(ptr) msvcrt.clearerr +@ stub clearerr_s +@ cdecl clock() msvcrt.clock +@ cdecl cos(double) msvcrt.cos +@ cdecl cosh(double) msvcrt.cosh +@ cdecl div(long long) msvcrt.div +@ cdecl exit(long) msvcrt.exit +@ cdecl exp(double) msvcrt.exp +@ cdecl fabs(double) msvcrt.fabs +@ cdecl fclose(ptr) msvcrt.fclose +@ cdecl feof(ptr) msvcrt.feof +@ cdecl ferror(ptr) msvcrt.ferror +@ cdecl fflush(ptr) msvcrt.fflush +@ cdecl fgetc(ptr) msvcrt.fgetc +@ cdecl fgetpos(ptr ptr) msvcrt.fgetpos +@ cdecl fgets(ptr long ptr) msvcrt.fgets +@ cdecl fgetwc(ptr) msvcrt.fgetwc +@ cdecl fgetws(ptr long ptr) msvcrt.fgetws +@ cdecl floor(double) msvcrt.floor +@ cdecl fmod(double double) msvcrt.fmod +@ cdecl fopen(str str) msvcrt.fopen +@ stub fopen_s +@ varargs fprintf(ptr str) msvcrt.fprintf +@ stub fprintf_s +@ cdecl fputc(long ptr) msvcrt.fputc +@ cdecl fputs(str ptr) msvcrt.fputs +@ cdecl fputwc(long ptr) msvcrt.fputwc +@ cdecl fputws(wstr ptr) msvcrt.fputws +@ cdecl fread(ptr long long ptr) msvcrt.fread +@ stub fread_s +@ cdecl free(ptr) msvcrt.free +@ cdecl freopen(str str ptr) msvcrt.freopen +@ stub freopen_s +@ cdecl frexp(double ptr) msvcrt.frexp +@ varargs fscanf(ptr str) msvcrt.fscanf +@ stub fscanf_s +@ cdecl fseek(ptr long long) msvcrt.fseek +@ cdecl fsetpos(ptr ptr) msvcrt.fsetpos +@ cdecl ftell(ptr) msvcrt.ftell +@ varargs fwprintf(ptr wstr) msvcrt.fwprintf +@ stub fwprintf_s +@ cdecl fwrite(ptr long long ptr) msvcrt.fwrite +@ varargs fwscanf(ptr wstr) msvcrt.fwscanf +@ stub fwscanf_s +@ cdecl getc(ptr) msvcrt.getc +@ cdecl getchar() msvcrt.getchar +@ cdecl getenv(str) msvcrt.getenv +@ stub getenv_s +@ cdecl gets(str) msvcrt.gets +@ stub gets_s +@ cdecl getwc(ptr) msvcrt.getwc +@ cdecl getwchar() msvcrt.getwchar +@ cdecl is_wctype(long long) msvcrt.is_wctype +@ cdecl isalnum(long) msvcrt.isalnum +@ cdecl isalpha(long) msvcrt.isalpha +@ cdecl iscntrl(long) msvcrt.iscntrl +@ cdecl isdigit(long) msvcrt.isdigit +@ cdecl isgraph(long) msvcrt.isgraph +@ cdecl isleadbyte(long) msvcrt.isleadbyte +@ cdecl islower(long) msvcrt.islower +@ cdecl isprint(long) msvcrt.isprint +@ cdecl ispunct(long) msvcrt.ispunct +@ cdecl isspace(long) msvcrt.isspace +@ cdecl isupper(long) msvcrt.isupper +@ cdecl iswalnum(long) msvcrt.iswalnum +@ cdecl iswalpha(long) msvcrt.iswalpha +@ cdecl iswascii(long) msvcrt.iswascii +@ cdecl iswcntrl(long) msvcrt.iswcntrl +@ cdecl iswctype(long long) msvcrt.iswctype +@ cdecl iswdigit(long) msvcrt.iswdigit +@ cdecl iswgraph(long) msvcrt.iswgraph +@ cdecl iswlower(long) msvcrt.iswlower +@ cdecl iswprint(long) msvcrt.iswprint +@ cdecl iswpunct(long) msvcrt.iswpunct +@ cdecl iswspace(long) msvcrt.iswspace +@ cdecl iswupper(long) msvcrt.iswupper +@ cdecl iswxdigit(long) msvcrt.iswxdigit +@ cdecl isxdigit(long) msvcrt.isxdigit +@ cdecl labs(long) msvcrt.labs +@ cdecl ldexp( double long) msvcrt.ldexp +@ cdecl ldiv(long long) msvcrt.ldiv +@ cdecl localeconv() msvcrt.localeconv +@ cdecl log(double) msvcrt.log +@ cdecl log10(double) msvcrt.log10 +@ cdecl -i386 longjmp(ptr long) msvcrt.longjmp +@ cdecl malloc(long) msvcrt.malloc +@ cdecl mblen(ptr long) msvcrt.mblen +@ stub mbrlen +@ stub mbrtowc +@ stub mbsrtowcs +@ stub mbsrtowcs_s +@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs +@ stub mbstowcs_s +@ cdecl mbtowc(wstr str long) msvcrt.mbtowc +@ cdecl memchr(ptr long long) msvcrt.memchr +@ cdecl memcmp(ptr ptr long) msvcrt.memcmp +@ cdecl memcpy(ptr ptr long) msvcrt.memcpy +@ stub memcpy_s +@ cdecl memmove(ptr ptr long) msvcrt.memmove +@ stub memmove_s +@ cdecl memset(ptr long long) msvcrt.memset +@ cdecl modf(double ptr) msvcrt.modf +@ cdecl perror(str) msvcrt.perror +@ cdecl pow(double double) msvcrt.pow +@ varargs printf(str) msvcrt.printf +@ stub printf_s +@ cdecl putc(long ptr) msvcrt.putc +@ cdecl putchar(long) msvcrt.putchar +@ cdecl puts(str) msvcrt.puts +@ cdecl putwc(long ptr) msvcrt.putwc +@ cdecl putwchar(long) msvcrt.putwchar +@ cdecl qsort(ptr long long ptr) msvcrt.qsort +@ stub qsort_s +@ cdecl raise(long) msvcrt.raise +@ cdecl rand() msvcrt.rand +@ cdecl rand_s(ptr) msvcrt.rand_s +@ cdecl realloc(ptr long) msvcrt.realloc +@ cdecl remove(str) msvcrt.remove +@ cdecl rename(str str) msvcrt.rename +@ cdecl rewind(ptr) msvcrt.rewind +@ varargs scanf(str) msvcrt.scanf +@ stub scanf_s +@ cdecl setbuf(ptr ptr) msvcrt.setbuf +@ cdecl setlocale(long str) msvcrt.setlocale +@ cdecl setvbuf(ptr str long long) msvcrt.setvbuf +@ cdecl signal(long long) msvcrt.signal +@ cdecl sin(double) msvcrt.sin +@ cdecl sinh(double) msvcrt.sinh +@ varargs sprintf(ptr str) msvcrt.sprintf +@ varargs sprintf_s(ptr long str) msvcrt.sprintf_s +@ cdecl sqrt(double) msvcrt.sqrt +@ cdecl srand(long) msvcrt.srand +@ varargs sscanf(str str) msvcrt.sscanf +@ stub sscanf_s +@ cdecl strcat(str str) msvcrt.strcat +@ cdecl strcat_s(str long str) msvcrt.strcat_s +@ cdecl strchr(str long) msvcrt.strchr +@ cdecl strcmp(str str) msvcrt.strcmp +@ cdecl strcoll(str str) msvcrt.strcoll +@ cdecl strcpy(ptr str) msvcrt.strcpy +@ cdecl strcpy_s(ptr long str) msvcrt.strcpy_s +@ cdecl strcspn(str str) msvcrt.strcspn +@ cdecl strerror(long) msvcrt.strerror +@ stub strerror_s +@ cdecl strftime(str long str ptr) msvcrt.strftime +@ cdecl strlen(str) msvcrt.strlen +@ cdecl strncat(str str long) msvcrt.strncat +@ stub strncat_s +@ cdecl strncmp(str str long) msvcrt.strncmp +@ cdecl strncpy(ptr str long) msvcrt.strncpy +@ stub strncpy_s +@ stub strnlen +@ cdecl strpbrk(str str) msvcrt.strpbrk +@ cdecl strrchr(str long) msvcrt.strrchr +@ cdecl strspn(str str) msvcrt.strspn +@ cdecl strstr(str str) msvcrt.strstr +@ cdecl strtod(str ptr) msvcrt.strtod +@ cdecl strtok(str str) msvcrt.strtok +@ stub strtok_s +@ cdecl strtol(str ptr long) msvcrt.strtol +@ cdecl strtoul(str ptr long) msvcrt.strtoul +@ cdecl strxfrm(ptr str long) msvcrt.strxfrm +@ stub swprintf_s +@ varargs swscanf(wstr wstr) msvcrt.swscanf +@ stub swscanf_s +@ cdecl system(str) msvcrt.system +@ cdecl tan(double) msvcrt.tan +@ cdecl tanh(double) msvcrt.tanh +@ cdecl tmpfile() msvcrt.tmpfile +@ stub tmpfile_s +@ cdecl tmpnam(ptr) msvcrt.tmpnam +@ stub tmpnam_s +@ cdecl tolower(long) msvcrt.tolower +@ cdecl toupper(long) msvcrt.toupper +@ cdecl towlower(long) msvcrt.towlower +@ cdecl towupper(long) msvcrt.towupper +@ cdecl ungetc(long ptr) msvcrt.ungetc +@ cdecl ungetwc(long ptr) msvcrt.ungetwc +@ cdecl vfprintf(ptr str ptr) msvcrt.vfprintf +@ stub vfprintf_s +@ cdecl vfwprintf(ptr wstr ptr) msvcrt.vfwprintf +@ stub vfwprintf_s +@ cdecl vprintf(str ptr) msvcrt.vprintf +@ stub vprintf_s +@ cdecl vsprintf(ptr str ptr) msvcrt.vsprintf +@ cdecl vsprintf_s(ptr long str ptr) msvcrt.vsprintf_s +@ cdecl vswprintf_s(ptr long wstr ptr) msvcrt.vswprintf_s +@ cdecl vwprintf(wstr ptr) msvcrt.vwprintf +@ stub vwprintf_s +@ stub wcrtomb +@ stub wcrtomb_s +@ cdecl wcscat(wstr wstr) msvcrt.wcscat +@ cdecl wcscat_s(wstr long wstr) msvcrt.wcscat_s +@ cdecl wcschr(wstr long) msvcrt.wcschr +@ cdecl wcscmp(wstr wstr) msvcrt.wcscmp +@ cdecl wcscoll(wstr wstr) msvcrt.wcscoll +@ cdecl wcscpy(ptr wstr) msvcrt.wcscpy +@ cdecl wcscpy_s(ptr long wstr) msvcrt.wcscpy_s +@ cdecl wcscspn(wstr wstr) msvcrt.wcscspn +@ cdecl wcsftime(ptr long wstr ptr) msvcrt.wcsftime +@ cdecl wcslen(wstr) msvcrt.wcslen +@ cdecl wcsncat(wstr wstr long) msvcrt.wcsncat +@ stub wcsncat_s +@ cdecl wcsncmp(wstr wstr long) msvcrt.wcsncmp +@ cdecl wcsncpy(ptr wstr long) msvcrt.wcsncpy +@ cdecl wcsncpy_s(ptr long wstr long) msvcrt.wcsncpy_s +@ stub wcsnlen +@ cdecl wcspbrk(wstr wstr) msvcrt.wcspbrk +@ cdecl wcsrchr(wstr long) msvcrt.wcsrchr +@ stub wcsrtombs +@ stub wcsrtombs_s +@ cdecl wcsspn(wstr wstr) msvcrt.wcsspn +@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr +@ cdecl wcstod(wstr ptr) msvcrt.wcstod +@ cdecl wcstok(wstr wstr) msvcrt.wcstok +@ stub wcstok_s +@ cdecl wcstol(wstr ptr long) msvcrt.wcstol +@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs +@ stub wcstombs_s +@ cdecl wcstoul(wstr ptr long) msvcrt.wcstoul +@ stub wcsxfrm +@ stub wctob +@ cdecl wctomb(ptr long) msvcrt.wctomb +@ stub wctomb_s +@ varargs wprintf(wstr) msvcrt.wprintf +@ stub wprintf_s +@ varargs wscanf(wstr) msvcrt.wscanf +@ stub wscanf_s diff --git a/dlls/msvcirt/Makefile.in b/dlls/msvcr90/Makefile.in similarity index 56% copy from dlls/msvcirt/Makefile.in copy to dlls/msvcr90/Makefile.in index d8c1ab08bff..029e2c05281 100644 --- a/dlls/msvcirt/Makefile.in +++ b/dlls/msvcr90/Makefile.in @@ -2,12 +2,11 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = msvcirt.dll +MODULE = msvcr90.dll +IMPORTLIB = msvcr90 IMPORTS = msvcrt kernel32 C_SRCS = \ - msvcirt.c + msvcr90.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcr90/msvcr90.c b/dlls/msvcr90/msvcr90.c new file mode 100644 index 00000000000..e7baa6fae21 --- /dev/null +++ b/dlls/msvcr90/msvcr90.c @@ -0,0 +1,69 @@ +/* + * msvcr90 specific functions + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msvcr90); + +typedef int (CDECL *_INITTERM_E_FN)(void); + +/********************************************************************* + * DllMain (MSVCR90.@) + */ +BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) +{ + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hdll); + } + return TRUE; +} + + +/********************************************************************* + * _initterm_e (MSVCR90.@) + * + * call an array of application initialization functions and report the return value + */ +int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end) +{ + int res = 0; + + TRACE("(%p, %p)\n", table, end); + + while (!res && table < end) { + if (*table) { + res = (**table)(); + if (res) + TRACE("function %p failed: 0x%x\n", *table, res); + + } + table++; + } + return res; +} diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec new file mode 100644 index 00000000000..cbfc6e21a5e --- /dev/null +++ b/dlls/msvcr90/msvcr90.spec @@ -0,0 +1,1452 @@ +# MS VC++2008 runtime library + +@ stub ??0__non_rtti_object@std@@QAE@ABV01@@Z +@ stub ??0bad_cast@std@@QAE@ABV01@@Z +@ stub ??0bad_cast@std@@QAE@PBD@Z +@ stub ??0bad_typeid@std@@QAE@ABV01@@Z +@ stub ??0bad_typeid@std@@QAE@PBD@Z +@ stub ??0exception@std@@QAE@ABQBD@Z +@ stub ??0exception@std@@QAE@ABQBDH@Z +@ stub ??0exception@std@@QAE@ABV01@@Z +@ stub ??0exception@std@@QAE@XZ +@ stub ??1__non_rtti_object@std@@UAE@XZ +@ stub ??1bad_cast@std@@UAE@XZ +@ stub ??1bad_typeid@std@@UAE@XZ +@ stub ??1exception@std@@UAE@XZ +@ cdecl -i386 -norelay ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ +@ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z +@ stub ??2@YAPAXIHPBDH@Z +@ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z +@ stub ??4__non_rtti_object@std@@QAEAAV01@ABV01@@Z +@ stub ??4bad_cast@std@@QAEAAV01@ABV01@@Z +@ stub ??4bad_typeid@std@@QAEAAV01@ABV01@@Z +@ stub ??4exception@std@@QAEAAV01@ABV01@@Z +@ stub ??8type_info@@QBE_NABV0@@Z +@ stub ??9type_info@@QBE_NABV0@@Z +@ stub ??_7__non_rtti_object@std@@6B@ +@ stub ??_7bad_cast@std@@6B@ +@ stub ??_7bad_typeid@std@@6B@ +@ extern -i386 ??_7exception@@6B@ msvcrt.??_7exception@@6B@ +@ stub ??_7exception@std@@6B@ +@ stub ??_Fbad_cast@std@@QAEXXZ +@ stub ??_Fbad_typeid@std@@QAEXXZ +@ cdecl ??_U@YAPAXI@Z(long) msvcrt.??_U@YAPAXI@Z +@ stub ??_U@YAPAXIHPBDH@Z +@ cdecl ??_V@YAXPAX@Z(ptr) msvcrt.??_V@YAXPAX@Z +@ stub ?_Name_base@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z +@ stub ?_Name_base_internal@type_info@@CAPBDPBV1@PAU__type_info_node@@@Z +@ stub ?_Type_info_dtor@type_info@@CAXPAV1@@Z +@ stub ?_Type_info_dtor_internal@type_info@@CAXPAV1@@Z +@ stub ?_ValidateExecute@@YAHP6GHXZ@Z +@ stub ?_ValidateRead@@YAHPBXI@Z +@ stub ?_ValidateWrite@@YAHPAXI@Z +@ cdecl __uncaught_exception() msvcrt.__uncaught_exception +@ stub ?_inconsistency@@YAXXZ +@ stub ?_invalid_parameter@@YAXPBG00II@Z +@ stub ?_is_exception_typeof@@YAHABVtype_info@@PAU_EXCEPTION_POINTERS@@@Z +@ stub ?_name_internal_method@type_info@@QBEPBDPAU__type_info_node@@@Z +@ stub ?_open@@YAHPBDHH@Z +@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() msvcrt.?_query_new_handler@@YAP6AHI@ZXZ +@ cdecl ?_query_new_mode@@YAHXZ() msvcrt.?_query_new_mode@@YAHXZ +@ stub ?_set_new_handler@@YAP6AHI@ZH@Z +@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) msvcrt.?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z +@ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z +@ stub ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZH@Z +@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z +@ stub ?_sopen@@YAHPBDHHH@Z +@ stub ?_type_info_dtor_internal_method@type_info@@QAEXXZ +@ stub ?_wopen@@YAHPB_WHH@Z +@ stub ?_wsopen@@YAHPB_WHHH@Z +@ cdecl -i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ stub ?name@type_info@@QBEPBDPAU__type_info_node@@@Z +@ cdecl -i386 -norelay ?raw_name@type_info@@QBEPBDXZ() msvcrt.?raw_name@type_info@@QBEPBDXZ +@ cdecl ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_new_handler@@YAP6AXXZP6AXXZ@Z +@ stub ?set_terminate@@YAP6AXXZH@Z +@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z +@ stub ?set_unexpected@@YAP6AXXZH@Z +@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ@Z +@ stub ?swprintf@@YAHPAGIPBGZZ +@ stub ?swprintf@@YAHPA_WIPB_WZZ +@ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ +@ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ +@ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z +@ stub ?what@exception@std@@UBEPBDXZ +@ cdecl $I10_OUTPUT() msvcrt.$I10_OUTPUT +@ cdecl -arch=i386 _CIacos() msvcrt._CIacos +@ cdecl -arch=i386 _CIasin() msvcrt._CIasin +@ cdecl -arch=i386 _CIatan() msvcrt._CIatan +@ cdecl -arch=i386 _CIatan2() msvcrt._CIatan2 +@ cdecl -arch=i386 _CIcos() msvcrt._CIcos +@ cdecl -arch=i386 _CIcosh() msvcrt._CIcosh +@ cdecl -arch=i386 _CIexp() msvcrt._CIexp +@ cdecl -arch=i386 _CIfmod() msvcrt._CIfmod +@ cdecl -arch=i386 _CIlog() msvcrt._CIlog +@ cdecl -arch=i386 _CIlog10() msvcrt._CIlog10 +@ cdecl -arch=i386 _CIpow() msvcrt._CIpow +@ cdecl -arch=i386 _CIsin() msvcrt._CIsin +@ cdecl -arch=i386 _CIsinh() msvcrt._CIsinh +@ cdecl -arch=i386 _CIsqrt() msvcrt._CIsqrt +@ cdecl -arch=i386 _CItan() msvcrt._CItan +@ cdecl -arch=i386 _CItanh() msvcrt._CItanh +@ stub _CRT_RTC_INIT +@ stub _CRT_RTC_INITW +@ stub _CreateFrameInfo +@ cdecl _CxxThrowException(long long) msvcrt._CxxThrowException +@ cdecl -i386 -norelay _EH_prolog() msvcrt._EH_prolog +@ stub _FindAndUnlinkFrame +@ cdecl _Getdays() msvcrt._Getdays +@ cdecl _Getmonths() msvcrt._Getmonths +@ cdecl _Gettnames() msvcrt._Gettnames +@ extern _HUGE msvcrt._HUGE +@ stub _IsExceptionObjectToBeDestroyed +@ stub _NLG_Dispatch2 +@ stub _NLG_Return +@ stub _NLG_Return2 +@ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime +@ cdecl _XcptFilter(long ptr) msvcrt._XcptFilter +@ stub __AdjustPointer +@ stub __BuildCatchObject +@ stub __BuildCatchObjectHelper +@ cdecl __CppXcptFilter(long ptr) msvcrt.__CppXcptFilter +@ stub __CxxCallUnwindDelDtor +@ stub __CxxCallUnwindDtor +@ stub __CxxCallUnwindStdDelDtor +@ stub __CxxCallUnwindVecDtor +@ cdecl __CxxDetectRethrow(ptr) msvcrt.__CxxDetectRethrow +@ stub __CxxExceptionFilter +@ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler +@ stub __CxxFrameHandler2 +@ stub __CxxFrameHandler3 +@ stdcall -i386 __CxxLongjmpUnwind(ptr) msvcrt.__CxxLongjmpUnwind +@ cdecl __CxxQueryExceptionSize() msvcrt.__CxxQueryExceptionSize +@ stub __CxxRegisterExceptionObject +@ stub __CxxUnregisterExceptionObject +@ stub __DestructExceptionObject +@ stub __FrameUnwindFilter +@ cdecl __RTCastToVoid(ptr) msvcrt.__RTCastToVoid +@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast +@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid +@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD +@ stub __STRINGTOLD_L +@ stub __TypeMatch +@ cdecl ___lc_codepage_func() msvcrt.___lc_codepage_func +@ cdecl ___lc_collate_cp_func() msvcrt.___lc_collate_cp_func +@ cdecl ___lc_handle_func() msvcrt.___lc_handle_func +@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func +@ stub ___mb_cur_max_l_func +@ cdecl ___setlc_active_func() msvcrt.___setlc_active_func +@ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func +@ extern __argc msvcrt.__argc +@ extern __argv msvcrt.__argv +@ extern __badioinfo msvcrt.__badioinfo +@ stub __clean_type_info_names_internal +@ stub __control87_2 +@ stub __create_locale +@ cdecl __crtCompareStringA(long long str long str long) msvcrt.__crtCompareStringA +@ cdecl __crtCompareStringW(long long wstr long wstr long) msvcrt.__crtCompareStringW +@ cdecl __crtGetLocaleInfoW(long long ptr long) msvcrt.__crtGetLocaleInfoW +@ stub __crtGetStringTypeW +@ cdecl __crtLCMapStringA(long long str long ptr long long long) msvcrt.__crtLCMapStringA +@ stub __crtLCMapStringW +@ stub __daylight +@ cdecl __dllonexit(ptr ptr ptr) msvcrt.__dllonexit +@ cdecl __doserrno() msvcrt.__doserrno +@ stub __dstbias +@ stub ___fls_getvalue@4 +@ stub ___fls_setvalue@8 +@ cdecl __fpecode() msvcrt.__fpecode +@ stub __free_locale +@ stub __get_app_type +@ stub __get_current_locale +@ stub __get_flsindex +@ stub __get_tlsindex +@ cdecl __getmainargs(ptr ptr ptr long ptr) msvcrt.__getmainargs +@ extern __initenv msvcrt.__initenv +@ cdecl __iob_func() msvcrt.__iob_func +@ cdecl __isascii(long) msvcrt.__isascii +@ cdecl __iscsym(long) msvcrt.__iscsym +@ cdecl __iscsymf(long) msvcrt.__iscsymf +@ stub __iswcsym +@ stub __iswcsymf +@ stub __lc_clike +@ extern __lc_codepage msvcrt.__lc_codepage +@ extern __lc_collate_cp msvcrt.__lc_collate_cp +@ extern __lc_handle msvcrt.__lc_handle +@ stub __lconv +@ cdecl __lconv_init() msvcrt.__lconv_init +@ stub __libm_sse2_acos +@ stub __libm_sse2_acosf +@ stub __libm_sse2_asin +@ stub __libm_sse2_asinf +@ stub __libm_sse2_atan +@ stub __libm_sse2_atan2 +@ stub __libm_sse2_atanf +@ stub __libm_sse2_cos +@ stub __libm_sse2_cosf +@ stub __libm_sse2_exp +@ stub __libm_sse2_expf +@ stub __libm_sse2_log +@ stub __libm_sse2_log10 +@ stub __libm_sse2_log10f +@ stub __libm_sse2_logf +@ stub __libm_sse2_pow +@ stub __libm_sse2_powf +@ stub __libm_sse2_sin +@ stub __libm_sse2_sinf +@ stub __libm_sse2_tan +@ stub __libm_sse2_tanf +@ extern __mb_cur_max msvcrt.__mb_cur_max +@ cdecl -arch=i386 __p___argc() msvcrt.__p___argc +@ cdecl -arch=i386 __p___argv() msvcrt.__p___argv +@ cdecl -arch=i386 __p___initenv() msvcrt.__p___initenv +@ cdecl -arch=i386 __p___mb_cur_max() msvcrt.__p___mb_cur_max +@ cdecl -arch=i386 __p___wargv() msvcrt.__p___wargv +@ cdecl -arch=i386 __p___winitenv() msvcrt.__p___winitenv +@ cdecl -arch=i386 __p__acmdln() msvcrt.__p__acmdln +@ cdecl -arch=i386 __p__amblksiz() msvcrt.__p__amblksiz +@ cdecl -arch=i386 __p__commode() msvcrt.__p__commode +@ cdecl -arch=i386 __p__daylight() msvcrt.__p__daylight +@ cdecl -arch=i386 __p__dstbias() msvcrt.__p__dstbias +@ cdecl -arch=i386 __p__environ() msvcrt.__p__environ +@ cdecl -arch=i386 __p__fmode() msvcrt.__p__fmode +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob +@ stub __p__mbcasemap +@ cdecl -arch=i386 __p__mbctype() msvcrt.__p__mbctype +@ cdecl -arch=i386 __p__pctype() msvcrt.__p__pctype +@ cdecl -arch=i386 __p__pgmptr() msvcrt.__p__pgmptr +@ stub __p__pwctype +@ cdecl -arch=i386 __p__timezone() msvcrt.__p__timezone +@ cdecl -arch=i386 __p__tzname() msvcrt.__p__tzname +@ cdecl -arch=i386 __p__wcmdln() msvcrt.__p__wcmdln +@ cdecl -arch=i386 __p__wenviron() msvcrt.__p__wenviron +@ cdecl -arch=i386 __p__wpgmptr() msvcrt.__p__wpgmptr +@ cdecl __pctype_func() msvcrt.__pctype_func +@ extern __pioinfo msvcrt.__pioinfo +@ stub __pwctype_func +@ stub __pxcptinfoptrs +@ stub __report_gsfailure +@ cdecl __set_app_type(long) msvcrt.__set_app_type +@ stub __set_flsgetvalue +@ extern __setlc_active msvcrt.__setlc_active +@ cdecl __setusermatherr(ptr) msvcrt.__setusermatherr +@ stub __strncnt +@ stub __swprintf_l +@ stub __sys_errlist +@ stub __sys_nerr +@ cdecl __threadhandle() msvcrt.__threadhandle +@ cdecl __threadid() msvcrt.__threadid +@ stub __timezone +@ cdecl __toascii(long) msvcrt.__toascii +@ stub __tzname +@ cdecl __unDName(ptr str long ptr ptr long) msvcrt.__unDName +@ cdecl __unDNameEx(ptr str long ptr ptr ptr long) msvcrt.__unDNameEx +@ stub __unDNameHelper +@ extern __unguarded_readlc_active msvcrt.__unguarded_readlc_active +@ stub __vswprintf_l +@ extern __wargv msvcrt.__wargv +@ stub __wcserror +@ stub __wcserror_s +@ stub __wcsncnt +@ cdecl __wgetmainargs(ptr ptr ptr long ptr) msvcrt.__wgetmainargs +@ extern __winitenv msvcrt.__winitenv +@ cdecl _abnormal_termination() msvcrt._abnormal_termination +@ stub _abs64 +@ cdecl _access(str long) msvcrt._access +@ stub _access_s +@ extern _acmdln msvcrt._acmdln +@ stdcall -arch=i386 _adj_fdiv_m16i(long) msvcrt._adj_fdiv_m16i +@ stdcall -arch=i386 _adj_fdiv_m32(long) msvcrt._adj_fdiv_m32 +@ stdcall -arch=i386 _adj_fdiv_m32i(long) msvcrt._adj_fdiv_m32i +@ stdcall -arch=i386 _adj_fdiv_m64(double) msvcrt._adj_fdiv_m64 +@ cdecl -arch=i386 _adj_fdiv_r() msvcrt._adj_fdiv_r +@ stdcall -arch=i386 _adj_fdivr_m16i(long) msvcrt._adj_fdivr_m16i +@ stdcall -arch=i386 _adj_fdivr_m32(long) msvcrt._adj_fdivr_m32 +@ stdcall -arch=i386 _adj_fdivr_m32i(long) msvcrt._adj_fdivr_m32i +@ stdcall -arch=i386 _adj_fdivr_m64(double) msvcrt._adj_fdivr_m64 +@ cdecl -arch=i386 _adj_fpatan() msvcrt._adj_fpatan +@ cdecl -arch=i386 _adj_fprem() msvcrt._adj_fprem +@ cdecl -arch=i386 _adj_fprem1() msvcrt._adj_fprem1 +@ cdecl -arch=i386 _adj_fptan() msvcrt._adj_fptan +@ extern -arch=i386 _adjust_fdiv msvcrt._adjust_fdiv +@ stub _aexit_rtn +@ cdecl _aligned_free(ptr) msvcrt._aligned_free +@ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc +@ stub _aligned_msize +@ cdecl _aligned_offset_malloc(long long long) msvcrt._aligned_offset_malloc +@ cdecl _aligned_offset_realloc(ptr long long long) msvcrt._aligned_offset_realloc +@ stub _aligned_offset_recalloc +@ cdecl _aligned_realloc(ptr long long) msvcrt._aligned_realloc +@ stub _aligned_recalloc +@ cdecl _amsg_exit(long) msvcrt._amsg_exit +@ cdecl _assert(str str long) msvcrt._assert +@ stub _atodbl +@ stub _atodbl_l +@ stub _atof_l +@ stub _atoflt +@ stub _atoflt_l +@ cdecl -ret64 _atoi64(str) msvcrt._atoi64 +@ stub _atoi64_l +@ stub _atoi_l +@ stub _atol_l +@ cdecl _atoldbl(ptr str) msvcrt._atoldbl +@ stub _atoldbl_l +@ cdecl _beep(long long) msvcrt._beep +@ cdecl _beginthread(ptr long ptr) msvcrt._beginthread +@ cdecl _beginthreadex(ptr long ptr ptr long ptr) msvcrt._beginthreadex +@ stub _byteswap_uint64 +@ stub _byteswap_ulong +@ stub _byteswap_ushort +@ cdecl _c_exit() msvcrt._c_exit +@ cdecl _cabs(long) msvcrt._cabs +@ cdecl _callnewh(long) msvcrt._callnewh +@ stub _calloc_crt +@ cdecl _cexit() msvcrt._cexit +@ cdecl _cgets(str) msvcrt._cgets +@ stub _cgets_s +@ stub _cgetws +@ stub _cgetws_s +@ cdecl _chdir(str) msvcrt._chdir +@ cdecl _chdrive(long) msvcrt._chdrive +@ cdecl _chgsign( double ) msvcrt._chgsign +@ cdecl -i386 -norelay _chkesp() msvcrt._chkesp +@ cdecl _chmod(str long) msvcrt._chmod +@ cdecl _chsize(long long) msvcrt._chsize +@ stub _chsize_s +@ cdecl _clearfp() msvcrt._clearfp +@ cdecl _close(long) msvcrt._close +@ cdecl _commit(long) msvcrt._commit +@ extern _commode msvcrt._commode +@ stub _configthreadlocale +@ cdecl _control87(long long) msvcrt._control87 +@ cdecl _controlfp(long long) msvcrt._controlfp +@ stub _controlfp_s +@ cdecl _copysign( double double ) msvcrt._copysign +@ varargs _cprintf(str) msvcrt._cprintf +@ stub _cprintf_l +@ stub _cprintf_p +@ stub _cprintf_p_l +@ stub _cprintf_s +@ stub _cprintf_s_l +@ cdecl _cputs(str) msvcrt._cputs +@ stub _cputws +@ cdecl _creat(str long) msvcrt._creat +@ stub _create_locale +@ stub _crt_debugger_hook +@ varargs _cscanf(str) msvcrt._cscanf +@ stub _cscanf_l +@ stub _cscanf_s +@ stub _cscanf_s_l +@ cdecl _ctime32(ptr) msvcrt._ctime32 +@ stub _ctime32_s +@ cdecl _ctime64(ptr) msvcrt._ctime64 +@ stub _ctime64_s +@ cdecl _cwait(ptr long long) msvcrt._cwait +@ stub _cwprintf +@ stub _cwprintf_l +@ stub _cwprintf_p +@ stub _cwprintf_p_l +@ stub _cwprintf_s +@ stub _cwprintf_s_l +@ stub _cwscanf +@ stub _cwscanf_l +@ stub _cwscanf_s +@ stub _cwscanf_s_l +@ extern _daylight msvcrt._daylight +@ stub _decode_pointer +@ cdecl _difftime32(long long) msvcrt._difftime32 +@ cdecl _difftime64(long long) msvcrt._difftime64 +@ stub _dosmaperr +@ extern _dstbias msvcrt._dstbias +@ cdecl _dup(long) msvcrt._dup +@ cdecl _dup2(long long) msvcrt._dup2 +@ stub _dupenv_s +@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt +@ stub _ecvt_s +@ stub _encode_pointer +@ stub _encoded_null +@ cdecl _endthread() msvcrt._endthread +@ cdecl _endthreadex(long) msvcrt._endthreadex +@ extern _environ msvcrt._environ +@ cdecl _eof(long) msvcrt._eof +@ cdecl _errno() msvcrt._errno +@ cdecl _except_handler2(ptr ptr ptr ptr) msvcrt._except_handler2 +@ cdecl _except_handler3(ptr ptr ptr ptr) msvcrt._except_handler3 +@ stub _except_handler4_common +@ varargs _execl(str str) msvcrt._execl +@ varargs _execle(str str) msvcrt._execle +@ varargs _execlp(str str) msvcrt._execlp +@ varargs _execlpe(str str) msvcrt._execlpe +@ cdecl _execv(str ptr) msvcrt._execv +@ cdecl _execve(str ptr ptr) msvcrt._execve +@ cdecl _execvp(str ptr) msvcrt._execvp +@ cdecl _execvpe(str ptr ptr) msvcrt._execvpe +@ cdecl _exit(long) msvcrt._exit +@ cdecl _expand(ptr long) msvcrt._expand +@ stub _fclose_nolock +@ cdecl _fcloseall() msvcrt._fcloseall +@ cdecl _fcvt(double long ptr ptr) msvcrt._fcvt +@ stub _fcvt_s +@ cdecl _fdopen(long str) msvcrt._fdopen +@ stub _fflush_nolock +@ cdecl _fgetchar() msvcrt._fgetchar +@ stub _fgetwc_nolock +@ cdecl _fgetwchar() msvcrt._fgetwchar +@ cdecl _filbuf(ptr) msvcrt._filbuf +@ cdecl _filelength(long) msvcrt._filelength +@ cdecl -ret64 _filelengthi64(long) msvcrt._filelengthi64 +@ cdecl _fileno(ptr) msvcrt._fileno +@ cdecl _findclose(long) msvcrt._findclose +@ stub _findfirst32 +@ stub _findfirst32i64 +@ stub _findfirst64 +@ stub _findfirst64i32 +@ stub _findnext32 +@ stub _findnext32i64 +@ stub _findnext64 +@ stub _findnext64i32 +@ cdecl _finite( double ) msvcrt._finite +@ cdecl _flsbuf(long ptr) msvcrt._flsbuf +@ cdecl _flushall() msvcrt._flushall +@ extern _fmode msvcrt._fmode +@ cdecl _fpclass(double) msvcrt._fpclass +@ stub _fpieee_flt +@ cdecl _fpreset() msvcrt._fpreset +@ stub _fprintf_l +@ stub _fprintf_p +@ stub _fprintf_p_l +@ stub _fprintf_s_l +@ cdecl _fputchar(long) msvcrt._fputchar +@ stub _fputwc_nolock +@ cdecl _fputwchar(long) msvcrt._fputwchar +@ stub _fread_nolock +@ stub _fread_nolock_s +@ stub _free_locale +@ stub _freea +@ stub _freea_s +@ stub _freefls +@ stub _fscanf_l +@ stub _fscanf_s_l +@ stub _fseek_nolock +@ stub _fseeki64 +@ stub _fseeki64_nolock +@ cdecl _fsopen(str str long) msvcrt._fsopen +@ stub _fstat32 +@ stub _fstat32i64 +@ cdecl _fstat64(long ptr) msvcrt._fstat64 +@ stub _fstat64i32 +@ stub _ftell_nolock +@ stub _ftelli64 +@ stub _ftelli64_nolock +@ cdecl _ftime32(ptr) msvcrt._ftime32 +@ stub _ftime32_s +@ cdecl _ftime64(ptr) msvcrt._ftime64 +@ stub _ftime64_s +@ cdecl -ret64 _ftol() msvcrt._ftol +@ cdecl _fullpath(ptr str long) msvcrt._fullpath +@ cdecl _futime32(long ptr) msvcrt._futime32 +@ cdecl _futime64(long ptr) msvcrt._futime64 +@ stub _fwprintf_l +@ stub _fwprintf_p +@ stub _fwprintf_p_l +@ stub _fwprintf_s_l +@ stub _fwrite_nolock +@ stub _fwscanf_l +@ stub _fwscanf_s_l +@ cdecl _gcvt(double long str) msvcrt._gcvt +@ stub _gcvt_s +@ stub _get_amblksiz +@ stub _get_current_locale +@ stub _get_daylight +@ stub _get_doserrno +@ stub _get_dstbias +@ stub _get_errno +@ stub _get_fmode +@ stub _get_heap_handle +@ stub _get_invalid_parameter_handler +@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle +@ stub _get_output_format +@ stub _get_pgmptr +@ stub _get_printf_count_output +@ stub _get_purecall_handler +@ cdecl _get_sbh_threshold() msvcrt._get_sbh_threshold +@ stub _get_terminate +@ stub _get_timezone +@ stub _get_tzname +@ stub _get_unexpected +@ stub _get_wpgmptr +@ stub _getc_nolock +@ cdecl _getch() msvcrt._getch +@ stub _getch_nolock +@ cdecl _getche() msvcrt._getche +@ stub _getche_nolock +@ cdecl _getcwd(str long) msvcrt._getcwd +@ cdecl _getdcwd(long str long) msvcrt._getdcwd +@ stub _getdcwd_nolock +@ cdecl _getdiskfree(long ptr) msvcrt._getdiskfree +@ cdecl _getdllprocaddr(long str long) msvcrt._getdllprocaddr +@ cdecl _getdrive() msvcrt._getdrive +@ cdecl _getdrives() msvcrt._getdrives +@ cdecl _getmaxstdio() msvcrt._getmaxstdio +@ cdecl _getmbcp() msvcrt._getmbcp +@ cdecl _getpid() msvcrt._getpid +@ stub _getptd +@ stub _getsystime +@ cdecl _getw(ptr) msvcrt._getw +@ stub _getwch +@ stub _getwch_nolock +@ stub _getwche +@ stub _getwche_nolock +@ cdecl _getws(ptr) msvcrt._getws +@ stub _getws_s +@ cdecl _global_unwind2(ptr) msvcrt._global_unwind2 +@ cdecl _gmtime32(ptr) msvcrt._gmtime32 +@ stub _gmtime32_s +@ cdecl _gmtime64(ptr) msvcrt._gmtime64 +@ stub _gmtime64_s +@ cdecl _heapadd(ptr long) msvcrt._heapadd +@ cdecl _heapchk() msvcrt._heapchk +@ cdecl _heapmin() msvcrt._heapmin +@ cdecl _heapset(long) msvcrt._heapset +@ stub _heapused +@ cdecl _heapwalk(ptr) msvcrt._heapwalk +@ cdecl _hypot(double double) msvcrt._hypot +@ stub _hypotf +@ cdecl _i64toa(long long ptr long) msvcrt._i64toa +@ stub _i64toa_s +@ cdecl _i64tow(long long ptr long) msvcrt._i64tow +@ stub _i64tow_s +@ stub _initptd +@ cdecl _initterm(ptr ptr) msvcrt._initterm +@ cdecl _initterm_e(ptr ptr) +@ stub _inp +@ stub _inpd +@ stub _inpw +@ stub _invalid_parameter +@ stub _invalid_parameter_noinfo +@ stub _invoke_watson +@ extern _iob msvcrt._iob +@ stub _isalnum_l +@ stub _isalpha_l +@ cdecl _isatty(long) msvcrt._isatty +@ stub _iscntrl_l +@ cdecl _isctype(long long) msvcrt._isctype +@ stub _isctype_l +@ stub _isdigit_l +@ stub _isgraph_l +@ stub _isleadbyte_l +@ stub _islower_l +@ stub _ismbbalnum +@ stub _ismbbalnum_l +@ stub _ismbbalpha +@ stub _ismbbalpha_l +@ stub _ismbbgraph +@ stub _ismbbgraph_l +@ stub _ismbbkalnum +@ stub _ismbbkalnum_l +@ cdecl _ismbbkana(long) msvcrt._ismbbkana +@ stub _ismbbkana_l +@ stub _ismbbkprint +@ stub _ismbbkprint_l +@ stub _ismbbkpunct +@ stub _ismbbkpunct_l +@ cdecl _ismbblead(long) msvcrt._ismbblead +@ stub _ismbblead_l +@ stub _ismbbprint +@ stub _ismbbprint_l +@ stub _ismbbpunct +@ stub _ismbbpunct_l +@ cdecl _ismbbtrail(long) msvcrt._ismbbtrail +@ stub _ismbbtrail_l +@ cdecl _ismbcalnum(long) msvcrt._ismbcalnum +@ stub _ismbcalnum_l +@ cdecl _ismbcalpha(long) msvcrt._ismbcalpha +@ stub _ismbcalpha_l +@ cdecl _ismbcdigit(long) msvcrt._ismbcdigit +@ stub _ismbcdigit_l +@ cdecl _ismbcgraph(long) msvcrt._ismbcgraph +@ stub _ismbcgraph_l +@ cdecl _ismbchira(long) msvcrt._ismbchira +@ stub _ismbchira_l +@ cdecl _ismbckata(long) msvcrt._ismbckata +@ stub _ismbckata_l +@ stub _ismbcl0 +@ stub _ismbcl0_l +@ stub _ismbcl1 +@ stub _ismbcl1_l +@ stub _ismbcl2 +@ stub _ismbcl2_l +@ cdecl _ismbclegal(long) msvcrt._ismbclegal +@ stub _ismbclegal_l +@ cdecl _ismbclower(long) msvcrt._ismbclower +@ stub _ismbclower_l +@ cdecl _ismbcprint(long) msvcrt._ismbcprint +@ stub _ismbcprint_l +@ cdecl _ismbcpunct(long) msvcrt._ismbcpunct +@ stub _ismbcpunct_l +@ cdecl _ismbcspace(long) msvcrt._ismbcspace +@ stub _ismbcspace_l +@ cdecl _ismbcsymbol(long) msvcrt._ismbcsymbol +@ stub _ismbcsymbol_l +@ cdecl _ismbcupper(long) msvcrt._ismbcupper +@ stub _ismbcupper_l +@ cdecl _ismbslead(ptr ptr) msvcrt._ismbslead +@ stub _ismbslead_l +@ cdecl _ismbstrail(ptr ptr) msvcrt._ismbstrail +@ stub _ismbstrail_l +@ cdecl _isnan( double ) msvcrt._isnan +@ stub _isprint_l +@ stub _ispunct_l +@ stub _isspace_l +@ stub _isupper_l +@ stub _iswalnum_l +@ stub _iswalpha_l +@ stub _iswcntrl_l +@ stub _iswcsym_l +@ stub _iswcsymf_l +@ stub _iswctype_l +@ stub _iswdigit_l +@ stub _iswgraph_l +@ stub _iswlower_l +@ stub _iswprint_l +@ stub _iswpunct_l +@ stub _iswspace_l +@ stub _iswupper_l +@ stub _iswxdigit_l +@ stub _isxdigit_l +@ cdecl _itoa(long ptr long) msvcrt._itoa +@ stub _itoa_s +@ cdecl _itow(long ptr long) msvcrt._itow +@ stub _itow_s +@ cdecl _j0(double) msvcrt._j0 +@ cdecl _j1(double) msvcrt._j1 +@ cdecl _jn(long double) msvcrt._jn +@ cdecl _kbhit() msvcrt._kbhit +@ cdecl _lfind(ptr ptr ptr long ptr) msvcrt._lfind +@ stub _lfind_s +@ cdecl _loaddll(str) msvcrt._loaddll +@ cdecl -i386 _local_unwind2(ptr long) msvcrt._local_unwind2 +@ stub _local_unwind4 +@ cdecl _localtime32(ptr) msvcrt._localtime32 +@ stub _localtime32_s +@ cdecl _localtime64(ptr) msvcrt._localtime64 +@ stub _localtime64_s +@ cdecl _lock(long) msvcrt._lock +@ stub _lock_file +@ cdecl _locking(long long long) msvcrt._locking +@ cdecl _logb( double ) msvcrt._logb +@ cdecl -i386 _longjmpex(ptr long) msvcrt._longjmpex +@ cdecl _lrotl(long long) msvcrt._lrotl +@ cdecl _lrotr(long long) msvcrt._lrotr +@ cdecl _lsearch(ptr ptr long long ptr) msvcrt._lsearch +@ stub _lsearch_s +@ cdecl _lseek(long long long) msvcrt._lseek +@ cdecl -ret64 _lseeki64(long double long) msvcrt._lseeki64 +@ cdecl _ltoa(long ptr long) msvcrt._ltoa +@ stub _ltoa_s +@ cdecl _ltow(long ptr long) msvcrt._ltow +@ stub _ltow_s +@ cdecl _makepath(ptr str str str str) msvcrt._makepath +@ stub _makepath_s +@ cdecl _malloc_crt(long) msvcrt.malloc +@ cdecl _mbbtombc(long) msvcrt._mbbtombc +@ stub _mbbtombc_l +@ cdecl _mbbtype(long long) msvcrt._mbbtype +@ stub _mbbtype_l +@ stub _mbcasemap +@ cdecl _mbccpy(str str) msvcrt._mbccpy +@ stub _mbccpy_l +@ stub _mbccpy_s +@ stub _mbccpy_s_l +@ cdecl _mbcjistojms(long) msvcrt._mbcjistojms +@ stub _mbcjistojms_l +@ stub _mbcjmstojis +@ stub _mbcjmstojis_l +@ cdecl _mbclen(ptr) msvcrt._mbclen +@ stub _mbclen_l +@ stub _mbctohira +@ stub _mbctohira_l +@ stub _mbctokata +@ stub _mbctokata_l +@ cdecl _mbctolower(long) msvcrt._mbctolower +@ stub _mbctolower_l +@ cdecl _mbctombb(long) msvcrt._mbctombb +@ stub _mbctombb_l +@ cdecl _mbctoupper(long) msvcrt._mbctoupper +@ stub _mbctoupper_l +@ extern _mbctype msvcrt._mbctype +@ stub _mblen_l +@ cdecl _mbsbtype(str long) msvcrt._mbsbtype +@ stub _mbsbtype_l +@ stub _mbscat_s +@ stub _mbscat_s_l +@ cdecl _mbschr(str long) msvcrt._mbschr +@ stub _mbschr_l +@ cdecl _mbscmp(str str) msvcrt._mbscmp +@ stub _mbscmp_l +@ cdecl _mbscoll(str str) msvcrt._mbscoll +@ stub _mbscoll_l +@ stub _mbscpy_s +@ stub _mbscpy_s_l +@ cdecl _mbscspn(str str) msvcrt._mbscspn +@ stub _mbscspn_l +@ cdecl _mbsdec(ptr ptr) msvcrt._mbsdec +@ stub _mbsdec_l +@ cdecl _mbsicmp(str str) msvcrt._mbsicmp +@ stub _mbsicmp_l +@ cdecl _mbsicoll(str str) msvcrt._mbsicoll +@ stub _mbsicoll_l +@ cdecl _mbsinc(str) msvcrt._mbsinc +@ stub _mbsinc_l +@ cdecl _mbslen(str) msvcrt._mbslen +@ stub _mbslen_l +@ cdecl _mbslwr(str) msvcrt._mbslwr +@ stub _mbslwr_l +@ stub _mbslwr_s +@ stub _mbslwr_s_l +@ cdecl _mbsnbcat(str str long) msvcrt._mbsnbcat +@ stub _mbsnbcat_l +@ stub _mbsnbcat_s +@ stub _mbsnbcat_s_l +@ cdecl _mbsnbcmp(str str long) msvcrt._mbsnbcmp +@ stub _mbsnbcmp_l +@ cdecl _mbsnbcnt(ptr long) msvcrt._mbsnbcnt +@ stub _mbsnbcnt_l +@ stub _mbsnbcoll +@ stub _mbsnbcoll_l +@ cdecl _mbsnbcpy(ptr str long) msvcrt._mbsnbcpy +@ stub _mbsnbcpy_l +@ cdecl _mbsnbcpy_s(ptr long str long) msvcrt._mbsnbcpy_s +@ stub _mbsnbcpy_s_l +@ cdecl _mbsnbicmp(str str long) msvcrt._mbsnbicmp +@ stub _mbsnbicmp_l +@ stub _mbsnbicoll +@ stub _mbsnbicoll_l +@ cdecl _mbsnbset(str long long) msvcrt._mbsnbset +@ stub _mbsnbset_l +@ stub _mbsnbset_s +@ stub _mbsnbset_s_l +@ cdecl _mbsncat(str str long) msvcrt._mbsncat +@ stub _mbsncat_l +@ stub _mbsncat_s +@ stub _mbsncat_s_l +@ cdecl _mbsnccnt(str long) msvcrt._mbsnccnt +@ stub _mbsnccnt_l +@ cdecl _mbsncmp(str str long) msvcrt._mbsncmp +@ stub _mbsncmp_l +@ stub _mbsncoll +@ stub _mbsncoll_l +@ cdecl _mbsncpy(str str long) msvcrt._mbsncpy +@ stub _mbsncpy_l +@ stub _mbsncpy_s +@ stub _mbsncpy_s_l +@ cdecl _mbsnextc(str) msvcrt._mbsnextc +@ stub _mbsnextc_l +@ cdecl _mbsnicmp(str str long) msvcrt._mbsnicmp +@ stub _mbsnicmp_l +@ stub _mbsnicoll +@ stub _mbsnicoll_l +@ cdecl _mbsninc(str long) msvcrt._mbsninc +@ stub _mbsninc_l +@ stub _mbsnlen +@ stub _mbsnlen_l +@ cdecl _mbsnset(str long long) msvcrt._mbsnset +@ stub _mbsnset_l +@ stub _mbsnset_s +@ stub _mbsnset_s_l +@ cdecl _mbspbrk(str str) msvcrt._mbspbrk +@ stub _mbspbrk_l +@ cdecl _mbsrchr(str long) msvcrt._mbsrchr +@ stub _mbsrchr_l +@ cdecl _mbsrev(str) msvcrt._mbsrev +@ stub _mbsrev_l +@ cdecl _mbsset(str long) msvcrt._mbsset +@ stub _mbsset_l +@ stub _mbsset_s +@ stub _mbsset_s_l +@ cdecl _mbsspn(str str) msvcrt._mbsspn +@ stub _mbsspn_l +@ cdecl _mbsspnp(str str) msvcrt._mbsspnp +@ stub _mbsspnp_l +@ cdecl _mbsstr(str str) msvcrt._mbsstr +@ stub _mbsstr_l +@ cdecl _mbstok(str str) msvcrt._mbstok +@ stub _mbstok_l +@ stub _mbstok_s +@ stub _mbstok_s_l +@ stub _mbstowcs_l +@ stub _mbstowcs_s_l +@ cdecl _mbstrlen(str) msvcrt._mbstrlen +@ stub _mbstrlen_l +@ stub _mbstrnlen +@ stub _mbstrnlen_l +@ cdecl _mbsupr(str) msvcrt._mbsupr +@ stub _mbsupr_l +@ stub _mbsupr_s +@ stub _mbsupr_s_l +@ stub _mbtowc_l +@ cdecl _memccpy(ptr ptr long long) msvcrt._memccpy +@ cdecl _memicmp(str str long) msvcrt._memicmp +@ stub _memicmp_l +@ cdecl _mkdir(str) msvcrt._mkdir +@ stub _mkgmtime32 +@ stub _mkgmtime64 +@ cdecl _mktemp(str) msvcrt._mktemp +@ stub _mktemp_s +@ cdecl _mktime32(ptr) msvcrt._mktime32 +@ cdecl _mktime64(ptr) msvcrt._mktime64 +@ cdecl _msize(ptr) msvcrt._msize +@ cdecl _nextafter(double double) msvcrt._nextafter +@ cdecl _onexit(ptr) msvcrt._onexit +@ varargs _open(str long) msvcrt._open +@ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle +@ stub _outp +@ stub _outpd +@ stub _outpw +@ cdecl _pclose(ptr) msvcrt._pclose +@ extern _pctype msvcrt._pctype +@ extern _pgmptr msvcrt._pgmptr +@ cdecl _pipe(ptr long long) msvcrt._pipe +@ cdecl _popen(str str) msvcrt._popen +@ stub _printf_l +@ stub _printf_p +@ stub _printf_p_l +@ stub _printf_s_l +@ cdecl _purecall() msvcrt._purecall +@ cdecl _putch(long) msvcrt._putch +@ stub _putch_nolock +@ cdecl _putenv(str) msvcrt._putenv +@ stub _putenv_s +@ cdecl _putw(long ptr) msvcrt._putw +@ stub _putwch +@ stub _putwch_nolock +@ cdecl _putws(wstr) msvcrt._putws +@ stub _pwctype +@ cdecl _read(long ptr long) msvcrt._read +@ stub _realloc_crt +@ stub _recalloc +@ stub _recalloc_crt +@ stub _resetstkoflw +@ cdecl _rmdir(str) msvcrt._rmdir +@ cdecl _rmtmp() msvcrt._rmtmp +@ cdecl _rotl(long long) msvcrt._rotl +@ stub _rotl64 +@ cdecl _rotr(long long) msvcrt._rotr +@ stub _rotr64 +@ cdecl -arch=i386 _safe_fdiv() msvcrt._safe_fdiv +@ cdecl -arch=i386 _safe_fdivr() msvcrt._safe_fdivr +@ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem +@ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1 +@ cdecl _scalb( double long) msvcrt._scalb +@ stub _scanf_l +@ stub _scanf_s_l +@ stub _scprintf +@ stub _scprintf_l +@ stub _scprintf_p +@ stub _scprintf_p_l +@ stub _scwprintf +@ stub _scwprintf_l +@ stub _scwprintf_p +@ stub _scwprintf_p_l +@ cdecl _searchenv(str str ptr) msvcrt._searchenv +@ stub _searchenv_s +@ stub _seh_longjmp_unwind4 +@ stdcall -i386 _seh_longjmp_unwind(ptr) msvcrt._seh_longjmp_unwind +@ stub _set_SSE2_enable +@ stub _set_abort_behavior +@ stub _set_amblksiz +@ stub _set_controlfp +@ stub _set_doserrno +@ stub _set_errno +@ cdecl _set_error_mode(long) msvcrt._set_error_mode +@ stub _set_fmode +@ stub _set_invalid_parameter_handler +@ stub _set_malloc_crt_max_wait +@ stub _set_output_format +@ stub _set_printf_count_output +@ stub _set_purecall_handler +@ cdecl _set_sbh_threshold(long) msvcrt._set_sbh_threshold +@ cdecl _seterrormode(long) msvcrt._seterrormode +@ cdecl -i386 -norelay _setjmp(ptr) msvcrt._setjmp +@ cdecl -i386 -norelay _setjmp3(ptr long) msvcrt._setjmp3 +@ cdecl _setmaxstdio(long) msvcrt._setmaxstdio +@ cdecl _setmbcp(long) msvcrt._setmbcp +@ cdecl _setmode(long long) msvcrt._setmode +@ stub _setsystime +@ cdecl _sleep(long) msvcrt._sleep +@ varargs _snprintf(ptr long str) msvcrt._snprintf +@ stub _snprintf_c +@ stub _snprintf_c_l +@ stub _snprintf_l +@ stub _snprintf_s +@ stub _snprintf_s_l +@ stub _snscanf +@ stub _snscanf_l +@ stub _snscanf_s +@ stub _snscanf_s_l +@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf +@ stub _snwprintf_l +@ stub _snwprintf_s +@ stub _snwprintf_s_l +@ stub _snwscanf +@ stub _snwscanf_l +@ stub _snwscanf_s +@ stub _snwscanf_s_l +@ varargs _sopen(str long long) msvcrt._sopen +@ stub _sopen_s +@ varargs _spawnl(long str str) msvcrt._spawnl +@ varargs _spawnle(long str str) msvcrt._spawnle +@ varargs _spawnlp(long str str) msvcrt._spawnlp +@ varargs _spawnlpe(long str str) msvcrt._spawnlpe +@ cdecl _spawnv(long str ptr) msvcrt._spawnv +@ cdecl _spawnve(long str ptr ptr) msvcrt._spawnve +@ cdecl _spawnvp(long str ptr) msvcrt._spawnvp +@ cdecl _spawnvpe(long str ptr ptr) msvcrt._spawnvpe +@ cdecl _splitpath(str ptr ptr ptr ptr) msvcrt._splitpath +@ stub _splitpath_s +@ stub _sprintf_l +@ stub _sprintf_p +@ stub _sprintf_p_l +@ stub _sprintf_s_l +@ stub _sscanf_l +@ stub _sscanf_s_l +@ stub _stat32 +@ stub _stat32i64 +@ cdecl _stat64(str ptr) msvcrt._stat64 +@ stub _stat64i32 +@ cdecl _statusfp() msvcrt._statusfp +@ stub _statusfp2 +@ stub _strcoll_l +@ cdecl _strdate(ptr) msvcrt._strdate +@ stub _strdate_s +@ cdecl _strdup(str) msvcrt._strdup +@ cdecl _strerror(long) msvcrt._strerror +@ stub _strerror_s +@ stub _strftime_l +@ cdecl _stricmp(str str) msvcrt._stricmp +@ stub _stricmp_l +@ cdecl _stricoll(str str) msvcrt._stricoll +@ stub _stricoll_l +@ cdecl _strlwr(str) msvcrt._strlwr +@ stub _strlwr_l +@ stub _strlwr_s +@ stub _strlwr_s_l +@ stub _strncoll +@ stub _strncoll_l +@ cdecl _strnicmp(str str long) msvcrt._strnicmp +@ stub _strnicmp_l +@ stub _strnicoll +@ stub _strnicoll_l +@ cdecl _strnset(str long long) msvcrt._strnset +@ stub _strnset_s +@ cdecl _strrev(str) msvcrt._strrev +@ cdecl _strset(str long) msvcrt._strset +@ stub _strset_s +@ cdecl _strtime(ptr) msvcrt._strtime +@ stub _strtime_s +@ stub _strtod_l +@ stub _strtoi64 +@ stub _strtoi64_l +@ stub _strtol_l +@ stub _strtoui64 +@ stub _strtoui64_l +@ stub _strtoul_l +@ cdecl _strupr(str) msvcrt._strupr +@ stub _strupr_l +@ stub _strupr_s +@ stub _strupr_s_l +@ stub _strxfrm_l +@ cdecl _swab(str str long) msvcrt._swab +@ stub _swprintf +@ stub _swprintf_c +@ stub _swprintf_c_l +@ stub _swprintf_p +@ stub _swprintf_p_l +@ stub _swprintf_s_l +@ stub _swscanf_l +@ stub _swscanf_s_l +@ extern _sys_errlist msvcrt._sys_errlist +@ extern _sys_nerr msvcrt._sys_nerr +@ cdecl _tell(long) msvcrt._tell +@ cdecl -ret64 _telli64(long) msvcrt._telli64 +@ cdecl _tempnam(str str) msvcrt._tempnam +@ cdecl _time32(ptr) msvcrt._time32 +@ cdecl _time64(ptr) msvcrt._time64 +@ extern _timezone msvcrt._timezone +@ cdecl _tolower(long) msvcrt._tolower +@ stub _tolower_l +@ cdecl _toupper(long) msvcrt._toupper +@ stub _toupper_l +@ stub _towlower_l +@ stub _towupper_l +@ extern _tzname msvcrt._tzname +@ cdecl _tzset() msvcrt._tzset +@ cdecl _ui64toa(long long ptr long) msvcrt._ui64toa +@ stub _ui64toa_s +@ cdecl _ui64tow(long long ptr long) msvcrt._ui64tow +@ stub _ui64tow_s +@ cdecl _ultoa(long ptr long) msvcrt._ultoa +@ stub _ultoa_s +@ cdecl _ultow(long ptr long) msvcrt._ultow +@ stub _ultow_s +@ cdecl _umask(long) msvcrt._umask +@ stub _umask_s +@ stub _ungetc_nolock +@ cdecl _ungetch(long) msvcrt._ungetch +@ stub _ungetch_nolock +@ stub _ungetwc_nolock +@ stub _ungetwch +@ stub _ungetwch_nolock +@ cdecl _unlink(str) msvcrt._unlink +@ cdecl _unloaddll(long) msvcrt._unloaddll +@ cdecl _unlock(long) msvcrt._unlock +@ stub _unlock_file +@ cdecl _utime32(str ptr) msvcrt._utime32 +@ cdecl _utime64(str ptr) msvcrt._utime64 +@ stub _vcprintf +@ stub _vcprintf_l +@ stub _vcprintf_p +@ stub _vcprintf_p_l +@ stub _vcprintf_s +@ stub _vcprintf_s_l +@ stub _vcwprintf +@ stub _vcwprintf_l +@ stub _vcwprintf_p +@ stub _vcwprintf_p_l +@ stub _vcwprintf_s +@ stub _vcwprintf_s_l +@ stub _vfprintf_l +@ stub _vfprintf_p +@ stub _vfprintf_p_l +@ stub _vfprintf_s_l +@ stub _vfwprintf_l +@ stub _vfwprintf_p +@ stub _vfwprintf_p_l +@ stub _vfwprintf_s_l +@ stub _vprintf_l +@ stub _vprintf_p +@ stub _vprintf_p_l +@ stub _vprintf_s_l +@ cdecl _vscprintf(str ptr) msvcrt._vscprintf +@ stub _vscprintf_l +@ stub _vscprintf_p +@ stub _vscprintf_p_l +@ cdecl _vscwprintf(wstr ptr) msvcrt._vscwprintf +@ stub _vscwprintf_l +@ stub _vscwprintf_p +@ stub _vscwprintf_p_l +@ cdecl _vsnprintf(ptr long str ptr) msvcrt._vsnprintf +@ stub _vsnprintf_c +@ stub _vsnprintf_c_l +@ stub _vsnprintf_l +@ stub _vsnprintf_s +@ stub _vsnprintf_s_l +@ cdecl _vsnwprintf(ptr long wstr ptr) msvcrt._vsnwprintf +@ stub _vsnwprintf_l +@ stub _vsnwprintf_s +@ stub _vsnwprintf_s_l +@ stub _vsprintf_l +@ stub _vsprintf_p +@ stub _vsprintf_p_l +@ stub _vsprintf_s_l +@ stub _vswprintf +@ stub _vswprintf_c +@ stub _vswprintf_c_l +@ stub _vswprintf_l +@ stub _vswprintf_p +@ stub _vswprintf_p_l +@ stub _vswprintf_s_l +@ stub _vwprintf_l +@ stub _vwprintf_p +@ stub _vwprintf_p_l +@ stub _vwprintf_s_l +@ cdecl _waccess(wstr long) msvcrt._waccess +@ stub _waccess_s +@ cdecl _wasctime(ptr) msvcrt._wasctime +@ stub _wasctime_s +@ stub _wassert +@ cdecl _wchdir(wstr) msvcrt._wchdir +@ cdecl _wchmod(wstr long) msvcrt._wchmod +@ extern _wcmdln msvcrt._wcmdln +@ cdecl _wcreat(wstr long) msvcrt._wcreat +@ stub _wcscoll_l +@ cdecl _wcsdup(wstr) msvcrt._wcsdup +@ stub _wcserror +@ stub _wcserror_s +@ stub _wcsftime_l +@ cdecl _wcsicmp(wstr wstr) msvcrt._wcsicmp +@ stub _wcsicmp_l +@ cdecl _wcsicoll(wstr wstr) msvcrt._wcsicoll +@ stub _wcsicoll_l +@ cdecl _wcslwr(wstr) msvcrt._wcslwr +@ stub _wcslwr_l +@ stub _wcslwr_s +@ stub _wcslwr_s_l +@ stub _wcsncoll +@ stub _wcsncoll_l +@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp +@ stub _wcsnicmp_l +@ stub _wcsnicoll +@ stub _wcsnicoll_l +@ cdecl _wcsnset(wstr long long) msvcrt._wcsnset +@ stub _wcsnset_s +@ cdecl _wcsrev(wstr) msvcrt._wcsrev +@ cdecl _wcsset(wstr long) msvcrt._wcsset +@ stub _wcsset_s +@ stub _wcstod_l +@ stub _wcstoi64 +@ stub _wcstoi64_l +@ stub _wcstol_l +@ stub _wcstombs_l +@ stub _wcstombs_s_l +@ stub _wcstoui64 +@ stub _wcstoui64_l +@ stub _wcstoul_l +@ cdecl _wcsupr(wstr) msvcrt._wcsupr +@ stub _wcsupr_l +@ cdecl _wcsupr_s(wstr long) msvcrt._wcsupr_s +@ stub _wcsupr_s_l +@ stub _wcsxfrm_l +@ cdecl _wctime32(ptr) msvcrt._wctime32 +@ stub _wctime32_s +@ cdecl _wctime64(ptr) msvcrt._wctime64 +@ stub _wctime64_s +@ stub _wctomb_l +@ stub _wctomb_s_l +@ stub _wctype +@ stub _wdupenv_s +@ extern _wenviron msvcrt._wenviron +@ varargs _wexecl(wstr wstr) msvcrt._wexecl +@ varargs _wexecle(wstr wstr) msvcrt._wexecle +@ varargs _wexeclp(wstr wstr) msvcrt._wexeclp +@ varargs _wexeclpe(wstr wstr) msvcrt._wexeclpe +@ cdecl _wexecv(wstr ptr) msvcrt._wexecv +@ cdecl _wexecve(wstr ptr ptr) msvcrt._wexecve +@ cdecl _wexecvp(wstr ptr) msvcrt._wexecvp +@ cdecl _wexecvpe(wstr ptr ptr) msvcrt._wexecvpe +@ cdecl _wfdopen(long wstr) msvcrt._wfdopen +@ stub _wfindfirst32 +@ stub _wfindfirst32i64 +@ stub _wfindfirst64 +@ stub _wfindfirst64i32 +@ stub _wfindnext32 +@ stub _wfindnext32i64 +@ stub _wfindnext64 +@ stub _wfindnext64i32 +@ cdecl _wfopen(wstr wstr) msvcrt._wfopen +@ stub _wfopen_s +@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen +@ stub _wfreopen_s +@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen +@ cdecl _wfullpath(ptr wstr long) msvcrt._wfullpath +@ cdecl _wgetcwd(wstr long) msvcrt._wgetcwd +@ cdecl _wgetdcwd(long wstr long) msvcrt._wgetdcwd +@ stub _wgetdcwd_nolock +@ cdecl _wgetenv(wstr) msvcrt._wgetenv +@ stub _wgetenv_s +@ cdecl _wmakepath(wstr wstr wstr wstr wstr) msvcrt._wmakepath +@ stub _wmakepath_s +@ cdecl _wmkdir(wstr) msvcrt._wmkdir +@ cdecl _wmktemp(wstr) msvcrt._wmktemp +@ stub _wmktemp_s +@ varargs _wopen(wstr long) msvcrt._wopen +@ stub _wperror +@ extern _wpgmptr msvcrt._wpgmptr +@ cdecl _wpopen(wstr wstr) msvcrt._wpopen +@ stub _wprintf_l +@ stub _wprintf_p +@ stub _wprintf_p_l +@ stub _wprintf_s_l +@ cdecl _wputenv(wstr) msvcrt._wputenv +@ stub _wputenv_s +@ cdecl _wremove(wstr) msvcrt._wremove +@ cdecl _wrename(wstr wstr) msvcrt._wrename +@ cdecl _write(long ptr long) msvcrt._write +@ cdecl _wrmdir(wstr) msvcrt._wrmdir +@ stub _wscanf_l +@ stub _wscanf_s_l +@ cdecl _wsearchenv(wstr wstr ptr) msvcrt._wsearchenv +@ stub _wsearchenv_s +@ cdecl _wsetlocale(long wstr) msvcrt._wsetlocale +@ varargs _wsopen(wstr long long) msvcrt._wsopen +@ stub _wsopen_s +@ varargs _wspawnl(long wstr wstr) msvcrt._wspawnl +@ varargs _wspawnle(long wstr wstr) msvcrt._wspawnle +@ varargs _wspawnlp(long wstr wstr) msvcrt._wspawnlp +@ varargs _wspawnlpe(long wstr wstr) msvcrt._wspawnlpe +@ cdecl _wspawnv(long wstr ptr) msvcrt._wspawnv +@ cdecl _wspawnve(long wstr ptr ptr) msvcrt._wspawnve +@ cdecl _wspawnvp(long wstr ptr) msvcrt._wspawnvp +@ cdecl _wspawnvpe(long wstr ptr ptr) msvcrt._wspawnvpe +@ cdecl _wsplitpath(wstr ptr ptr ptr ptr) msvcrt._wsplitpath +@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) msvcrt._wsplitpath_s +@ stub _wstat32 +@ stub _wstat32i64 +@ cdecl _wstat64(wstr ptr) msvcrt._wstat64 +@ stub _wstat64i32 +@ cdecl _wstrdate(ptr) msvcrt._wstrdate +@ stub _wstrdate_s +@ cdecl _wstrtime(ptr) msvcrt._wstrtime +@ stub _wstrtime_s +@ cdecl _wsystem(wstr) msvcrt._wsystem +@ cdecl _wtempnam(wstr wstr) msvcrt._wtempnam +@ stub _wtmpnam +@ stub _wtmpnam_s +@ stub _wtof +@ stub _wtof_l +@ cdecl _wtoi(wstr) msvcrt._wtoi +@ cdecl _wtoi64(wstr) msvcrt._wtoi64 +@ stub _wtoi64_l +@ stub _wtoi_l +@ cdecl _wtol(wstr) msvcrt._wtol +@ stub _wtol_l +@ cdecl _wunlink(wstr) msvcrt._wunlink +@ cdecl _wutime32(wstr ptr) msvcrt._wutime32 +@ cdecl _wutime64(wstr ptr) msvcrt._wutime64 +@ cdecl _y0(double) msvcrt._y0 +@ cdecl _y1(double) msvcrt._y1 +@ cdecl _yn(long double ) msvcrt._yn +@ cdecl abort() msvcrt.abort +@ cdecl abs(long) msvcrt.abs +@ cdecl acos(double) msvcrt.acos +@ cdecl asctime(ptr) msvcrt.asctime +@ stub asctime_s +@ cdecl asin(double) msvcrt.asin +@ cdecl atan(double) msvcrt.atan +@ cdecl atan2(double double) msvcrt.atan2 +@ cdecl atexit(ptr) msvcrt.atexit +@ cdecl atof(str) msvcrt.atof +@ cdecl atoi(str) msvcrt.atoi +@ cdecl atol(str) msvcrt.atol +@ cdecl bsearch(ptr ptr long long ptr) msvcrt.bsearch +@ stub bsearch_s +@ stub btowc +@ cdecl calloc(long long) msvcrt.calloc +@ cdecl ceil(double) msvcrt.ceil +@ cdecl clearerr(ptr) msvcrt.clearerr +@ stub clearerr_s +@ cdecl clock() msvcrt.clock +@ cdecl cos(double) msvcrt.cos +@ cdecl cosh(double) msvcrt.cosh +@ cdecl div(long long) msvcrt.div +@ cdecl exit(long) msvcrt.exit +@ cdecl exp(double) msvcrt.exp +@ cdecl fabs(double) msvcrt.fabs +@ cdecl fclose(ptr) msvcrt.fclose +@ cdecl feof(ptr) msvcrt.feof +@ cdecl ferror(ptr) msvcrt.ferror +@ cdecl fflush(ptr) msvcrt.fflush +@ cdecl fgetc(ptr) msvcrt.fgetc +@ cdecl fgetpos(ptr ptr) msvcrt.fgetpos +@ cdecl fgets(ptr long ptr) msvcrt.fgets +@ cdecl fgetwc(ptr) msvcrt.fgetwc +@ cdecl fgetws(ptr long ptr) msvcrt.fgetws +@ cdecl floor(double) msvcrt.floor +@ cdecl fmod(double double) msvcrt.fmod +@ cdecl fopen(str str) msvcrt.fopen +@ stub fopen_s +@ varargs fprintf(ptr str) msvcrt.fprintf +@ stub fprintf_s +@ cdecl fputc(long ptr) msvcrt.fputc +@ cdecl fputs(str ptr) msvcrt.fputs +@ cdecl fputwc(long ptr) msvcrt.fputwc +@ cdecl fputws(wstr ptr) msvcrt.fputws +@ cdecl fread(ptr long long ptr) msvcrt.fread +@ stub fread_s +@ cdecl free(ptr) msvcrt.free +@ cdecl freopen(str str ptr) msvcrt.freopen +@ stub freopen_s +@ cdecl frexp(double ptr) msvcrt.frexp +@ varargs fscanf(ptr str) msvcrt.fscanf +@ stub fscanf_s +@ cdecl fseek(ptr long long) msvcrt.fseek +@ cdecl fsetpos(ptr ptr) msvcrt.fsetpos +@ cdecl ftell(ptr) msvcrt.ftell +@ varargs fwprintf(ptr wstr) msvcrt.fwprintf +@ stub fwprintf_s +@ cdecl fwrite(ptr long long ptr) msvcrt.fwrite +@ varargs fwscanf(ptr wstr) msvcrt.fwscanf +@ stub fwscanf_s +@ cdecl getc(ptr) msvcrt.getc +@ cdecl getchar() msvcrt.getchar +@ cdecl getenv(str) msvcrt.getenv +@ stub getenv_s +@ cdecl gets(str) msvcrt.gets +@ stub gets_s +@ cdecl getwc(ptr) msvcrt.getwc +@ cdecl getwchar() msvcrt.getwchar +@ cdecl is_wctype(long long) msvcrt.is_wctype +@ cdecl isalnum(long) msvcrt.isalnum +@ cdecl isalpha(long) msvcrt.isalpha +@ cdecl iscntrl(long) msvcrt.iscntrl +@ cdecl isdigit(long) msvcrt.isdigit +@ cdecl isgraph(long) msvcrt.isgraph +@ cdecl isleadbyte(long) msvcrt.isleadbyte +@ cdecl islower(long) msvcrt.islower +@ cdecl isprint(long) msvcrt.isprint +@ cdecl ispunct(long) msvcrt.ispunct +@ cdecl isspace(long) msvcrt.isspace +@ cdecl isupper(long) msvcrt.isupper +@ cdecl iswalnum(long) msvcrt.iswalnum +@ cdecl iswalpha(long) msvcrt.iswalpha +@ cdecl iswascii(long) msvcrt.iswascii +@ cdecl iswcntrl(long) msvcrt.iswcntrl +@ cdecl iswctype(long long) msvcrt.iswctype +@ cdecl iswdigit(long) msvcrt.iswdigit +@ cdecl iswgraph(long) msvcrt.iswgraph +@ cdecl iswlower(long) msvcrt.iswlower +@ cdecl iswprint(long) msvcrt.iswprint +@ cdecl iswpunct(long) msvcrt.iswpunct +@ cdecl iswspace(long) msvcrt.iswspace +@ cdecl iswupper(long) msvcrt.iswupper +@ cdecl iswxdigit(long) msvcrt.iswxdigit +@ cdecl isxdigit(long) msvcrt.isxdigit +@ cdecl labs(long) msvcrt.labs +@ cdecl ldexp( double long) msvcrt.ldexp +@ cdecl ldiv(long long) msvcrt.ldiv +@ cdecl localeconv() msvcrt.localeconv +@ cdecl log(double) msvcrt.log +@ cdecl log10(double) msvcrt.log10 +@ cdecl -i386 longjmp(ptr long) msvcrt.longjmp +@ cdecl malloc(long) msvcrt.malloc +@ cdecl mblen(ptr long) msvcrt.mblen +@ stub mbrlen +@ stub mbrtowc +@ stub mbsrtowcs +@ stub mbsrtowcs_s +@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs +@ stub mbstowcs_s +@ cdecl mbtowc(wstr str long) msvcrt.mbtowc +@ cdecl memchr(ptr long long) msvcrt.memchr +@ cdecl memcmp(ptr ptr long) msvcrt.memcmp +@ cdecl memcpy(ptr ptr long) msvcrt.memcpy +@ stub memcpy_s +@ cdecl memmove(ptr ptr long) msvcrt.memmove +@ stub memmove_s +@ cdecl memset(ptr long long) msvcrt.memset +@ cdecl modf(double ptr) msvcrt.modf +@ cdecl perror(str) msvcrt.perror +@ cdecl pow(double double) msvcrt.pow +@ varargs printf(str) msvcrt.printf +@ stub printf_s +@ cdecl putc(long ptr) msvcrt.putc +@ cdecl putchar(long) msvcrt.putchar +@ cdecl puts(str) msvcrt.puts +@ cdecl putwc(long ptr) msvcrt.putwc +@ cdecl putwchar(long) msvcrt.putwchar +@ cdecl qsort(ptr long long ptr) msvcrt.qsort +@ stub qsort_s +@ cdecl raise(long) msvcrt.raise +@ cdecl rand() msvcrt.rand +@ cdecl rand_s(ptr) msvcrt.rand_s +@ cdecl realloc(ptr long) msvcrt.realloc +@ cdecl remove(str) msvcrt.remove +@ cdecl rename(str str) msvcrt.rename +@ cdecl rewind(ptr) msvcrt.rewind +@ varargs scanf(str) msvcrt.scanf +@ stub scanf_s +@ cdecl setbuf(ptr ptr) msvcrt.setbuf +@ cdecl setlocale(long str) msvcrt.setlocale +@ cdecl setvbuf(ptr str long long) msvcrt.setvbuf +@ cdecl signal(long long) msvcrt.signal +@ cdecl sin(double) msvcrt.sin +@ cdecl sinh(double) msvcrt.sinh +@ varargs sprintf(ptr str) msvcrt.sprintf +@ varargs sprintf_s(ptr long str) msvcrt.sprintf_s +@ cdecl sqrt(double) msvcrt.sqrt +@ cdecl srand(long) msvcrt.srand +@ varargs sscanf(str str) msvcrt.sscanf +@ stub sscanf_s +@ cdecl strcat(str str) msvcrt.strcat +@ cdecl strcat_s(str long str) msvcrt.strcat_s +@ cdecl strchr(str long) msvcrt.strchr +@ cdecl strcmp(str str) msvcrt.strcmp +@ cdecl strcoll(str str) msvcrt.strcoll +@ cdecl strcpy(ptr str) msvcrt.strcpy +@ cdecl strcpy_s(ptr long str) msvcrt.strcpy_s +@ cdecl strcspn(str str) msvcrt.strcspn +@ cdecl strerror(long) msvcrt.strerror +@ stub strerror_s +@ cdecl strftime(str long str ptr) msvcrt.strftime +@ cdecl strlen(str) msvcrt.strlen +@ cdecl strncat(str str long) msvcrt.strncat +@ stub strncat_s +@ cdecl strncmp(str str long) msvcrt.strncmp +@ cdecl strncpy(ptr str long) msvcrt.strncpy +@ stub strncpy_s +@ stub strnlen +@ cdecl strpbrk(str str) msvcrt.strpbrk +@ cdecl strrchr(str long) msvcrt.strrchr +@ cdecl strspn(str str) msvcrt.strspn +@ cdecl strstr(str str) msvcrt.strstr +@ cdecl strtod(str ptr) msvcrt.strtod +@ cdecl strtok(str str) msvcrt.strtok +@ stub strtok_s +@ cdecl strtol(str ptr long) msvcrt.strtol +@ cdecl strtoul(str ptr long) msvcrt.strtoul +@ cdecl strxfrm(ptr str long) msvcrt.strxfrm +@ stub swprintf_s +@ varargs swscanf(wstr wstr) msvcrt.swscanf +@ stub swscanf_s +@ cdecl system(str) msvcrt.system +@ cdecl tan(double) msvcrt.tan +@ cdecl tanh(double) msvcrt.tanh +@ cdecl tmpfile() msvcrt.tmpfile +@ stub tmpfile_s +@ cdecl tmpnam(ptr) msvcrt.tmpnam +@ stub tmpnam_s +@ cdecl tolower(long) msvcrt.tolower +@ cdecl toupper(long) msvcrt.toupper +@ cdecl towlower(long) msvcrt.towlower +@ cdecl towupper(long) msvcrt.towupper +@ cdecl ungetc(long ptr) msvcrt.ungetc +@ cdecl ungetwc(long ptr) msvcrt.ungetwc +@ cdecl vfprintf(ptr str ptr) msvcrt.vfprintf +@ stub vfprintf_s +@ cdecl vfwprintf(ptr wstr ptr) msvcrt.vfwprintf +@ stub vfwprintf_s +@ cdecl vprintf(str ptr) msvcrt.vprintf +@ stub vprintf_s +@ cdecl vsprintf(ptr str ptr) msvcrt.vsprintf +@ cdecl vsprintf_s(ptr long str ptr) msvcrt.vsprintf_s +@ cdecl vswprintf_s(ptr long wstr ptr) msvcrt.vswprintf_s +@ cdecl vwprintf(wstr ptr) msvcrt.vwprintf +@ stub vwprintf_s +@ stub wcrtomb +@ stub wcrtomb_s +@ cdecl wcscat(wstr wstr) msvcrt.wcscat +@ cdecl wcscat_s(wstr long wstr) msvcrt.wcscat_s +@ cdecl wcschr(wstr long) msvcrt.wcschr +@ cdecl wcscmp(wstr wstr) msvcrt.wcscmp +@ cdecl wcscoll(wstr wstr) msvcrt.wcscoll +@ cdecl wcscpy(ptr wstr) msvcrt.wcscpy +@ cdecl wcscpy_s(ptr long wstr) msvcrt.wcscpy_s +@ cdecl wcscspn(wstr wstr) msvcrt.wcscspn +@ cdecl wcsftime(ptr long wstr ptr) msvcrt.wcsftime +@ cdecl wcslen(wstr) msvcrt.wcslen +@ cdecl wcsncat(wstr wstr long) msvcrt.wcsncat +@ stub wcsncat_s +@ cdecl wcsncmp(wstr wstr long) msvcrt.wcsncmp +@ cdecl wcsncpy(ptr wstr long) msvcrt.wcsncpy +@ cdecl wcsncpy_s(ptr long wstr long) msvcrt.wcsncpy_s +@ stub wcsnlen +@ cdecl wcspbrk(wstr wstr) msvcrt.wcspbrk +@ cdecl wcsrchr(wstr long) msvcrt.wcsrchr +@ stub wcsrtombs +@ stub wcsrtombs_s +@ cdecl wcsspn(wstr wstr) msvcrt.wcsspn +@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr +@ cdecl wcstod(wstr ptr) msvcrt.wcstod +@ cdecl wcstok(wstr wstr) msvcrt.wcstok +@ stub wcstok_s +@ cdecl wcstol(wstr ptr long) msvcrt.wcstol +@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs +@ stub wcstombs_s +@ cdecl wcstoul(wstr ptr long) msvcrt.wcstoul +@ stub wcsxfrm +@ stub wctob +@ cdecl wctomb(ptr long) msvcrt.wctomb +@ stub wctomb_s +@ varargs wprintf(wstr) msvcrt.wprintf +@ stub wprintf_s +@ varargs wscanf(wstr) msvcrt.wscanf +@ stub wscanf_s diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index e5f69100352..3b2d293a554 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -39,5 +39,3 @@ RC_SRCS = \ rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcrt/tests/Makefile.in b/dlls/msvcrt/tests/Makefile.in index aab6ba2c3c2..79958ea1243 100644 --- a/dlls/msvcrt/tests/Makefile.in +++ b/dlls/msvcrt/tests/Makefile.in @@ -24,5 +24,3 @@ C_SRCS = \ time.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcrt20/Makefile.in b/dlls/msvcrt20/Makefile.in index 1179be297c9..1ab90301262 100644 --- a/dlls/msvcrt20/Makefile.in +++ b/dlls/msvcrt20/Makefile.in @@ -10,5 +10,3 @@ IMPORTS = msvcrt kernel32 C_SRCS = msvcrt20.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcrt40/Makefile.in b/dlls/msvcrt40/Makefile.in index b053a967067..d1f3d57569d 100644 --- a/dlls/msvcrt40/Makefile.in +++ b/dlls/msvcrt40/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ msvcrt40.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcrtd/Makefile.in b/dlls/msvcrtd/Makefile.in index 904b36318de..e607924b1c9 100644 --- a/dlls/msvcrtd/Makefile.in +++ b/dlls/msvcrtd/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ debug.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvcrtd/tests/Makefile.in b/dlls/msvcrtd/tests/Makefile.in index 2076974c8d6..9fe485000fc 100644 --- a/dlls/msvcrtd/tests/Makefile.in +++ b/dlls/msvcrtd/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ debug.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvfw32/Makefile.in b/dlls/msvfw32/Makefile.in index 252ab788c3c..292e345f419 100644 --- a/dlls/msvfw32/Makefile.in +++ b/dlls/msvfw32/Makefile.in @@ -33,5 +33,3 @@ RC_SRCS = \ msvfw32_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c index ff8a0369df0..64a19ca30fe 100644 --- a/dlls/msvfw32/mciwnd.c +++ b/dlls/msvfw32/mciwnd.c @@ -1298,30 +1298,23 @@ end_of_mci_open: } case MCI_SEEK: + case MCI_STEP: { - MCI_SEEK_PARMS mci_seek; - - switch (lParam) - { - case MCIWND_START: - lParam = SendMessageW(hWnd, MCIWNDM_GETSTART, 0, 0); - break; - - case MCIWND_END: - lParam = SendMessageW(hWnd, MCIWNDM_GETEND, 0, 0); - break; - } + MCI_SEEK_PARMS mci_seek; /* Layout is useable as MCI_XYZ_STEP_PARMS */ + DWORD flags = MCI_STEP == wMsg ? 0 : + MCIWND_START == lParam ? MCI_SEEK_TO_START : + MCIWND_END == lParam ? MCI_SEEK_TO_END : MCI_TO; mci_seek.dwTo = lParam; - mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SEEK, - MCI_TO, (DWORD_PTR)&mci_seek); + mwi->lasterror = mciSendCommandW(mwi->mci, wMsg, + flags, (DWORD_PTR)&mci_seek); if (mwi->lasterror) { MCIWND_notify_error(mwi); return mwi->lasterror; } /* update window to reflect the state */ - InvalidateRect(hWnd, NULL, TRUE); + else InvalidateRect(hWnd, NULL, TRUE); return 0; } @@ -1364,15 +1357,9 @@ end_of_mci_open: } case MCI_PAUSE: - case MCI_STEP: case MCI_STOP: case MCI_RESUME: mci_generic_command(mwi, wMsg); - if (wMsg == MCI_STEP && !mwi->lasterror) - { - /* update window to reflect the state */ - InvalidateRect(hWnd, NULL, TRUE); - } return mwi->lasterror; case MCI_CONFIGURE: diff --git a/dlls/msvfw32/tests/Makefile.in b/dlls/msvfw32/tests/Makefile.in index 75dc3d9a152..7c53a3b4a28 100644 --- a/dlls/msvfw32/tests/Makefile.in +++ b/dlls/msvfw32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ msvfw.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvidc32/Makefile.in b/dlls/msvidc32/Makefile.in index be4a2049810..2fd71ec3046 100644 --- a/dlls/msvidc32/Makefile.in +++ b/dlls/msvidc32/Makefile.in @@ -29,5 +29,3 @@ RC_SRCS = \ msvidc32_Uk.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msvideo.dll16/Makefile.in b/dlls/msvideo.dll16/Makefile.in index a136c7b7d79..7ae3bf3c86c 100644 --- a/dlls/msvideo.dll16/Makefile.in +++ b/dlls/msvideo.dll16/Makefile.in @@ -10,5 +10,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,msvfw32.dll C_SRCS = msvideo16.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mswsock/Makefile.in b/dlls/mswsock/Makefile.in index b8fe898fa19..72eb3fbfb88 100644 --- a/dlls/mswsock/Makefile.in +++ b/dlls/mswsock/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in index 8997f1bb566..a8d1dd5b19e 100644 --- a/dlls/msxml3/Makefile.in +++ b/dlls/msxml3/Makefile.in @@ -41,5 +41,3 @@ RC_SRCS = version.rc IDL_TLB_SRCS = msxml3_v1.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index a29e9b2fb3e..aae8a343500 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1650,19 +1650,20 @@ static HRESULT WINAPI domdoc_abort( static BOOL bstr_to_utf8( BSTR bstr, char **pstr, int *plen ) { - UINT len, blen = SysStringLen( bstr ); + UINT len; LPSTR str; - len = WideCharToMultiByte( CP_UTF8, 0, bstr, blen, NULL, 0, NULL, NULL ); + len = WideCharToMultiByte( CP_UTF8, 0, bstr, -1, NULL, 0, NULL, NULL ); str = heap_alloc( len ); if ( !str ) return FALSE; - WideCharToMultiByte( CP_UTF8, 0, bstr, blen, str, len, NULL, NULL ); + WideCharToMultiByte( CP_UTF8, 0, bstr, -1, str, len, NULL, NULL ); *plen = len; *pstr = str; return TRUE; } +/* don't rely on data to be in BSTR format, treat it as WCHAR string */ static HRESULT WINAPI domdoc_loadXML( IXMLDOMDocument2 *iface, BSTR bstrXML, diff --git a/dlls/msxml3/tests/Makefile.in b/dlls/msxml3/tests/Makefile.in index 8bdb87df31e..9ee416d1714 100644 --- a/dlls/msxml3/tests/Makefile.in +++ b/dlls/msxml3/tests/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ xmlelem.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 5f06d93f381..08b577631d0 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -535,6 +535,7 @@ static void test_domdoc( void ) BSTR str; LONG code; LONG nLength = 0; + WCHAR buff[100]; r = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); @@ -543,6 +544,12 @@ static void test_domdoc( void ) test_disp((IUnknown*)doc); +if (0) +{ + /* crashes on native */ + r = IXMLDOMDocument_loadXML( doc, (BSTR)0x1, NULL ); +} + /* try some stupid things */ r = IXMLDOMDocument_loadXML( doc, NULL, NULL ); ok( r == S_FALSE, "loadXML failed\n"); @@ -601,6 +608,15 @@ static void test_domdoc( void ) ok( r == S_FALSE, "should be no document element\n"); ok( element == NULL, "Element should be NULL\n"); + /* test for BSTR handling, pass broken BSTR */ + memcpy(&buff[2], szComplete1, sizeof(szComplete1)); + /* just a big length */ + *(DWORD*)buff = 0xf0f0; + b = VARIANT_FALSE; + r = IXMLDOMDocument_loadXML( doc, &buff[2], &b ); + ok( r == S_OK, "loadXML failed\n"); + ok( b == VARIANT_TRUE, "failed to load XML string\n"); + /* try to load something valid */ b = VARIANT_FALSE; str = SysAllocString( szComplete1 ); diff --git a/dlls/msxml4/Makefile.in b/dlls/msxml4/Makefile.in index a051e96d36c..957a9a67354 100644 --- a/dlls/msxml4/Makefile.in +++ b/dlls/msxml4/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ regsvr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/nddeapi/Makefile.in b/dlls/nddeapi/Makefile.in index 7f145fb2e2b..451e9f754e6 100644 --- a/dlls/nddeapi/Makefile.in +++ b/dlls/nddeapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ nddeapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/netapi32/Makefile.in b/dlls/netapi32/Makefile.in index 5ee3aacdd44..62035dfc262 100644 --- a/dlls/netapi32/Makefile.in +++ b/dlls/netapi32/Makefile.in @@ -22,5 +22,3 @@ C_SRCS = \ wksta.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/netapi32/tests/Makefile.in b/dlls/netapi32/tests/Makefile.in index 50e63578826..46933d093c0 100644 --- a/dlls/netapi32/tests/Makefile.in +++ b/dlls/netapi32/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ wksta.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/newdev/Makefile.in b/dlls/newdev/Makefile.in index 391e87a0798..79b47074695 100644 --- a/dlls/newdev/Makefile.in +++ b/dlls/newdev/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in index 41bc5d30d98..c51776b01dc 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -57,5 +57,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index ecd94189470..865c2fa863b 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1120,6 +1120,7 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK default: assert(0); + return NULL; } memcpy( filename, long_nameW, total_len - ((char *)filename - (char *)info) ); io->Information += total_len; diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index ba51df56445..6fdceae498a 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -293,9 +293,26 @@ NTSTATUS WINAPI NtQueryInformationProcess( case ProcessDebugPort: /* "These are not the debuggers you are looking for." * * set it to 0 aka "no debugger" to satisfy copy protections */ - len = 4; + len = sizeof(DWORD_PTR); if (ProcessInformationLength == len) - memset(ProcessInformation, 0, ProcessInformationLength); + { + if (!ProcessInformation) + ret = STATUS_ACCESS_VIOLATION; + else if (!ProcessHandle) + ret = STATUS_INVALID_HANDLE; + else + { + SERVER_START_REQ(get_process_info) + { + req->handle = wine_server_obj_handle( ProcessHandle ); + if ((ret = wine_server_call( req )) == STATUS_SUCCESS) + { + *(DWORD_PTR *)ProcessInformation = reply->debugger_present ? ~(DWORD_PTR)0 : 0; + } + } + SERVER_END_REQ; + } + } else ret = STATUS_INFO_LENGTH_MISMATCH; break; diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in index 7f8800cfd2c..be1e359219d 100644 --- a/dlls/ntdll/tests/Makefile.in +++ b/dlls/ntdll/tests/Makefile.in @@ -27,5 +27,3 @@ C_SRCS = \ time.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index c7d451c70b3..a8e19f929e6 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -20,6 +20,7 @@ #include "ntdll_test.h" #include +#include static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); @@ -751,6 +752,78 @@ static void test_query_process_times(void) "Inconsistent length %d\n", ReturnLength); } +static void test_query_process_debug_port(int argc, char **argv) +{ + DWORD_PTR debug_port = 0xdeadbeef; + char cmdline[MAX_PATH]; + PROCESS_INFORMATION pi; + STARTUPINFO si = { 0 }; + NTSTATUS status; + BOOL ret; + + sprintf(cmdline, "%s %s %s", argv[0], argv[1], "debuggee"); + + si.cb = sizeof(si); + ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi); + ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + if (!ret) return; + + status = pNtQueryInformationProcess(NULL, ProcessDebugPort, + NULL, 0, NULL); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); + + status = pNtQueryInformationProcess(NULL, ProcessDebugPort, + NULL, sizeof(debug_port), NULL); + ok(status == STATUS_INVALID_HANDLE || status == STATUS_ACCESS_VIOLATION, + "Expected STATUS_INVALID_HANDLE, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, + NULL, sizeof(debug_port), NULL); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); + + status = pNtQueryInformationProcess(NULL, ProcessDebugPort, + &debug_port, sizeof(debug_port), NULL); + ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, + &debug_port, sizeof(debug_port) - 1, NULL); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, + &debug_port, sizeof(debug_port) + 1, NULL); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, + &debug_port, sizeof(debug_port), NULL); + ok(!status, "NtQueryInformationProcess failed, status %#x.\n", status); + ok(debug_port == 0, "Expected port 0, got %#lx.\n", debug_port); + + status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugPort, + &debug_port, sizeof(debug_port), NULL); + ok(!status, "NtQueryInformationProcess failed, status %#x.\n", status); + ok(debug_port == ~(DWORD_PTR)0, "Expected port %#lx, got %#lx.\n", ~(DWORD_PTR)0, debug_port); + + for (;;) + { + DEBUG_EVENT ev; + + ret = WaitForDebugEvent(&ev, INFINITE); + ok(ret, "WaitForDebugEvent failed, last error %#x.\n", GetLastError()); + if (!ret) break; + + if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; + + ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); + ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError()); + if (!ret) break; + } + + ret = CloseHandle(pi.hThread); + ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); + ret = CloseHandle(pi.hProcess); + ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); +} + static void test_query_process_handlecount(void) { NTSTATUS status; @@ -978,9 +1051,15 @@ static void test_affinity(void) START_TEST(info) { + char **argv; + int argc; + if(!InitFunctionPtrs()) return; + argc = winetest_get_mainargs(&argv); + if (argc >= 3) return; /* Child */ + /* NtQuerySystemInformation */ /* 0x0 SystemBasicInformation */ @@ -1049,6 +1128,10 @@ START_TEST(info) trace("Starting test_query_process_times()\n"); test_query_process_times(); + /* 0x7 ProcessDebugPort */ + trace("Starting test_process_debug_port()\n"); + test_query_process_debug_port(argc, argv); + /* 0x14 ProcessHandleCount */ trace("Starting test_query_process_handlecount()\n"); test_query_process_handlecount(); diff --git a/dlls/ntdsapi/Makefile.in b/dlls/ntdsapi/Makefile.in index 21255f1abde..9ac4ca36807 100644 --- a/dlls/ntdsapi/Makefile.in +++ b/dlls/ntdsapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ ntdsapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntdsapi/tests/Makefile.in b/dlls/ntdsapi/tests/Makefile.in index f835b10cde4..0451831864b 100644 --- a/dlls/ntdsapi/tests/Makefile.in +++ b/dlls/ntdsapi/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ ntdsapi.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntoskrnl.exe/Makefile.in b/dlls/ntoskrnl.exe/Makefile.in index c91a7764e61..cae10259b12 100644 --- a/dlls/ntoskrnl.exe/Makefile.in +++ b/dlls/ntoskrnl.exe/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = ntoskrnl.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 0131d2477f9..3513b014966 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2,6 +2,7 @@ * ntoskrnl.exe implementation * * Copyright (C) 2007 Alexandre Julliard + * Copyright (C) 2010 Damjan Jovanovic * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -678,6 +679,72 @@ PCONFIGURATION_INFORMATION WINAPI IoGetConfigurationInformation(void) /*********************************************************************** + * IoIsWdmVersionAvailable (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI IoIsWdmVersionAvailable(UCHAR MajorVersion, UCHAR MinorVersion) +{ + DWORD version; + DWORD major; + DWORD minor; + + TRACE( "%d, 0x%X\n", MajorVersion, MinorVersion ); + + version = GetVersion(); + major = LOBYTE(version); + minor = HIBYTE(LOWORD(version)); + + if (MajorVersion == 6 && MinorVersion == 0) + { + /* Windows Vista, Windows Server 2008, Windows 7 */ + } + else if (MajorVersion == 1) + { + if (MinorVersion == 0x30) + { + /* Windows server 2003 */ + MajorVersion = 6; + MinorVersion = 0; + } + else if (MinorVersion == 0x20) + { + /* Windows XP */ + MajorVersion = 5; + MinorVersion = 1; + } + else if (MinorVersion == 0x10) + { + /* Windows 2000 */ + MajorVersion = 5; + MinorVersion = 0; + } + else if (MinorVersion == 0x05) + { + /* Windows ME */ + MajorVersion = 4; + MinorVersion = 0x5a; + } + else if (MinorVersion == 0x00) + { + /* Windows 98 */ + MajorVersion = 4; + MinorVersion = 0x0a; + } + else + { + FIXME( "unknown major %d minor 0x%X\n", MajorVersion, MinorVersion ); + return FALSE; + } + } + else + { + FIXME( "unknown major %d minor 0x%X\n", MajorVersion, MinorVersion ); + return FALSE; + } + return major > MajorVersion || (major == MajorVersion && minor >= MinorVersion); +} + + +/*********************************************************************** * IoQueryDeviceDescription (NTOSKRNL.EXE.@) */ NTSTATUS WINAPI IoQueryDeviceDescription(PINTERFACE_TYPE itype, PULONG bus, PCONFIGURATION_TYPE ctype, diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 5e11bf95709..0cbbbc66519 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -406,7 +406,7 @@ @ stub IoIsOperationSynchronous @ stub IoIsSystemThread @ stub IoIsValidNameGraftingBuffer -@ stub IoIsWdmVersionAvailable +@ stdcall IoIsWdmVersionAvailable(long long) @ stub IoMakeAssociatedIrp @ stub IoOpenDeviceInterfaceRegistryKey @ stub IoOpenDeviceRegistryKey diff --git a/dlls/ntprint/Makefile.in b/dlls/ntprint/Makefile.in index b3ecad8731d..e22482f2ab8 100644 --- a/dlls/ntprint/Makefile.in +++ b/dlls/ntprint/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = ntprint.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ntprint/tests/Makefile.in b/dlls/ntprint/tests/Makefile.in index 137fa674bd2..157602c00bf 100644 --- a/dlls/ntprint/tests/Makefile.in +++ b/dlls/ntprint/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ ntprint.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/objsel/Makefile.in b/dlls/objsel/Makefile.in index 1885c14aafc..177d41b09be 100644 --- a/dlls/objsel/Makefile.in +++ b/dlls/objsel/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = objsel.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/odbc32/Makefile.in b/dlls/odbc32/Makefile.in index dc685aebdc7..e42b1216071 100644 --- a/dlls/odbc32/Makefile.in +++ b/dlls/odbc32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ proxyodbc.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/odbccp32/Makefile.in b/dlls/odbccp32/Makefile.in index be1ac4a54dc..2945bcc2fd4 100644 --- a/dlls/odbccp32/Makefile.in +++ b/dlls/odbccp32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ odbccp32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/odbccp32/tests/Makefile.in b/dlls/odbccp32/tests/Makefile.in index b90443563b8..9e6212eee62 100644 --- a/dlls/odbccp32/tests/Makefile.in +++ b/dlls/odbccp32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ misc.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole2.dll16/Makefile.in b/dlls/ole2.dll16/Makefile.in index ee3a95b2842..d2829546504 100644 --- a/dlls/ole2.dll16/Makefile.in +++ b/dlls/ole2.dll16/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ ole2.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole2conv.dll16/Makefile.in b/dlls/ole2conv.dll16/Makefile.in index b99bb0d3291..df4584e4f0c 100644 --- a/dlls/ole2conv.dll16/Makefile.in +++ b/dlls/ole2conv.dll16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ole32.dll @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole2disp.dll16/Makefile.in b/dlls/ole2disp.dll16/Makefile.in index 667c0166cae..6e58438eb5f 100644 --- a/dlls/ole2disp.dll16/Makefile.in +++ b/dlls/ole2disp.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,oleaut32.dll C_SRCS = ole2disp.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole2nls.dll16/Makefile.in b/dlls/ole2nls.dll16/Makefile.in index 4808531c6d7..b3c50f323fc 100644 --- a/dlls/ole2nls.dll16/Makefile.in +++ b/dlls/ole2nls.dll16/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = ole2nls.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole2prox.dll16/Makefile.in b/dlls/ole2prox.dll16/Makefile.in index 9ab9141aa07..7fcd26be24e 100644 --- a/dlls/ole2prox.dll16/Makefile.in +++ b/dlls/ole2prox.dll16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ole32.dll @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole2thk.dll16/Makefile.in b/dlls/ole2thk.dll16/Makefile.in index 7426ee06a8e..e521eac0c0a 100644 --- a/dlls/ole2thk.dll16/Makefile.in +++ b/dlls/ole2thk.dll16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ole32.dll @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in index c6f7cbddac6..755a2b8df59 100644 --- a/dlls/ole32/Makefile.in +++ b/dlls/ole32/Makefile.in @@ -60,5 +60,3 @@ IDL_P_SRCS = \ EXTRA_OBJS = dlldata.o @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 583a9cbcd00..12f83146113 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2956,7 +2956,7 @@ HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID clsidNew) HRESULT res = S_OK; LONG len = sizeof(szClsidNew); - FIXME("(%s,%p)\n", debugstr_guid(clsidOld), clsidNew); + TRACE("(%s,%p)\n", debugstr_guid(clsidOld), clsidNew); *clsidNew = *clsidOld; /* copy over old value */ res = COM_OpenKeyForCLSID(clsidOld, wszTreatAs, KEY_READ, &hkey); diff --git a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c index 19151b96382..77abbf6286b 100644 --- a/dlls/ole32/stg_bigblockfile.c +++ b/dlls/ole32/stg_bigblockfile.c @@ -63,19 +63,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(storage); /* We map in PAGE_SIZE-sized chunks. Must be a multiple of 4096. */ #define PAGE_SIZE 131072 -#define BLOCKS_PER_PAGE (PAGE_SIZE / BIG_BLOCK_SIZE) - /* We keep a list of recently-discarded pages. This controls the * size of that list. */ #define MAX_VICTIM_PAGES 16 -/* This structure provides one bit for each block in a page. - * Use BIGBLOCKFILE_{Test,Set,Clear}Bit to manipulate it. */ -typedef struct -{ - unsigned int bits[BLOCKS_PER_PAGE / (CHAR_BIT * sizeof(unsigned int))]; -} BlockBits; - /*** * This structure identifies the paged that are mapped * from the file and their position in memory. It is @@ -96,16 +87,12 @@ struct MappedPage DWORD mapped_bytes; LPVOID lpBytes; LONG refcnt; - - BlockBits readable_blocks; - BlockBits writable_blocks; }; struct BigBlockFile { BOOL fileBased; ULARGE_INTEGER filesize; - ULONG blocksize; HANDLE hfile; HANDLE hfilemap; DWORD flProtect; @@ -123,39 +110,6 @@ struct BigBlockFile * pass expressions with side effects. */ #define ROUND_UP(a, b) ((((a) + (b) - 1)/(b))*(b)) -/*********************************************************** - * Blockbits functions. - */ -static inline BOOL BIGBLOCKFILE_TestBit(const BlockBits *bb, - unsigned int index) -{ - unsigned int array_index = index / (CHAR_BIT * sizeof(unsigned int)); - unsigned int bit_index = index % (CHAR_BIT * sizeof(unsigned int)); - - return bb->bits[array_index] & (1 << bit_index); -} - -static inline void BIGBLOCKFILE_SetBit(BlockBits *bb, unsigned int index) -{ - unsigned int array_index = index / (CHAR_BIT * sizeof(unsigned int)); - unsigned int bit_index = index % (CHAR_BIT * sizeof(unsigned int)); - - bb->bits[array_index] |= (1 << bit_index); -} - -static inline void BIGBLOCKFILE_ClearBit(BlockBits *bb, unsigned int index) -{ - unsigned int array_index = index / (CHAR_BIT * sizeof(unsigned int)); - unsigned int bit_index = index % (CHAR_BIT * sizeof(unsigned int)); - - bb->bits[array_index] &= ~(1 << bit_index); -} - -static inline void BIGBLOCKFILE_Zero(BlockBits *bb) -{ - memset(bb->bits, 0, sizeof(bb->bits)); -} - /****************************************************************************** * BIGBLOCKFILE_FileInit * @@ -302,9 +256,6 @@ static MappedPage *BIGBLOCKFILE_CreatePage(BigBlockFile *This, ULONG page_index) return NULL; } - BIGBLOCKFILE_Zero(&page->readable_blocks); - BIGBLOCKFILE_Zero(&page->writable_blocks); - return page; } @@ -328,9 +279,6 @@ static void * BIGBLOCKFILE_GetMappedView( if (page) { This->num_victim_pages--; - - BIGBLOCKFILE_Zero(&page->readable_blocks); - BIGBLOCKFILE_Zero(&page->writable_blocks); } } @@ -709,7 +657,7 @@ static HRESULT ImplBIGBLOCKFILE_WriteAt( * and the blocks in use list. */ BigBlockFile *BIGBLOCKFILE_Construct(HANDLE hFile, ILockBytes* pLkByt, DWORD openFlags, - ULONG blocksize, BOOL fileBased) + BOOL fileBased) { BigBlockFile *This; @@ -720,7 +668,6 @@ BigBlockFile *BIGBLOCKFILE_Construct(HANDLE hFile, ILockBytes* pLkByt, DWORD ope This->fileBased = fileBased; This->flProtect = BIGBLOCKFILE_GetProtectMode(openFlags); - This->blocksize = blocksize; This->maplist = NULL; This->victimhead = NULL; @@ -863,31 +810,19 @@ static HRESULT BIGBLOCKFILE_GetSize(BigBlockFile *This, ULARGE_INTEGER *size) } /****************************************************************************** - * BIGBLOCKFILE_EnsureExists + * BIGBLOCKFILE_Expand * - * Grows the file if necessary to make sure the block is valid. + * Grows the file to the specified size if necessary. */ -HRESULT BIGBLOCKFILE_EnsureExists(BigBlockFile *This, ULONG index) +HRESULT BIGBLOCKFILE_Expand(BigBlockFile *This, ULARGE_INTEGER newSize) { ULARGE_INTEGER size; HRESULT hr; - /* Block index starts at -1 translate to zero based index */ - if (index == 0xffffffff) - index = 0; - else - index++; - hr = BIGBLOCKFILE_GetSize(This, &size); if(FAILED(hr)) return hr; - /* make sure that the block physically exists */ - if ((This->blocksize * (index + 1)) > size.QuadPart) - { - ULARGE_INTEGER newSize; - - newSize.QuadPart = This->blocksize * (index + 1); + if (newSize.QuadPart > size.QuadPart) hr = BIGBLOCKFILE_SetSize(This, newSize); - } return hr; } diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 52153a20d44..b3362bc21de 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -181,7 +181,9 @@ static HRESULT WINAPI IPropertyStorage_fnQueryInterface( { PropertyStorage_impl *This = (PropertyStorage_impl *)iface; - if ( (This==0) || (ppvObject==0) ) + TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject); + + if (!ppvObject) return E_INVALIDARG; *ppvObject = 0; diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 837365bdb9d..f1706da72fb 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -269,14 +269,9 @@ static void IEnumSTATSTGImpl_Destroy(IEnumSTATSTGImpl* This); ** Block Functions */ -static ULONG BLOCK_GetBigBlockOffset(ULONG index) +static ULONG StorageImpl_GetBigBlockOffset(StorageImpl* This, ULONG index) { - if (index == 0xffffffff) - index = 0; - else - index ++; - - return index * BIG_BLOCK_SIZE; + return (index+1) * This->bigBlockSize; } /************************************************************************ @@ -1599,11 +1594,15 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo( SNB snbExclude, /* [unique][in] */ IStorage* pstgDest) /* [unique][in] */ { + StorageBaseImpl* const This=(StorageBaseImpl*)iface; + IEnumSTATSTG *elements = 0; STATSTG curElement, strStat; HRESULT hr; IStorage *pstgTmp, *pstgChild; IStream *pstrTmp, *pstrChild; + DirRef srcEntryRef; + DirEntry srcEntry; BOOL skip = FALSE, skip_storage = FALSE, skip_stream = FALSE; int i; @@ -1728,11 +1727,25 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo( goto cleanup; /* - * open child stream storage + * open child stream storage. This operation must succeed even if the + * stream is already open, so we use internal functions to do it. */ - hr = IStorage_OpenStream( iface, curElement.pwcsName, NULL, - STGM_READ|STGM_SHARE_EXCLUSIVE, - 0, &pstrChild ); + srcEntryRef = findElement( This, This->storageDirEntry, curElement.pwcsName, + &srcEntry); + if (!srcEntryRef) + { + ERR("source stream not found\n"); + hr = STG_E_DOCFILECORRUPT; + } + + if (hr == S_OK) + { + pstrChild = (IStream*)StgStreamImpl_Construct(This, STGM_READ|STGM_SHARE_EXCLUSIVE, srcEntryRef); + if (pstrChild) + IStream_AddRef(pstrChild); + else + hr = E_OUTOFMEMORY; + } if (hr == S_OK) { @@ -2626,7 +2639,6 @@ static HRESULT StorageImpl_Construct( This->bigBlockFile = BIGBLOCKFILE_Construct(hFile, pLkbyt, openFlags, - This->bigBlockSize, fileBased); if (This->bigBlockFile == 0) @@ -2638,7 +2650,7 @@ static HRESULT StorageImpl_Construct( if (create) { ULARGE_INTEGER size; - BYTE bigBlockBuffer[BIG_BLOCK_SIZE]; + BYTE bigBlockBuffer[MAX_BIG_BLOCK_SIZE]; /* * Initialize all header variables: @@ -2835,13 +2847,14 @@ static ULONG StorageImpl_GetNextFreeBigBlock( StorageImpl* This) { ULONG depotBlockIndexPos; - BYTE depotBuffer[BIG_BLOCK_SIZE]; + BYTE depotBuffer[MAX_BIG_BLOCK_SIZE]; BOOL success; ULONG depotBlockOffset; ULONG blocksPerDepot = This->bigBlockSize / sizeof(ULONG); ULONG nextBlockIndex = BLOCK_SPECIAL; int depotIndex = 0; ULONG freeBlock = BLOCK_UNUSED; + ULARGE_INTEGER neededSize; depotIndex = This->prevFreeBlock / blocksPerDepot; depotBlockOffset = (This->prevFreeBlock % blocksPerDepot) * sizeof(ULONG); @@ -2955,7 +2968,8 @@ static ULONG StorageImpl_GetNextFreeBigBlock( /* * make sure that the block physically exists before using it */ - BIGBLOCKFILE_EnsureExists(This->bigBlockFile, freeBlock); + neededSize.QuadPart = StorageImpl_GetBigBlockOffset(This, freeBlock)+This->bigBlockSize; + BIGBLOCKFILE_Expand(This->bigBlockFile, neededSize); This->prevFreeBlock = freeBlock; @@ -2970,7 +2984,7 @@ static ULONG StorageImpl_GetNextFreeBigBlock( */ static void Storage32Impl_AddBlockDepot(StorageImpl* This, ULONG blockIndex) { - BYTE blockBuffer[BIG_BLOCK_SIZE]; + BYTE blockBuffer[MAX_BIG_BLOCK_SIZE]; /* * Initialize blocks as free @@ -3053,7 +3067,7 @@ static ULONG Storage32Impl_AddExtBlockDepot(StorageImpl* This) { ULONG numExtBlocks = This->extBigBlockDepotCount; ULONG nextExtBlock = This->extBigBlockDepotStart; - BYTE depotBuffer[BIG_BLOCK_SIZE]; + BYTE depotBuffer[MAX_BIG_BLOCK_SIZE]; ULONG index = BLOCK_UNUSED; ULONG nextBlockOffset = This->bigBlockSize - sizeof(ULONG); ULONG blocksPerDepotBlock = This->bigBlockSize / sizeof(ULONG); @@ -3143,10 +3157,10 @@ static HRESULT StorageImpl_GetNextBlockInChain( ULONG offsetInDepot = blockIndex * sizeof (ULONG); ULONG depotBlockCount = offsetInDepot / This->bigBlockSize; ULONG depotBlockOffset = offsetInDepot % This->bigBlockSize; - BYTE depotBuffer[BIG_BLOCK_SIZE]; + BYTE depotBuffer[MAX_BIG_BLOCK_SIZE]; BOOL success; ULONG depotBlockIndexPos; - int index; + int index, num_blocks; *nextBlockIndex = BLOCK_SPECIAL; @@ -3181,7 +3195,9 @@ static HRESULT StorageImpl_GetNextBlockInChain( if (!success) return STG_E_READFAULT; - for (index = 0; index < NUM_BLOCKS_PER_DEPOT_BLOCK; index++) + num_blocks = This->bigBlockSize / 4; + + for (index = 0; index < num_blocks; index++) { StorageUtl_ReadDWord(depotBuffer, index*sizeof(ULONG), nextBlockIndex); This->blockDepotCached[index] = *nextBlockIndex; @@ -3272,26 +3288,31 @@ static void StorageImpl_SetNextBlockInChain( /****************************************************************************** * Storage32Impl_LoadFileHeader * - * This method will read in the file header, i.e. big block index -1. + * This method will read in the file header */ static HRESULT StorageImpl_LoadFileHeader( StorageImpl* This) { - HRESULT hr = STG_E_FILENOTFOUND; - BYTE headerBigBlock[BIG_BLOCK_SIZE]; - BOOL success; + HRESULT hr; + BYTE headerBigBlock[HEADER_SIZE]; int index; + ULARGE_INTEGER offset; + DWORD bytes_read; TRACE("\n"); /* * Get a pointer to the big block of data containing the header. */ - success = StorageImpl_ReadBigBlock(This, -1, headerBigBlock); + offset.u.HighPart = 0; + offset.u.LowPart = 0; + hr = StorageImpl_ReadAt(This, offset, headerBigBlock, HEADER_SIZE, &bytes_read); + if (SUCCEEDED(hr) && bytes_read != HEADER_SIZE) + hr = STG_E_FILENOTFOUND; /* * Extract the information from the header. */ - if (success) + if (SUCCEEDED(hr)) { /* * Check for the "magic number" signature and return an error if it is not @@ -3360,7 +3381,7 @@ static HRESULT StorageImpl_LoadFileHeader( * Right now, the code is making some assumptions about the size of the * blocks, just make sure they are what we're expecting. */ - if (This->bigBlockSize != DEF_BIG_BLOCK_SIZE || + if ((This->bigBlockSize != MIN_BIG_BLOCK_SIZE && This->bigBlockSize != MAX_BIG_BLOCK_SIZE) || This->smallBlockSize != DEF_SMALL_BLOCK_SIZE) { WARN("Broken OLE storage file\n"); @@ -3376,29 +3397,35 @@ static HRESULT StorageImpl_LoadFileHeader( /****************************************************************************** * Storage32Impl_SaveFileHeader * - * This method will save to the file the header, i.e. big block -1. + * This method will save to the file the header */ static void StorageImpl_SaveFileHeader( StorageImpl* This) { - BYTE headerBigBlock[BIG_BLOCK_SIZE]; + BYTE headerBigBlock[HEADER_SIZE]; int index; - BOOL success; + HRESULT hr; + ULARGE_INTEGER offset; + DWORD bytes_read, bytes_written; /* * Get a pointer to the big block of data containing the header. */ - success = StorageImpl_ReadBigBlock(This, -1, headerBigBlock); + offset.u.HighPart = 0; + offset.u.LowPart = 0; + hr = StorageImpl_ReadAt(This, offset, headerBigBlock, HEADER_SIZE, &bytes_read); + if (SUCCEEDED(hr) && bytes_read != HEADER_SIZE) + hr = STG_E_FILENOTFOUND; /* * If the block read failed, the file is probably new. */ - if (!success) + if (FAILED(hr)) { /* * Initialize for all unknown fields. */ - memset(headerBigBlock, 0, BIG_BLOCK_SIZE); + memset(headerBigBlock, 0, HEADER_SIZE); /* * Initialize the magic number. @@ -3469,7 +3496,7 @@ static void StorageImpl_SaveFileHeader( /* * Write the big block back to the file. */ - StorageImpl_WriteBigBlock(This, -1, headerBigBlock); + StorageImpl_WriteAt(This, offset, headerBigBlock, HEADER_SIZE, &bytes_written); } /****************************************************************************** @@ -3711,7 +3738,7 @@ static BOOL StorageImpl_ReadBigBlock( DWORD read; ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = BLOCK_GetBigBlockOffset(blockIndex); + ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); StorageImpl_ReadAt(This, ulOffset, buffer, This->bigBlockSize, &read); return (read == This->bigBlockSize); @@ -3728,7 +3755,7 @@ static BOOL StorageImpl_ReadDWordFromBigBlock( DWORD tmp; ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = BLOCK_GetBigBlockOffset(blockIndex); + ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); ulOffset.u.LowPart += offset; StorageImpl_ReadAt(This, ulOffset, &tmp, sizeof(DWORD), &read); @@ -3745,7 +3772,7 @@ static BOOL StorageImpl_WriteBigBlock( DWORD wrote; ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = BLOCK_GetBigBlockOffset(blockIndex); + ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); StorageImpl_WriteAt(This, ulOffset, buffer, This->bigBlockSize, &wrote); return (wrote == This->bigBlockSize); @@ -3761,7 +3788,7 @@ static BOOL StorageImpl_WriteDWordToBigBlock( DWORD wrote; ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = BLOCK_GetBigBlockOffset(blockIndex); + ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); ulOffset.u.LowPart += offset; value = htole32(value); @@ -5151,7 +5178,7 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This, TRACE("block %i\n",blockIndex); ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = BLOCK_GetBigBlockOffset(blockIndex) + + ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This->parentStorage, blockIndex) + offsetInBlock; StorageImpl_ReadAt(This->parentStorage, @@ -5247,7 +5274,7 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This, TRACE("block %i\n",blockIndex); ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = BLOCK_GetBigBlockOffset(blockIndex) + + ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This->parentStorage, blockIndex) + offsetInBlock; StorageImpl_WriteAt(This->parentStorage, @@ -5721,7 +5748,7 @@ static ULONG SmallBlockChainStream_GetNextFreeBlock( ULONG sbdIndex = This->parentStorage->smallBlockDepotStart; ULONG nextBlock, newsbdIndex; - BYTE smallBlockDepot[BIG_BLOCK_SIZE]; + BYTE smallBlockDepot[MAX_BIG_BLOCK_SIZE]; nextBlock = sbdIndex; while (nextBlock != BLOCK_END_OF_CHAIN) diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 03328b29708..fad5d7766f7 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -79,6 +79,11 @@ static const ULONG DIRENTRY_NULL = 0xFFFFFFFF; #define RAW_DIRENTRY_SIZE 0x00000080 +#define HEADER_SIZE 512 + +#define MIN_BIG_BLOCK_SIZE 0x200 +#define MAX_BIG_BLOCK_SIZE 0x1000 + /* * Type of child entry link */ @@ -91,15 +96,8 @@ static const ULONG DIRENTRY_NULL = 0xFFFFFFFF; */ #define STGTY_ROOT 0x05 -/* - * These defines assume a hardcoded blocksize. The code will assert - * if the blocksize is different. Some changes will have to be done if it - * becomes the case. - */ -#define BIG_BLOCK_SIZE 0x200 #define COUNT_BBDEPOTINHEADER 109 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000 -#define NUM_BLOCKS_PER_DEPOT_BLOCK 128 #define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f) #define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0) @@ -163,10 +161,9 @@ typedef struct BigBlockFile BigBlockFile,*LPBIGBLOCKFILE; BigBlockFile* BIGBLOCKFILE_Construct(HANDLE hFile, ILockBytes* pLkByt, DWORD openFlags, - ULONG blocksize, BOOL fileBased); void BIGBLOCKFILE_Destructor(LPBIGBLOCKFILE This); -HRESULT BIGBLOCKFILE_EnsureExists(LPBIGBLOCKFILE This, ULONG index); +HRESULT BIGBLOCKFILE_Expand(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize); HRESULT BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize); HRESULT BIGBLOCKFILE_ReadAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset, void* buffer, ULONG size, ULONG* bytesRead); @@ -359,7 +356,7 @@ struct StorageImpl ULONG extBigBlockDepotCount; ULONG bigBlockDepotStart[COUNT_BBDEPOTINHEADER]; - ULONG blockDepotCached[NUM_BLOCKS_PER_DEPOT_BLOCK]; + ULONG blockDepotCached[MAX_BIG_BLOCK_SIZE / 4]; ULONG indexBlockDepotCached; ULONG prevFreeBlock; diff --git a/dlls/ole32/tests/Makefile.in b/dlls/ole32/tests/Makefile.in index 3348f4d69e2..ea71048d938 100644 --- a/dlls/ole32/tests/Makefile.in +++ b/dlls/ole32/tests/Makefile.in @@ -21,5 +21,3 @@ C_SRCS = \ usrmarshal.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 7568a0ceafa..8fa1afdaca7 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -2750,7 +2750,7 @@ static void test_copyto_locking(void) /* Try to copy the storage while the stream is open */ r = IStorage_CopyTo(stg2, 0, NULL, NULL, stg3); - todo_wine ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); IStream_Release(stm); diff --git a/dlls/oleacc/Makefile.in b/dlls/oleacc/Makefile.in index 1aca0cf7495..6ac62c07884 100644 --- a/dlls/oleacc/Makefile.in +++ b/dlls/oleacc/Makefile.in @@ -22,5 +22,3 @@ RC_SRCS = \ oleacc_Ro.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleacc/tests/Makefile.in b/dlls/oleacc/tests/Makefile.in index 2e80aaeb9cf..0e5f85c1ec1 100644 --- a/dlls/oleacc/tests/Makefile.in +++ b/dlls/oleacc/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleaut32/Makefile.in b/dlls/oleaut32/Makefile.in index e1d2f67cf1e..96aa6799ab1 100644 --- a/dlls/oleaut32/Makefile.in +++ b/dlls/oleaut32/Makefile.in @@ -64,5 +64,3 @@ IDL_P_SRCS = \ EXTRA_OBJS = dlldata.o @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleaut32/tests/Makefile.in b/dlls/oleaut32/tests/Makefile.in index 657d42c706f..737e1c147a2 100644 --- a/dlls/oleaut32/tests/Makefile.in +++ b/dlls/oleaut32/tests/Makefile.in @@ -26,5 +26,3 @@ IDL_TLB_SRCS = \ tmarshal.idl @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 33adf3c6597..64b6633a9a2 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -594,6 +594,15 @@ static HRESULT WINAPI Widget_ByRefUInt( return S_OK; } +static HRESULT WINAPI Widget_put_prop_opt_arg( + IWidget* iface, INT opt, INT i) +{ + trace("put_prop_opt_arg(%08x, %08x)\n", opt, i); + todo_wine ok(opt == 0, "got opt=%08x\n", opt); + ok(i == 0xcafe, "got i=%08x\n", i); + return S_OK; +} + static const struct IWidgetVtbl Widget_VTable = { Widget_QueryInterface, @@ -627,6 +636,7 @@ static const struct IWidgetVtbl Widget_VTable = Widget_get_prop_int, Widget_get_prop_uint, Widget_ByRefUInt, + Widget_put_prop_opt_arg, }; static HRESULT WINAPI StaticWidget_QueryInterface(IStaticWidget *iface, REFIID riid, void **ppvObject) @@ -1387,6 +1397,19 @@ static void test_typelibmarshal(void) VariantClear(&varresult); VariantClear(&vararg[0]); + /* test propput with optional argument. */ + VariantInit(&vararg[0]); + V_VT(&vararg[0]) = VT_I4; + V_I4(&vararg[0]) = 0xcafe; + dispparams.cNamedArgs = 1; + dispparams.rgdispidNamedArgs = &dispidNamed; + dispparams.cArgs = 1; + dispparams.rgvarg = vararg; + VariantInit(&varresult); + hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_OPT_ARG, &IID_NULL, 0x40c, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); + ok_ole_success(hr, ITypeInfo_Invoke); + VariantClear(&varresult); + IDispatch_Release(pDispatch); IWidget_Release(pWidget); diff --git a/dlls/oleaut32/tests/tmarshal.idl b/dlls/oleaut32/tests/tmarshal.idl index 5dc3a128b0c..077fb59f77e 100644 --- a/dlls/oleaut32/tests/tmarshal.idl +++ b/dlls/oleaut32/tests/tmarshal.idl @@ -140,6 +140,9 @@ library TestTypelib [id(DISPID_TM_BYREF_UINT)] HRESULT ByRefUInt([in, out] UINT *i); + + [id(DISPID_TM_PROP_OPT_ARG), propput] + HRESULT prop_opt_arg([in,optional] INT opt, [in] INT i); } [ diff --git a/dlls/oleaut32/tests/tmarshal_dispids.h b/dlls/oleaut32/tests/tmarshal_dispids.h index ad8ba1b8dfa..a4f467ed6f7 100644 --- a/dlls/oleaut32/tests/tmarshal_dispids.h +++ b/dlls/oleaut32/tests/tmarshal_dispids.h @@ -38,6 +38,7 @@ #define DISPID_TM_PROP_INT 19 #define DISPID_TM_PROP_UINT 20 #define DISPID_TM_BYREF_UINT 21 +#define DISPID_TM_PROP_OPT_ARG 22 #define DISPID_NOA_BSTRRET 1 #define DISPID_NOA_ERROR 2 diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 5aee88d9217..8a8766a82d2 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -150,7 +150,7 @@ static void test_TypeComp(void) /* test getting a function within a TKIND_MODULE with INVOKE_PROPERTYGET */ ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture); hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); - todo_wine ok(hr == TYPE_E_TYPEMISMATCH, + ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", hr); @@ -988,7 +988,7 @@ static void test_CreateTypeLib(void) { ICreateTypeLib2 *createtl; ICreateTypeInfo *createti; ITypeLib *tl, *stdole; - ITypeInfo *interface1, *interface2, *unknown, *dispatch, *ti; + ITypeInfo *interface1, *interface2, *dual, *unknown, *dispatch, *ti; FUNCDESC funcdesc; ELEMDESC elemdesc[5]; PARAMDESCEX paramdescex; @@ -1076,6 +1076,10 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); ok(hres == S_OK, "got %08x\n", hres); + if(hres != S_OK) { + skip("Skipping some tests\n"); + return; + } hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); @@ -1087,6 +1091,9 @@ static void test_CreateTypeLib(void) { ok(hres == S_OK, "got %08x\n", hres); ok(hreftype == 3, "hreftype = %d\n", hreftype); + hres = ITypeInfo_GetRefTypeOfImplType(interface1, -1, &hreftype); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + memset(&funcdesc, 0, sizeof(FUNCDESC)); funcdesc.funckind = FUNC_PUREVIRTUAL; funcdesc.invkind = INVOKE_PROPERTYGET; @@ -1103,6 +1110,9 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); + ok(hres == S_OK, "got %08x\n", hres); + funcdesc.invkind = INVOKE_PROPERTYPUT; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); @@ -1123,10 +1133,19 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); + ok(hres == S_OK, "got %08x\n", hres); + funcdesc.invkind = INVOKE_PROPERTYPUTREF; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); + ok(hres == S_OK, "got %08x\n", hres); + + hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0x201); + ok(hres == S_OK, "got %08x\n", hres); + funcdesc.memid = 1; funcdesc.lprgelemdescParam = NULL; funcdesc.invkind = INVOKE_FUNC; @@ -1237,6 +1256,9 @@ static void test_CreateTypeLib(void) { ok(hres == S_OK, "got %08x\n", hres); ok(hreftype == 2, "hreftype = %d\n", hreftype); + hres = ITypeInfo_GetRefTypeOfImplType(interface2, -1, &hreftype); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); ok(hres == TYPE_E_BADMODULEKIND, "got %08x\n", hres); @@ -1247,6 +1269,14 @@ static void test_CreateTypeLib(void) { hres = ITypeInfo_GetImplTypeFlags(interface2, 1, &impltypeflags); ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + funcdesc.oVft = 0xaaac; + hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); + ok(hres == S_OK, "got %08x\n", hres); + funcdesc.oVft = 0xaaa8; + hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); + ok(hres == S_OK, "got %08x\n", hres); + funcdesc.oVft = 0; + ICreateTypeInfo_Release(createti); hres = ICreateTypeLib_CreateTypeInfo(createtl, coclassW, TKIND_COCLASS, &createti); @@ -1309,6 +1339,9 @@ static void test_CreateTypeLib(void) { ok(hres == S_OK, "got %08x\n", hres); ok(hreftype == 1, "hreftype = %d\n", hreftype); + hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ITypeInfo_Release(ti); ICreateTypeInfo_Release(createti); @@ -1316,25 +1349,53 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeLib_CreateTypeInfo(createtl, dualW, TKIND_INTERFACE, &createti); ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FDUAL); + ok(hres == S_OK, "got %08x\n", hres); + + hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); + ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeInfo_AddRefTypeInfo(createti, dispatch, &hreftype); ok(hres == S_OK, "got %08x\n", hres); hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); ok(hres == S_OK, "got %08x\n", hres); - hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&ti); + hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&dual); ok(hres == S_OK, "got %08x\n", hres); - hres = ITypeInfo_GetTypeAttr(ti, &typeattr); + hres = ITypeInfo_GetTypeAttr(dual, &typeattr); ok(hres == S_OK, "got %08x\n", hres); ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); ok(typeattr->typekind == 3, "typekind = %d\n", typeattr->typekind); - ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); + ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); + ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); + ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); + ok(typeattr->cbSizeVft == 32, "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); + ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); + ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); + ok(typeattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", typeattr->wMinorVerNum); + + ITypeInfo_ReleaseTypeAttr(dual, typeattr); + + hres = ITypeInfo_GetRefTypeOfImplType(dual, -1, &hreftype); + ok(hres == S_OK, "got %08x\n", hres); + ok(hreftype == -2, "got %08x\n", hreftype); + + hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti); + ok(hres == S_OK, "got %08x\n", hres); + + hres = ITypeInfo_GetTypeAttr(ti, &typeattr); + ok(hres == S_OK, "got %08x\n", hres); + ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(typeattr->typekind == 4, "typekind = %d\n", typeattr->typekind); + ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); ok(typeattr->cbSizeVft == 28, "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); - ok(typeattr->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "wTypeFlags = %d\n", typeattr->wTypeFlags); + ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); ok(typeattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", typeattr->wMinorVerNum); @@ -1363,10 +1424,10 @@ static void test_CreateTypeLib(void) { ok(hres == S_OK, "got %08x\n", hres); ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); ok(typeattr->typekind == 3, "typekind = %d\n", typeattr->typekind); - ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); + ok(typeattr->cFuncs == 2, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 56, "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 43696, "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); @@ -1376,18 +1437,19 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeLib2_SaveAllChanges(createtl); ok(hres == S_OK, "got %08x\n", hres); - ICreateTypeLib2_Release(createtl); - hres = LoadTypeLib(filenameW, &tl); - ok(hres == S_OK, "got %08x\n", hres); + ok(ITypeInfo_Release(interface2)==0, "Object should be freed\n"); + ok(ITypeInfo_Release(interface1)==0, "Object should be freed\n"); + ok(ITypeInfo_Release(dual)==0, "Object should be freed\n"); + ok(ICreateTypeLib2_Release(createtl)==0, "Object should be freed\n"); - ITypeInfo_Release(interface2); - ITypeInfo_Release(interface1); - ITypeInfo_Release(dispatch); - ITypeInfo_Release(unknown); + ok(ITypeInfo_Release(dispatch)==0, "Object should be freed\n"); + ok(ITypeInfo_Release(unknown)==0, "Object should be freed\n"); + ok(ITypeLib_Release(stdole)==0, "Object should be freed\n"); - ITypeLib_Release(tl); - ITypeLib_Release(stdole); + hres = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); + ok(hres == S_OK, "got %08x\n", hres); + ok(ITypeLib_Release(tl)==0, "Object should be freed\n"); DeleteFileA(filename); } diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 79b6b9312fe..b973a549b06 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -5238,10 +5238,8 @@ static void test_SysAllocStringLen(void) if (0) { str = SysAllocStringLen(szTest, 0x80000000); - todo_wine { ok (str == NULL, "Expected NULL, got %p\n", str); } - } str = SysAllocStringLen(NULL, 0); ok (str != NULL, "Expected non-NULL\n"); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 445eac5c51e..b09f7ab64d1 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4722,6 +4722,7 @@ static HRESULT WINAPI ITypeLibComp_fnBind( { ITypeLibImpl *This = impl_from_ITypeComp(iface); ITypeInfoImpl *pTypeInfo; + int typemismatch=0; TRACE("(%s, 0x%x, 0x%x, %p, %p, %p)\n", debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr); @@ -4761,6 +4762,8 @@ static HRESULT WINAPI ITypeLibComp_fnBind( TRACE("found in module or in enum: %s\n", debugstr_w(szName)); return S_OK; } + else if (hr == TYPE_E_TYPEMISMATCH) + typemismatch = 1; } if ((pTypeInfo->TypeAttr.typekind == TKIND_COCLASS) && @@ -4833,11 +4836,21 @@ static HRESULT WINAPI ITypeLibComp_fnBind( ITypeInfo_AddRef(*ppTInfo); return S_OK; } + else if (hr == TYPE_E_TYPEMISMATCH) + typemismatch = 1; } } - TRACE("name not found %s\n", debugstr_w(szName)); - return S_OK; + if (typemismatch) + { + TRACE("type mismatch %s\n", debugstr_w(szName)); + return TYPE_E_TYPEMISMATCH; + } + else + { + TRACE("name not found %s\n", debugstr_w(szName)); + return S_OK; + } } static HRESULT WINAPI ITypeLibComp_fnBindType( @@ -5568,6 +5581,11 @@ static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( ITypeInfo2 *iface, return S_OK; } *pImplTypeFlags=0; + + if(This->TypeAttr.typekind==TKIND_DISPATCH && !index) + return S_OK; + + WARN("ImplType %d not found\n", index); return TYPE_E_ELEMENTNOTFOUND; } @@ -6052,9 +6070,6 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( hres = DISP_E_PARAMNOTFOUND; goto func_fail; } - /* ignore the DISPID_PROPERTYPUT named argument from now on */ - cNamedArgs--; - rgdispidNamedArgs++; } if (func_desc->cParamsOpt < 0 && cNamedArgs) @@ -6092,7 +6107,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( USHORT j; src_arg = NULL; for (j = 0; j < cNamedArgs; j++) - if (rgdispidNamedArgs[j] == i) + if (rgdispidNamedArgs[j] == i || (i == func_desc->cParams-1 && rgdispidNamedArgs[j] == DISPID_PROPERTYPUT)) { src_arg = &pDispParams->rgvarg[j]; break; @@ -6859,7 +6874,8 @@ static HRESULT WINAPI ITypeInfo_fnGetMops( ITypeInfo2 *iface, MEMBERID memid, BSTR *pBstrMops) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - FIXME("(%p) stub!\n", This); + FIXME("(%p %d) stub!\n", This, memid); + *pBstrMops = NULL; return S_OK; } diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 4544317a512..6b1aea062ba 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -199,9 +199,11 @@ typedef struct tagICreateTypeInfo2Impl struct tagCyclicList *typedata; /* tail of cyclic list */ + TYPEKIND typekind; int datawidth; struct tagICreateTypeInfo2Impl *next_typeinfo; + struct tagICreateTypeInfo2Impl *dual; } ICreateTypeInfo2Impl; static inline ICreateTypeInfo2Impl *impl_from_ITypeInfo2( ITypeInfo2 *iface ) @@ -1177,6 +1179,7 @@ static HRESULT ctl2_add_default_value( { VARIANT v; HRESULT hres; + int mask = 0; TRACE("%p %d %d\n", This, V_VT(value), arg_type); @@ -1194,7 +1197,6 @@ static HRESULT ctl2_add_default_value( /* Check if default value can be stored in encoded_value */ switch(arg_type) { - int mask = 0; case VT_I4: case VT_UI4: mask = 0x3ffffff; @@ -1313,7 +1315,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnQueryInterface( if(*ppvObject) { - ICreateTypeLib2_AddRef(iface); + ICreateTypeInfo2_AddRef(iface); TRACE("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject); return S_OK; } @@ -1333,6 +1335,9 @@ static ULONG WINAPI ICreateTypeInfo2_fnAddRef(ICreateTypeInfo2 *iface) TRACE("(%p)->ref was %u\n",This, ref - 1); + if(ref==1 && This->typelib) + ICreateTypeLib2_AddRef((ICreateTypeLib2 *)This->typelib); + return ref; } @@ -1406,43 +1411,63 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U TRACE("(%p,0x%x)\n", iface, uTypeFlags); - This->typeinfo->flags = uTypeFlags; + if(uTypeFlags & TYPEFLAG_FDUAL) { + This->typeinfo->typekind |= 0x10; + This->typeinfo->typekind &= ~0x0f; + This->typeinfo->typekind |= TKIND_DISPATCH; + + if(!This->dual) { + This->dual = HeapAlloc(GetProcessHeap(), 0, sizeof(ICreateTypeInfo2Impl)); + if(!This->dual) + return E_OUTOFMEMORY; + + memcpy(This->dual, This, sizeof(ICreateTypeInfo2Impl)); + This->dual->ref = 0; + This->dual->typekind = This->typekind==TKIND_DISPATCH ? + TKIND_INTERFACE : TKIND_DISPATCH; + This->dual->dual = This; + } + + /* Make sure dispatch is in typeinfos queue */ + if(This->typekind != TKIND_DISPATCH) { + if(This->typelib->last_typeinfo == This) + This->typelib->last_typeinfo = This->dual; + + if(This->typelib->typeinfos == This) + This->typelib->typeinfos = This->dual; + else { + ICreateTypeInfo2Impl *iter; + + for(iter=This->typelib->typeinfos; iter->next_typeinfo!=This; iter=iter->next_typeinfo); + iter->next_typeinfo = This->dual; + } + } else + iface = (ICreateTypeInfo2*)&This->dual->lpVtbl; + } + + if (uTypeFlags & (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL)) { + static const WCHAR stdole2tlb[] = { 's','t','d','o','l','e','2','.','t','l','b',0 }; + ITypeLib *stdole; + ITypeInfo *dispatch; + HREFTYPE hreftype; + HRESULT hres; + + hres = LoadTypeLib(stdole2tlb, &stdole); + if(FAILED(hres)) + return hres; + + hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &dispatch); + ITypeLib_Release(stdole); + if(FAILED(hres)) + return hres; - if (uTypeFlags & TYPEFLAG_FDISPATCHABLE) { - MSFT_GuidEntry foo; - int guidoffset; - int fileoffset; - MSFT_ImpInfo impinfo; - static const WCHAR stdole2tlb[] = { 's','t','d','o','l','e','2','.','t','l','b',0 }; - - foo.guid = IID_StdOle; - foo.hreftype = 2; - foo.next_hash = -1; - guidoffset = ctl2_alloc_guid(This->typelib, &foo); - if (guidoffset == -1) return E_OUTOFMEMORY; - - fileoffset = ctl2_alloc_importfile(This->typelib, guidoffset, - This->typelib->typelib_header.lcid2, 2, 0, stdole2tlb); - if (fileoffset == -1) return E_OUTOFMEMORY; - - foo.guid = IID_IDispatch; - foo.hreftype = 1; - foo.next_hash = -1; - guidoffset = ctl2_alloc_guid(This->typelib, &foo); - if (guidoffset == -1) return E_OUTOFMEMORY; - - impinfo.flags = TKIND_INTERFACE << 24 | MSFT_IMPINFO_OFFSET_IS_GUID; - impinfo.oImpFile = fileoffset; - impinfo.oGuid = guidoffset; - ctl2_alloc_importinfo(This->typelib, &impinfo); - - This->typelib->typelib_header.dispatchpos = 1; - - This->typeinfo->typekind |= 0x10; - This->typeinfo->typekind &= ~0x0f; - This->typeinfo->typekind |= TKIND_DISPATCH; + hres = ICreateTypeInfo2_AddRefTypeInfo(iface, dispatch, &hreftype); + ITypeInfo_Release(dispatch); + if(FAILED(hres)) + return hres; } + This->typeinfo->flags = uTypeFlags; return S_OK; } @@ -1541,25 +1566,21 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo( /* Process locally defined TypeInfo */ *phRefType = This->typelib->typelib_typeinfo_offsets[index]; } else { - static const WCHAR regkey[] = {'T','y','p','e','L','i','b','\\','{', - '%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%', - '0','2','x','%','0','2','x','-','%','0','2','x','%','0','2','x', - '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x', - '}','\\','%','d','.','%','d','\\','0','\\','w','i','n','3','2',0}; - - WCHAR name[MAX_PATH], *p; + BSTR name; TLIBATTR *tlibattr; TYPEATTR *typeattr; + TYPEKIND typekind; MSFT_GuidEntry guid, *check_guid; MSFT_ImpInfo impinfo; int guid_offset, import_offset; - DWORD len; HRESULT hres; /* Allocate container GUID */ hres = ITypeLib_GetLibAttr(container, &tlibattr); - if(FAILED(hres)) + if(FAILED(hres)) { + ITypeLib_Release(container); return hres; + } guid.guid = tlibattr->guid; guid.hreftype = This->typelib->typelib_guids*12+2; @@ -1568,6 +1589,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo( guid_offset = ctl2_alloc_guid(This->typelib, &guid); if(guid_offset == -1) { ITypeLib_ReleaseTLibAttr(container, tlibattr); + ITypeLib_Release(container); return E_OUTOFMEMORY; } @@ -1576,50 +1598,50 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo( This->typelib->typelib_guids++; /* Get import file name */ - /* Check HKEY_CLASSES_ROOT\TypeLib\{GUID}\{Ver}\0\win32 */ - len = MAX_PATH; - sprintfW(name, regkey, guid.guid.Data1, guid.guid.Data2, - guid.guid.Data3, guid.guid.Data4[0], guid.guid.Data4[1], - guid.guid.Data4[2], guid.guid.Data4[3], guid.guid.Data4[4], - guid.guid.Data4[5], guid.guid.Data4[6], guid.guid.Data4[7], - tlibattr->wMajorVerNum, tlibattr->wMinorVerNum); - - if(RegGetValueW(HKEY_CLASSES_ROOT, name, NULL, RRF_RT_REG_SZ, NULL, name, &len)!=ERROR_SUCCESS - || (p=strrchrW(name, '\\'))==NULL) { - ERR("Error guessing typelib filename\n"); + hres = QueryPathOfRegTypeLib(&guid.guid, tlibattr->wMajorVerNum, + tlibattr->wMinorVerNum, tlibattr->lcid, &name); + if(FAILED(hres)) { ITypeLib_ReleaseTLibAttr(container, tlibattr); - return E_NOTIMPL; + ITypeLib_Release(container); + return hres; } - memmove(name, p+1, strlenW(p)*sizeof(WCHAR)); /* Import file */ - import_offset = ctl2_alloc_importfile(This->typelib, guid_offset, - tlibattr->lcid, tlibattr->wMajorVerNum, tlibattr->wMinorVerNum, name); + import_offset = ctl2_alloc_importfile(This->typelib, guid_offset, tlibattr->lcid, + tlibattr->wMajorVerNum, tlibattr->wMinorVerNum, strrchrW(name, '\\')+1); ITypeLib_ReleaseTLibAttr(container, tlibattr); + SysFreeString(name); - if(import_offset == -1) + if(import_offset == -1) { + ITypeLib_Release(container); return E_OUTOFMEMORY; + } /* Allocate referenced guid */ hres = ITypeInfo_GetTypeAttr(pTInfo, &typeattr); - if(FAILED(hres)) + if(FAILED(hres)) { + ITypeLib_Release(container); return hres; + } guid.guid = typeattr->guid; guid.hreftype = This->typelib->typeinfo_guids*12+1; guid.next_hash = -1; + typekind = typeattr->typekind; ITypeInfo_ReleaseTypeAttr(pTInfo, typeattr); guid_offset = ctl2_alloc_guid(This->typelib, &guid); - if(guid_offset == -1) + if(guid_offset == -1) { + ITypeLib_Release(container); return E_OUTOFMEMORY; + } check_guid = (MSFT_GuidEntry*)&This->typelib->typelib_segment_data[MSFT_SEG_GUID][guid_offset]; if(check_guid->hreftype == guid.hreftype) This->typelib->typeinfo_guids++; /* Allocate importinfo */ - impinfo.flags = ((This->typeinfo->typekind&0xf)<<24) | MSFT_IMPINFO_OFFSET_IS_GUID; + impinfo.flags = (typekind<<24) | MSFT_IMPINFO_OFFSET_IS_GUID; impinfo.oImpFile = import_offset; impinfo.oGuid = guid_offset; *phRefType = ctl2_alloc_importinfo(This->typelib, &impinfo)+1; @@ -1652,7 +1674,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( TRACE("(%p,%d,%p)\n", iface, index, pFuncDesc); - if(!pFuncDesc || (pFuncDesc->memid>0x7fffffff && pFuncDesc->memid!=MEMBERID_NIL)) + if(!pFuncDesc || pFuncDesc->oVft&3) return E_INVALIDARG; TRACE("{%d,%p,%p,%d,%d,%d,%d,%d,%d,%d,{%d},%d}\n", pFuncDesc->memid, @@ -1661,7 +1683,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( pFuncDesc->cParamsOpt, pFuncDesc->oVft, pFuncDesc->cScodes, pFuncDesc->elemdescFunc.tdesc.vt, pFuncDesc->wFuncFlags); - switch(This->typeinfo->typekind&0xf) { + if(pFuncDesc->cParamsOpt || pFuncDesc->cScodes) + FIXME("Unimplemented parameter - created typelib will be incorrect\n"); + + switch(This->typekind) { case TKIND_MODULE: if(pFuncDesc->funckind != FUNC_STATIC) return TYPE_E_BADMODULEKIND; @@ -1688,12 +1713,15 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( num_defaults++; if (!This->typedata) { - This->typedata = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); + This->typedata = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); if(!This->typedata) return E_OUTOFMEMORY; This->typedata->next = This->typedata; - This->typedata->u.val = 0; + This->typedata->u.val = 0; + + if(This->dual) + This->dual->typedata = This->typedata; } /* allocate type data space for us */ @@ -1711,7 +1739,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( typedata[0] = 0x18 + pFuncDesc->cParams*(num_defaults?16:12); ctl2_encode_typedesc(This->typelib, &pFuncDesc->elemdescFunc.tdesc, &typedata[1], NULL, NULL, &decoded_size); typedata[2] = pFuncDesc->wFuncFlags; - typedata[3] = ((sizeof(FUNCDESC) + decoded_size) << 16) | This->typeinfo->cbSizeVft; + typedata[3] = ((sizeof(FUNCDESC) + decoded_size) << 16) | (unsigned short)(pFuncDesc->oVft?pFuncDesc->oVft+1:0); typedata[4] = (pFuncDesc->callconv << 8) | (pFuncDesc->invkind << 3) | pFuncDesc->funckind; if(num_defaults) typedata[4] |= 0x1000; typedata[5] = pFuncDesc->cParams; @@ -1758,6 +1786,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( insert->next = This->typedata->next; This->typedata->next = insert; This->typedata = insert; + + if(This->dual) + This->dual->typedata = This->typedata; } else { iter = This->typedata->next; for(i=0; itypeinfo->typekind & 15) == TKIND_COCLASS) { + if (This->typekind == TKIND_COCLASS) { int offset; MSFT_RefRecord *ref; @@ -1822,21 +1853,26 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddImplType( ref->flags = 0; ref->oCustData = -1; ref->onext = -1; - } else if ((This->typeinfo->typekind & 15) == TKIND_DISPATCH) { - FIXME("dispatch case unhandled.\n"); - } else if ((This->typeinfo->typekind & 15) == TKIND_INTERFACE) { + This->typeinfo->cImplTypes++; + } else if (This->typekind == TKIND_INTERFACE) { if (This->typeinfo->cImplTypes && index==1) return TYPE_E_BADMODULEKIND; if( index != 0) return TYPE_E_ELEMENTNOTFOUND; This->typeinfo->datatype1 = hRefType; + This->typeinfo->cImplTypes = 1; + } else if (This->typekind == TKIND_DISPATCH) { + if(index != 0) return TYPE_E_ELEMENTNOTFOUND; + + /* FIXME: Check if referenced typeinfo is IDispatch */ + This->typeinfo->flags |= TYPEFLAG_FDISPATCHABLE; + This->typeinfo->cImplTypes = 1; } else { - FIXME("AddImplType unsupported on typekind %d\n", This->typeinfo->typekind & 15); + FIXME("AddImplType unsupported on typekind %d\n", This->typekind); return E_OUTOFMEMORY; } - This->typeinfo->cImplTypes++; return S_OK; } @@ -1856,7 +1892,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetImplTypeFlags( TRACE("(%p,%d,0x%x)\n", iface, index, implTypeFlags); - if ((This->typeinfo->typekind & 15) != TKIND_COCLASS) { + if (This->typekind != TKIND_COCLASS) { return TYPE_E_BADMODULEKIND; } @@ -1889,7 +1925,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetAlignment( This->typeinfo->typekind |= cbAlignment << 6; /* FIXME: There's probably some way to simplify this. */ - switch (This->typeinfo->typekind & 15) { + switch (This->typekind) { case TKIND_ALIAS: default: break; @@ -1963,6 +1999,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( This->typedata->next = This->typedata; This->typedata->u.val = 0; + + if(This->dual) + This->dual->typedata = This->typedata; } /* allocate type data space for us */ @@ -1979,6 +2018,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( This->typedata->next = insert; This->typedata = insert; + if(This->dual) + This->dual->typedata = This->typedata; + This->typedata->next->u.val += 0x14; typedata = This->typedata->u.data; @@ -2003,6 +2045,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( /* add the new variable to the total data width */ This->datawidth += var_datawidth; + if(This->dual) + This->dual->datawidth = This->datawidth; /* add type description size to total required allocation */ typedata[3] += var_type_size << 16; @@ -2125,7 +2169,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName( *((INT *)namedata) = This->typelib->typelib_typeinfo_offsets[This->typeinfo->typekind >> 16]; namedata[9] |= 0x10; } - if ((This->typeinfo->typekind & 15) == TKIND_ENUM) { + if (This->typekind == TKIND_ENUM) { namedata[9] |= 0x20; } @@ -2151,7 +2195,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeDescAlias( int encoded_typedesc; int width; - if ((This->typeinfo->typekind & 15) != TKIND_ALIAS) { + if (This->typekind != TKIND_ALIAS) { return TYPE_E_WRONGTYPEKIND; } @@ -2225,8 +2269,42 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncHelpContext( UINT index, DWORD dwHelpContext) { - FIXME("(%p,%d,%d), stub!\n", iface, index, dwHelpContext); - return E_OUTOFMEMORY; + ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + CyclicList *func; + int *typedata; + int size; + + TRACE("(%p,%d,%d)\n", iface, index, dwHelpContext); + + if(This->typeinfo->cElementtypeinfo->cElement == index) + func = This->typedata; + else + for(func=This->typedata->next->next; func!=This->typedata; func=func->next) + if(index-- == 0) + break; + + typedata = func->u.data; + + /* Compute func size without arguments */ + size = typedata[0] - typedata[5]*(typedata[4]&0x1000?16:12); + + /* Allocate memory for HelpContext if needed */ + if(size < 7*sizeof(int)) { + typedata = HeapReAlloc(GetProcessHeap(), 0, typedata, typedata[0]+sizeof(int)); + if(!typedata) + return E_OUTOFMEMORY; + + memmove(&typedata[7], &typedata[6], typedata[0]-sizeof(int)*6); + typedata[0] += sizeof(int); + This->typedata->next->u.val += sizeof(int); + func->u.data = typedata; + } + + typedata[6] = dwHelpContext; + return S_OK; } /****************************************************************************** @@ -2282,11 +2360,13 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( CyclicList *iter, *iter2, **typedata; HREFTYPE hreftype; HRESULT hres; + unsigned user_vft = 0; int i; TRACE("(%p)\n", iface); - if((This->typeinfo->typekind&0xf) == TKIND_COCLASS) + /* FIXME: LayOut should be run on all ImplTypes */ + if(This->typekind == TKIND_COCLASS) return S_OK; /* Validate inheritance */ @@ -2317,15 +2397,17 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( return hres; hres = ITypeInfo_GetRefTypeInfo(next, hreftype, &cur); + ITypeInfo_Release(next); if(FAILED(hres)) return hres; - ITypeInfo_Release(next); while(1) { hres = ITypeInfo_GetTypeAttr(cur, &typeattr); - if(FAILED(hres)) + if(FAILED(hres)) { + ITypeInfo_Release(cur); return hres; + } if(!memcmp(&typeattr->guid, &IID_IDispatch, sizeof(IDispatch))) This->typeinfo->flags |= TYPEFLAG_FDISPATCHABLE; @@ -2336,19 +2418,51 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( hres = ITypeInfo_GetRefTypeOfImplType(cur, 0, &hreftype); if(hres == TYPE_E_ELEMENTNOTFOUND) break; - if(FAILED(hres)) + if(FAILED(hres)) { + ITypeInfo_Release(cur); return hres; + } hres = ITypeInfo_GetRefTypeInfo(cur, hreftype, &next); - if(FAILED(hres)) + if(FAILED(hres)) { + ITypeInfo_Release(cur); return hres; + } ITypeInfo_Release(cur); cur = next; } + ITypeInfo_Release(cur); } - This->typeinfo->cbSizeVft = (This->typeinfo->datatype2>>16) * 4; + /* Get cbSizeVft of inherited interface */ + /* Makes LayOut running recursively */ + if(This->typeinfo->datatype1 != -1) { + ITypeInfo *cur, *inherited; + TYPEATTR *typeattr; + + hres = ICreateTypeInfo_QueryInterface(iface, &IID_ITypeInfo, (void**)&cur); + if(FAILED(hres)) + return hres; + + hres = ITypeInfo_GetRefTypeInfo(cur, This->typeinfo->datatype1, &inherited); + ITypeInfo_Release(cur); + if(FAILED(hres)) + return hres; + + hres = ITypeInfo_GetTypeAttr(inherited, &typeattr); + if(FAILED(hres)) { + ITypeInfo_Release(inherited); + return hres; + } + + This->typeinfo->cbSizeVft = typeattr->cbSizeVft; + + ITypeInfo_ReleaseTypeAttr(inherited, typeattr); + ITypeInfo_Release(inherited); + } else + This->typeinfo->cbSizeVft = 0; + if(!This->typedata) return S_OK; @@ -2358,6 +2472,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( /* Assign IDs and VTBL entries */ i = 0; + if(This->typedata->u.data[3]&1) + user_vft = This->typedata->u.data[3]&0xffff; + for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) { /* Assign MEMBERID if MEMBERID_NIL was specified */ if(iter->indice == MEMBERID_NIL) { @@ -2370,8 +2487,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( for(iter2=This->typedata->next->next; iter2!=This->typedata->next; iter2=iter2->next) { if(iter == iter2) continue; - if(iter2->indice == iter->indice) + if(iter2->indice == iter->indice) { + HeapFree(GetProcessHeap(), 0, typedata); return E_ACCESSDENIED; + } } break; @@ -2383,7 +2502,20 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( iter->u.data[0] = (iter->u.data[0]&0xffff) | (i<<16); - if((This->typeinfo->typekind&0xf) != TKIND_MODULE) { + if((iter->u.data[3]&1) != (user_vft&1)) { + HeapFree(GetProcessHeap(), 0, typedata); + return TYPE_E_INVALIDID; + } + + if(user_vft&1) { + if(user_vft < (iter->u.data[3]&0xffff)) + user_vft = (iter->u.data[3]&0xffff); + + if((iter->u.data[3]&0xffff) < This->typeinfo->cbSizeVft) { + HeapFree(GetProcessHeap(), 0, typedata); + return TYPE_E_INVALIDID; + } + } else if(This->typekind != TKIND_MODULE) { iter->u.data[3] = (iter->u.data[3]&0xffff0000) | This->typeinfo->cbSizeVft; This->typeinfo->cbSizeVft += 4; } @@ -2406,6 +2538,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( i++; } + if(user_vft) + This->typeinfo->cbSizeVft = user_vft+3; + for(i=0; i<(This->typeinfo->cElement&0xffff); i++) { if(typedata[i]->u.data[4]>>16 > i) { int inv; @@ -2787,11 +2922,13 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeAttr( (*ppTypeAttr)->lcid = This->typelib->typelib_header.lcid; (*ppTypeAttr)->cbSizeInstance = This->typeinfo->size; - (*ppTypeAttr)->typekind = This->typeinfo->typekind&0xf; + (*ppTypeAttr)->typekind = This->typekind; (*ppTypeAttr)->cFuncs = This->typeinfo->cElement&0xffff; + if(This->typeinfo->flags&TYPEFLAG_FDUAL && This->typekind==TKIND_DISPATCH) + (*ppTypeAttr)->cFuncs += 7; (*ppTypeAttr)->cVars = This->typeinfo->cElement>>16; (*ppTypeAttr)->cImplTypes = This->typeinfo->cImplTypes; - (*ppTypeAttr)->cbSizeVft = This->typeinfo->cbSizeVft; + (*ppTypeAttr)->cbSizeVft = This->typekind==TKIND_DISPATCH ? 28 : This->typeinfo->cbSizeVft; (*ppTypeAttr)->cbAlignment = (This->typeinfo->typekind>>11) & 0x1f; (*ppTypeAttr)->wTypeFlags = This->typeinfo->flags; (*ppTypeAttr)->wMajorVerNum = This->typeinfo->version&0xffff; @@ -2879,15 +3016,21 @@ static HRESULT WINAPI ITypeInfo2_fnGetRefTypeOfImplType( if(!pRefType) return E_INVALIDARG; - if(index == -1) { - FIXME("Dual interfaces not handled yet\n"); - return E_NOTIMPL; + if(This->typeinfo->flags&TYPEFLAG_FDUAL) { + if(index == -1) { + *pRefType = -2; + return S_OK; + } + + if(This->typekind == TKIND_DISPATCH) + return ITypeInfo2_GetRefTypeOfImplType((ITypeInfo2*)&This->dual->lpVtblTypeInfo2, + index, pRefType); } - if(index >= This->typeinfo->cImplTypes) + if(index>=This->typeinfo->cImplTypes) return TYPE_E_ELEMENTNOTFOUND; - if((This->typeinfo->typekind&0xf) == TKIND_INTERFACE) { + if(This->typekind == TKIND_INTERFACE) { *pRefType = This->typeinfo->datatype1 + 2; return S_OK; } @@ -2923,7 +3066,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeFlags( if(index >= This->typeinfo->cImplTypes) return TYPE_E_ELEMENTNOTFOUND; - if((This->typeinfo->typekind&0xf) != TKIND_COCLASS) { + if(This->typekind != TKIND_COCLASS) { *pImplTypeFlags = 0; return S_OK; } @@ -3022,6 +3165,12 @@ static HRESULT WINAPI ITypeInfo2_fnGetRefTypeInfo( if(!ppTInfo) return E_INVALIDARG; + if(hRefType==-2 && This->dual) { + *ppTInfo = (ITypeInfo*)&This->dual->lpVtblTypeInfo2; + ITypeInfo_AddRef(*ppTInfo); + return S_OK; + } + if(hRefType&1) { ITypeLib *tl; MSFT_ImpInfo *impinfo; @@ -3124,7 +3273,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetContainingTypeLib( TRACE("(%p,%p,%p)\n", iface, ppTLib, pIndex); *ppTLib = (ITypeLib *)&This->typelib->lpVtblTypeLib2; - This->typelib->ref++; + ICreateTypeLib_AddRef((ICreateTypeLib*)This->typelib); *pIndex = This->typeinfo->typekind >> 16; return S_OK; @@ -3573,7 +3722,7 @@ static ICreateTypeInfo2 *ICreateTypeInfo2_Constructor(ICreateTypeLib2Impl *typel pCreateTypeInfo2Impl->ref = 1; pCreateTypeInfo2Impl->typelib = typelib; - typelib->ref++; + ICreateTypeLib_AddRef((ICreateTypeLib*)typelib); nameoffset = ctl2_alloc_name(typelib, szName); typeinfo_offset = ctl2_alloc_typeinfo(typelib, nameoffset); @@ -3584,6 +3733,7 @@ static ICreateTypeInfo2 *ICreateTypeInfo2_Constructor(ICreateTypeLib2Impl *typel pCreateTypeInfo2Impl->typeinfo = typeinfo; + pCreateTypeInfo2Impl->typekind = tkind; typeinfo->typekind |= tkind | 0x20; ICreateTypeInfo2_SetAlignment((ICreateTypeInfo2 *)pCreateTypeInfo2Impl, 4); @@ -3717,7 +3867,9 @@ static ULONG WINAPI ICreateTypeLib2_fnRelease(ICreateTypeLib2 *iface) HeapFree(GetProcessHeap(), 0, rem); } } - HeapFree(GetProcessHeap(), 0, typeinfo); + + HeapFree(GetProcessHeap(), 0, typeinfo->dual); + HeapFree(GetProcessHeap(), 0, typeinfo); } HeapFree(GetProcessHeap(),0,This); diff --git a/dlls/olecli.dll16/Makefile.in b/dlls/olecli.dll16/Makefile.in index 51baa784f99..4aba3b73d5b 100644 --- a/dlls/olecli.dll16/Makefile.in +++ b/dlls/olecli.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,olecli32.dll C_SRCS = olecli.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/olecli32/Makefile.in b/dlls/olecli32/Makefile.in index 794e4da3d9f..82a4695c4b9 100644 --- a/dlls/olecli32/Makefile.in +++ b/dlls/olecli32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ olecli_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oledb32/Makefile.in b/dlls/oledb32/Makefile.in index 6c64237eea0..3a96222b6b6 100644 --- a/dlls/oledb32/Makefile.in +++ b/dlls/oledb32/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ IDL_I_SRCS = convert.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oledb32/tests/Makefile.in b/dlls/oledb32/tests/Makefile.in index 623b3994646..012eb2adc36 100644 --- a/dlls/oledb32/tests/Makefile.in +++ b/dlls/oledb32/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ IDL_I_SRCS = convert.idl @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oledlg/Makefile.in b/dlls/oledlg/Makefile.in index e60e150bce9..7b696bd9f21 100644 --- a/dlls/oledlg/Makefile.in +++ b/dlls/oledlg/Makefile.in @@ -34,5 +34,3 @@ RC_SRCS = \ oledlg_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/olepro32/Makefile.in b/dlls/olepro32/Makefile.in index ad4be0e8177..607bf16da6c 100644 --- a/dlls/olepro32/Makefile.in +++ b/dlls/olepro32/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = olepro32stubs.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/olesvr.dll16/Makefile.in b/dlls/olesvr.dll16/Makefile.in index 8372456ae33..9049d269ba7 100644 --- a/dlls/olesvr.dll16/Makefile.in +++ b/dlls/olesvr.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,olesvr32.dll C_SRCS = olesvr.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/olesvr32/Makefile.in b/dlls/olesvr32/Makefile.in index 0ed23251ee0..ab76df601b4 100644 --- a/dlls/olesvr32/Makefile.in +++ b/dlls/olesvr32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ olesvr_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/olethk32/Makefile.in b/dlls/olethk32/Makefile.in index 3dd208bef39..b7cf2003f5e 100644 --- a/dlls/olethk32/Makefile.in +++ b/dlls/olethk32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = main.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/openal32/Makefile.in b/dlls/openal32/Makefile.in index b237706681c..1f6e876731d 100644 --- a/dlls/openal32/Makefile.in +++ b/dlls/openal32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ openal.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/opengl32/Makefile.in b/dlls/opengl32/Makefile.in index d6f19c37e13..094615f09dd 100644 --- a/dlls/opengl32/Makefile.in +++ b/dlls/opengl32/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/opengl32/opengl_ext.c b/dlls/opengl32/opengl_ext.c index e3c767e046c..d46397bce72 100644 --- a/dlls/opengl32/opengl_ext.c +++ b/dlls/opengl32/opengl_ext.c @@ -32,6 +32,7 @@ enum extensions EXT_glBeginPerfMonitorAMD, EXT_glBeginQuery, EXT_glBeginQueryARB, + EXT_glBeginQueryIndexed, EXT_glBeginTransformFeedback, EXT_glBeginTransformFeedbackEXT, EXT_glBeginTransformFeedbackNV, @@ -51,6 +52,7 @@ enum extensions EXT_glBindBufferRangeNV, EXT_glBindFragDataLocation, EXT_glBindFragDataLocationEXT, + EXT_glBindFragDataLocationIndexed, EXT_glBindFragmentShaderATI, EXT_glBindFramebuffer, EXT_glBindFramebufferEXT, @@ -62,9 +64,11 @@ enum extensions EXT_glBindProgramNV, EXT_glBindRenderbuffer, EXT_glBindRenderbufferEXT, + EXT_glBindSampler, EXT_glBindTexGenParameterEXT, EXT_glBindTextureEXT, EXT_glBindTextureUnitParameterEXT, + EXT_glBindTransformFeedback, EXT_glBindTransformFeedbackNV, EXT_glBindVertexArray, EXT_glBindVertexArrayAPPLE, @@ -143,6 +147,10 @@ enum extensions EXT_glColorFragmentOp3ATI, EXT_glColorMaskIndexedEXT, EXT_glColorMaski, + EXT_glColorP3ui, + EXT_glColorP3uiv, + EXT_glColorP4ui, + EXT_glColorP4uiv, EXT_glColorPointerEXT, EXT_glColorPointerListIBM, EXT_glColorPointervINTEL, @@ -164,6 +172,7 @@ enum extensions EXT_glCombinerStageParameterfvNV, EXT_glCompileShader, EXT_glCompileShaderARB, + EXT_glCompileShaderIncludeARB, EXT_glCompressedMultiTexImage1DEXT, EXT_glCompressedMultiTexImage2DEXT, EXT_glCompressedMultiTexImage3DEXT, @@ -246,6 +255,7 @@ enum extensions EXT_glDeleteFragmentShaderATI, EXT_glDeleteFramebuffers, EXT_glDeleteFramebuffersEXT, + EXT_glDeleteNamedStringARB, EXT_glDeleteObjectARB, EXT_glDeleteObjectBufferATI, EXT_glDeleteOcclusionQueriesNV, @@ -257,9 +267,11 @@ enum extensions EXT_glDeleteQueriesARB, EXT_glDeleteRenderbuffers, EXT_glDeleteRenderbuffersEXT, + EXT_glDeleteSamplers, EXT_glDeleteShader, EXT_glDeleteSync, EXT_glDeleteTexturesEXT, + EXT_glDeleteTransformFeedbacks, EXT_glDeleteTransformFeedbacksNV, EXT_glDeleteVertexArrays, EXT_glDeleteVertexArraysAPPLE, @@ -278,6 +290,7 @@ enum extensions EXT_glDisableVertexAttribArrayARB, EXT_glDisablei, EXT_glDrawArraysEXT, + EXT_glDrawArraysIndirect, EXT_glDrawArraysInstanced, EXT_glDrawArraysInstancedARB, EXT_glDrawArraysInstancedEXT, @@ -288,6 +301,7 @@ enum extensions EXT_glDrawElementArrayAPPLE, EXT_glDrawElementArrayATI, EXT_glDrawElementsBaseVertex, + EXT_glDrawElementsIndirect, EXT_glDrawElementsInstanced, EXT_glDrawElementsInstancedARB, EXT_glDrawElementsInstancedBaseVertex, @@ -298,7 +312,9 @@ enum extensions EXT_glDrawRangeElements, EXT_glDrawRangeElementsBaseVertex, EXT_glDrawRangeElementsEXT, + EXT_glDrawTransformFeedback, EXT_glDrawTransformFeedbackNV, + EXT_glDrawTransformFeedbackStream, EXT_glEdgeFlagFormatNV, EXT_glEdgeFlagPointerEXT, EXT_glEdgeFlagPointerListIBM, @@ -318,6 +334,7 @@ enum extensions EXT_glEndPerfMonitorAMD, EXT_glEndQuery, EXT_glEndQueryARB, + EXT_glEndQueryIndexed, EXT_glEndTransformFeedback, EXT_glEndTransformFeedbackEXT, EXT_glEndTransformFeedbackNV, @@ -383,7 +400,6 @@ enum extensions EXT_glFramebufferTexture3DEXT, EXT_glFramebufferTextureARB, EXT_glFramebufferTextureEXT, - EXT_glFramebufferTextureFace, EXT_glFramebufferTextureFaceARB, EXT_glFramebufferTextureFaceEXT, EXT_glFramebufferTextureLayer, @@ -406,8 +422,10 @@ enum extensions EXT_glGenQueriesARB, EXT_glGenRenderbuffers, EXT_glGenRenderbuffersEXT, + EXT_glGenSamplers, EXT_glGenSymbolsEXT, EXT_glGenTexturesEXT, + EXT_glGenTransformFeedbacks, EXT_glGenTransformFeedbacksNV, EXT_glGenVertexArrays, EXT_glGenVertexArraysAPPLE, @@ -418,6 +436,9 @@ enum extensions EXT_glGenerateTextureMipmapEXT, EXT_glGetActiveAttrib, EXT_glGetActiveAttribARB, + EXT_glGetActiveSubroutineName, + EXT_glGetActiveSubroutineUniformName, + EXT_glGetActiveSubroutineUniformiv, EXT_glGetActiveUniform, EXT_glGetActiveUniformARB, EXT_glGetActiveUniformBlockName, @@ -472,6 +493,7 @@ enum extensions EXT_glGetFinalCombinerInputParameterivNV, EXT_glGetFloatIndexedvEXT, EXT_glGetFogFuncSGIS, + EXT_glGetFragDataIndex, EXT_glGetFragDataLocation, EXT_glGetFragDataLocationEXT, EXT_glGetFragmentLightfvSGIX, @@ -543,6 +565,8 @@ enum extensions EXT_glGetNamedProgramStringEXT, EXT_glGetNamedProgramivEXT, EXT_glGetNamedRenderbufferParameterivEXT, + EXT_glGetNamedStringARB, + EXT_glGetNamedStringivARB, EXT_glGetObjectBufferfvATI, EXT_glGetObjectBufferivATI, EXT_glGetObjectParameterfvARB, @@ -573,14 +597,18 @@ enum extensions EXT_glGetProgramNamedParameterfvNV, EXT_glGetProgramParameterdvNV, EXT_glGetProgramParameterfvNV, + EXT_glGetProgramStageiv, EXT_glGetProgramStringARB, EXT_glGetProgramStringNV, EXT_glGetProgramiv, EXT_glGetProgramivARB, EXT_glGetProgramivNV, + EXT_glGetQueryIndexediv, + EXT_glGetQueryObjecti64v, EXT_glGetQueryObjecti64vEXT, EXT_glGetQueryObjectiv, EXT_glGetQueryObjectivARB, + EXT_glGetQueryObjectui64v, EXT_glGetQueryObjectui64vEXT, EXT_glGetQueryObjectuiv, EXT_glGetQueryObjectuivARB, @@ -588,6 +616,10 @@ enum extensions EXT_glGetQueryivARB, EXT_glGetRenderbufferParameteriv, EXT_glGetRenderbufferParameterivEXT, + EXT_glGetSamplerParameterIfv, + EXT_glGetSamplerParameterIiv, + EXT_glGetSamplerParameterfv, + EXT_glGetSamplerParameteriv, EXT_glGetSeparableFilter, EXT_glGetSeparableFilterEXT, EXT_glGetShaderInfoLog, @@ -596,6 +628,8 @@ enum extensions EXT_glGetShaderiv, EXT_glGetSharpenTexFuncSGIS, EXT_glGetStringi, + EXT_glGetSubroutineIndex, + EXT_glGetSubroutineUniformLocation, EXT_glGetSynciv, EXT_glGetTexBumpParameterfvATI, EXT_glGetTexBumpParameterivATI, @@ -622,6 +656,8 @@ enum extensions EXT_glGetUniformLocation, EXT_glGetUniformLocationARB, EXT_glGetUniformOffsetEXT, + EXT_glGetUniformSubroutineuiv, + EXT_glGetUniformdv, EXT_glGetUniformfv, EXT_glGetUniformfvARB, EXT_glGetUniformiv, @@ -696,6 +732,7 @@ enum extensions EXT_glIsFramebuffer, EXT_glIsFramebufferEXT, EXT_glIsNamedBufferResidentNV, + EXT_glIsNamedStringARB, EXT_glIsObjectBufferATI, EXT_glIsOcclusionQueryNV, EXT_glIsProgram, @@ -705,9 +742,11 @@ enum extensions EXT_glIsQueryARB, EXT_glIsRenderbuffer, EXT_glIsRenderbufferEXT, + EXT_glIsSampler, EXT_glIsShader, EXT_glIsSync, EXT_glIsTextureEXT, + EXT_glIsTransformFeedback, EXT_glIsTransformFeedbackNV, EXT_glIsVariantEnabledEXT, EXT_glIsVertexArray, @@ -889,6 +928,14 @@ enum extensions EXT_glMultiTexCoord4sv, EXT_glMultiTexCoord4svARB, EXT_glMultiTexCoord4svSGIS, + EXT_glMultiTexCoordP1ui, + EXT_glMultiTexCoordP1uiv, + EXT_glMultiTexCoordP2ui, + EXT_glMultiTexCoordP2uiv, + EXT_glMultiTexCoordP3ui, + EXT_glMultiTexCoordP3uiv, + EXT_glMultiTexCoordP4ui, + EXT_glMultiTexCoordP4uiv, EXT_glMultiTexCoordPointerEXT, EXT_glMultiTexCoordPointerSGIS, EXT_glMultiTexEnvfEXT, @@ -938,6 +985,7 @@ enum extensions EXT_glNamedRenderbufferStorageEXT, EXT_glNamedRenderbufferStorageMultisampleCoverageEXT, EXT_glNamedRenderbufferStorageMultisampleEXT, + EXT_glNamedStringARB, EXT_glNewBufferRegion, EXT_glNewObjectBufferATI, EXT_glNormal3fVertex3fSUN, @@ -945,6 +993,8 @@ enum extensions EXT_glNormal3hNV, EXT_glNormal3hvNV, EXT_glNormalFormatNV, + EXT_glNormalP3ui, + EXT_glNormalP3uiv, EXT_glNormalPointerEXT, EXT_glNormalPointerListIBM, EXT_glNormalPointervINTEL, @@ -963,6 +1013,9 @@ enum extensions EXT_glPNTrianglesfATI, EXT_glPNTrianglesiATI, EXT_glPassTexCoordATI, + EXT_glPatchParameterfv, + EXT_glPatchParameteri, + EXT_glPauseTransformFeedback, EXT_glPauseTransformFeedbackNV, EXT_glPixelDataRangeNV, EXT_glPixelTexGenParameterfSGIS, @@ -1034,38 +1087,55 @@ enum extensions EXT_glProgramParameters4dvNV, EXT_glProgramParameters4fvNV, EXT_glProgramStringARB, + EXT_glProgramUniform1dEXT, + EXT_glProgramUniform1dvEXT, EXT_glProgramUniform1fEXT, EXT_glProgramUniform1fvEXT, EXT_glProgramUniform1iEXT, EXT_glProgramUniform1ivEXT, EXT_glProgramUniform1uiEXT, EXT_glProgramUniform1uivEXT, + EXT_glProgramUniform2dEXT, + EXT_glProgramUniform2dvEXT, EXT_glProgramUniform2fEXT, EXT_glProgramUniform2fvEXT, EXT_glProgramUniform2iEXT, EXT_glProgramUniform2ivEXT, EXT_glProgramUniform2uiEXT, EXT_glProgramUniform2uivEXT, + EXT_glProgramUniform3dEXT, + EXT_glProgramUniform3dvEXT, EXT_glProgramUniform3fEXT, EXT_glProgramUniform3fvEXT, EXT_glProgramUniform3iEXT, EXT_glProgramUniform3ivEXT, EXT_glProgramUniform3uiEXT, EXT_glProgramUniform3uivEXT, + EXT_glProgramUniform4dEXT, + EXT_glProgramUniform4dvEXT, EXT_glProgramUniform4fEXT, EXT_glProgramUniform4fvEXT, EXT_glProgramUniform4iEXT, EXT_glProgramUniform4ivEXT, EXT_glProgramUniform4uiEXT, EXT_glProgramUniform4uivEXT, + EXT_glProgramUniformMatrix2dvEXT, EXT_glProgramUniformMatrix2fvEXT, + EXT_glProgramUniformMatrix2x3dvEXT, EXT_glProgramUniformMatrix2x3fvEXT, + EXT_glProgramUniformMatrix2x4dvEXT, EXT_glProgramUniformMatrix2x4fvEXT, + EXT_glProgramUniformMatrix3dvEXT, EXT_glProgramUniformMatrix3fvEXT, + EXT_glProgramUniformMatrix3x2dvEXT, EXT_glProgramUniformMatrix3x2fvEXT, + EXT_glProgramUniformMatrix3x4dvEXT, EXT_glProgramUniformMatrix3x4fvEXT, + EXT_glProgramUniformMatrix4dvEXT, EXT_glProgramUniformMatrix4fvEXT, + EXT_glProgramUniformMatrix4x2dvEXT, EXT_glProgramUniformMatrix4x2fvEXT, + EXT_glProgramUniformMatrix4x3dvEXT, EXT_glProgramUniformMatrix4x3fvEXT, EXT_glProgramUniformui64NV, EXT_glProgramUniformui64vNV, @@ -1073,6 +1143,7 @@ enum extensions EXT_glProvokingVertex, EXT_glProvokingVertexEXT, EXT_glPushClientAttribDefaultEXT, + EXT_glQueryCounter, EXT_glReadBufferRegion, EXT_glReadInstrumentsSGIX, EXT_glReferencePlaneSGIX, @@ -1110,6 +1181,7 @@ enum extensions EXT_glResetMinmax, EXT_glResetMinmaxEXT, EXT_glResizeBuffersMESA, + EXT_glResumeTransformFeedback, EXT_glResumeTransformFeedbackNV, EXT_glSampleCoverage, EXT_glSampleCoverageARB, @@ -1120,6 +1192,12 @@ enum extensions EXT_glSampleMaski, EXT_glSamplePatternEXT, EXT_glSamplePatternSGIS, + EXT_glSamplerParameterIiv, + EXT_glSamplerParameterIuiv, + EXT_glSamplerParameterf, + EXT_glSamplerParameterfv, + EXT_glSamplerParameteri, + EXT_glSamplerParameteriv, EXT_glSecondaryColor3b, EXT_glSecondaryColor3bEXT, EXT_glSecondaryColor3bv, @@ -1155,6 +1233,8 @@ enum extensions EXT_glSecondaryColor3usv, EXT_glSecondaryColor3usvEXT, EXT_glSecondaryColorFormatNV, + EXT_glSecondaryColorP3ui, + EXT_glSecondaryColorP3uiv, EXT_glSecondaryColorPointer, EXT_glSecondaryColorPointerEXT, EXT_glSecondaryColorPointerListIBM, @@ -1234,6 +1314,14 @@ enum extensions EXT_glTexCoord4hNV, EXT_glTexCoord4hvNV, EXT_glTexCoordFormatNV, + EXT_glTexCoordP1ui, + EXT_glTexCoordP1uiv, + EXT_glTexCoordP2ui, + EXT_glTexCoordP2uiv, + EXT_glTexCoordP3ui, + EXT_glTexCoordP3uiv, + EXT_glTexCoordP4ui, + EXT_glTexCoordP4uiv, EXT_glTexCoordPointerEXT, EXT_glTexCoordPointerListIBM, EXT_glTexCoordPointervINTEL, @@ -1278,6 +1366,8 @@ enum extensions EXT_glTransformFeedbackVaryings, EXT_glTransformFeedbackVaryingsEXT, EXT_glTransformFeedbackVaryingsNV, + EXT_glUniform1d, + EXT_glUniform1dv, EXT_glUniform1f, EXT_glUniform1fARB, EXT_glUniform1fv, @@ -1290,6 +1380,8 @@ enum extensions EXT_glUniform1uiEXT, EXT_glUniform1uiv, EXT_glUniform1uivEXT, + EXT_glUniform2d, + EXT_glUniform2dv, EXT_glUniform2f, EXT_glUniform2fARB, EXT_glUniform2fv, @@ -1302,6 +1394,8 @@ enum extensions EXT_glUniform2uiEXT, EXT_glUniform2uiv, EXT_glUniform2uivEXT, + EXT_glUniform3d, + EXT_glUniform3dv, EXT_glUniform3f, EXT_glUniform3fARB, EXT_glUniform3fv, @@ -1314,6 +1408,8 @@ enum extensions EXT_glUniform3uiEXT, EXT_glUniform3uiv, EXT_glUniform3uivEXT, + EXT_glUniform4d, + EXT_glUniform4dv, EXT_glUniform4f, EXT_glUniform4fARB, EXT_glUniform4fv, @@ -1328,18 +1424,28 @@ enum extensions EXT_glUniform4uivEXT, EXT_glUniformBlockBinding, EXT_glUniformBufferEXT, + EXT_glUniformMatrix2dv, EXT_glUniformMatrix2fv, EXT_glUniformMatrix2fvARB, + EXT_glUniformMatrix2x3dv, EXT_glUniformMatrix2x3fv, + EXT_glUniformMatrix2x4dv, EXT_glUniformMatrix2x4fv, + EXT_glUniformMatrix3dv, EXT_glUniformMatrix3fv, EXT_glUniformMatrix3fvARB, + EXT_glUniformMatrix3x2dv, EXT_glUniformMatrix3x2fv, + EXT_glUniformMatrix3x4dv, EXT_glUniformMatrix3x4fv, + EXT_glUniformMatrix4dv, EXT_glUniformMatrix4fv, EXT_glUniformMatrix4fvARB, + EXT_glUniformMatrix4x2dv, EXT_glUniformMatrix4x2fv, + EXT_glUniformMatrix4x3dv, EXT_glUniformMatrix4x3fv, + EXT_glUniformSubroutinesuiv, EXT_glUniformui64NV, EXT_glUniformui64vNV, EXT_glUnlockArraysEXT, @@ -1524,6 +1630,14 @@ enum extensions EXT_glVertexAttribIFormatNV, EXT_glVertexAttribIPointer, EXT_glVertexAttribIPointerEXT, + EXT_glVertexAttribP1ui, + EXT_glVertexAttribP1uiv, + EXT_glVertexAttribP2ui, + EXT_glVertexAttribP2uiv, + EXT_glVertexAttribP3ui, + EXT_glVertexAttribP3uiv, + EXT_glVertexAttribP4ui, + EXT_glVertexAttribP4uiv, EXT_glVertexAttribPointer, EXT_glVertexAttribPointerARB, EXT_glVertexAttribPointerNV, @@ -1548,6 +1662,12 @@ enum extensions EXT_glVertexBlendEnvfATI, EXT_glVertexBlendEnviATI, EXT_glVertexFormatNV, + EXT_glVertexP2ui, + EXT_glVertexP2uiv, + EXT_glVertexP3ui, + EXT_glVertexP3uiv, + EXT_glVertexP4ui, + EXT_glVertexP4uiv, EXT_glVertexPointerEXT, EXT_glVertexPointerListIBM, EXT_glVertexPointervINTEL, @@ -1854,6 +1974,14 @@ static void WINAPI wine_glBeginQueryARB( GLenum target, GLuint id ) { LEAVE_GL(); } +static void WINAPI wine_glBeginQueryIndexed( GLenum target, GLuint index, GLuint id ) { + void (*func_glBeginQueryIndexed)( GLenum, GLuint, GLuint ) = extension_funcs[EXT_glBeginQueryIndexed]; + TRACE("(%d, %d, %d)\n", target, index, id ); + ENTER_GL(); + func_glBeginQueryIndexed( target, index, id ); + LEAVE_GL(); +} + static void WINAPI wine_glBeginTransformFeedback( GLenum primitiveMode ) { void (*func_glBeginTransformFeedback)( GLenum ) = extension_funcs[EXT_glBeginTransformFeedback]; TRACE("(%d)\n", primitiveMode ); @@ -2006,6 +2134,14 @@ static void WINAPI wine_glBindFragDataLocationEXT( GLuint program, GLuint color, LEAVE_GL(); } +static void WINAPI wine_glBindFragDataLocationIndexed( GLuint program, GLuint colorNumber, GLuint index, char* name ) { + void (*func_glBindFragDataLocationIndexed)( GLuint, GLuint, GLuint, char* ) = extension_funcs[EXT_glBindFragDataLocationIndexed]; + TRACE("(%d, %d, %d, %p)\n", program, colorNumber, index, name ); + ENTER_GL(); + func_glBindFragDataLocationIndexed( program, colorNumber, index, name ); + LEAVE_GL(); +} + static void WINAPI wine_glBindFragmentShaderATI( GLuint id ) { void (*func_glBindFragmentShaderATI)( GLuint ) = extension_funcs[EXT_glBindFragmentShaderATI]; TRACE("(%d)\n", id ); @@ -2100,6 +2236,14 @@ static void WINAPI wine_glBindRenderbufferEXT( GLenum target, GLuint renderbuffe LEAVE_GL(); } +static void WINAPI wine_glBindSampler( GLenum unit, GLuint sampler ) { + void (*func_glBindSampler)( GLenum, GLuint ) = extension_funcs[EXT_glBindSampler]; + TRACE("(%d, %d)\n", unit, sampler ); + ENTER_GL(); + func_glBindSampler( unit, sampler ); + LEAVE_GL(); +} + static GLuint WINAPI wine_glBindTexGenParameterEXT( GLenum unit, GLenum coord, GLenum value ) { GLuint ret_value; GLuint (*func_glBindTexGenParameterEXT)( GLenum, GLenum, GLenum ) = extension_funcs[EXT_glBindTexGenParameterEXT]; @@ -2128,6 +2272,14 @@ static GLuint WINAPI wine_glBindTextureUnitParameterEXT( GLenum unit, GLenum val return ret_value; } +static void WINAPI wine_glBindTransformFeedback( GLenum target, GLuint id ) { + void (*func_glBindTransformFeedback)( GLenum, GLuint ) = extension_funcs[EXT_glBindTransformFeedback]; + TRACE("(%d, %d)\n", target, id ); + ENTER_GL(); + func_glBindTransformFeedback( target, id ); + LEAVE_GL(); +} + static void WINAPI wine_glBindTransformFeedbackNV( GLenum target, GLuint id ) { void (*func_glBindTransformFeedbackNV)( GLenum, GLuint ) = extension_funcs[EXT_glBindTransformFeedbackNV]; TRACE("(%d, %d)\n", target, id ); @@ -2762,6 +2914,38 @@ static void WINAPI wine_glColorMaski( GLuint index, GLboolean r, GLboolean g, GL LEAVE_GL(); } +static void WINAPI wine_glColorP3ui( GLenum type, GLuint color ) { + void (*func_glColorP3ui)( GLenum, GLuint ) = extension_funcs[EXT_glColorP3ui]; + TRACE("(%d, %d)\n", type, color ); + ENTER_GL(); + func_glColorP3ui( type, color ); + LEAVE_GL(); +} + +static void WINAPI wine_glColorP3uiv( GLenum type, GLuint* color ) { + void (*func_glColorP3uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glColorP3uiv]; + TRACE("(%d, %p)\n", type, color ); + ENTER_GL(); + func_glColorP3uiv( type, color ); + LEAVE_GL(); +} + +static void WINAPI wine_glColorP4ui( GLenum type, GLuint color ) { + void (*func_glColorP4ui)( GLenum, GLuint ) = extension_funcs[EXT_glColorP4ui]; + TRACE("(%d, %d)\n", type, color ); + ENTER_GL(); + func_glColorP4ui( type, color ); + LEAVE_GL(); +} + +static void WINAPI wine_glColorP4uiv( GLenum type, GLuint* color ) { + void (*func_glColorP4uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glColorP4uiv]; + TRACE("(%d, %p)\n", type, color ); + ENTER_GL(); + func_glColorP4uiv( type, color ); + LEAVE_GL(); +} + static void WINAPI wine_glColorPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { void (*func_glColorPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glColorPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", size, type, stride, count, pointer ); @@ -2930,6 +3114,14 @@ static void WINAPI wine_glCompileShaderARB( unsigned int shaderObj ) { LEAVE_GL(); } +static void WINAPI wine_glCompileShaderIncludeARB( GLuint shader, GLsizei count, char** path, GLint* length ) { + void (*func_glCompileShaderIncludeARB)( GLuint, GLsizei, char**, GLint* ) = extension_funcs[EXT_glCompileShaderIncludeARB]; + TRACE("(%d, %d, %p, %p)\n", shader, count, path, length ); + ENTER_GL(); + func_glCompileShaderIncludeARB( shader, count, path, length ); + LEAVE_GL(); +} + static void WINAPI wine_glCompressedMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid* bits ) { void (*func_glCompressedMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, border, imageSize, bits ); @@ -3596,6 +3788,14 @@ static void WINAPI wine_glDeleteFramebuffersEXT( GLsizei n, GLuint* framebuffers LEAVE_GL(); } +static void WINAPI wine_glDeleteNamedStringARB( GLint namelen, char* name ) { + void (*func_glDeleteNamedStringARB)( GLint, char* ) = extension_funcs[EXT_glDeleteNamedStringARB]; + TRACE("(%d, %p)\n", namelen, name ); + ENTER_GL(); + func_glDeleteNamedStringARB( namelen, name ); + LEAVE_GL(); +} + static void WINAPI wine_glDeleteObjectARB( unsigned int obj ) { void (*func_glDeleteObjectARB)( unsigned int ) = extension_funcs[EXT_glDeleteObjectARB]; TRACE("(%d)\n", obj ); @@ -3684,6 +3884,14 @@ static void WINAPI wine_glDeleteRenderbuffersEXT( GLsizei n, GLuint* renderbuffe LEAVE_GL(); } +static void WINAPI wine_glDeleteSamplers( GLsizei count, GLuint* samplers ) { + void (*func_glDeleteSamplers)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteSamplers]; + TRACE("(%d, %p)\n", count, samplers ); + ENTER_GL(); + func_glDeleteSamplers( count, samplers ); + LEAVE_GL(); +} + static void WINAPI wine_glDeleteShader( GLuint shader ) { void (*func_glDeleteShader)( GLuint ) = extension_funcs[EXT_glDeleteShader]; TRACE("(%d)\n", shader ); @@ -3708,6 +3916,14 @@ static void WINAPI wine_glDeleteTexturesEXT( GLsizei n, GLuint* textures ) { LEAVE_GL(); } +static void WINAPI wine_glDeleteTransformFeedbacks( GLsizei n, GLuint* ids ) { + void (*func_glDeleteTransformFeedbacks)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteTransformFeedbacks]; + TRACE("(%d, %p)\n", n, ids ); + ENTER_GL(); + func_glDeleteTransformFeedbacks( n, ids ); + LEAVE_GL(); +} + static void WINAPI wine_glDeleteTransformFeedbacksNV( GLsizei n, GLuint* ids ) { void (*func_glDeleteTransformFeedbacksNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteTransformFeedbacksNV]; TRACE("(%d, %p)\n", n, ids ); @@ -3852,6 +4068,14 @@ static void WINAPI wine_glDrawArraysEXT( GLenum mode, GLint first, GLsizei count LEAVE_GL(); } +static void WINAPI wine_glDrawArraysIndirect( GLenum mode, GLvoid* indirect ) { + void (*func_glDrawArraysIndirect)( GLenum, GLvoid* ) = extension_funcs[EXT_glDrawArraysIndirect]; + TRACE("(%d, %p)\n", mode, indirect ); + ENTER_GL(); + func_glDrawArraysIndirect( mode, indirect ); + LEAVE_GL(); +} + static void WINAPI wine_glDrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei primcount ) { void (*func_glDrawArraysInstanced)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glDrawArraysInstanced]; TRACE("(%d, %d, %d, %d)\n", mode, first, count, primcount ); @@ -3932,6 +4156,14 @@ static void WINAPI wine_glDrawElementsBaseVertex( GLenum mode, GLsizei count, GL LEAVE_GL(); } +static void WINAPI wine_glDrawElementsIndirect( GLenum mode, GLenum type, GLvoid* indirect ) { + void (*func_glDrawElementsIndirect)( GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glDrawElementsIndirect]; + TRACE("(%d, %d, %p)\n", mode, type, indirect ); + ENTER_GL(); + func_glDrawElementsIndirect( mode, type, indirect ); + LEAVE_GL(); +} + static void WINAPI wine_glDrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, GLvoid* indices, GLsizei primcount ) { void (*func_glDrawElementsInstanced)( GLenum, GLsizei, GLenum, GLvoid*, GLsizei ) = extension_funcs[EXT_glDrawElementsInstanced]; TRACE("(%d, %d, %d, %p, %d)\n", mode, count, type, indices, primcount ); @@ -4012,6 +4244,14 @@ static void WINAPI wine_glDrawRangeElementsEXT( GLenum mode, GLuint start, GLuin LEAVE_GL(); } +static void WINAPI wine_glDrawTransformFeedback( GLenum mode, GLuint id ) { + void (*func_glDrawTransformFeedback)( GLenum, GLuint ) = extension_funcs[EXT_glDrawTransformFeedback]; + TRACE("(%d, %d)\n", mode, id ); + ENTER_GL(); + func_glDrawTransformFeedback( mode, id ); + LEAVE_GL(); +} + static void WINAPI wine_glDrawTransformFeedbackNV( GLenum mode, GLuint id ) { void (*func_glDrawTransformFeedbackNV)( GLenum, GLuint ) = extension_funcs[EXT_glDrawTransformFeedbackNV]; TRACE("(%d, %d)\n", mode, id ); @@ -4020,6 +4260,14 @@ static void WINAPI wine_glDrawTransformFeedbackNV( GLenum mode, GLuint id ) { LEAVE_GL(); } +static void WINAPI wine_glDrawTransformFeedbackStream( GLenum mode, GLuint id, GLuint stream ) { + void (*func_glDrawTransformFeedbackStream)( GLenum, GLuint, GLuint ) = extension_funcs[EXT_glDrawTransformFeedbackStream]; + TRACE("(%d, %d, %d)\n", mode, id, stream ); + ENTER_GL(); + func_glDrawTransformFeedbackStream( mode, id, stream ); + LEAVE_GL(); +} + static void WINAPI wine_glEdgeFlagFormatNV( GLsizei stride ) { void (*func_glEdgeFlagFormatNV)( GLsizei ) = extension_funcs[EXT_glEdgeFlagFormatNV]; TRACE("(%d)\n", stride ); @@ -4172,6 +4420,14 @@ static void WINAPI wine_glEndQueryARB( GLenum target ) { LEAVE_GL(); } +static void WINAPI wine_glEndQueryIndexed( GLenum target, GLuint index ) { + void (*func_glEndQueryIndexed)( GLenum, GLuint ) = extension_funcs[EXT_glEndQueryIndexed]; + TRACE("(%d, %d)\n", target, index ); + ENTER_GL(); + func_glEndQueryIndexed( target, index ); + LEAVE_GL(); +} + static void WINAPI wine_glEndTransformFeedback( void ) { void (*func_glEndTransformFeedback)( void ) = extension_funcs[EXT_glEndTransformFeedback]; TRACE("()\n"); @@ -4696,14 +4952,6 @@ static void WINAPI wine_glFramebufferTextureEXT( GLenum target, GLenum attachmen LEAVE_GL(); } -static void WINAPI wine_glFramebufferTextureFace( GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face ) { - void (*func_glFramebufferTextureFace)( GLenum, GLenum, GLuint, GLint, GLenum ) = extension_funcs[EXT_glFramebufferTextureFace]; - TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, face ); - ENTER_GL(); - func_glFramebufferTextureFace( target, attachment, texture, level, face ); - LEAVE_GL(); -} - static void WINAPI wine_glFramebufferTextureFaceARB( GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face ) { void (*func_glFramebufferTextureFaceARB)( GLenum, GLenum, GLuint, GLint, GLenum ) = extension_funcs[EXT_glFramebufferTextureFaceARB]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, face ); @@ -4884,6 +5132,14 @@ static void WINAPI wine_glGenRenderbuffersEXT( GLsizei n, GLuint* renderbuffers LEAVE_GL(); } +static void WINAPI wine_glGenSamplers( GLsizei count, GLuint* samplers ) { + void (*func_glGenSamplers)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenSamplers]; + TRACE("(%d, %p)\n", count, samplers ); + ENTER_GL(); + func_glGenSamplers( count, samplers ); + LEAVE_GL(); +} + static GLuint WINAPI wine_glGenSymbolsEXT( GLenum datatype, GLenum storagetype, GLenum range, GLuint components ) { GLuint ret_value; GLuint (*func_glGenSymbolsEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glGenSymbolsEXT]; @@ -4902,6 +5158,14 @@ static void WINAPI wine_glGenTexturesEXT( GLsizei n, GLuint* textures ) { LEAVE_GL(); } +static void WINAPI wine_glGenTransformFeedbacks( GLsizei n, GLuint* ids ) { + void (*func_glGenTransformFeedbacks)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenTransformFeedbacks]; + TRACE("(%d, %p)\n", n, ids ); + ENTER_GL(); + func_glGenTransformFeedbacks( n, ids ); + LEAVE_GL(); +} + static void WINAPI wine_glGenTransformFeedbacksNV( GLsizei n, GLuint* ids ) { void (*func_glGenTransformFeedbacksNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenTransformFeedbacksNV]; TRACE("(%d, %p)\n", n, ids ); @@ -4984,6 +5248,30 @@ static void WINAPI wine_glGetActiveAttribARB( unsigned int programObj, GLuint in LEAVE_GL(); } +static void WINAPI wine_glGetActiveSubroutineName( GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, char* name ) { + void (*func_glGetActiveSubroutineName)( GLuint, GLenum, GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetActiveSubroutineName]; + TRACE("(%d, %d, %d, %d, %p, %p)\n", program, shadertype, index, bufsize, length, name ); + ENTER_GL(); + func_glGetActiveSubroutineName( program, shadertype, index, bufsize, length, name ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetActiveSubroutineUniformName( GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, char* name ) { + void (*func_glGetActiveSubroutineUniformName)( GLuint, GLenum, GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetActiveSubroutineUniformName]; + TRACE("(%d, %d, %d, %d, %p, %p)\n", program, shadertype, index, bufsize, length, name ); + ENTER_GL(); + func_glGetActiveSubroutineUniformName( program, shadertype, index, bufsize, length, name ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetActiveSubroutineUniformiv( GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values ) { + void (*func_glGetActiveSubroutineUniformiv)( GLuint, GLenum, GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetActiveSubroutineUniformiv]; + TRACE("(%d, %d, %d, %d, %p)\n", program, shadertype, index, pname, values ); + ENTER_GL(); + func_glGetActiveSubroutineUniformiv( program, shadertype, index, pname, values ); + LEAVE_GL(); +} + static void WINAPI wine_glGetActiveUniform( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, char* name ) { void (*func_glGetActiveUniform)( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[EXT_glGetActiveUniform]; TRACE("(%d, %d, %d, %p, %p, %p, %p)\n", program, index, bufSize, length, size, type, name ); @@ -5420,6 +5708,16 @@ static void WINAPI wine_glGetFogFuncSGIS( GLfloat* points ) { LEAVE_GL(); } +static GLint WINAPI wine_glGetFragDataIndex( GLuint program, char* name ) { + GLint ret_value; + GLint (*func_glGetFragDataIndex)( GLuint, char* ) = extension_funcs[EXT_glGetFragDataIndex]; + TRACE("(%d, %p)\n", program, name ); + ENTER_GL(); + ret_value = func_glGetFragDataIndex( program, name ); + LEAVE_GL(); + return ret_value; +} + static GLint WINAPI wine_glGetFragDataLocation( GLuint program, char* name ) { GLint ret_value; GLint (*func_glGetFragDataLocation)( GLuint, char* ) = extension_funcs[EXT_glGetFragDataLocation]; @@ -5996,6 +6294,22 @@ static void WINAPI wine_glGetNamedRenderbufferParameterivEXT( GLuint renderbuffe LEAVE_GL(); } +static void WINAPI wine_glGetNamedStringARB( GLint namelen, char* name, GLsizei bufSize, GLint* stringlen, char* string ) { + void (*func_glGetNamedStringARB)( GLint, char*, GLsizei, GLint*, char* ) = extension_funcs[EXT_glGetNamedStringARB]; + TRACE("(%d, %p, %d, %p, %p)\n", namelen, name, bufSize, stringlen, string ); + ENTER_GL(); + func_glGetNamedStringARB( namelen, name, bufSize, stringlen, string ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetNamedStringivARB( GLint namelen, char* name, GLenum pname, GLint* params ) { + void (*func_glGetNamedStringivARB)( GLint, char*, GLenum, GLint* ) = extension_funcs[EXT_glGetNamedStringivARB]; + TRACE("(%d, %p, %d, %p)\n", namelen, name, pname, params ); + ENTER_GL(); + func_glGetNamedStringivARB( namelen, name, pname, params ); + LEAVE_GL(); +} + static void WINAPI wine_glGetObjectBufferfvATI( GLuint buffer, GLenum pname, GLfloat* params ) { void (*func_glGetObjectBufferfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetObjectBufferfvATI]; TRACE("(%d, %d, %p)\n", buffer, pname, params ); @@ -6236,6 +6550,14 @@ static void WINAPI wine_glGetProgramParameterfvNV( GLenum target, GLuint index, LEAVE_GL(); } +static void WINAPI wine_glGetProgramStageiv( GLuint program, GLenum shadertype, GLenum pname, GLint* values ) { + void (*func_glGetProgramStageiv)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetProgramStageiv]; + TRACE("(%d, %d, %d, %p)\n", program, shadertype, pname, values ); + ENTER_GL(); + func_glGetProgramStageiv( program, shadertype, pname, values ); + LEAVE_GL(); +} + static void WINAPI wine_glGetProgramStringARB( GLenum target, GLenum pname, GLvoid* string ) { void (*func_glGetProgramStringARB)( GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetProgramStringARB]; TRACE("(%d, %d, %p)\n", target, pname, string ); @@ -6276,6 +6598,22 @@ static void WINAPI wine_glGetProgramivNV( GLuint id, GLenum pname, GLint* params LEAVE_GL(); } +static void WINAPI wine_glGetQueryIndexediv( GLenum target, GLuint index, GLenum pname, GLint* params ) { + void (*func_glGetQueryIndexediv)( GLenum, GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetQueryIndexediv]; + TRACE("(%d, %d, %d, %p)\n", target, index, pname, params ); + ENTER_GL(); + func_glGetQueryIndexediv( target, index, pname, params ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetQueryObjecti64v( GLuint id, GLenum pname, INT64* params ) { + void (*func_glGetQueryObjecti64v)( GLuint, GLenum, INT64* ) = extension_funcs[EXT_glGetQueryObjecti64v]; + TRACE("(%d, %d, %p)\n", id, pname, params ); + ENTER_GL(); + func_glGetQueryObjecti64v( id, pname, params ); + LEAVE_GL(); +} + static void WINAPI wine_glGetQueryObjecti64vEXT( GLuint id, GLenum pname, INT64* params ) { void (*func_glGetQueryObjecti64vEXT)( GLuint, GLenum, INT64* ) = extension_funcs[EXT_glGetQueryObjecti64vEXT]; TRACE("(%d, %d, %p)\n", id, pname, params ); @@ -6300,6 +6638,14 @@ static void WINAPI wine_glGetQueryObjectivARB( GLuint id, GLenum pname, GLint* p LEAVE_GL(); } +static void WINAPI wine_glGetQueryObjectui64v( GLuint id, GLenum pname, UINT64* params ) { + void (*func_glGetQueryObjectui64v)( GLuint, GLenum, UINT64* ) = extension_funcs[EXT_glGetQueryObjectui64v]; + TRACE("(%d, %d, %p)\n", id, pname, params ); + ENTER_GL(); + func_glGetQueryObjectui64v( id, pname, params ); + LEAVE_GL(); +} + static void WINAPI wine_glGetQueryObjectui64vEXT( GLuint id, GLenum pname, UINT64* params ) { void (*func_glGetQueryObjectui64vEXT)( GLuint, GLenum, UINT64* ) = extension_funcs[EXT_glGetQueryObjectui64vEXT]; TRACE("(%d, %d, %p)\n", id, pname, params ); @@ -6356,6 +6702,38 @@ static void WINAPI wine_glGetRenderbufferParameterivEXT( GLenum target, GLenum p LEAVE_GL(); } +static void WINAPI wine_glGetSamplerParameterIfv( GLuint sampler, GLenum pname, GLfloat* params ) { + void (*func_glGetSamplerParameterIfv)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetSamplerParameterIfv]; + TRACE("(%d, %d, %p)\n", sampler, pname, params ); + ENTER_GL(); + func_glGetSamplerParameterIfv( sampler, pname, params ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetSamplerParameterIiv( GLuint sampler, GLenum pname, GLint* params ) { + void (*func_glGetSamplerParameterIiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetSamplerParameterIiv]; + TRACE("(%d, %d, %p)\n", sampler, pname, params ); + ENTER_GL(); + func_glGetSamplerParameterIiv( sampler, pname, params ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat* params ) { + void (*func_glGetSamplerParameterfv)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetSamplerParameterfv]; + TRACE("(%d, %d, %p)\n", sampler, pname, params ); + ENTER_GL(); + func_glGetSamplerParameterfv( sampler, pname, params ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetSamplerParameteriv( GLuint sampler, GLenum pname, GLint* params ) { + void (*func_glGetSamplerParameteriv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetSamplerParameteriv]; + TRACE("(%d, %d, %p)\n", sampler, pname, params ); + ENTER_GL(); + func_glGetSamplerParameteriv( sampler, pname, params ); + LEAVE_GL(); +} + static void WINAPI wine_glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid* row, GLvoid* column, GLvoid* span ) { void (*func_glGetSeparableFilter)( GLenum, GLenum, GLenum, GLvoid*, GLvoid*, GLvoid* ) = extension_funcs[EXT_glGetSeparableFilter]; TRACE("(%d, %d, %d, %p, %p, %p)\n", target, format, type, row, column, span ); @@ -6422,6 +6800,26 @@ static const GLubyte * WINAPI wine_glGetStringi( GLenum name, GLuint index ) { return ret_value; } +static GLuint WINAPI wine_glGetSubroutineIndex( GLuint program, GLenum shadertype, char* name ) { + GLuint ret_value; + GLuint (*func_glGetSubroutineIndex)( GLuint, GLenum, char* ) = extension_funcs[EXT_glGetSubroutineIndex]; + TRACE("(%d, %d, %p)\n", program, shadertype, name ); + ENTER_GL(); + ret_value = func_glGetSubroutineIndex( program, shadertype, name ); + LEAVE_GL(); + return ret_value; +} + +static GLint WINAPI wine_glGetSubroutineUniformLocation( GLuint program, GLenum shadertype, char* name ) { + GLint ret_value; + GLint (*func_glGetSubroutineUniformLocation)( GLuint, GLenum, char* ) = extension_funcs[EXT_glGetSubroutineUniformLocation]; + TRACE("(%d, %d, %p)\n", program, shadertype, name ); + ENTER_GL(); + ret_value = func_glGetSubroutineUniformLocation( program, shadertype, name ); + LEAVE_GL(); + return ret_value; +} + static void WINAPI wine_glGetSynciv( GLvoid* sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values ) { void (*func_glGetSynciv)( GLvoid*, GLenum, GLsizei, GLsizei*, GLint* ) = extension_funcs[EXT_glGetSynciv]; TRACE("(%p, %d, %d, %p, %p)\n", sync, pname, bufSize, length, values ); @@ -6640,6 +7038,22 @@ static INT_PTR WINAPI wine_glGetUniformOffsetEXT( GLuint program, GLint location return ret_value; } +static void WINAPI wine_glGetUniformSubroutineuiv( GLenum shadertype, GLint location, GLuint* params ) { + void (*func_glGetUniformSubroutineuiv)( GLenum, GLint, GLuint* ) = extension_funcs[EXT_glGetUniformSubroutineuiv]; + TRACE("(%d, %d, %p)\n", shadertype, location, params ); + ENTER_GL(); + func_glGetUniformSubroutineuiv( shadertype, location, params ); + LEAVE_GL(); +} + +static void WINAPI wine_glGetUniformdv( GLuint program, GLint location, GLdouble* params ) { + void (*func_glGetUniformdv)( GLuint, GLint, GLdouble* ) = extension_funcs[EXT_glGetUniformdv]; + TRACE("(%d, %d, %p)\n", program, location, params ); + ENTER_GL(); + func_glGetUniformdv( program, location, params ); + LEAVE_GL(); +} + static void WINAPI wine_glGetUniformfv( GLuint program, GLint location, GLfloat* params ) { void (*func_glGetUniformfv)( GLuint, GLint, GLfloat* ) = extension_funcs[EXT_glGetUniformfv]; TRACE("(%d, %d, %p)\n", program, location, params ); @@ -7256,6 +7670,16 @@ static GLboolean WINAPI wine_glIsNamedBufferResidentNV( GLuint buffer ) { return ret_value; } +static GLboolean WINAPI wine_glIsNamedStringARB( GLint namelen, char* name ) { + GLboolean ret_value; + GLboolean (*func_glIsNamedStringARB)( GLint, char* ) = extension_funcs[EXT_glIsNamedStringARB]; + TRACE("(%d, %p)\n", namelen, name ); + ENTER_GL(); + ret_value = func_glIsNamedStringARB( namelen, name ); + LEAVE_GL(); + return ret_value; +} + static GLboolean WINAPI wine_glIsObjectBufferATI( GLuint buffer ) { GLboolean ret_value; GLboolean (*func_glIsObjectBufferATI)( GLuint ) = extension_funcs[EXT_glIsObjectBufferATI]; @@ -7346,6 +7770,16 @@ static GLboolean WINAPI wine_glIsRenderbufferEXT( GLuint renderbuffer ) { return ret_value; } +static GLboolean WINAPI wine_glIsSampler( GLuint sampler ) { + GLboolean ret_value; + GLboolean (*func_glIsSampler)( GLuint ) = extension_funcs[EXT_glIsSampler]; + TRACE("(%d)\n", sampler ); + ENTER_GL(); + ret_value = func_glIsSampler( sampler ); + LEAVE_GL(); + return ret_value; +} + static GLboolean WINAPI wine_glIsShader( GLuint shader ) { GLboolean ret_value; GLboolean (*func_glIsShader)( GLuint ) = extension_funcs[EXT_glIsShader]; @@ -7376,6 +7810,16 @@ static GLboolean WINAPI wine_glIsTextureEXT( GLuint texture ) { return ret_value; } +static GLboolean WINAPI wine_glIsTransformFeedback( GLuint id ) { + GLboolean ret_value; + GLboolean (*func_glIsTransformFeedback)( GLuint ) = extension_funcs[EXT_glIsTransformFeedback]; + TRACE("(%d)\n", id ); + ENTER_GL(); + ret_value = func_glIsTransformFeedback( id ); + LEAVE_GL(); + return ret_value; +} + static GLboolean WINAPI wine_glIsTransformFeedbackNV( GLuint id ) { GLboolean ret_value; GLboolean (*func_glIsTransformFeedbackNV)( GLuint ) = extension_funcs[EXT_glIsTransformFeedbackNV]; @@ -8844,6 +9288,70 @@ static void WINAPI wine_glMultiTexCoord4svSGIS( GLenum target, GLshort * v ) { LEAVE_GL(); } +static void WINAPI wine_glMultiTexCoordP1ui( GLenum texture, GLenum type, GLuint coords ) { + void (*func_glMultiTexCoordP1ui)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glMultiTexCoordP1ui]; + TRACE("(%d, %d, %d)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP1ui( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP1uiv( GLenum texture, GLenum type, GLuint* coords ) { + void (*func_glMultiTexCoordP1uiv)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glMultiTexCoordP1uiv]; + TRACE("(%d, %d, %p)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP1uiv( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP2ui( GLenum texture, GLenum type, GLuint coords ) { + void (*func_glMultiTexCoordP2ui)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glMultiTexCoordP2ui]; + TRACE("(%d, %d, %d)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP2ui( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP2uiv( GLenum texture, GLenum type, GLuint* coords ) { + void (*func_glMultiTexCoordP2uiv)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glMultiTexCoordP2uiv]; + TRACE("(%d, %d, %p)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP2uiv( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP3ui( GLenum texture, GLenum type, GLuint coords ) { + void (*func_glMultiTexCoordP3ui)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glMultiTexCoordP3ui]; + TRACE("(%d, %d, %d)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP3ui( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP3uiv( GLenum texture, GLenum type, GLuint* coords ) { + void (*func_glMultiTexCoordP3uiv)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glMultiTexCoordP3uiv]; + TRACE("(%d, %d, %p)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP3uiv( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP4ui( GLenum texture, GLenum type, GLuint coords ) { + void (*func_glMultiTexCoordP4ui)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glMultiTexCoordP4ui]; + TRACE("(%d, %d, %d)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP4ui( texture, type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glMultiTexCoordP4uiv( GLenum texture, GLenum type, GLuint* coords ) { + void (*func_glMultiTexCoordP4uiv)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glMultiTexCoordP4uiv]; + TRACE("(%d, %d, %p)\n", texture, type, coords ); + ENTER_GL(); + func_glMultiTexCoordP4uiv( texture, type, coords ); + LEAVE_GL(); +} + static void WINAPI wine_glMultiTexCoordPointerEXT( GLenum texunit, GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { void (*func_glMultiTexCoordPointerEXT)( GLenum, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glMultiTexCoordPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", texunit, size, type, stride, pointer ); @@ -9236,6 +9744,14 @@ static void WINAPI wine_glNamedRenderbufferStorageMultisampleEXT( GLuint renderb LEAVE_GL(); } +static void WINAPI wine_glNamedStringARB( GLenum type, GLint namelen, char* name, GLint stringlen, char* string ) { + void (*func_glNamedStringARB)( GLenum, GLint, char*, GLint, char* ) = extension_funcs[EXT_glNamedStringARB]; + TRACE("(%d, %d, %p, %d, %p)\n", type, namelen, name, stringlen, string ); + ENTER_GL(); + func_glNamedStringARB( type, namelen, name, stringlen, string ); + LEAVE_GL(); +} + static GLuint WINAPI wine_glNewBufferRegion( GLenum type ) { GLuint ret_value; GLuint (*func_glNewBufferRegion)( GLenum ) = extension_funcs[EXT_glNewBufferRegion]; @@ -9296,6 +9812,22 @@ static void WINAPI wine_glNormalFormatNV( GLenum type, GLsizei stride ) { LEAVE_GL(); } +static void WINAPI wine_glNormalP3ui( GLenum type, GLuint coords ) { + void (*func_glNormalP3ui)( GLenum, GLuint ) = extension_funcs[EXT_glNormalP3ui]; + TRACE("(%d, %d)\n", type, coords ); + ENTER_GL(); + func_glNormalP3ui( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glNormalP3uiv( GLenum type, GLuint* coords ) { + void (*func_glNormalP3uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glNormalP3uiv]; + TRACE("(%d, %p)\n", type, coords ); + ENTER_GL(); + func_glNormalP3uiv( type, coords ); + LEAVE_GL(); +} + static void WINAPI wine_glNormalPointerEXT( GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { void (*func_glNormalPointerEXT)( GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glNormalPointerEXT]; TRACE("(%d, %d, %d, %p)\n", type, stride, count, pointer ); @@ -9444,6 +9976,30 @@ static void WINAPI wine_glPassTexCoordATI( GLuint dst, GLuint coord, GLenum swiz LEAVE_GL(); } +static void WINAPI wine_glPatchParameterfv( GLenum pname, GLfloat* values ) { + void (*func_glPatchParameterfv)( GLenum, GLfloat* ) = extension_funcs[EXT_glPatchParameterfv]; + TRACE("(%d, %p)\n", pname, values ); + ENTER_GL(); + func_glPatchParameterfv( pname, values ); + LEAVE_GL(); +} + +static void WINAPI wine_glPatchParameteri( GLenum pname, GLint value ) { + void (*func_glPatchParameteri)( GLenum, GLint ) = extension_funcs[EXT_glPatchParameteri]; + TRACE("(%d, %d)\n", pname, value ); + ENTER_GL(); + func_glPatchParameteri( pname, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glPauseTransformFeedback( void ) { + void (*func_glPauseTransformFeedback)( void ) = extension_funcs[EXT_glPauseTransformFeedback]; + TRACE("()\n"); + ENTER_GL(); + func_glPauseTransformFeedback( ); + LEAVE_GL(); +} + static void WINAPI wine_glPauseTransformFeedbackNV( void ) { void (*func_glPauseTransformFeedbackNV)( void ) = extension_funcs[EXT_glPauseTransformFeedbackNV]; TRACE("()\n"); @@ -10016,6 +10572,22 @@ static void WINAPI wine_glProgramStringARB( GLenum target, GLenum format, GLsize LEAVE_GL(); } +static void WINAPI wine_glProgramUniform1dEXT( GLuint program, GLint location, GLdouble x ) { + void (*func_glProgramUniform1dEXT)( GLuint, GLint, GLdouble ) = extension_funcs[EXT_glProgramUniform1dEXT]; + TRACE("(%d, %d, %f)\n", program, location, x ); + ENTER_GL(); + func_glProgramUniform1dEXT( program, location, x ); + LEAVE_GL(); +} + +static void WINAPI wine_glProgramUniform1dvEXT( GLuint program, GLint location, GLsizei count, GLdouble* value ) { + void (*func_glProgramUniform1dvEXT)( GLuint, GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glProgramUniform1dvEXT]; + TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); + ENTER_GL(); + func_glProgramUniform1dvEXT( program, location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniform1fEXT( GLuint program, GLint location, GLfloat v0 ) { void (*func_glProgramUniform1fEXT)( GLuint, GLint, GLfloat ) = extension_funcs[EXT_glProgramUniform1fEXT]; TRACE("(%d, %d, %f)\n", program, location, v0 ); @@ -10064,8 +10636,24 @@ static void WINAPI wine_glProgramUniform1uivEXT( GLuint program, GLint location, LEAVE_GL(); } -static void WINAPI wine_glProgramUniform2fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) { - void (*func_glProgramUniform2fEXT)( GLuint, GLint, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform2fEXT]; +static void WINAPI wine_glProgramUniform2dEXT( GLuint program, GLint location, GLdouble x, GLdouble y ) { + void (*func_glProgramUniform2dEXT)( GLuint, GLint, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramUniform2dEXT]; + TRACE("(%d, %d, %f, %f)\n", program, location, x, y ); + ENTER_GL(); + func_glProgramUniform2dEXT( program, location, x, y ); + LEAVE_GL(); +} + +static void WINAPI wine_glProgramUniform2dvEXT( GLuint program, GLint location, GLsizei count, GLdouble* value ) { + void (*func_glProgramUniform2dvEXT)( GLuint, GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glProgramUniform2dvEXT]; + TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); + ENTER_GL(); + func_glProgramUniform2dvEXT( program, location, count, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glProgramUniform2fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) { + void (*func_glProgramUniform2fEXT)( GLuint, GLint, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform2fEXT]; TRACE("(%d, %d, %f, %f)\n", program, location, v0, v1 ); ENTER_GL(); func_glProgramUniform2fEXT( program, location, v0, v1 ); @@ -10112,6 +10700,22 @@ static void WINAPI wine_glProgramUniform2uivEXT( GLuint program, GLint location, LEAVE_GL(); } +static void WINAPI wine_glProgramUniform3dEXT( GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z ) { + void (*func_glProgramUniform3dEXT)( GLuint, GLint, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramUniform3dEXT]; + TRACE("(%d, %d, %f, %f, %f)\n", program, location, x, y, z ); + ENTER_GL(); + func_glProgramUniform3dEXT( program, location, x, y, z ); + LEAVE_GL(); +} + +static void WINAPI wine_glProgramUniform3dvEXT( GLuint program, GLint location, GLsizei count, GLdouble* value ) { + void (*func_glProgramUniform3dvEXT)( GLuint, GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glProgramUniform3dvEXT]; + TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); + ENTER_GL(); + func_glProgramUniform3dvEXT( program, location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniform3fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) { void (*func_glProgramUniform3fEXT)( GLuint, GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform3fEXT]; TRACE("(%d, %d, %f, %f, %f)\n", program, location, v0, v1, v2 ); @@ -10160,6 +10764,22 @@ static void WINAPI wine_glProgramUniform3uivEXT( GLuint program, GLint location, LEAVE_GL(); } +static void WINAPI wine_glProgramUniform4dEXT( GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { + void (*func_glProgramUniform4dEXT)( GLuint, GLint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramUniform4dEXT]; + TRACE("(%d, %d, %f, %f, %f, %f)\n", program, location, x, y, z, w ); + ENTER_GL(); + func_glProgramUniform4dEXT( program, location, x, y, z, w ); + LEAVE_GL(); +} + +static void WINAPI wine_glProgramUniform4dvEXT( GLuint program, GLint location, GLsizei count, GLdouble* value ) { + void (*func_glProgramUniform4dvEXT)( GLuint, GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glProgramUniform4dvEXT]; + TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); + ENTER_GL(); + func_glProgramUniform4dvEXT( program, location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniform4fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { void (*func_glProgramUniform4fEXT)( GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform4fEXT]; TRACE("(%d, %d, %f, %f, %f, %f)\n", program, location, v0, v1, v2, v3 ); @@ -10208,6 +10828,14 @@ static void WINAPI wine_glProgramUniform4uivEXT( GLuint program, GLint location, LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix2dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix2dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix2dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix2dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix2fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix2fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10216,6 +10844,14 @@ static void WINAPI wine_glProgramUniformMatrix2fvEXT( GLuint program, GLint loca LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix2x3dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix2x3dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix2x3dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix2x3dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix2x3fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix2x3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix2x3fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10224,6 +10860,14 @@ static void WINAPI wine_glProgramUniformMatrix2x3fvEXT( GLuint program, GLint lo LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix2x4dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix2x4dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix2x4dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix2x4dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix2x4fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix2x4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix2x4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10232,6 +10876,14 @@ static void WINAPI wine_glProgramUniformMatrix2x4fvEXT( GLuint program, GLint lo LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix3dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix3dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix3dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix3dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix3fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix3fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10240,6 +10892,14 @@ static void WINAPI wine_glProgramUniformMatrix3fvEXT( GLuint program, GLint loca LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix3x2dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix3x2dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix3x2dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix3x2dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix3x2fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix3x2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix3x2fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10248,6 +10908,14 @@ static void WINAPI wine_glProgramUniformMatrix3x2fvEXT( GLuint program, GLint lo LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix3x4dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix3x4dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix3x4dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix3x4dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix3x4fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix3x4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix3x4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10256,6 +10924,14 @@ static void WINAPI wine_glProgramUniformMatrix3x4fvEXT( GLuint program, GLint lo LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix4dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix4dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix4dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix4dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix4fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10264,6 +10940,14 @@ static void WINAPI wine_glProgramUniformMatrix4fvEXT( GLuint program, GLint loca LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix4x2dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix4x2dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix4x2dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix4x2dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix4x2fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix4x2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix4x2fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10272,6 +10956,14 @@ static void WINAPI wine_glProgramUniformMatrix4x2fvEXT( GLuint program, GLint lo LEAVE_GL(); } +static void WINAPI wine_glProgramUniformMatrix4x3dvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glProgramUniformMatrix4x3dvEXT)( GLuint, GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glProgramUniformMatrix4x3dvEXT]; + TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); + ENTER_GL(); + func_glProgramUniformMatrix4x3dvEXT( program, location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glProgramUniformMatrix4x3fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glProgramUniformMatrix4x3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix4x3fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); @@ -10328,6 +11020,14 @@ static void WINAPI wine_glPushClientAttribDefaultEXT( GLbitfield mask ) { LEAVE_GL(); } +static void WINAPI wine_glQueryCounter( GLuint id, GLenum target ) { + void (*func_glQueryCounter)( GLuint, GLenum ) = extension_funcs[EXT_glQueryCounter]; + TRACE("(%d, %d)\n", id, target ); + ENTER_GL(); + func_glQueryCounter( id, target ); + LEAVE_GL(); +} + static void WINAPI wine_glReadBufferRegion( GLenum region, GLint x, GLint y, GLsizei width, GLsizei height ) { void (*func_glReadBufferRegion)( GLenum, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glReadBufferRegion]; TRACE("(%d, %d, %d, %d, %d)\n", region, x, y, width, height ); @@ -10624,6 +11324,14 @@ static void WINAPI wine_glResizeBuffersMESA( void ) { LEAVE_GL(); } +static void WINAPI wine_glResumeTransformFeedback( void ) { + void (*func_glResumeTransformFeedback)( void ) = extension_funcs[EXT_glResumeTransformFeedback]; + TRACE("()\n"); + ENTER_GL(); + func_glResumeTransformFeedback( ); + LEAVE_GL(); +} + static void WINAPI wine_glResumeTransformFeedbackNV( void ) { void (*func_glResumeTransformFeedbackNV)( void ) = extension_funcs[EXT_glResumeTransformFeedbackNV]; TRACE("()\n"); @@ -10704,6 +11412,54 @@ static void WINAPI wine_glSamplePatternSGIS( GLenum pattern ) { LEAVE_GL(); } +static void WINAPI wine_glSamplerParameterIiv( GLuint sampler, GLenum pname, GLint* param ) { + void (*func_glSamplerParameterIiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glSamplerParameterIiv]; + TRACE("(%d, %d, %p)\n", sampler, pname, param ); + ENTER_GL(); + func_glSamplerParameterIiv( sampler, pname, param ); + LEAVE_GL(); +} + +static void WINAPI wine_glSamplerParameterIuiv( GLuint sampler, GLenum pname, GLuint* param ) { + void (*func_glSamplerParameterIuiv)( GLuint, GLenum, GLuint* ) = extension_funcs[EXT_glSamplerParameterIuiv]; + TRACE("(%d, %d, %p)\n", sampler, pname, param ); + ENTER_GL(); + func_glSamplerParameterIuiv( sampler, pname, param ); + LEAVE_GL(); +} + +static void WINAPI wine_glSamplerParameterf( GLuint sampler, GLenum pname, GLfloat param ) { + void (*func_glSamplerParameterf)( GLuint, GLenum, GLfloat ) = extension_funcs[EXT_glSamplerParameterf]; + TRACE("(%d, %d, %f)\n", sampler, pname, param ); + ENTER_GL(); + func_glSamplerParameterf( sampler, pname, param ); + LEAVE_GL(); +} + +static void WINAPI wine_glSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat* param ) { + void (*func_glSamplerParameterfv)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glSamplerParameterfv]; + TRACE("(%d, %d, %p)\n", sampler, pname, param ); + ENTER_GL(); + func_glSamplerParameterfv( sampler, pname, param ); + LEAVE_GL(); +} + +static void WINAPI wine_glSamplerParameteri( GLuint sampler, GLenum pname, GLint param ) { + void (*func_glSamplerParameteri)( GLuint, GLenum, GLint ) = extension_funcs[EXT_glSamplerParameteri]; + TRACE("(%d, %d, %d)\n", sampler, pname, param ); + ENTER_GL(); + func_glSamplerParameteri( sampler, pname, param ); + LEAVE_GL(); +} + +static void WINAPI wine_glSamplerParameteriv( GLuint sampler, GLenum pname, GLint* param ) { + void (*func_glSamplerParameteriv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glSamplerParameteriv]; + TRACE("(%d, %d, %p)\n", sampler, pname, param ); + ENTER_GL(); + func_glSamplerParameteriv( sampler, pname, param ); + LEAVE_GL(); +} + static void WINAPI wine_glSecondaryColor3b( GLbyte red, GLbyte green, GLbyte blue ) { void (*func_glSecondaryColor3b)( GLbyte, GLbyte, GLbyte ) = extension_funcs[EXT_glSecondaryColor3b]; TRACE("(%d, %d, %d)\n", red, green, blue ); @@ -10984,6 +11740,22 @@ static void WINAPI wine_glSecondaryColorFormatNV( GLint size, GLenum type, GLsiz LEAVE_GL(); } +static void WINAPI wine_glSecondaryColorP3ui( GLenum type, GLuint color ) { + void (*func_glSecondaryColorP3ui)( GLenum, GLuint ) = extension_funcs[EXT_glSecondaryColorP3ui]; + TRACE("(%d, %d)\n", type, color ); + ENTER_GL(); + func_glSecondaryColorP3ui( type, color ); + LEAVE_GL(); +} + +static void WINAPI wine_glSecondaryColorP3uiv( GLenum type, GLuint* color ) { + void (*func_glSecondaryColorP3uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glSecondaryColorP3uiv]; + TRACE("(%d, %p)\n", type, color ); + ENTER_GL(); + func_glSecondaryColorP3uiv( type, color ); + LEAVE_GL(); +} + static void WINAPI wine_glSecondaryColorPointer( GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { void (*func_glSecondaryColorPointer)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glSecondaryColorPointer]; TRACE("(%d, %d, %d, %p)\n", size, type, stride, pointer ); @@ -11622,6 +12394,70 @@ static void WINAPI wine_glTexCoordFormatNV( GLint size, GLenum type, GLsizei str LEAVE_GL(); } +static void WINAPI wine_glTexCoordP1ui( GLenum type, GLuint coords ) { + void (*func_glTexCoordP1ui)( GLenum, GLuint ) = extension_funcs[EXT_glTexCoordP1ui]; + TRACE("(%d, %d)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP1ui( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP1uiv( GLenum type, GLuint* coords ) { + void (*func_glTexCoordP1uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glTexCoordP1uiv]; + TRACE("(%d, %p)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP1uiv( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP2ui( GLenum type, GLuint coords ) { + void (*func_glTexCoordP2ui)( GLenum, GLuint ) = extension_funcs[EXT_glTexCoordP2ui]; + TRACE("(%d, %d)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP2ui( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP2uiv( GLenum type, GLuint* coords ) { + void (*func_glTexCoordP2uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glTexCoordP2uiv]; + TRACE("(%d, %p)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP2uiv( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP3ui( GLenum type, GLuint coords ) { + void (*func_glTexCoordP3ui)( GLenum, GLuint ) = extension_funcs[EXT_glTexCoordP3ui]; + TRACE("(%d, %d)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP3ui( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP3uiv( GLenum type, GLuint* coords ) { + void (*func_glTexCoordP3uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glTexCoordP3uiv]; + TRACE("(%d, %p)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP3uiv( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP4ui( GLenum type, GLuint coords ) { + void (*func_glTexCoordP4ui)( GLenum, GLuint ) = extension_funcs[EXT_glTexCoordP4ui]; + TRACE("(%d, %d)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP4ui( type, coords ); + LEAVE_GL(); +} + +static void WINAPI wine_glTexCoordP4uiv( GLenum type, GLuint* coords ) { + void (*func_glTexCoordP4uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glTexCoordP4uiv]; + TRACE("(%d, %p)\n", type, coords ); + ENTER_GL(); + func_glTexCoordP4uiv( type, coords ); + LEAVE_GL(); +} + static void WINAPI wine_glTexCoordPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { void (*func_glTexCoordPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glTexCoordPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", size, type, stride, count, pointer ); @@ -11974,6 +12810,22 @@ static void WINAPI wine_glTransformFeedbackVaryingsNV( GLuint program, GLsizei c LEAVE_GL(); } +static void WINAPI wine_glUniform1d( GLint location, GLdouble x ) { + void (*func_glUniform1d)( GLint, GLdouble ) = extension_funcs[EXT_glUniform1d]; + TRACE("(%d, %f)\n", location, x ); + ENTER_GL(); + func_glUniform1d( location, x ); + LEAVE_GL(); +} + +static void WINAPI wine_glUniform1dv( GLint location, GLsizei count, GLdouble* value ) { + void (*func_glUniform1dv)( GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glUniform1dv]; + TRACE("(%d, %d, %p)\n", location, count, value ); + ENTER_GL(); + func_glUniform1dv( location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniform1f( GLint location, GLfloat v0 ) { void (*func_glUniform1f)( GLint, GLfloat ) = extension_funcs[EXT_glUniform1f]; TRACE("(%d, %f)\n", location, v0 ); @@ -12070,6 +12922,22 @@ static void WINAPI wine_glUniform1uivEXT( GLint location, GLsizei count, GLuint* LEAVE_GL(); } +static void WINAPI wine_glUniform2d( GLint location, GLdouble x, GLdouble y ) { + void (*func_glUniform2d)( GLint, GLdouble, GLdouble ) = extension_funcs[EXT_glUniform2d]; + TRACE("(%d, %f, %f)\n", location, x, y ); + ENTER_GL(); + func_glUniform2d( location, x, y ); + LEAVE_GL(); +} + +static void WINAPI wine_glUniform2dv( GLint location, GLsizei count, GLdouble* value ) { + void (*func_glUniform2dv)( GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glUniform2dv]; + TRACE("(%d, %d, %p)\n", location, count, value ); + ENTER_GL(); + func_glUniform2dv( location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniform2f( GLint location, GLfloat v0, GLfloat v1 ) { void (*func_glUniform2f)( GLint, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform2f]; TRACE("(%d, %f, %f)\n", location, v0, v1 ); @@ -12166,6 +13034,22 @@ static void WINAPI wine_glUniform2uivEXT( GLint location, GLsizei count, GLuint* LEAVE_GL(); } +static void WINAPI wine_glUniform3d( GLint location, GLdouble x, GLdouble y, GLdouble z ) { + void (*func_glUniform3d)( GLint, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glUniform3d]; + TRACE("(%d, %f, %f, %f)\n", location, x, y, z ); + ENTER_GL(); + func_glUniform3d( location, x, y, z ); + LEAVE_GL(); +} + +static void WINAPI wine_glUniform3dv( GLint location, GLsizei count, GLdouble* value ) { + void (*func_glUniform3dv)( GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glUniform3dv]; + TRACE("(%d, %d, %p)\n", location, count, value ); + ENTER_GL(); + func_glUniform3dv( location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) { void (*func_glUniform3f)( GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform3f]; TRACE("(%d, %f, %f, %f)\n", location, v0, v1, v2 ); @@ -12262,6 +13146,22 @@ static void WINAPI wine_glUniform3uivEXT( GLint location, GLsizei count, GLuint* LEAVE_GL(); } +static void WINAPI wine_glUniform4d( GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { + void (*func_glUniform4d)( GLint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glUniform4d]; + TRACE("(%d, %f, %f, %f, %f)\n", location, x, y, z, w ); + ENTER_GL(); + func_glUniform4d( location, x, y, z, w ); + LEAVE_GL(); +} + +static void WINAPI wine_glUniform4dv( GLint location, GLsizei count, GLdouble* value ) { + void (*func_glUniform4dv)( GLint, GLsizei, GLdouble* ) = extension_funcs[EXT_glUniform4dv]; + TRACE("(%d, %d, %p)\n", location, count, value ); + ENTER_GL(); + func_glUniform4dv( location, count, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { void (*func_glUniform4f)( GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform4f]; TRACE("(%d, %f, %f, %f, %f)\n", location, v0, v1, v2, v3 ); @@ -12374,6 +13274,14 @@ static void WINAPI wine_glUniformBufferEXT( GLuint program, GLint location, GLui LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix2dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix2dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix2dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix2dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12390,6 +13298,14 @@ static void WINAPI wine_glUniformMatrix2fvARB( GLint location, GLsizei count, GL LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix2x3dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix2x3dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix2x3dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix2x3dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix2x3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2x3fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12398,6 +13314,14 @@ static void WINAPI wine_glUniformMatrix2x3fv( GLint location, GLsizei count, GLb LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix2x4dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix2x4dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix2x4dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix2x4dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix2x4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2x4fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12406,6 +13330,14 @@ static void WINAPI wine_glUniformMatrix2x4fv( GLint location, GLsizei count, GLb LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix3dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix3dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix3dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix3dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12422,6 +13354,14 @@ static void WINAPI wine_glUniformMatrix3fvARB( GLint location, GLsizei count, GL LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix3x2dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix3x2dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix3x2dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix3x2dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix3x2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3x2fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12430,6 +13370,14 @@ static void WINAPI wine_glUniformMatrix3x2fv( GLint location, GLsizei count, GLb LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix3x4dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix3x4dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix3x4dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix3x4dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix3x4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3x4fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12438,6 +13386,14 @@ static void WINAPI wine_glUniformMatrix3x4fv( GLint location, GLsizei count, GLb LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix4dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix4dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix4dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix4dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12454,6 +13410,14 @@ static void WINAPI wine_glUniformMatrix4fvARB( GLint location, GLsizei count, GL LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix4x2dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix4x2dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix4x2dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix4x2dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix4x2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4x2fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12462,6 +13426,14 @@ static void WINAPI wine_glUniformMatrix4x2fv( GLint location, GLsizei count, GLb LEAVE_GL(); } +static void WINAPI wine_glUniformMatrix4x3dv( GLint location, GLsizei count, GLboolean transpose, GLdouble* value ) { + void (*func_glUniformMatrix4x3dv)( GLint, GLsizei, GLboolean, GLdouble* ) = extension_funcs[EXT_glUniformMatrix4x3dv]; + TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); + ENTER_GL(); + func_glUniformMatrix4x3dv( location, count, transpose, value ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { void (*func_glUniformMatrix4x3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4x3fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); @@ -12470,6 +13442,14 @@ static void WINAPI wine_glUniformMatrix4x3fv( GLint location, GLsizei count, GLb LEAVE_GL(); } +static void WINAPI wine_glUniformSubroutinesuiv( GLenum shadertype, GLsizei count, GLuint* indices ) { + void (*func_glUniformSubroutinesuiv)( GLenum, GLsizei, GLuint* ) = extension_funcs[EXT_glUniformSubroutinesuiv]; + TRACE("(%d, %d, %p)\n", shadertype, count, indices ); + ENTER_GL(); + func_glUniformSubroutinesuiv( shadertype, count, indices ); + LEAVE_GL(); +} + static void WINAPI wine_glUniformui64NV( GLint location, UINT64 value ) { void (*func_glUniformui64NV)( GLint, UINT64 ) = extension_funcs[EXT_glUniformui64NV]; TRACE("(%d, %s)\n", location, wine_dbgstr_longlong(value) ); @@ -13948,6 +14928,70 @@ static void WINAPI wine_glVertexAttribIPointerEXT( GLuint index, GLint size, GLe LEAVE_GL(); } +static void WINAPI wine_glVertexAttribP1ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ) { + void (*func_glVertexAttribP1ui)( GLuint, GLenum, GLboolean, GLuint ) = extension_funcs[EXT_glVertexAttribP1ui]; + TRACE("(%d, %d, %d, %d)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP1ui( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP1uiv( GLuint index, GLenum type, GLboolean normalized, GLuint* value ) { + void (*func_glVertexAttribP1uiv)( GLuint, GLenum, GLboolean, GLuint* ) = extension_funcs[EXT_glVertexAttribP1uiv]; + TRACE("(%d, %d, %d, %p)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP1uiv( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP2ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ) { + void (*func_glVertexAttribP2ui)( GLuint, GLenum, GLboolean, GLuint ) = extension_funcs[EXT_glVertexAttribP2ui]; + TRACE("(%d, %d, %d, %d)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP2ui( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP2uiv( GLuint index, GLenum type, GLboolean normalized, GLuint* value ) { + void (*func_glVertexAttribP2uiv)( GLuint, GLenum, GLboolean, GLuint* ) = extension_funcs[EXT_glVertexAttribP2uiv]; + TRACE("(%d, %d, %d, %p)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP2uiv( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP3ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ) { + void (*func_glVertexAttribP3ui)( GLuint, GLenum, GLboolean, GLuint ) = extension_funcs[EXT_glVertexAttribP3ui]; + TRACE("(%d, %d, %d, %d)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP3ui( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP3uiv( GLuint index, GLenum type, GLboolean normalized, GLuint* value ) { + void (*func_glVertexAttribP3uiv)( GLuint, GLenum, GLboolean, GLuint* ) = extension_funcs[EXT_glVertexAttribP3uiv]; + TRACE("(%d, %d, %d, %p)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP3uiv( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP4ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ) { + void (*func_glVertexAttribP4ui)( GLuint, GLenum, GLboolean, GLuint ) = extension_funcs[EXT_glVertexAttribP4ui]; + TRACE("(%d, %d, %d, %d)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP4ui( index, type, normalized, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexAttribP4uiv( GLuint index, GLenum type, GLboolean normalized, GLuint* value ) { + void (*func_glVertexAttribP4uiv)( GLuint, GLenum, GLboolean, GLuint* ) = extension_funcs[EXT_glVertexAttribP4uiv]; + TRACE("(%d, %d, %d, %p)\n", index, type, normalized, value ); + ENTER_GL(); + func_glVertexAttribP4uiv( index, type, normalized, value ); + LEAVE_GL(); +} + static void WINAPI wine_glVertexAttribPointer( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid* pointer ) { void (*func_glVertexAttribPointer)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexAttribPointer]; TRACE("(%d, %d, %d, %d, %d, %p)\n", index, size, type, normalized, stride, pointer ); @@ -14140,6 +15184,54 @@ static void WINAPI wine_glVertexFormatNV( GLint size, GLenum type, GLsizei strid LEAVE_GL(); } +static void WINAPI wine_glVertexP2ui( GLenum type, GLuint value ) { + void (*func_glVertexP2ui)( GLenum, GLuint ) = extension_funcs[EXT_glVertexP2ui]; + TRACE("(%d, %d)\n", type, value ); + ENTER_GL(); + func_glVertexP2ui( type, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexP2uiv( GLenum type, GLuint* value ) { + void (*func_glVertexP2uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glVertexP2uiv]; + TRACE("(%d, %p)\n", type, value ); + ENTER_GL(); + func_glVertexP2uiv( type, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexP3ui( GLenum type, GLuint value ) { + void (*func_glVertexP3ui)( GLenum, GLuint ) = extension_funcs[EXT_glVertexP3ui]; + TRACE("(%d, %d)\n", type, value ); + ENTER_GL(); + func_glVertexP3ui( type, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexP3uiv( GLenum type, GLuint* value ) { + void (*func_glVertexP3uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glVertexP3uiv]; + TRACE("(%d, %p)\n", type, value ); + ENTER_GL(); + func_glVertexP3uiv( type, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexP4ui( GLenum type, GLuint value ) { + void (*func_glVertexP4ui)( GLenum, GLuint ) = extension_funcs[EXT_glVertexP4ui]; + TRACE("(%d, %d)\n", type, value ); + ENTER_GL(); + func_glVertexP4ui( type, value ); + LEAVE_GL(); +} + +static void WINAPI wine_glVertexP4uiv( GLenum type, GLuint* value ) { + void (*func_glVertexP4uiv)( GLenum, GLuint* ) = extension_funcs[EXT_glVertexP4uiv]; + TRACE("(%d, %p)\n", type, value ); + ENTER_GL(); + func_glVertexP4uiv( type, value ); + LEAVE_GL(); +} + static void WINAPI wine_glVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { void (*func_glVertexPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", size, type, stride, count, pointer ); @@ -15056,6 +16148,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glBeginPerfMonitorAMD", "GL_AMD_performance_monitor", wine_glBeginPerfMonitorAMD }, { "glBeginQuery", "GL_VERSION_1_5", wine_glBeginQuery }, { "glBeginQueryARB", "GL_ARB_occlusion_query", wine_glBeginQueryARB }, + { "glBeginQueryIndexed", "GL_ARB_transform_feedback3", wine_glBeginQueryIndexed }, { "glBeginTransformFeedback", "GL_VERSION_3_0", wine_glBeginTransformFeedback }, { "glBeginTransformFeedbackEXT", "GL_EXT_transform_feedback", wine_glBeginTransformFeedbackEXT }, { "glBeginTransformFeedbackNV", "GL_NV_transform_feedback", wine_glBeginTransformFeedbackNV }, @@ -15075,6 +16168,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glBindBufferRangeNV", "GL_NV_transform_feedback", wine_glBindBufferRangeNV }, { "glBindFragDataLocation", "GL_VERSION_3_0", wine_glBindFragDataLocation }, { "glBindFragDataLocationEXT", "GL_EXT_gpu_shader4", wine_glBindFragDataLocationEXT }, + { "glBindFragDataLocationIndexed", "GL_ARB_blend_func_extended", wine_glBindFragDataLocationIndexed }, { "glBindFragmentShaderATI", "GL_ATI_fragment_shader", wine_glBindFragmentShaderATI }, { "glBindFramebuffer", "GL_ARB_framebuffer_object", wine_glBindFramebuffer }, { "glBindFramebufferEXT", "GL_EXT_framebuffer_object", wine_glBindFramebufferEXT }, @@ -15086,9 +16180,11 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glBindProgramNV", "GL_NV_vertex_program", wine_glBindProgramNV }, { "glBindRenderbuffer", "GL_ARB_framebuffer_object", wine_glBindRenderbuffer }, { "glBindRenderbufferEXT", "GL_EXT_framebuffer_object", wine_glBindRenderbufferEXT }, + { "glBindSampler", "GL_ARB_sampler_objects", wine_glBindSampler }, { "glBindTexGenParameterEXT", "GL_EXT_vertex_shader", wine_glBindTexGenParameterEXT }, { "glBindTextureEXT", "GL_EXT_texture_object", wine_glBindTextureEXT }, { "glBindTextureUnitParameterEXT", "GL_EXT_vertex_shader", wine_glBindTextureUnitParameterEXT }, + { "glBindTransformFeedback", "GL_ARB_transform_feedback2", wine_glBindTransformFeedback }, { "glBindTransformFeedbackNV", "GL_NV_transform_feedback2", wine_glBindTransformFeedbackNV }, { "glBindVertexArray", "GL_ARB_vertex_array_object", wine_glBindVertexArray }, { "glBindVertexArrayAPPLE", "GL_APPLE_vertex_array_object", wine_glBindVertexArrayAPPLE }, @@ -15167,6 +16263,10 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glColorFragmentOp3ATI", "GL_ATI_fragment_shader", wine_glColorFragmentOp3ATI }, { "glColorMaskIndexedEXT", "GL_EXT_draw_buffers2", wine_glColorMaskIndexedEXT }, { "glColorMaski", "GL_VERSION_3_0", wine_glColorMaski }, + { "glColorP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glColorP3ui }, + { "glColorP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glColorP3uiv }, + { "glColorP4ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glColorP4ui }, + { "glColorP4uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glColorP4uiv }, { "glColorPointerEXT", "GL_EXT_vertex_array", wine_glColorPointerEXT }, { "glColorPointerListIBM", "GL_IBM_vertex_array_lists", wine_glColorPointerListIBM }, { "glColorPointervINTEL", "GL_INTEL_parallel_arrays", wine_glColorPointervINTEL }, @@ -15188,6 +16288,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glCombinerStageParameterfvNV", "GL_NV_register_combiners2", wine_glCombinerStageParameterfvNV }, { "glCompileShader", "GL_VERSION_2_0", wine_glCompileShader }, { "glCompileShaderARB", "GL_ARB_shader_objects", wine_glCompileShaderARB }, + { "glCompileShaderIncludeARB", "GL_ARB_shading_language_include", wine_glCompileShaderIncludeARB }, { "glCompressedMultiTexImage1DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexImage1DEXT }, { "glCompressedMultiTexImage2DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexImage2DEXT }, { "glCompressedMultiTexImage3DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexImage3DEXT }, @@ -15270,6 +16371,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glDeleteFragmentShaderATI", "GL_ATI_fragment_shader", wine_glDeleteFragmentShaderATI }, { "glDeleteFramebuffers", "GL_ARB_framebuffer_object", wine_glDeleteFramebuffers }, { "glDeleteFramebuffersEXT", "GL_EXT_framebuffer_object", wine_glDeleteFramebuffersEXT }, + { "glDeleteNamedStringARB", "GL_ARB_shading_language_include", wine_glDeleteNamedStringARB }, { "glDeleteObjectARB", "GL_ARB_shader_objects", wine_glDeleteObjectARB }, { "glDeleteObjectBufferATI", "GL_ATI_vertex_array_object", wine_glDeleteObjectBufferATI }, { "glDeleteOcclusionQueriesNV", "GL_NV_occlusion_query", wine_glDeleteOcclusionQueriesNV }, @@ -15281,9 +16383,11 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glDeleteQueriesARB", "GL_ARB_occlusion_query", wine_glDeleteQueriesARB }, { "glDeleteRenderbuffers", "GL_ARB_framebuffer_object", wine_glDeleteRenderbuffers }, { "glDeleteRenderbuffersEXT", "GL_EXT_framebuffer_object", wine_glDeleteRenderbuffersEXT }, + { "glDeleteSamplers", "GL_ARB_sampler_objects", wine_glDeleteSamplers }, { "glDeleteShader", "GL_VERSION_2_0", wine_glDeleteShader }, { "glDeleteSync", "GL_ARB_sync", wine_glDeleteSync }, { "glDeleteTexturesEXT", "GL_EXT_texture_object", wine_glDeleteTexturesEXT }, + { "glDeleteTransformFeedbacks", "GL_ARB_transform_feedback2", wine_glDeleteTransformFeedbacks }, { "glDeleteTransformFeedbacksNV", "GL_NV_transform_feedback2", wine_glDeleteTransformFeedbacksNV }, { "glDeleteVertexArrays", "GL_ARB_vertex_array_object", wine_glDeleteVertexArrays }, { "glDeleteVertexArraysAPPLE", "GL_APPLE_vertex_array_object", wine_glDeleteVertexArraysAPPLE }, @@ -15302,6 +16406,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glDisableVertexAttribArrayARB", "GL_ARB_vertex_program", wine_glDisableVertexAttribArrayARB }, { "glDisablei", "GL_VERSION_3_0", wine_glDisablei }, { "glDrawArraysEXT", "GL_EXT_vertex_array", wine_glDrawArraysEXT }, + { "glDrawArraysIndirect", "GL_ARB_draw_indirect", wine_glDrawArraysIndirect }, { "glDrawArraysInstanced", "GL_VERSION_3_1", wine_glDrawArraysInstanced }, { "glDrawArraysInstancedARB", "GL_ARB_draw_instanced", wine_glDrawArraysInstancedARB }, { "glDrawArraysInstancedEXT", "GL_EXT_draw_instanced", wine_glDrawArraysInstancedEXT }, @@ -15312,6 +16417,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glDrawElementArrayAPPLE", "GL_APPLE_element_array", wine_glDrawElementArrayAPPLE }, { "glDrawElementArrayATI", "GL_ATI_element_array", wine_glDrawElementArrayATI }, { "glDrawElementsBaseVertex", "GL_ARB_draw_elements_base_vertex", wine_glDrawElementsBaseVertex }, + { "glDrawElementsIndirect", "GL_ARB_draw_indirect", wine_glDrawElementsIndirect }, { "glDrawElementsInstanced", "GL_VERSION_3_1", wine_glDrawElementsInstanced }, { "glDrawElementsInstancedARB", "GL_ARB_draw_instanced", wine_glDrawElementsInstancedARB }, { "glDrawElementsInstancedBaseVertex", "GL_ARB_draw_elements_base_vertex", wine_glDrawElementsInstancedBaseVertex }, @@ -15322,7 +16428,9 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glDrawRangeElements", "GL_VERSION_1_2", wine_glDrawRangeElements }, { "glDrawRangeElementsBaseVertex", "GL_ARB_draw_elements_base_vertex", wine_glDrawRangeElementsBaseVertex }, { "glDrawRangeElementsEXT", "GL_EXT_draw_range_elements", wine_glDrawRangeElementsEXT }, + { "glDrawTransformFeedback", "GL_ARB_transform_feedback2", wine_glDrawTransformFeedback }, { "glDrawTransformFeedbackNV", "GL_NV_transform_feedback2", wine_glDrawTransformFeedbackNV }, + { "glDrawTransformFeedbackStream", "GL_ARB_transform_feedback3", wine_glDrawTransformFeedbackStream }, { "glEdgeFlagFormatNV", "GL_NV_vertex_buffer_unified_memory", wine_glEdgeFlagFormatNV }, { "glEdgeFlagPointerEXT", "GL_EXT_vertex_array", wine_glEdgeFlagPointerEXT }, { "glEdgeFlagPointerListIBM", "GL_IBM_vertex_array_lists", wine_glEdgeFlagPointerListIBM }, @@ -15342,6 +16450,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glEndPerfMonitorAMD", "GL_AMD_performance_monitor", wine_glEndPerfMonitorAMD }, { "glEndQuery", "GL_VERSION_1_5", wine_glEndQuery }, { "glEndQueryARB", "GL_ARB_occlusion_query", wine_glEndQueryARB }, + { "glEndQueryIndexed", "GL_ARB_transform_feedback3", wine_glEndQueryIndexed }, { "glEndTransformFeedback", "GL_VERSION_3_0", wine_glEndTransformFeedback }, { "glEndTransformFeedbackEXT", "GL_EXT_transform_feedback", wine_glEndTransformFeedbackEXT }, { "glEndTransformFeedbackNV", "GL_NV_transform_feedback", wine_glEndTransformFeedbackNV }, @@ -15407,7 +16516,6 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glFramebufferTexture3DEXT", "GL_EXT_framebuffer_object", wine_glFramebufferTexture3DEXT }, { "glFramebufferTextureARB", "GL_ARB_geometry_shader4", wine_glFramebufferTextureARB }, { "glFramebufferTextureEXT", "GL_NV_geometry_program4", wine_glFramebufferTextureEXT }, - { "glFramebufferTextureFace", "GL_VERSION_3_2", wine_glFramebufferTextureFace }, { "glFramebufferTextureFaceARB", "GL_ARB_geometry_shader4", wine_glFramebufferTextureFaceARB }, { "glFramebufferTextureFaceEXT", "GL_NV_geometry_program4", wine_glFramebufferTextureFaceEXT }, { "glFramebufferTextureLayer", "GL_ARB_framebuffer_object", wine_glFramebufferTextureLayer }, @@ -15430,8 +16538,10 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGenQueriesARB", "GL_ARB_occlusion_query", wine_glGenQueriesARB }, { "glGenRenderbuffers", "GL_ARB_framebuffer_object", wine_glGenRenderbuffers }, { "glGenRenderbuffersEXT", "GL_EXT_framebuffer_object", wine_glGenRenderbuffersEXT }, + { "glGenSamplers", "GL_ARB_sampler_objects", wine_glGenSamplers }, { "glGenSymbolsEXT", "GL_EXT_vertex_shader", wine_glGenSymbolsEXT }, { "glGenTexturesEXT", "GL_EXT_texture_object", wine_glGenTexturesEXT }, + { "glGenTransformFeedbacks", "GL_ARB_transform_feedback2", wine_glGenTransformFeedbacks }, { "glGenTransformFeedbacksNV", "GL_NV_transform_feedback2", wine_glGenTransformFeedbacksNV }, { "glGenVertexArrays", "GL_ARB_vertex_array_object", wine_glGenVertexArrays }, { "glGenVertexArraysAPPLE", "GL_APPLE_vertex_array_object", wine_glGenVertexArraysAPPLE }, @@ -15442,6 +16552,9 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGenerateTextureMipmapEXT", "GL_EXT_direct_state_access", wine_glGenerateTextureMipmapEXT }, { "glGetActiveAttrib", "GL_VERSION_2_0", wine_glGetActiveAttrib }, { "glGetActiveAttribARB", "GL_ARB_vertex_shader", wine_glGetActiveAttribARB }, + { "glGetActiveSubroutineName", "GL_ARB_shader_subroutine", wine_glGetActiveSubroutineName }, + { "glGetActiveSubroutineUniformName", "GL_ARB_shader_subroutine", wine_glGetActiveSubroutineUniformName }, + { "glGetActiveSubroutineUniformiv", "GL_ARB_shader_subroutine", wine_glGetActiveSubroutineUniformiv }, { "glGetActiveUniform", "GL_VERSION_2_0", wine_glGetActiveUniform }, { "glGetActiveUniformARB", "GL_ARB_shader_objects", wine_glGetActiveUniformARB }, { "glGetActiveUniformBlockName", "GL_ARB_uniform_buffer_object", wine_glGetActiveUniformBlockName }, @@ -15496,6 +16609,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGetFinalCombinerInputParameterivNV", "GL_NV_register_combiners", wine_glGetFinalCombinerInputParameterivNV }, { "glGetFloatIndexedvEXT", "GL_EXT_direct_state_access", wine_glGetFloatIndexedvEXT }, { "glGetFogFuncSGIS", "GL_SGIS_fog_function", wine_glGetFogFuncSGIS }, + { "glGetFragDataIndex", "GL_ARB_blend_func_extended", wine_glGetFragDataIndex }, { "glGetFragDataLocation", "GL_VERSION_3_0", wine_glGetFragDataLocation }, { "glGetFragDataLocationEXT", "GL_EXT_gpu_shader4", wine_glGetFragDataLocationEXT }, { "glGetFragmentLightfvSGIX", "GL_SGIX_fragment_lighting", wine_glGetFragmentLightfvSGIX }, @@ -15567,6 +16681,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGetNamedProgramStringEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramStringEXT }, { "glGetNamedProgramivEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramivEXT }, { "glGetNamedRenderbufferParameterivEXT", "GL_EXT_direct_state_access", wine_glGetNamedRenderbufferParameterivEXT }, + { "glGetNamedStringARB", "GL_ARB_shading_language_include", wine_glGetNamedStringARB }, + { "glGetNamedStringivARB", "GL_ARB_shading_language_include", wine_glGetNamedStringivARB }, { "glGetObjectBufferfvATI", "GL_ATI_vertex_array_object", wine_glGetObjectBufferfvATI }, { "glGetObjectBufferivATI", "GL_ATI_vertex_array_object", wine_glGetObjectBufferivATI }, { "glGetObjectParameterfvARB", "GL_ARB_shader_objects", wine_glGetObjectParameterfvARB }, @@ -15597,14 +16713,18 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGetProgramNamedParameterfvNV", "GL_NV_fragment_program", wine_glGetProgramNamedParameterfvNV }, { "glGetProgramParameterdvNV", "GL_NV_vertex_program", wine_glGetProgramParameterdvNV }, { "glGetProgramParameterfvNV", "GL_NV_vertex_program", wine_glGetProgramParameterfvNV }, + { "glGetProgramStageiv", "GL_ARB_shader_subroutine", wine_glGetProgramStageiv }, { "glGetProgramStringARB", "GL_ARB_vertex_program", wine_glGetProgramStringARB }, { "glGetProgramStringNV", "GL_NV_vertex_program", wine_glGetProgramStringNV }, { "glGetProgramiv", "GL_VERSION_2_0", wine_glGetProgramiv }, { "glGetProgramivARB", "GL_ARB_vertex_program", wine_glGetProgramivARB }, { "glGetProgramivNV", "GL_NV_vertex_program", wine_glGetProgramivNV }, + { "glGetQueryIndexediv", "GL_ARB_transform_feedback3", wine_glGetQueryIndexediv }, + { "glGetQueryObjecti64v", "GL_ARB_timer_query", wine_glGetQueryObjecti64v }, { "glGetQueryObjecti64vEXT", "GL_EXT_timer_query", wine_glGetQueryObjecti64vEXT }, { "glGetQueryObjectiv", "GL_VERSION_1_5", wine_glGetQueryObjectiv }, { "glGetQueryObjectivARB", "GL_ARB_occlusion_query", wine_glGetQueryObjectivARB }, + { "glGetQueryObjectui64v", "GL_ARB_timer_query", wine_glGetQueryObjectui64v }, { "glGetQueryObjectui64vEXT", "GL_EXT_timer_query", wine_glGetQueryObjectui64vEXT }, { "glGetQueryObjectuiv", "GL_VERSION_1_5", wine_glGetQueryObjectuiv }, { "glGetQueryObjectuivARB", "GL_ARB_occlusion_query", wine_glGetQueryObjectuivARB }, @@ -15612,6 +16732,10 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGetQueryivARB", "GL_ARB_occlusion_query", wine_glGetQueryivARB }, { "glGetRenderbufferParameteriv", "GL_ARB_framebuffer_object", wine_glGetRenderbufferParameteriv }, { "glGetRenderbufferParameterivEXT", "GL_EXT_framebuffer_object", wine_glGetRenderbufferParameterivEXT }, + { "glGetSamplerParameterIfv", "GL_ARB_sampler_objects", wine_glGetSamplerParameterIfv }, + { "glGetSamplerParameterIiv", "GL_ARB_sampler_objects", wine_glGetSamplerParameterIiv }, + { "glGetSamplerParameterfv", "GL_ARB_sampler_objects", wine_glGetSamplerParameterfv }, + { "glGetSamplerParameteriv", "GL_ARB_sampler_objects", wine_glGetSamplerParameteriv }, { "glGetSeparableFilter", "GL_VERSION_1_2_DEPRECATED", wine_glGetSeparableFilter }, { "glGetSeparableFilterEXT", "GL_EXT_convolution", wine_glGetSeparableFilterEXT }, { "glGetShaderInfoLog", "GL_VERSION_2_0", wine_glGetShaderInfoLog }, @@ -15620,6 +16744,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGetShaderiv", "GL_VERSION_2_0", wine_glGetShaderiv }, { "glGetSharpenTexFuncSGIS", "GL_SGIS_sharpen_texture", wine_glGetSharpenTexFuncSGIS }, { "glGetStringi", "GL_VERSION_3_0", wine_glGetStringi }, + { "glGetSubroutineIndex", "GL_ARB_shader_subroutine", wine_glGetSubroutineIndex }, + { "glGetSubroutineUniformLocation", "GL_ARB_shader_subroutine", wine_glGetSubroutineUniformLocation }, { "glGetSynciv", "GL_ARB_sync", wine_glGetSynciv }, { "glGetTexBumpParameterfvATI", "GL_ATI_envmap_bumpmap", wine_glGetTexBumpParameterfvATI }, { "glGetTexBumpParameterivATI", "GL_ATI_envmap_bumpmap", wine_glGetTexBumpParameterivATI }, @@ -15646,6 +16772,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glGetUniformLocation", "GL_VERSION_2_0", wine_glGetUniformLocation }, { "glGetUniformLocationARB", "GL_ARB_shader_objects", wine_glGetUniformLocationARB }, { "glGetUniformOffsetEXT", "GL_EXT_bindable_uniform", wine_glGetUniformOffsetEXT }, + { "glGetUniformSubroutineuiv", "GL_ARB_shader_subroutine", wine_glGetUniformSubroutineuiv }, + { "glGetUniformdv", "GL_ARB_gpu_shader_fp64", wine_glGetUniformdv }, { "glGetUniformfv", "GL_VERSION_2_0", wine_glGetUniformfv }, { "glGetUniformfvARB", "GL_ARB_shader_objects", wine_glGetUniformfvARB }, { "glGetUniformiv", "GL_VERSION_2_0", wine_glGetUniformiv }, @@ -15720,6 +16848,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glIsFramebuffer", "GL_ARB_framebuffer_object", wine_glIsFramebuffer }, { "glIsFramebufferEXT", "GL_EXT_framebuffer_object", wine_glIsFramebufferEXT }, { "glIsNamedBufferResidentNV", "GL_NV_shader_buffer_load", wine_glIsNamedBufferResidentNV }, + { "glIsNamedStringARB", "GL_ARB_shading_language_include", wine_glIsNamedStringARB }, { "glIsObjectBufferATI", "GL_ATI_vertex_array_object", wine_glIsObjectBufferATI }, { "glIsOcclusionQueryNV", "GL_NV_occlusion_query", wine_glIsOcclusionQueryNV }, { "glIsProgram", "GL_VERSION_2_0", wine_glIsProgram }, @@ -15729,9 +16858,11 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glIsQueryARB", "GL_ARB_occlusion_query", wine_glIsQueryARB }, { "glIsRenderbuffer", "GL_ARB_framebuffer_object", wine_glIsRenderbuffer }, { "glIsRenderbufferEXT", "GL_EXT_framebuffer_object", wine_glIsRenderbufferEXT }, + { "glIsSampler", "GL_ARB_sampler_objects", wine_glIsSampler }, { "glIsShader", "GL_VERSION_2_0", wine_glIsShader }, { "glIsSync", "GL_ARB_sync", wine_glIsSync }, { "glIsTextureEXT", "GL_EXT_texture_object", wine_glIsTextureEXT }, + { "glIsTransformFeedback", "GL_ARB_transform_feedback2", wine_glIsTransformFeedback }, { "glIsTransformFeedbackNV", "GL_NV_transform_feedback2", wine_glIsTransformFeedbackNV }, { "glIsVariantEnabledEXT", "GL_EXT_vertex_shader", wine_glIsVariantEnabledEXT }, { "glIsVertexArray", "GL_ARB_vertex_array_object", wine_glIsVertexArray }, @@ -15913,6 +17044,14 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glMultiTexCoord4sv", "GL_VERSION_1_3_DEPRECATED", wine_glMultiTexCoord4sv }, { "glMultiTexCoord4svARB", "GL_ARB_multitexture", wine_glMultiTexCoord4svARB }, { "glMultiTexCoord4svSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4svSGIS }, + { "glMultiTexCoordP1ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP1ui }, + { "glMultiTexCoordP1uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP1uiv }, + { "glMultiTexCoordP2ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP2ui }, + { "glMultiTexCoordP2uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP2uiv }, + { "glMultiTexCoordP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP3ui }, + { "glMultiTexCoordP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP3uiv }, + { "glMultiTexCoordP4ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP4ui }, + { "glMultiTexCoordP4uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glMultiTexCoordP4uiv }, { "glMultiTexCoordPointerEXT", "GL_EXT_direct_state_access", wine_glMultiTexCoordPointerEXT }, { "glMultiTexCoordPointerSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoordPointerSGIS }, { "glMultiTexEnvfEXT", "GL_EXT_direct_state_access", wine_glMultiTexEnvfEXT }, @@ -15962,6 +17101,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glNamedRenderbufferStorageEXT", "GL_EXT_direct_state_access", wine_glNamedRenderbufferStorageEXT }, { "glNamedRenderbufferStorageMultisampleCoverageEXT", "GL_EXT_direct_state_access", wine_glNamedRenderbufferStorageMultisampleCoverageEXT }, { "glNamedRenderbufferStorageMultisampleEXT", "GL_EXT_direct_state_access", wine_glNamedRenderbufferStorageMultisampleEXT }, + { "glNamedStringARB", "GL_ARB_shading_language_include", wine_glNamedStringARB }, { "glNewBufferRegion", "GL_KTX_buffer_region", wine_glNewBufferRegion }, { "glNewObjectBufferATI", "GL_ATI_vertex_array_object", wine_glNewObjectBufferATI }, { "glNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glNormal3fVertex3fSUN }, @@ -15969,6 +17109,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glNormal3hNV", "GL_NV_half_float", wine_glNormal3hNV }, { "glNormal3hvNV", "GL_NV_half_float", wine_glNormal3hvNV }, { "glNormalFormatNV", "GL_NV_vertex_buffer_unified_memory", wine_glNormalFormatNV }, + { "glNormalP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glNormalP3ui }, + { "glNormalP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glNormalP3uiv }, { "glNormalPointerEXT", "GL_EXT_vertex_array", wine_glNormalPointerEXT }, { "glNormalPointerListIBM", "GL_IBM_vertex_array_lists", wine_glNormalPointerListIBM }, { "glNormalPointervINTEL", "GL_INTEL_parallel_arrays", wine_glNormalPointervINTEL }, @@ -15987,6 +17129,9 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glPNTrianglesfATI", "GL_ATI_pn_triangles", wine_glPNTrianglesfATI }, { "glPNTrianglesiATI", "GL_ATI_pn_triangles", wine_glPNTrianglesiATI }, { "glPassTexCoordATI", "GL_ATI_fragment_shader", wine_glPassTexCoordATI }, + { "glPatchParameterfv", "GL_ARB_tessellation_shader", wine_glPatchParameterfv }, + { "glPatchParameteri", "GL_ARB_tessellation_shader", wine_glPatchParameteri }, + { "glPauseTransformFeedback", "GL_ARB_transform_feedback2", wine_glPauseTransformFeedback }, { "glPauseTransformFeedbackNV", "GL_NV_transform_feedback2", wine_glPauseTransformFeedbackNV }, { "glPixelDataRangeNV", "GL_NV_pixel_data_range", wine_glPixelDataRangeNV }, { "glPixelTexGenParameterfSGIS", "GL_SGIS_pixel_texture", wine_glPixelTexGenParameterfSGIS }, @@ -16058,38 +17203,55 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glProgramParameters4dvNV", "GL_NV_vertex_program", wine_glProgramParameters4dvNV }, { "glProgramParameters4fvNV", "GL_NV_vertex_program", wine_glProgramParameters4fvNV }, { "glProgramStringARB", "GL_ARB_vertex_program", wine_glProgramStringARB }, + { "glProgramUniform1dEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform1dEXT }, + { "glProgramUniform1dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform1dvEXT }, { "glProgramUniform1fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1fEXT }, { "glProgramUniform1fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1fvEXT }, { "glProgramUniform1iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1iEXT }, { "glProgramUniform1ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1ivEXT }, { "glProgramUniform1uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1uiEXT }, { "glProgramUniform1uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1uivEXT }, + { "glProgramUniform2dEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform2dEXT }, + { "glProgramUniform2dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform2dvEXT }, { "glProgramUniform2fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2fEXT }, { "glProgramUniform2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2fvEXT }, { "glProgramUniform2iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2iEXT }, { "glProgramUniform2ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2ivEXT }, { "glProgramUniform2uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2uiEXT }, { "glProgramUniform2uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2uivEXT }, + { "glProgramUniform3dEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform3dEXT }, + { "glProgramUniform3dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform3dvEXT }, { "glProgramUniform3fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3fEXT }, { "glProgramUniform3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3fvEXT }, { "glProgramUniform3iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3iEXT }, { "glProgramUniform3ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3ivEXT }, { "glProgramUniform3uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3uiEXT }, { "glProgramUniform3uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3uivEXT }, + { "glProgramUniform4dEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform4dEXT }, + { "glProgramUniform4dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniform4dvEXT }, { "glProgramUniform4fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4fEXT }, { "glProgramUniform4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4fvEXT }, { "glProgramUniform4iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4iEXT }, { "glProgramUniform4ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4ivEXT }, { "glProgramUniform4uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4uiEXT }, { "glProgramUniform4uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4uivEXT }, + { "glProgramUniformMatrix2dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix2dvEXT }, { "glProgramUniformMatrix2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix2fvEXT }, + { "glProgramUniformMatrix2x3dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix2x3dvEXT }, { "glProgramUniformMatrix2x3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix2x3fvEXT }, + { "glProgramUniformMatrix2x4dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix2x4dvEXT }, { "glProgramUniformMatrix2x4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix2x4fvEXT }, + { "glProgramUniformMatrix3dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix3dvEXT }, { "glProgramUniformMatrix3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix3fvEXT }, + { "glProgramUniformMatrix3x2dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix3x2dvEXT }, { "glProgramUniformMatrix3x2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix3x2fvEXT }, + { "glProgramUniformMatrix3x4dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix3x4dvEXT }, { "glProgramUniformMatrix3x4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix3x4fvEXT }, + { "glProgramUniformMatrix4dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix4dvEXT }, { "glProgramUniformMatrix4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix4fvEXT }, + { "glProgramUniformMatrix4x2dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix4x2dvEXT }, { "glProgramUniformMatrix4x2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix4x2fvEXT }, + { "glProgramUniformMatrix4x3dvEXT", "GL_ARB_gpu_shader_fp64", wine_glProgramUniformMatrix4x3dvEXT }, { "glProgramUniformMatrix4x3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix4x3fvEXT }, { "glProgramUniformui64NV", "GL_NV_shader_buffer_load", wine_glProgramUniformui64NV }, { "glProgramUniformui64vNV", "GL_NV_shader_buffer_load", wine_glProgramUniformui64vNV }, @@ -16097,6 +17259,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glProvokingVertex", "GL_ARB_provoking_vertex", wine_glProvokingVertex }, { "glProvokingVertexEXT", "GL_EXT_provoking_vertex", wine_glProvokingVertexEXT }, { "glPushClientAttribDefaultEXT", "GL_EXT_direct_state_access", wine_glPushClientAttribDefaultEXT }, + { "glQueryCounter", "GL_ARB_timer_query", wine_glQueryCounter }, { "glReadBufferRegion", "GL_KTX_buffer_region", wine_glReadBufferRegion }, { "glReadInstrumentsSGIX", "GL_SGIX_instruments", wine_glReadInstrumentsSGIX }, { "glReferencePlaneSGIX", "GL_SGIX_reference_plane", wine_glReferencePlaneSGIX }, @@ -16134,6 +17297,7 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glResetMinmax", "GL_VERSION_1_2_DEPRECATED", wine_glResetMinmax }, { "glResetMinmaxEXT", "GL_EXT_histogram", wine_glResetMinmaxEXT }, { "glResizeBuffersMESA", "GL_MESA_resize_buffers", wine_glResizeBuffersMESA }, + { "glResumeTransformFeedback", "GL_ARB_transform_feedback2", wine_glResumeTransformFeedback }, { "glResumeTransformFeedbackNV", "GL_NV_transform_feedback2", wine_glResumeTransformFeedbackNV }, { "glSampleCoverage", "GL_VERSION_1_3", wine_glSampleCoverage }, { "glSampleCoverageARB", "GL_ARB_multisample", wine_glSampleCoverageARB }, @@ -16144,6 +17308,12 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glSampleMaski", "GL_ARB_texture_multisample", wine_glSampleMaski }, { "glSamplePatternEXT", "GL_EXT_multisample", wine_glSamplePatternEXT }, { "glSamplePatternSGIS", "GL_SGIS_multisample", wine_glSamplePatternSGIS }, + { "glSamplerParameterIiv", "GL_ARB_sampler_objects", wine_glSamplerParameterIiv }, + { "glSamplerParameterIuiv", "GL_ARB_sampler_objects", wine_glSamplerParameterIuiv }, + { "glSamplerParameterf", "GL_ARB_sampler_objects", wine_glSamplerParameterf }, + { "glSamplerParameterfv", "GL_ARB_sampler_objects", wine_glSamplerParameterfv }, + { "glSamplerParameteri", "GL_ARB_sampler_objects", wine_glSamplerParameteri }, + { "glSamplerParameteriv", "GL_ARB_sampler_objects", wine_glSamplerParameteriv }, { "glSecondaryColor3b", "GL_VERSION_1_4_DEPRECATED", wine_glSecondaryColor3b }, { "glSecondaryColor3bEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3bEXT }, { "glSecondaryColor3bv", "GL_VERSION_1_4_DEPRECATED", wine_glSecondaryColor3bv }, @@ -16179,6 +17349,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glSecondaryColor3usv", "GL_VERSION_1_4_DEPRECATED", wine_glSecondaryColor3usv }, { "glSecondaryColor3usvEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3usvEXT }, { "glSecondaryColorFormatNV", "GL_NV_vertex_buffer_unified_memory", wine_glSecondaryColorFormatNV }, + { "glSecondaryColorP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glSecondaryColorP3ui }, + { "glSecondaryColorP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glSecondaryColorP3uiv }, { "glSecondaryColorPointer", "GL_VERSION_1_4_DEPRECATED", wine_glSecondaryColorPointer }, { "glSecondaryColorPointerEXT", "GL_EXT_secondary_color", wine_glSecondaryColorPointerEXT }, { "glSecondaryColorPointerListIBM", "GL_IBM_vertex_array_lists", wine_glSecondaryColorPointerListIBM }, @@ -16258,6 +17430,14 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glTexCoord4hNV", "GL_NV_half_float", wine_glTexCoord4hNV }, { "glTexCoord4hvNV", "GL_NV_half_float", wine_glTexCoord4hvNV }, { "glTexCoordFormatNV", "GL_NV_vertex_buffer_unified_memory", wine_glTexCoordFormatNV }, + { "glTexCoordP1ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP1ui }, + { "glTexCoordP1uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP1uiv }, + { "glTexCoordP2ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP2ui }, + { "glTexCoordP2uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP2uiv }, + { "glTexCoordP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP3ui }, + { "glTexCoordP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP3uiv }, + { "glTexCoordP4ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP4ui }, + { "glTexCoordP4uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glTexCoordP4uiv }, { "glTexCoordPointerEXT", "GL_EXT_vertex_array", wine_glTexCoordPointerEXT }, { "glTexCoordPointerListIBM", "GL_IBM_vertex_array_lists", wine_glTexCoordPointerListIBM }, { "glTexCoordPointervINTEL", "GL_INTEL_parallel_arrays", wine_glTexCoordPointervINTEL }, @@ -16302,6 +17482,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glTransformFeedbackVaryings", "GL_VERSION_3_0", wine_glTransformFeedbackVaryings }, { "glTransformFeedbackVaryingsEXT", "GL_EXT_transform_feedback", wine_glTransformFeedbackVaryingsEXT }, { "glTransformFeedbackVaryingsNV", "GL_NV_transform_feedback", wine_glTransformFeedbackVaryingsNV }, + { "glUniform1d", "GL_ARB_gpu_shader_fp64", wine_glUniform1d }, + { "glUniform1dv", "GL_ARB_gpu_shader_fp64", wine_glUniform1dv }, { "glUniform1f", "GL_VERSION_2_0", wine_glUniform1f }, { "glUniform1fARB", "GL_ARB_shader_objects", wine_glUniform1fARB }, { "glUniform1fv", "GL_VERSION_2_0", wine_glUniform1fv }, @@ -16314,6 +17496,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glUniform1uiEXT", "GL_EXT_gpu_shader4", wine_glUniform1uiEXT }, { "glUniform1uiv", "GL_VERSION_3_0", wine_glUniform1uiv }, { "glUniform1uivEXT", "GL_EXT_gpu_shader4", wine_glUniform1uivEXT }, + { "glUniform2d", "GL_ARB_gpu_shader_fp64", wine_glUniform2d }, + { "glUniform2dv", "GL_ARB_gpu_shader_fp64", wine_glUniform2dv }, { "glUniform2f", "GL_VERSION_2_0", wine_glUniform2f }, { "glUniform2fARB", "GL_ARB_shader_objects", wine_glUniform2fARB }, { "glUniform2fv", "GL_VERSION_2_0", wine_glUniform2fv }, @@ -16326,6 +17510,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glUniform2uiEXT", "GL_EXT_gpu_shader4", wine_glUniform2uiEXT }, { "glUniform2uiv", "GL_VERSION_3_0", wine_glUniform2uiv }, { "glUniform2uivEXT", "GL_EXT_gpu_shader4", wine_glUniform2uivEXT }, + { "glUniform3d", "GL_ARB_gpu_shader_fp64", wine_glUniform3d }, + { "glUniform3dv", "GL_ARB_gpu_shader_fp64", wine_glUniform3dv }, { "glUniform3f", "GL_VERSION_2_0", wine_glUniform3f }, { "glUniform3fARB", "GL_ARB_shader_objects", wine_glUniform3fARB }, { "glUniform3fv", "GL_VERSION_2_0", wine_glUniform3fv }, @@ -16338,6 +17524,8 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glUniform3uiEXT", "GL_EXT_gpu_shader4", wine_glUniform3uiEXT }, { "glUniform3uiv", "GL_VERSION_3_0", wine_glUniform3uiv }, { "glUniform3uivEXT", "GL_EXT_gpu_shader4", wine_glUniform3uivEXT }, + { "glUniform4d", "GL_ARB_gpu_shader_fp64", wine_glUniform4d }, + { "glUniform4dv", "GL_ARB_gpu_shader_fp64", wine_glUniform4dv }, { "glUniform4f", "GL_VERSION_2_0", wine_glUniform4f }, { "glUniform4fARB", "GL_ARB_shader_objects", wine_glUniform4fARB }, { "glUniform4fv", "GL_VERSION_2_0", wine_glUniform4fv }, @@ -16352,18 +17540,28 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glUniform4uivEXT", "GL_EXT_gpu_shader4", wine_glUniform4uivEXT }, { "glUniformBlockBinding", "GL_ARB_uniform_buffer_object", wine_glUniformBlockBinding }, { "glUniformBufferEXT", "GL_EXT_bindable_uniform", wine_glUniformBufferEXT }, + { "glUniformMatrix2dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix2dv }, { "glUniformMatrix2fv", "GL_VERSION_2_0", wine_glUniformMatrix2fv }, { "glUniformMatrix2fvARB", "GL_ARB_shader_objects", wine_glUniformMatrix2fvARB }, + { "glUniformMatrix2x3dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix2x3dv }, { "glUniformMatrix2x3fv", "GL_VERSION_2_1", wine_glUniformMatrix2x3fv }, + { "glUniformMatrix2x4dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix2x4dv }, { "glUniformMatrix2x4fv", "GL_VERSION_2_1", wine_glUniformMatrix2x4fv }, + { "glUniformMatrix3dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix3dv }, { "glUniformMatrix3fv", "GL_VERSION_2_0", wine_glUniformMatrix3fv }, { "glUniformMatrix3fvARB", "GL_ARB_shader_objects", wine_glUniformMatrix3fvARB }, + { "glUniformMatrix3x2dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix3x2dv }, { "glUniformMatrix3x2fv", "GL_VERSION_2_1", wine_glUniformMatrix3x2fv }, + { "glUniformMatrix3x4dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix3x4dv }, { "glUniformMatrix3x4fv", "GL_VERSION_2_1", wine_glUniformMatrix3x4fv }, + { "glUniformMatrix4dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix4dv }, { "glUniformMatrix4fv", "GL_VERSION_2_0", wine_glUniformMatrix4fv }, { "glUniformMatrix4fvARB", "GL_ARB_shader_objects", wine_glUniformMatrix4fvARB }, + { "glUniformMatrix4x2dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix4x2dv }, { "glUniformMatrix4x2fv", "GL_VERSION_2_1", wine_glUniformMatrix4x2fv }, + { "glUniformMatrix4x3dv", "GL_ARB_gpu_shader_fp64", wine_glUniformMatrix4x3dv }, { "glUniformMatrix4x3fv", "GL_VERSION_2_1", wine_glUniformMatrix4x3fv }, + { "glUniformSubroutinesuiv", "GL_ARB_shader_subroutine", wine_glUniformSubroutinesuiv }, { "glUniformui64NV", "GL_NV_shader_buffer_load", wine_glUniformui64NV }, { "glUniformui64vNV", "GL_NV_shader_buffer_load", wine_glUniformui64vNV }, { "glUnlockArraysEXT", "GL_EXT_compiled_vertex_array", wine_glUnlockArraysEXT }, @@ -16548,6 +17746,14 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glVertexAttribIFormatNV", "GL_NV_vertex_buffer_unified_memory", wine_glVertexAttribIFormatNV }, { "glVertexAttribIPointer", "GL_VERSION_3_0", wine_glVertexAttribIPointer }, { "glVertexAttribIPointerEXT", "GL_NV_vertex_program4", wine_glVertexAttribIPointerEXT }, + { "glVertexAttribP1ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP1ui }, + { "glVertexAttribP1uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP1uiv }, + { "glVertexAttribP2ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP2ui }, + { "glVertexAttribP2uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP2uiv }, + { "glVertexAttribP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP3ui }, + { "glVertexAttribP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP3uiv }, + { "glVertexAttribP4ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP4ui }, + { "glVertexAttribP4uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexAttribP4uiv }, { "glVertexAttribPointer", "GL_VERSION_2_0", wine_glVertexAttribPointer }, { "glVertexAttribPointerARB", "GL_ARB_vertex_program", wine_glVertexAttribPointerARB }, { "glVertexAttribPointerNV", "GL_NV_vertex_program", wine_glVertexAttribPointerNV }, @@ -16572,6 +17778,12 @@ const OpenGL_extension extension_registry[NB_EXTENSIONS] = { { "glVertexBlendEnvfATI", "GL_ATI_vertex_streams", wine_glVertexBlendEnvfATI }, { "glVertexBlendEnviATI", "GL_ATI_vertex_streams", wine_glVertexBlendEnviATI }, { "glVertexFormatNV", "GL_NV_vertex_buffer_unified_memory", wine_glVertexFormatNV }, + { "glVertexP2ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexP2ui }, + { "glVertexP2uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexP2uiv }, + { "glVertexP3ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexP3ui }, + { "glVertexP3uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexP3uiv }, + { "glVertexP4ui", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexP4ui }, + { "glVertexP4uiv", "GL_ARB_vertex_type_2_10_10_10_rev", wine_glVertexP4uiv }, { "glVertexPointerEXT", "GL_EXT_vertex_array", wine_glVertexPointerEXT }, { "glVertexPointerListIBM", "GL_IBM_vertex_array_lists", wine_glVertexPointerListIBM }, { "glVertexPointervINTEL", "GL_INTEL_parallel_arrays", wine_glVertexPointervINTEL }, diff --git a/dlls/opengl32/tests/Makefile.in b/dlls/opengl32/tests/Makefile.in index bbcc9718d48..65570494f6d 100644 --- a/dlls/opengl32/tests/Makefile.in +++ b/dlls/opengl32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ opengl.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/pdh/Makefile.in b/dlls/pdh/Makefile.in index 4983efd6d5e..b8a653d875b 100644 --- a/dlls/pdh/Makefile.in +++ b/dlls/pdh/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ pdh_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/pdh/tests/Makefile.in b/dlls/pdh/tests/Makefile.in index f3f8966764b..32c52d37c53 100644 --- a/dlls/pdh/tests/Makefile.in +++ b/dlls/pdh/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ pdh.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/pidgen/Makefile.in b/dlls/pidgen/Makefile.in index 797417af38f..44af793317e 100644 --- a/dlls/pidgen/Makefile.in +++ b/dlls/pidgen/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/powrprof/Makefile.in b/dlls/powrprof/Makefile.in index 3023b0cf557..587502b00cf 100644 --- a/dlls/powrprof/Makefile.in +++ b/dlls/powrprof/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = advapi32 kernel32 ntdll C_SRCS = powrprof.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/printui/Makefile.in b/dlls/printui/Makefile.in index a69fd98faae..c6c923b5097 100644 --- a/dlls/printui/Makefile.in +++ b/dlls/printui/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = printui.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/propsys/Makefile.in b/dlls/propsys/Makefile.in index 15637418618..ec999f7f145 100644 --- a/dlls/propsys/Makefile.in +++ b/dlls/propsys/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ propvar.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/psapi/Makefile.in b/dlls/psapi/Makefile.in index 93da7aa7d4e..05573b7a52b 100644 --- a/dlls/psapi/Makefile.in +++ b/dlls/psapi/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/psapi/tests/Makefile.in b/dlls/psapi/tests/Makefile.in index fc089e4b112..999358a7c63 100644 --- a/dlls/psapi/tests/Makefile.in +++ b/dlls/psapi/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ psapi_main.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/pstorec/Makefile.in b/dlls/pstorec/Makefile.in index c754081be13..d4f77dad2bb 100644 --- a/dlls/pstorec/Makefile.in +++ b/dlls/pstorec/Makefile.in @@ -13,5 +13,3 @@ RC_SRCS = rsrc.rc IDL_TLB_SRCS = pstorec_tlb.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qcap/Makefile.in b/dlls/qcap/Makefile.in index c273bcb6a86..bd2398b59e8 100644 --- a/dlls/qcap/Makefile.in +++ b/dlls/qcap/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qedit/Makefile.in b/dlls/qedit/Makefile.in index b6f9e8ee661..667b108a7ee 100644 --- a/dlls/qedit/Makefile.in +++ b/dlls/qedit/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ samplegrabber.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index d09d5546b19..1875c51c49e 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -37,7 +37,7 @@ static WCHAR const pin_in_name[] = { 'I', 'n', 0 }; static WCHAR const pin_out_name[] = { 'O', 'u', 't', 0 }; IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); -IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype); +IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype); /* Fixed pins enumerator, holds filter referenced */ typedef struct _PE_Impl { @@ -258,7 +258,7 @@ Single_IEnumMediaTypes_Next(IEnumMediaTypes *iface, ULONG nTypes, AM_MEDIA_TYPE return E_INVALIDARG; if (!types || ((nTypes != 1) && !fetched)) return E_POINTER; - if (!This->past) { + if (!This->past && !IsEqualGUID(&This->mtype.majortype,&GUID_NULL)) { AM_MEDIA_TYPE *mtype = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); *mtype = This->mtype; if (mtype->cbFormat) { @@ -324,7 +324,7 @@ static const IEnumMediaTypesVtbl IEnumMediaTypes_VTable = Single_IEnumMediaTypes_Clone, }; -IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype) +IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype) { ME_Impl *obj = CoTaskMemAlloc(sizeof(ME_Impl)); if (obj) { @@ -332,14 +332,18 @@ IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype) obj->me.lpVtbl = &IEnumMediaTypes_VTable; obj->refCount = 1; obj->past = FALSE; - obj->mtype = *mtype; - obj->mtype.pUnk = NULL; - if (mtype->cbFormat) { - obj->mtype.pbFormat = CoTaskMemAlloc(mtype->cbFormat); - CopyMemory(obj->mtype.pbFormat, mtype->pbFormat, mtype->cbFormat); + if (mtype) { + obj->mtype = *mtype; + obj->mtype.pUnk = NULL; + if (mtype->cbFormat) { + obj->mtype.pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(obj->mtype.pbFormat, mtype->pbFormat, mtype->cbFormat); + } + else + obj->mtype.pbFormat = NULL; } else - obj->mtype.pbFormat = NULL; + obj->mtype.majortype = GUID_NULL; } return &obj->me; } @@ -361,6 +365,7 @@ typedef struct _SG_Impl { const IMemInputPinVtbl* IMemInputPin_Vtbl; /* TODO: IMediaPosition, IMediaSeeking, IQualityControl */ LONG refCount; + CRITICAL_SECTION critSect; FILTER_INFO info; FILTER_STATE state; AM_MEDIA_TYPE mtype; @@ -372,6 +377,8 @@ typedef struct _SG_Impl { ISampleGrabberCB *grabberIface; LONG grabberMethod; LONG oneShot; + LONG bufferLen; + void* bufferData; } SG_Impl; enum { @@ -413,6 +420,10 @@ static void SampleGrabber_cleanup(SG_Impl *This) ISampleGrabberCB_Release(This->grabberIface); if (This->mtype.pbFormat) CoTaskMemFree(This->mtype.pbFormat); + if (This->bufferData) + CoTaskMemFree(This->bufferData); + This->critSect.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&This->critSect); } /* Common helper AddRef called from all interfaces */ @@ -471,11 +482,31 @@ static HRESULT SampleGrabber_query(SG_Impl *This, REFIID riid, void **ppvObject) return E_NOINTERFACE; } -/* Helper that calls installed sample callbacks */ +/* Helper that buffers data and/or calls installed sample callbacks */ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) { double time = 0.0; REFERENCE_TIME tStart, tEnd; + if (This->bufferLen >= 0) { + BYTE *data = 0; + long size = IMediaSample_GetActualDataLength(sample); + if (size >= 0 && SUCCEEDED(IMediaSample_GetPointer(sample, &data))) { + if (!data) + size = 0; + EnterCriticalSection(&This->critSect); + if (This->bufferLen != size) { + if (This->bufferData) + CoTaskMemFree(This->bufferData); + This->bufferData = size ? CoTaskMemAlloc(size) : NULL; + This->bufferLen = size; + } + if (size) + CopyMemory(This->bufferData, data, size); + LeaveCriticalSection(&This->critSect); + } + } + if (!This->grabberIface) + return; if (SUCCEEDED(IMediaSample_GetTime(sample, &tStart, &tEnd))) time = 1e-7 * tStart; switch (This->grabberMethod) { @@ -777,11 +808,16 @@ SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MED static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL bufferEm) { - TRACE("(%u)\n", bufferEm); + SG_Impl *This = impl_from_ISampleGrabber(iface); + TRACE("(%p)->(%u)\n", This, bufferEm); + EnterCriticalSection(&This->critSect); if (bufferEm) { - FIXME("buffering not implemented\n"); - return E_NOTIMPL; + if (This->bufferLen < 0) + This->bufferLen = 0; } + else + This->bufferLen = -1; + LeaveCriticalSection(&This->critSect); return S_OK; } @@ -789,10 +825,29 @@ SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL buffer static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentBuffer(ISampleGrabber *iface, LONG *bufSize, LONG *buffer) { - FIXME("(%p, %p): stub\n", bufSize, buffer); + SG_Impl *This = impl_from_ISampleGrabber(iface); + HRESULT ret = S_OK; + TRACE("(%p)->(%p, %p)\n", This, bufSize, buffer); if (!bufSize) return E_POINTER; - return E_INVALIDARG; + EnterCriticalSection(&This->critSect); + if (!This->pin_in.pair) + ret = VFW_E_NOT_CONNECTED; + else if (This->bufferLen < 0) + ret = E_INVALIDARG; + else if (This->bufferLen == 0) + ret = VFW_E_WRONG_STATE; + else { + if (buffer) { + if (*bufSize >= This->bufferLen) + CopyMemory(buffer, This->bufferData, This->bufferLen); + else + ret = E_OUTOFMEMORY; + } + *bufSize = This->bufferLen; + } + LeaveCriticalSection(&This->critSect); + return ret; } /* ISampleGrabber */ @@ -896,8 +951,7 @@ SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample) return E_POINTER; if ((This->state != State_Running) || (This->oneShot == OneShot_Past)) return S_FALSE; - if (This->grabberIface) - SampleGrabber_callback(This, sample); + SampleGrabber_callback(This, sample); hr = This->memOutput ? IMemInputPin_Receive(This->memOutput, sample) : S_OK; if (This->oneShot == OneShot_Wait) { This->oneShot = OneShot_Past; @@ -913,16 +967,14 @@ static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **samples, LONG nSamples, LONG *nProcessed) { SG_Impl *This = impl_from_IMemInputPin(iface); + LONG idx; TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->memOutput, This->grabberIface); if (!samples || !nProcessed) return E_POINTER; if ((This->state != State_Running) || (This->oneShot == OneShot_Past)) return S_FALSE; - if (This->grabberIface) { - LONG idx; - for (idx = 0; idx < nSamples; idx++) - SampleGrabber_callback(This, samples[idx]); - } + for (idx = 0; idx < nSamples; idx++) + SampleGrabber_callback(This, samples[idx]); return This->memOutput ? IMemInputPin_ReceiveMultiple(This->memOutput, samples, nSamples, nProcessed) : S_OK; } @@ -1048,6 +1100,10 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), type->lSampleSize, debugstr_guid(&type->formattype), type->cbFormat); + if (!IsEqualGUID(&type->formattype, &FORMAT_None) && + !IsEqualGUID(&type->formattype, &GUID_NULL) && + !type->pbFormat) + return VFW_E_INVALIDMEDIATYPE; if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) && !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype)) return VFW_E_TYPE_NOT_ACCEPTED; @@ -1058,10 +1114,6 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) && !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype)) return VFW_E_TYPE_NOT_ACCEPTED; - if (!IsEqualGUID(&type->formattype, &FORMAT_None) && - !IsEqualGUID(&type->formattype, &GUID_NULL) && - !type->pbFormat) - return VFW_E_TYPE_NOT_ACCEPTED; if (This->sg->mtype.pbFormat) CoTaskMemFree(This->sg->mtype.pbFormat); This->sg->mtype = *type; @@ -1212,7 +1264,7 @@ SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes) TRACE("(%p)->(%p)\n", This, mtypes); if (!mtypes) return E_POINTER; - *mtypes = mediaenum_create(&This->sg->mtype); + *mtypes = mediaenum_create(This->sg->pin_in.pair ? &This->sg->mtype : (const AM_MEDIA_TYPE *)NULL); return *mtypes ? S_OK : E_OUTOFMEMORY; } @@ -1401,6 +1453,8 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) obj->pin_out.name = pin_out_name; obj->pin_out.sg = obj; obj->pin_out.pair = NULL; + InitializeCriticalSection(&obj->critSect); + obj->critSect.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SG_Impl.critSect"); obj->info.achName[0] = 0; obj->info.pGraph = NULL; obj->state = State_Stopped; @@ -1413,6 +1467,8 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) obj->grabberIface = NULL; obj->grabberMethod = -1; obj->oneShot = OneShot_None; + obj->bufferLen = -1; + obj->bufferData = NULL; *ppv = obj; return S_OK; diff --git a/dlls/qedit/tests/Makefile.in b/dlls/qedit/tests/Makefile.in index 09f89257904..7a08df09cd8 100644 --- a/dlls/qedit/tests/Makefile.in +++ b/dlls/qedit/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = qedit.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qmgr/Makefile.in b/dlls/qmgr/Makefile.in index 3143c5ad05b..365f02571dd 100644 --- a/dlls/qmgr/Makefile.in +++ b/dlls/qmgr/Makefile.in @@ -20,5 +20,3 @@ RC_SRCS = rsrc.rc IDL_I_SRCS = qmgr_local.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qmgr/tests/Makefile.in b/dlls/qmgr/tests/Makefile.in index 53b07e31c82..c85b3560032 100644 --- a/dlls/qmgr/tests/Makefile.in +++ b/dlls/qmgr/tests/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ qmgr.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qmgrprxy/Makefile.in b/dlls/qmgrprxy/Makefile.in index e4515665097..da6dd4d1cf5 100644 --- a/dlls/qmgrprxy/Makefile.in +++ b/dlls/qmgrprxy/Makefile.in @@ -12,5 +12,3 @@ IDL_P_SRCS = qmgrprxy.idl EXTRA_OBJS = dlldata.o @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in index 1206d0a0c0b..1c0092e2dbd 100644 --- a/dlls/quartz/Makefile.in +++ b/dlls/quartz/Makefile.in @@ -40,5 +40,3 @@ IDL_P_SRCS = quartz_strmif.idl EXTRA_OBJS = dlldata.o @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index 7b8d95430bf..bacb72950d6 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -479,11 +479,16 @@ static HRESULT WINAPI FilterMapper2_UnregisterFilter( static HRESULT FM2_WriteFriendlyName(IPropertyBag * pPropBag, LPCWSTR szName) { VARIANT var; + HRESULT ret; + BSTR value; V_VT(&var) = VT_BSTR; - V_UNION(&var, bstrVal) = (BSTR)szName; + V_UNION(&var, bstrVal) = value = SysAllocString(szName); - return IPropertyBag_Write(pPropBag, wszFriendlyName, &var); + ret = IPropertyBag_Write(pPropBag, wszFriendlyName, &var); + SysFreeString(value); + + return ret; } static HRESULT FM2_WriteClsid(IPropertyBag * pPropBag, REFCLSID clsid) diff --git a/dlls/quartz/tests/Makefile.in b/dlls/quartz/tests/Makefile.in index ea03ab2bb52..fa6254d0546 100644 --- a/dlls/quartz/tests/Makefile.in +++ b/dlls/quartz/tests/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ videorenderer.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/query/Makefile.in b/dlls/query/Makefile.in index e4059a45f8f..f699cb1c496 100644 --- a/dlls/query/Makefile.in +++ b/dlls/query/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ query_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rasapi16.dll16/Makefile.in b/dlls/rasapi16.dll16/Makefile.in index d61446a015e..0f57650e58b 100644 --- a/dlls/rasapi16.dll16/Makefile.in +++ b/dlls/rasapi16.dll16/Makefile.in @@ -7,5 +7,3 @@ IMPORTS = kernel32 EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,rasapi32.dll @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rasapi32/Makefile.in b/dlls/rasapi32/Makefile.in index ce4f34ddcea..e08ecda11b3 100644 --- a/dlls/rasapi32/Makefile.in +++ b/dlls/rasapi32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = rasapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rasapi32/tests/Makefile.in b/dlls/rasapi32/tests/Makefile.in index fe984b60c5d..daebd52b9e5 100644 --- a/dlls/rasapi32/tests/Makefile.in +++ b/dlls/rasapi32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ rasapi.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rasdlg/Makefile.in b/dlls/rasdlg/Makefile.in index 02d3a7fa6f4..ceb8d132772 100644 --- a/dlls/rasdlg/Makefile.in +++ b/dlls/rasdlg/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ rasdlg_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/resutils/Makefile.in b/dlls/resutils/Makefile.in index b263c55ecad..5682c6d0113 100644 --- a/dlls/resutils/Makefile.in +++ b/dlls/resutils/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ resutils.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/riched20/Makefile.in b/dlls/riched20/Makefile.in index d56137edc33..bbf72d02623 100644 --- a/dlls/riched20/Makefile.in +++ b/dlls/riched20/Makefile.in @@ -30,5 +30,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/riched20/tests/Makefile.in b/dlls/riched20/tests/Makefile.in index db83c1b260a..3f02925f2ef 100644 --- a/dlls/riched20/tests/Makefile.in +++ b/dlls/riched20/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ txtsrv.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/riched32/Makefile.in b/dlls/riched32/Makefile.in index c8d15a15204..2abcf9361df 100644 --- a/dlls/riched32/Makefile.in +++ b/dlls/riched32/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/riched32/tests/Makefile.in b/dlls/riched32/tests/Makefile.in index 330d4ce2746..ed794ccd5dd 100644 --- a/dlls/riched32/tests/Makefile.in +++ b/dlls/riched32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ editor.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rpcrt4/Makefile.in b/dlls/rpcrt4/Makefile.in index ce50b36ac32..686144a3f9f 100644 --- a/dlls/rpcrt4/Makefile.in +++ b/dlls/rpcrt4/Makefile.in @@ -35,5 +35,3 @@ IDL_C_SRCS = \ epm.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index e594c953774..9946bd13d57 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2711,12 +2711,18 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, safe_copy_to_buffer(pStubMsg, pMemory, sizeof(double)); pMemory += sizeof(double); break; + case RPC_FC_RP: + case RPC_FC_UP: + case RPC_FC_OP: + case RPC_FC_FP: case RPC_FC_POINTER: { unsigned char *saved_buffer; int pointer_buffer_mark_set = 0; TRACE("pointer=%p <= %p\n", *(unsigned char**)pMemory, pMemory); TRACE("pStubMsg->Buffer before %p\n", pStubMsg->Buffer); + if (*pFormat != RPC_FC_POINTER) + pPointer = pFormat; if (*pPointer != RPC_FC_RP) ALIGN_POINTER_CLEAR(pStubMsg->Buffer, 4); saved_buffer = pStubMsg->Buffer; @@ -2738,7 +2744,10 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ } TRACE("pStubMsg->Buffer after %p\n", pStubMsg->Buffer); - pPointer += 4; + if (*pFormat == RPC_FC_POINTER) + pPointer += 4; + else + pFormat += 4; pMemory += sizeof(void *); break; } @@ -2850,11 +2859,17 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, TRACE("double=%f => %p\n", *(double*)pMemory, pMemory); pMemory += sizeof(double); break; + case RPC_FC_RP: + case RPC_FC_UP: + case RPC_FC_OP: + case RPC_FC_FP: case RPC_FC_POINTER: { unsigned char *saved_buffer; int pointer_buffer_mark_set = 0; TRACE("pointer => %p\n", pMemory); + if (*pFormat != RPC_FC_POINTER) + pPointer = pFormat; if (*pPointer != RPC_FC_RP) ALIGN_POINTER(pStubMsg->Buffer, 4); saved_buffer = pStubMsg->Buffer; @@ -2876,7 +2891,10 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, if (*pPointer != RPC_FC_RP) safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ } - pPointer += 4; + if (*pFormat == RPC_FC_POINTER) + pPointer += 4; + else + pFormat += 4; pMemory += sizeof(void *); break; } @@ -2979,7 +2997,13 @@ static unsigned char * ComplexBufferSize(PMIDL_STUB_MESSAGE pStubMsg, safe_buffer_length_increment(pStubMsg, 8); pMemory += 8; break; + case RPC_FC_RP: + case RPC_FC_UP: + case RPC_FC_OP: + case RPC_FC_FP: case RPC_FC_POINTER: + if (*pFormat != RPC_FC_POINTER) + pPointer = pFormat; if (!pStubMsg->IgnoreEmbeddedPointers) { int saved_buffer_length = pStubMsg->BufferLength; @@ -2996,7 +3020,10 @@ static unsigned char * ComplexBufferSize(PMIDL_STUB_MESSAGE pStubMsg, ALIGN_LENGTH(pStubMsg->BufferLength, 4); safe_buffer_length_increment(pStubMsg, 4); } - pPointer += 4; + if (*pFormat == RPC_FC_POINTER) + pPointer += 4; + else + pFormat += 4; pMemory += sizeof(void*); break; case RPC_FC_ALIGNM2: @@ -3082,9 +3109,18 @@ static unsigned char * ComplexFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_DOUBLE: pMemory += 8; break; + case RPC_FC_RP: + case RPC_FC_UP: + case RPC_FC_OP: + case RPC_FC_FP: case RPC_FC_POINTER: + if (*pFormat != RPC_FC_POINTER) + pPointer = pFormat; NdrPointerFree(pStubMsg, *(unsigned char**)pMemory, pPointer); - pPointer += 4; + if (*pFormat == RPC_FC_POINTER) + pPointer += 4; + else + pFormat += 4; pMemory += sizeof(void *); break; case RPC_FC_ALIGNM2: @@ -3174,10 +3210,16 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, size += 8; safe_buffer_increment(pStubMsg, 8); break; + case RPC_FC_RP: + case RPC_FC_UP: + case RPC_FC_OP: + case RPC_FC_FP: case RPC_FC_POINTER: { unsigned char *saved_buffer; int pointer_buffer_mark_set = 0; + if (*pFormat != RPC_FC_POINTER) + pPointer = pFormat; if (*pPointer != RPC_FC_RP) ALIGN_POINTER(pStubMsg->Buffer, 4); saved_buffer = pStubMsg->Buffer; @@ -3200,7 +3242,10 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, if (*pPointer != RPC_FC_RP) safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ } - pPointer += 4; + if (*pFormat == RPC_FC_POINTER) + pPointer += 4; + else + pFormat += 4; size += sizeof(void *); break; } @@ -3269,8 +3314,14 @@ ULONG ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) case RPC_FC_DOUBLE: size += 8; break; + case RPC_FC_RP: + case RPC_FC_UP: + case RPC_FC_OP: + case RPC_FC_FP: case RPC_FC_POINTER: size += sizeof(void *); + if (*pFormat != RPC_FC_POINTER) + pFormat += 4; break; case RPC_FC_ALIGNM2: ALIGN_LENGTH(size, 2); diff --git a/dlls/rpcrt4/tests/Makefile.in b/dlls/rpcrt4/tests/Makefile.in index 78f81fef8fb..29a5e3a410d 100644 --- a/dlls/rpcrt4/tests/Makefile.in +++ b/dlls/rpcrt4/tests/Makefile.in @@ -19,5 +19,3 @@ C_SRCS = \ server.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 2c18bc54274..b5987dc5638 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -1997,7 +1997,6 @@ static void test_conf_complex_array(void) win_skip("Tests crash on Win9x, WinMe and NT4\n"); goto cleanup; } -todo_wine ok(StubMsg.BufferLength >= expected_length, "length %d\n", StubMsg.BufferLength); /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ @@ -2013,13 +2012,8 @@ todo_wine #endif ok(ptr == NULL, "ret %p\n", ptr); -todo_wine ok((char*)StubMsg.Buffer == (char*)StubMsg.BufferStart + expected_length, "not at expected length\n"); - /* Skip tests on Wine until the todo_wine is removed */ - if((char*)StubMsg.Buffer == (char*)StubMsg.BufferStart + expected_length) - { - buf = (DWORD *)StubMsg.BufferStart; ok(*buf == memsrc.dim1, "dim1 should have been %d instead of %08x\n", memsrc.dim1, *buf); @@ -2069,7 +2063,6 @@ todo_wine #else NdrSimpleStructFree( &StubMsg, (unsigned char*)mem, &fmtstr_complex_array[32]); #endif - } HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 693fe699b0f..e792170eda5 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -283,6 +283,15 @@ s_sum_var_array(int x[20], int n) } int +s_sum_complex_array(int n, refpint_t pi[]) +{ + int total = 0; + for (; n > 0; n--) + total += *pi[n - 1]; + return total; +} + +int s_dot_two_vectors(vector_t vs[2]) { return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z; @@ -1213,6 +1222,7 @@ array_tests(void) int *pi; pints_t api[5]; numbers_struct_t *ns; + refpint_t rpi[5]; if (!old_windows_version) { @@ -1317,6 +1327,15 @@ array_tests(void) HeapFree(GetProcessHeap(), 0, ns); } HeapFree(GetProcessHeap(), 0, pi); + + pi = HeapAlloc(GetProcessHeap(), 0, 5 * sizeof(*pi)); + pi[0] = 3; rpi[0] = &pi[0]; + pi[1] = 5; rpi[1] = &pi[1]; + pi[2] = -2; rpi[2] = &pi[2]; + pi[3] = -1; rpi[3] = &pi[3]; + pi[4] = -4; rpi[4] = &pi[4]; + ok(sum_complex_array(5, rpi) == 1, "RPC sum_complex_array\n"); + HeapFree(GetProcessHeap(), 0, pi); } void diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl index 29b90b5afc6..68996757c01 100644 --- a/dlls/rpcrt4/tests/server.idl +++ b/dlls/rpcrt4/tests/server.idl @@ -120,6 +120,8 @@ cpp_quote("#endif") } u; } test_list_t; + typedef [ref] int *refpint_t; + int test_list_length(test_list_t *ls); int sum_fixed_int_3d(int m[2][3][4]); int sum_conf_array([size_is(n)] int x[], int n); @@ -154,6 +156,7 @@ cpp_quote("#endif") int sum_cs(cs_t *cs); int sum_cps(cps_t *cps); int sum_cpsc(cpsc_t *cpsc); + int sum_complex_array(int n, refpint_t pi[n]); typedef [wire_marshal(int)] void *puint_t; int square_puint(puint_t p); diff --git a/dlls/rsabase/Makefile.in b/dlls/rsabase/Makefile.in index 033c2034b41..f72c6c217d7 100644 --- a/dlls/rsabase/Makefile.in +++ b/dlls/rsabase/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = rsaenh kernel32 RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rsaenh/Makefile.in b/dlls/rsaenh/Makefile.in index 40cbd95ebfb..ea6f75799e2 100644 --- a/dlls/rsaenh/Makefile.in +++ b/dlls/rsaenh/Makefile.in @@ -17,10 +17,9 @@ C_SRCS = \ rc2.c \ rc4.c \ rsa.c \ - rsaenh.c + rsaenh.c \ + sha2.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rsaenh/implglue.c b/dlls/rsaenh/implglue.c index b73eba93ec6..7ecfc289ecf 100644 --- a/dlls/rsaenh/implglue.c +++ b/dlls/rsaenh/implglue.c @@ -67,6 +67,18 @@ BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext) case CALG_SHA: A_SHAInit(&pHashContext->sha); break; + + case CALG_SHA_256: + SHA256_Init(&pHashContext->sha256); + break; + + case CALG_SHA_384: + SHA384_Init(&pHashContext->sha384); + break; + + case CALG_SHA_512: + SHA512_Init(&pHashContext->sha512); + break; } return TRUE; @@ -93,6 +105,18 @@ BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, CONST BYTE *pb A_SHAUpdate(&pHashContext->sha, pbData, dwDataLen); break; + case CALG_SHA_256: + SHA256_Update(&pHashContext->sha256, pbData, dwDataLen); + break; + + case CALG_SHA_384: + SHA384_Update(&pHashContext->sha384, pbData, dwDataLen); + break; + + case CALG_SHA_512: + SHA512_Update(&pHashContext->sha512, pbData, dwDataLen); + break; + default: SetLastError(NTE_BAD_ALGID); return FALSE; @@ -123,6 +147,18 @@ BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHash A_SHAFinal(&pHashContext->sha, (PULONG)pbHashValue); break; + case CALG_SHA_256: + SHA256_Final(pbHashValue, &pHashContext->sha256); + break; + + case CALG_SHA_384: + SHA384_Final(pbHashValue, &pHashContext->sha384); + break; + + case CALG_SHA_512: + SHA512_Final(pbHashValue, &pHashContext->sha512); + break; + default: SetLastError(NTE_BAD_ALGID); return FALSE; diff --git a/dlls/rsaenh/implglue.h b/dlls/rsaenh/implglue.h index 5deaf53e58a..63553204c5b 100644 --- a/dlls/rsaenh/implglue.h +++ b/dlls/rsaenh/implglue.h @@ -25,6 +25,7 @@ #define __WINE_IMPLGLUE_H #include "tomcrypt.h" +#include "sha2.h" /* Next typedef copied from dlls/advapi32/crypt_md4.c */ typedef struct tagMD4_CTX { @@ -57,6 +58,9 @@ typedef union tagHASH_CONTEXT { MD4_CTX md4; MD5_CTX md5; SHA_CTX sha; + SHA256_CTX sha256; + SHA384_CTX sha384; + SHA512_CTX sha512; } HASH_CONTEXT; typedef union tagKEY_CONTEXT { diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 665bc40056f..74ad392f2f2 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -241,6 +241,9 @@ static const PROV_ENUMALGS_EX aProvEnumAlgsEx[5][RSAENH_MAX_ENUMALGS+1] = {CALG_AES_192, 192,192, 192,0, 8,"AES-192", 39,"Advanced Encryption Standard (AES-192)"}, {CALG_AES_256, 256,256, 256,0, 8,"AES-256", 39,"Advanced Encryption Standard (AES-256)"}, {CALG_SHA, 160,160, 160,CRYPT_FLAG_SIGNING, 6,"SHA-1", 30,"Secure Hash Algorithm (SHA-1)"}, + {CALG_SHA_256, 256,256, 256,CRYPT_FLAG_SIGNING, 6,"SHA-256", 30,"Secure Hash Algorithm (SHA-256)"}, + {CALG_SHA_384, 384,384, 384,CRYPT_FLAG_SIGNING, 6,"SHA-384", 30,"Secure Hash Algorithm (SHA-284)"}, + {CALG_SHA_512, 512,512, 512,CRYPT_FLAG_SIGNING, 6,"SHA-512", 30,"Secure Hash Algorithm (SHA-512)"}, {CALG_MD2, 128,128, 128,CRYPT_FLAG_SIGNING, 4,"MD2", 23,"Message Digest 2 (MD2)"}, {CALG_MD4, 128,128, 128,CRYPT_FLAG_SIGNING, 4,"MD4", 23,"Message Digest 4 (MD4)"}, {CALG_MD5, 128,128, 128,CRYPT_FLAG_SIGNING, 4,"MD5", 23,"Message Digest 5 (MD5)"}, @@ -1422,8 +1425,8 @@ static BOOL build_hash_signature(BYTE *pbSignature, DWORD dwLen, ALG_ID aiAlgid, static const struct tagOIDDescriptor { ALG_ID aiAlgid; DWORD dwLen; - CONST BYTE abOID[18]; - } aOIDDescriptor[5] = { + CONST BYTE abOID[19]; + } aOIDDescriptor[8] = { { CALG_MD2, 18, { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02, 0x05, 0x00, 0x04, 0x10 } }, { CALG_MD4, 18, { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, @@ -1432,6 +1435,15 @@ static BOOL build_hash_signature(BYTE *pbSignature, DWORD dwLen, ALG_ID aiAlgid, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10 } }, { CALG_SHA, 15, { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 } }, + { CALG_SHA_256, 19, { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, + 0x05, 0x00, 0x04, 0x20 } }, + { CALG_SHA_384, 19, { 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, + 0x05, 0x00, 0x04, 0x30 } }, + { CALG_SHA_384, 19, { 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, + 0x05, 0x00, 0x04, 0x40 } }, { 0, 0, { 0 } } }; DWORD dwIdxOID, i, j; diff --git a/dlls/rsaenh/sha2.c b/dlls/rsaenh/sha2.c new file mode 100644 index 00000000000..559323c54e5 --- /dev/null +++ b/dlls/rsaenh/sha2.c @@ -0,0 +1,1003 @@ +/* + * FILE: sha2.c + * AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/ + * + * Copyright (c) 2000-2001, Aaron D. Gifford + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "config.h" + +#include +#include +#include "sha2.h" + +/* + * ASSERT NOTE: + * Some sanity checking code is included using assert(). On my FreeBSD + * system, this additional code can be removed by compiling with NDEBUG + * defined. Check your own systems manpage on assert() to see how to + * compile WITHOUT the sanity checking code on your system. + * + * UNROLLED TRANSFORM LOOP NOTE: + * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform + * loop version for the hash transform rounds (defined using macros + * later in this file). Either define on the command line, for example: + * + * cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c + * + * or define below: + * + * #define SHA2_UNROLL_TRANSFORM + * + */ + +/*** SHA-256/384/512 Various Length Definitions ***********************/ +/* NOTE: Most of these are in sha2.h */ +#define SHA256_SHORT_BLOCK_LENGTH (SHA256_BLOCK_LENGTH - 8) +#define SHA384_SHORT_BLOCK_LENGTH (SHA384_BLOCK_LENGTH - 16) +#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16) + +#define SHA2_WORD64_CONST(dw1, dw2) (((sha2_word64)(dw1) << 32) | (dw2)) + +/*** ENDIAN REVERSAL MACROS *******************************************/ +#ifndef WORDS_BIGENDIAN +#define REVERSE32(w,x) { \ + sha2_word32 tmp = (w); \ + tmp = (tmp >> 16) | (tmp << 16); \ + (x) = ((tmp & 0xff00ff00) >> 8) | ((tmp & 0x00ff00ff) << 8); \ +} +#define REVERSE64(w,x) { \ + sha2_word64 tmp = (w); \ + tmp = (tmp >> 32) | (tmp << 32); \ + tmp = ((tmp & SHA2_WORD64_CONST(0xff00ff00, 0xff00ff00)) >> 8) | \ + ((tmp & SHA2_WORD64_CONST(0x00ff00ff, 0x00ff00ff)) << 8); \ + (x) = ((tmp & SHA2_WORD64_CONST(0xffff0000, 0xffff0000)) >> 16) | \ + ((tmp & SHA2_WORD64_CONST(0x0000ffff, 0x0000ffff)) << 16); \ +} +#endif + +/* + * Macro for incrementally adding the unsigned 64-bit integer n to the + * unsigned 128-bit integer (represented using a two-element array of + * 64-bit words): + */ +#define ADDINC128(w,n) { \ + (w)[0] += (sha2_word64)(n); \ + if ((w)[0] < (n)) { \ + (w)[1]++; \ + } \ +} + +/* + * Macros for copying blocks of memory and for zeroing out ranges + * of memory. Using these macros makes it easy to switch from + * using memset()/memcpy() and using bzero()/bcopy(). + * + * Please define either SHA2_USE_MEMSET_MEMCPY or define + * SHA2_USE_BZERO_BCOPY depending on which function set you + * choose to use: + */ +#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY) +/* Default to memset()/memcpy() if no option is specified */ +#define SHA2_USE_MEMSET_MEMCPY 1 +#endif +#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY) +/* Abort with an error if BOTH options are defined */ +#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both! +#endif + +#ifdef SHA2_USE_MEMSET_MEMCPY +#define MEMSET_BZERO(p,l) memset((p), 0, (l)) +#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) +#endif +#ifdef SHA2_USE_BZERO_BCOPY +#define MEMSET_BZERO(p,l) bzero((p), (l)) +#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) +#endif + + +/*** THE SIX LOGICAL FUNCTIONS ****************************************/ +/* + * Bit shifting and rotation (used by the six SHA-XYZ logical functions: + * + * NOTE: The naming of R and S appears backwards here (R is a SHIFT and + * S is a ROTATION) because the SHA-256/384/512 description document + * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this + * same "backwards" definition. + */ +/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */ +#define R(b,x) ((x) >> (b)) +/* 32-bit Rotate-right (used in SHA-256): */ +#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b)))) +/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */ +#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b)))) + +/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */ +#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) +#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) + +/* Four of six logical functions used in SHA-256: */ +#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x))) +#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x))) +#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3 , (x))) +#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x))) + +/* Four of six logical functions used in SHA-384 and SHA-512: */ +#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x))) +#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x))) +#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x))) +#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x))) + +/*** INTERNAL FUNCTION PROTOTYPES *************************************/ +/* NOTE: These should not be accessed directly from outside this + * library -- they are intended for private internal visibility/use + * only. + */ +void SHA512_Last(SHA512_CTX*); +void SHA256_Transform(SHA256_CTX*, const sha2_word32*); +void SHA512_Transform(SHA512_CTX*, const sha2_word64*); + + +/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ +/* Hash constant words K for SHA-256: */ +static const sha2_word32 K256[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +/* Initial hash value H for SHA-256: */ +static const sha2_word32 sha256_initial_hash_value[8] = { + 0x6a09e667, + 0xbb67ae85, + 0x3c6ef372, + 0xa54ff53a, + 0x510e527f, + 0x9b05688c, + 0x1f83d9ab, + 0x5be0cd19 +}; + +/* Hash constant words K for SHA-384 and SHA-512: */ +static const sha2_word64 K512[80] = { + SHA2_WORD64_CONST(0x428a2f98, 0xd728ae22), SHA2_WORD64_CONST(0x71374491, 0x23ef65cd), + SHA2_WORD64_CONST(0xb5c0fbcf, 0xec4d3b2f), SHA2_WORD64_CONST(0xe9b5dba5, 0x8189dbbc), + SHA2_WORD64_CONST(0x3956c25b, 0xf348b538), SHA2_WORD64_CONST(0x59f111f1, 0xb605d019), + SHA2_WORD64_CONST(0x923f82a4, 0xaf194f9b), SHA2_WORD64_CONST(0xab1c5ed5, 0xda6d8118), + SHA2_WORD64_CONST(0xd807aa98, 0xa3030242), SHA2_WORD64_CONST(0x12835b01, 0x45706fbe), + SHA2_WORD64_CONST(0x243185be, 0x4ee4b28c), SHA2_WORD64_CONST(0x550c7dc3, 0xd5ffb4e2), + SHA2_WORD64_CONST(0x72be5d74, 0xf27b896f), SHA2_WORD64_CONST(0x80deb1fe, 0x3b1696b1), + SHA2_WORD64_CONST(0x9bdc06a7, 0x25c71235), SHA2_WORD64_CONST(0xc19bf174, 0xcf692694), + SHA2_WORD64_CONST(0xe49b69c1, 0x9ef14ad2), SHA2_WORD64_CONST(0xefbe4786, 0x384f25e3), + SHA2_WORD64_CONST(0x0fc19dc6, 0x8b8cd5b5), SHA2_WORD64_CONST(0x240ca1cc, 0x77ac9c65), + SHA2_WORD64_CONST(0x2de92c6f, 0x592b0275), SHA2_WORD64_CONST(0x4a7484aa, 0x6ea6e483), + SHA2_WORD64_CONST(0x5cb0a9dc, 0xbd41fbd4), SHA2_WORD64_CONST(0x76f988da, 0x831153b5), + SHA2_WORD64_CONST(0x983e5152, 0xee66dfab), SHA2_WORD64_CONST(0xa831c66d, 0x2db43210), + SHA2_WORD64_CONST(0xb00327c8, 0x98fb213f), SHA2_WORD64_CONST(0xbf597fc7, 0xbeef0ee4), + SHA2_WORD64_CONST(0xc6e00bf3, 0x3da88fc2), SHA2_WORD64_CONST(0xd5a79147, 0x930aa725), + SHA2_WORD64_CONST(0x06ca6351, 0xe003826f), SHA2_WORD64_CONST(0x14292967, 0x0a0e6e70), + SHA2_WORD64_CONST(0x27b70a85, 0x46d22ffc), SHA2_WORD64_CONST(0x2e1b2138, 0x5c26c926), + SHA2_WORD64_CONST(0x4d2c6dfc, 0x5ac42aed), SHA2_WORD64_CONST(0x53380d13, 0x9d95b3df), + SHA2_WORD64_CONST(0x650a7354, 0x8baf63de), SHA2_WORD64_CONST(0x766a0abb, 0x3c77b2a8), + SHA2_WORD64_CONST(0x81c2c92e, 0x47edaee6), SHA2_WORD64_CONST(0x92722c85, 0x1482353b), + SHA2_WORD64_CONST(0xa2bfe8a1, 0x4cf10364), SHA2_WORD64_CONST(0xa81a664b, 0xbc423001), + SHA2_WORD64_CONST(0xc24b8b70, 0xd0f89791), SHA2_WORD64_CONST(0xc76c51a3, 0x0654be30), + SHA2_WORD64_CONST(0xd192e819, 0xd6ef5218), SHA2_WORD64_CONST(0xd6990624, 0x5565a910), + SHA2_WORD64_CONST(0xf40e3585, 0x5771202a), SHA2_WORD64_CONST(0x106aa070, 0x32bbd1b8), + SHA2_WORD64_CONST(0x19a4c116, 0xb8d2d0c8), SHA2_WORD64_CONST(0x1e376c08, 0x5141ab53), + SHA2_WORD64_CONST(0x2748774c, 0xdf8eeb99), SHA2_WORD64_CONST(0x34b0bcb5, 0xe19b48a8), + SHA2_WORD64_CONST(0x391c0cb3, 0xc5c95a63), SHA2_WORD64_CONST(0x4ed8aa4a, 0xe3418acb), + SHA2_WORD64_CONST(0x5b9cca4f, 0x7763e373), SHA2_WORD64_CONST(0x682e6ff3, 0xd6b2b8a3), + SHA2_WORD64_CONST(0x748f82ee, 0x5defb2fc), SHA2_WORD64_CONST(0x78a5636f, 0x43172f60), + SHA2_WORD64_CONST(0x84c87814, 0xa1f0ab72), SHA2_WORD64_CONST(0x8cc70208, 0x1a6439ec), + SHA2_WORD64_CONST(0x90befffa, 0x23631e28), SHA2_WORD64_CONST(0xa4506ceb, 0xde82bde9), + SHA2_WORD64_CONST(0xbef9a3f7, 0xb2c67915), SHA2_WORD64_CONST(0xc67178f2, 0xe372532b), + SHA2_WORD64_CONST(0xca273ece, 0xea26619c), SHA2_WORD64_CONST(0xd186b8c7, 0x21c0c207), + SHA2_WORD64_CONST(0xeada7dd6, 0xcde0eb1e), SHA2_WORD64_CONST(0xf57d4f7f, 0xee6ed178), + SHA2_WORD64_CONST(0x06f067aa, 0x72176fba), SHA2_WORD64_CONST(0x0a637dc5, 0xa2c898a6), + SHA2_WORD64_CONST(0x113f9804, 0xbef90dae), SHA2_WORD64_CONST(0x1b710b35, 0x131c471b), + SHA2_WORD64_CONST(0x28db77f5, 0x23047d84), SHA2_WORD64_CONST(0x32caab7b, 0x40c72493), + SHA2_WORD64_CONST(0x3c9ebe0a, 0x15c9bebc), SHA2_WORD64_CONST(0x431d67c4, 0x9c100d4c), + SHA2_WORD64_CONST(0x4cc5d4be, 0xcb3e42b6), SHA2_WORD64_CONST(0x597f299c, 0xfc657e2a), + SHA2_WORD64_CONST(0x5fcb6fab, 0x3ad6faec), SHA2_WORD64_CONST(0x6c44198c, 0x4a475817) +}; + +/* Initial hash value H for SHA-384 */ +static const sha2_word64 sha384_initial_hash_value[8] = { + SHA2_WORD64_CONST(0xcbbb9d5d, 0xc1059ed8), + SHA2_WORD64_CONST(0x629a292a, 0x367cd507), + SHA2_WORD64_CONST(0x9159015a, 0x3070dd17), + SHA2_WORD64_CONST(0x152fecd8, 0xf70e5939), + SHA2_WORD64_CONST(0x67332667, 0xffc00b31), + SHA2_WORD64_CONST(0x8eb44a87, 0x68581511), + SHA2_WORD64_CONST(0xdb0c2e0d, 0x64f98fa7), + SHA2_WORD64_CONST(0x47b5481d, 0xbefa4fa4) +}; + +/* Initial hash value H for SHA-512 */ +static const sha2_word64 sha512_initial_hash_value[8] = { + SHA2_WORD64_CONST(0x6a09e667, 0xf3bcc908), + SHA2_WORD64_CONST(0xbb67ae85, 0x84caa73b), + SHA2_WORD64_CONST(0x3c6ef372, 0xfe94f82b), + SHA2_WORD64_CONST(0xa54ff53a, 0x5f1d36f1), + SHA2_WORD64_CONST(0x510e527f, 0xade682d1), + SHA2_WORD64_CONST(0x9b05688c, 0x2b3e6c1f), + SHA2_WORD64_CONST(0x1f83d9ab, 0xfb41bd6b), + SHA2_WORD64_CONST(0x5be0cd19, 0x137e2179) +}; + +/* + * Constant used by SHA256/384/512_End() functions for converting the + * digest to a readable hexadecimal character string: + */ +static const char sha2_hex_digits[] = "0123456789abcdef"; + + +/*** SHA-256: *********************************************************/ +void SHA256_Init(SHA256_CTX* context) { + if (context == (SHA256_CTX*)0) { + return; + } + MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH); + MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH); + context->bitcount = 0; +} + +#ifdef SHA2_UNROLL_TRANSFORM + +/* Unrolled SHA-256 round macros: */ + +#ifndef WORDS_BIGENDIAN + +#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ + REVERSE32(*data++, W256[j]); \ + T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \ + K256[j] + W256[j]; \ + (d) += T1; \ + (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ + j++ + + +#else + +#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ + T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \ + K256[j] + (W256[j] = *data++); \ + (d) += T1; \ + (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ + j++ + +#endif + +#define ROUND256(a,b,c,d,e,f,g,h) \ + s0 = W256[(j+1)&0x0f]; \ + s0 = sigma0_256(s0); \ + s1 = W256[(j+14)&0x0f]; \ + s1 = sigma1_256(s1); \ + T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \ + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \ + (d) += T1; \ + (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ + j++ + +void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { + sha2_word32 a, b, c, d, e, f, g, h, s0, s1; + sha2_word32 T1, *W256; + int j; + + W256 = (sha2_word32*)context->buffer; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { + /* Rounds 0 to 15 (unrolled): */ + ROUND256_0_TO_15(a,b,c,d,e,f,g,h); + ROUND256_0_TO_15(h,a,b,c,d,e,f,g); + ROUND256_0_TO_15(g,h,a,b,c,d,e,f); + ROUND256_0_TO_15(f,g,h,a,b,c,d,e); + ROUND256_0_TO_15(e,f,g,h,a,b,c,d); + ROUND256_0_TO_15(d,e,f,g,h,a,b,c); + ROUND256_0_TO_15(c,d,e,f,g,h,a,b); + ROUND256_0_TO_15(b,c,d,e,f,g,h,a); + } while (j < 16); + + /* Now for the remaining rounds to 64: */ + do { + ROUND256(a,b,c,d,e,f,g,h); + ROUND256(h,a,b,c,d,e,f,g); + ROUND256(g,h,a,b,c,d,e,f); + ROUND256(f,g,h,a,b,c,d,e); + ROUND256(e,f,g,h,a,b,c,d); + ROUND256(d,e,f,g,h,a,b,c); + ROUND256(c,d,e,f,g,h,a,b); + ROUND256(b,c,d,e,f,g,h,a); + } while (j < 64); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = 0; +} + +#else /* SHA2_UNROLL_TRANSFORM */ + +void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { + sha2_word32 a, b, c, d, e, f, g, h, s0, s1; + sha2_word32 T1, T2, *W256; + int j; + + W256 = (sha2_word32*)context->buffer; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { +#ifndef WORDS_BIGENDIAN + /* Copy data while converting to host byte order */ + REVERSE32(*data++,W256[j]); + /* Apply the SHA-256 compression function to update a..h */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j]; +#else + /* Apply the SHA-256 compression function to update a..h with copy */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++); +#endif + T2 = Sigma0_256(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 16); + + do { + /* Part of the message block expansion: */ + s0 = W256[(j+1)&0x0f]; + s0 = sigma0_256(s0); + s1 = W256[(j+14)&0x0f]; + s1 = sigma1_256(s1); + + /* Apply the SHA-256 compression function to update a..h */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); + T2 = Sigma0_256(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 64); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = T2 = 0; +} + +#endif /* SHA2_UNROLL_TRANSFORM */ + +void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) { + unsigned int freespace, usedspace; + + if (len == 0) { + /* Calling with no data is valid - we do nothing */ + return; + } + + /* Sanity check: */ + assert(context != (SHA256_CTX*)0 && data != (sha2_byte*)0); + + usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; + if (usedspace > 0) { + /* Calculate how much free space is available in the buffer */ + freespace = SHA256_BLOCK_LENGTH - usedspace; + + if (len >= freespace) { + /* Fill the buffer completely and process it */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); + context->bitcount += freespace << 3; + len -= freespace; + data += freespace; + SHA256_Transform(context, (sha2_word32*)context->buffer); + } else { + /* The buffer is not yet full */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, len); + context->bitcount += len << 3; + /* Clean up: */ + usedspace = freespace = 0; + return; + } + } + while (len >= SHA256_BLOCK_LENGTH) { + /* Process as many complete blocks as we can */ + SHA256_Transform(context, (sha2_word32*)data); + context->bitcount += SHA256_BLOCK_LENGTH << 3; + len -= SHA256_BLOCK_LENGTH; + data += SHA256_BLOCK_LENGTH; + } + if (len > 0) { + /* There's left-overs, so save 'em */ + MEMCPY_BCOPY(context->buffer, data, len); + context->bitcount += len << 3; + } + /* Clean up: */ + usedspace = freespace = 0; +} + +void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { + sha2_word32 *d = (sha2_word32*)digest; + unsigned int usedspace; + + /* Sanity check: */ + assert(context != (SHA256_CTX*)0); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != (sha2_byte*)0) { + usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; +#ifndef WORDS_BIGENDIAN + /* Convert FROM host byte order */ + REVERSE64(context->bitcount,context->bitcount); +#endif + if (usedspace > 0) { + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + + if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace); + } else { + if (usedspace < SHA256_BLOCK_LENGTH) { + MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace); + } + /* Do second-to-last transform: */ + SHA256_Transform(context, (sha2_word32*)context->buffer); + + /* And set-up for the last transform: */ + MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); + } + } else { + /* Set-up for the last transform: */ + MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); + + /* Begin padding with a 1 bit: */ + *context->buffer = 0x80; + } + /* Set the bit count: */ + *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; + + /* Final transform: */ + SHA256_Transform(context, (sha2_word32*)context->buffer); + +#ifndef WORDS_BIGENDIAN + { + /* Convert TO host byte order */ + int j; + for (j = 0; j < 8; j++) { + REVERSE32(context->state[j],context->state[j]); + *d++ = context->state[j]; + } + } +#else + MEMCPY_BCOPY(d, context->state, SHA256_DIGEST_LENGTH); +#endif + } + + /* Clean up state data: */ + MEMSET_BZERO(context, sizeof(context)); + usedspace = 0; +} + +char *SHA256_End(SHA256_CTX* context, char buffer[]) { + sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest; + int i; + + /* Sanity check: */ + assert(context != (SHA256_CTX*)0); + + if (buffer != (char*)0) { + SHA256_Final(digest, context); + + for (i = 0; i < SHA256_DIGEST_LENGTH; i++) { + *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4]; + *buffer++ = sha2_hex_digits[*d & 0x0f]; + d++; + } + *buffer = (char)0; + } else { + MEMSET_BZERO(context, sizeof(context)); + } + MEMSET_BZERO(digest, SHA256_DIGEST_LENGTH); + return buffer; +} + +char* SHA256_Data(const sha2_byte* data, size_t len, char digest[SHA256_DIGEST_STRING_LENGTH]) { + SHA256_CTX context; + + SHA256_Init(&context); + SHA256_Update(&context, data, len); + return SHA256_End(&context, digest); +} + + +/*** SHA-512: *********************************************************/ +void SHA512_Init(SHA512_CTX* context) { + if (context == (SHA512_CTX*)0) { + return; + } + MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH); + MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH); + context->bitcount[0] = context->bitcount[1] = 0; +} + +#ifdef SHA2_UNROLL_TRANSFORM + +/* Unrolled SHA-512 round macros: */ +#ifndef WORDS_BIGENDIAN + +#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \ + REVERSE64(*data++, W512[j]); \ + T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \ + K512[j] + W512[j]; \ + (d) += T1, \ + (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \ + j++ + + +#else + +#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \ + T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \ + K512[j] + (W512[j] = *data++); \ + (d) += T1; \ + (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \ + j++ + +#endif + +#define ROUND512(a,b,c,d,e,f,g,h) \ + s0 = W512[(j+1)&0x0f]; \ + s0 = sigma0_512(s0); \ + s1 = W512[(j+14)&0x0f]; \ + s1 = sigma1_512(s1); \ + T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \ + (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \ + (d) += T1; \ + (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \ + j++ + +void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { + sha2_word64 a, b, c, d, e, f, g, h, s0, s1; + sha2_word64 T1, *W512 = (sha2_word64*)context->buffer; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { + ROUND512_0_TO_15(a,b,c,d,e,f,g,h); + ROUND512_0_TO_15(h,a,b,c,d,e,f,g); + ROUND512_0_TO_15(g,h,a,b,c,d,e,f); + ROUND512_0_TO_15(f,g,h,a,b,c,d,e); + ROUND512_0_TO_15(e,f,g,h,a,b,c,d); + ROUND512_0_TO_15(d,e,f,g,h,a,b,c); + ROUND512_0_TO_15(c,d,e,f,g,h,a,b); + ROUND512_0_TO_15(b,c,d,e,f,g,h,a); + } while (j < 16); + + /* Now for the remaining rounds up to 79: */ + do { + ROUND512(a,b,c,d,e,f,g,h); + ROUND512(h,a,b,c,d,e,f,g); + ROUND512(g,h,a,b,c,d,e,f); + ROUND512(f,g,h,a,b,c,d,e); + ROUND512(e,f,g,h,a,b,c,d); + ROUND512(d,e,f,g,h,a,b,c); + ROUND512(c,d,e,f,g,h,a,b); + ROUND512(b,c,d,e,f,g,h,a); + } while (j < 80); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = 0; +} + +#else /* SHA2_UNROLL_TRANSFORM */ + +void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { + sha2_word64 a, b, c, d, e, f, g, h, s0, s1; + sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { +#ifndef WORDS_BIGENDIAN + /* Convert TO host byte order */ + REVERSE64(*data++, W512[j]); + /* Apply the SHA-512 compression function to update a..h */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j]; +#else + /* Apply the SHA-512 compression function to update a..h with copy */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++); +#endif + T2 = Sigma0_512(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 16); + + do { + /* Part of the message block expansion: */ + s0 = W512[(j+1)&0x0f]; + s0 = sigma0_512(s0); + s1 = W512[(j+14)&0x0f]; + s1 = sigma1_512(s1); + + /* Apply the SHA-512 compression function to update a..h */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + + (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); + T2 = Sigma0_512(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 80); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = T2 = 0; +} + +#endif /* SHA2_UNROLL_TRANSFORM */ + +void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) { + unsigned int freespace, usedspace; + + if (len == 0) { + /* Calling with no data is valid - we do nothing */ + return; + } + + /* Sanity check: */ + assert(context != (SHA512_CTX*)0 && data != (sha2_byte*)0); + + usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; + if (usedspace > 0) { + /* Calculate how much free space is available in the buffer */ + freespace = SHA512_BLOCK_LENGTH - usedspace; + + if (len >= freespace) { + /* Fill the buffer completely and process it */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); + ADDINC128(context->bitcount, freespace << 3); + len -= freespace; + data += freespace; + SHA512_Transform(context, (sha2_word64*)context->buffer); + } else { + /* The buffer is not yet full */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, len); + ADDINC128(context->bitcount, len << 3); + /* Clean up: */ + usedspace = freespace = 0; + return; + } + } + while (len >= SHA512_BLOCK_LENGTH) { + /* Process as many complete blocks as we can */ + SHA512_Transform(context, (sha2_word64*)data); + ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3); + len -= SHA512_BLOCK_LENGTH; + data += SHA512_BLOCK_LENGTH; + } + if (len > 0) { + /* There's left-overs, so save 'em */ + MEMCPY_BCOPY(context->buffer, data, len); + ADDINC128(context->bitcount, len << 3); + } + /* Clean up: */ + usedspace = freespace = 0; +} + +void SHA512_Last(SHA512_CTX* context) { + unsigned int usedspace; + + usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; +#ifndef WORDS_BIGENDIAN + /* Convert FROM host byte order */ + REVERSE64(context->bitcount[0],context->bitcount[0]); + REVERSE64(context->bitcount[1],context->bitcount[1]); +#endif + if (usedspace > 0) { + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + + if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace); + } else { + if (usedspace < SHA512_BLOCK_LENGTH) { + MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace); + } + /* Do second-to-last transform: */ + SHA512_Transform(context, (sha2_word64*)context->buffer); + + /* And set-up for the last transform: */ + MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2); + } + } else { + /* Prepare for final transform: */ + MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH); + + /* Begin padding with a 1 bit: */ + *context->buffer = 0x80; + } + /* Store the length of input data (in bits): */ + *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; + *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; + + /* Final transform: */ + SHA512_Transform(context, (sha2_word64*)context->buffer); +} + +void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) { + sha2_word64 *d = (sha2_word64*)digest; + + /* Sanity check: */ + assert(context != (SHA512_CTX*)0); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != (sha2_byte*)0) { + SHA512_Last(context); + + /* Save the hash data for output: */ +#ifndef WORDS_BIGENDIAN + { + /* Convert TO host byte order */ + int j; + for (j = 0; j < 8; j++) { + REVERSE64(context->state[j],context->state[j]); + *d++ = context->state[j]; + } + } +#else + MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH); +#endif + } + + /* Zero out state data */ + MEMSET_BZERO(context, sizeof(context)); +} + +char *SHA512_End(SHA512_CTX* context, char buffer[]) { + sha2_byte digest[SHA512_DIGEST_LENGTH], *d = digest; + int i; + + /* Sanity check: */ + assert(context != (SHA512_CTX*)0); + + if (buffer != (char*)0) { + SHA512_Final(digest, context); + + for (i = 0; i < SHA512_DIGEST_LENGTH; i++) { + *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4]; + *buffer++ = sha2_hex_digits[*d & 0x0f]; + d++; + } + *buffer = (char)0; + } else { + MEMSET_BZERO(context, sizeof(context)); + } + MEMSET_BZERO(digest, SHA512_DIGEST_LENGTH); + return buffer; +} + +char* SHA512_Data(const sha2_byte* data, size_t len, char digest[SHA512_DIGEST_STRING_LENGTH]) { + SHA512_CTX context; + + SHA512_Init(&context); + SHA512_Update(&context, data, len); + return SHA512_End(&context, digest); +} + + +/*** SHA-384: *********************************************************/ +void SHA384_Init(SHA384_CTX* context) { + if (context == (SHA384_CTX*)0) { + return; + } + MEMCPY_BCOPY(context->state, sha384_initial_hash_value, SHA512_DIGEST_LENGTH); + MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH); + context->bitcount[0] = context->bitcount[1] = 0; +} + +void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) { + SHA512_Update((SHA512_CTX*)context, data, len); +} + +void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) { + sha2_word64 *d = (sha2_word64*)digest; + + /* Sanity check: */ + assert(context != (SHA384_CTX*)0); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != (sha2_byte*)0) { + SHA512_Last((SHA512_CTX*)context); + + /* Save the hash data for output: */ +#ifndef WORDS_BIGENDIAN + { + /* Convert TO host byte order */ + int j; + for (j = 0; j < 6; j++) { + REVERSE64(context->state[j],context->state[j]); + *d++ = context->state[j]; + } + } +#else + MEMCPY_BCOPY(d, context->state, SHA384_DIGEST_LENGTH); +#endif + } + + /* Zero out state data */ + MEMSET_BZERO(context, sizeof(context)); +} + +char *SHA384_End(SHA384_CTX* context, char buffer[]) { + sha2_byte digest[SHA384_DIGEST_LENGTH], *d = digest; + int i; + + /* Sanity check: */ + assert(context != (SHA384_CTX*)0); + + if (buffer != (char*)0) { + SHA384_Final(digest, context); + + for (i = 0; i < SHA384_DIGEST_LENGTH; i++) { + *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4]; + *buffer++ = sha2_hex_digits[*d & 0x0f]; + d++; + } + *buffer = (char)0; + } else { + MEMSET_BZERO(context, sizeof(context)); + } + MEMSET_BZERO(digest, SHA384_DIGEST_LENGTH); + return buffer; +} + +char* SHA384_Data(const sha2_byte* data, size_t len, char digest[SHA384_DIGEST_STRING_LENGTH]) { + SHA384_CTX context; + + SHA384_Init(&context); + SHA384_Update(&context, data, len); + return SHA384_End(&context, digest); +} diff --git a/dlls/rsaenh/sha2.h b/dlls/rsaenh/sha2.h new file mode 100644 index 00000000000..2dda41230c1 --- /dev/null +++ b/dlls/rsaenh/sha2.h @@ -0,0 +1,89 @@ +/* + * FILE: sha2.h + * AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/ + * + * Copyright (c) 2000-2001, Aaron D. Gifford + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __SHA2_H__ +#define __SHA2_H__ + +#include + +/*** SHA-256/384/512 Various Length Definitions ***********************/ +#define SHA256_BLOCK_LENGTH 64 +#define SHA256_DIGEST_LENGTH 32 +#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) +#define SHA384_BLOCK_LENGTH 128 +#define SHA384_DIGEST_LENGTH 48 +#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1) +#define SHA512_BLOCK_LENGTH 128 +#define SHA512_DIGEST_LENGTH 64 +#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) + + +/*** SHA-256/384/512 Context Structures *******************************/ +typedef UINT8 sha2_byte; /* Exactly 1 byte */ +typedef UINT32 sha2_word32; /* Exactly 4 bytes */ +typedef UINT64 sha2_word64; /* Exactly 8 bytes */ + +typedef struct _SHA256_CTX { + sha2_word32 state[8]; + sha2_word64 bitcount; + sha2_byte buffer[SHA256_BLOCK_LENGTH]; +} SHA256_CTX; +typedef struct _SHA512_CTX { + sha2_word64 state[8]; + sha2_word64 bitcount[2]; + sha2_byte buffer[SHA512_BLOCK_LENGTH]; +} SHA512_CTX; + +typedef SHA512_CTX SHA384_CTX; + + +/*** SHA-256/384/512 Function Prototypes ******************************/ + +void SHA256_Init(SHA256_CTX *); +void SHA256_Update(SHA256_CTX*, const sha2_byte*, size_t); +void SHA256_Final(sha2_byte[SHA256_DIGEST_LENGTH], SHA256_CTX*); +char* SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]); +char* SHA256_Data(const sha2_byte*, size_t, char[SHA256_DIGEST_STRING_LENGTH]); + +void SHA384_Init(SHA384_CTX*); +void SHA384_Update(SHA384_CTX*, const sha2_byte*, size_t); +void SHA384_Final(sha2_byte[SHA384_DIGEST_LENGTH], SHA384_CTX*); +char* SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]); +char* SHA384_Data(const sha2_byte*, size_t, char[SHA384_DIGEST_STRING_LENGTH]); + +void SHA512_Init(SHA512_CTX*); +void SHA512_Update(SHA512_CTX*, const sha2_byte*, size_t); +void SHA512_Final(sha2_byte[SHA512_DIGEST_LENGTH], SHA512_CTX*); +char* SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]); +char* SHA512_Data(const sha2_byte*, size_t, char[SHA512_DIGEST_STRING_LENGTH]); + +#endif /* __SHA2_H__ */ diff --git a/dlls/rsaenh/tests/Makefile.in b/dlls/rsaenh/tests/Makefile.in index 3f2e41594f2..6b1691ebcc4 100644 --- a/dlls/rsaenh/tests/Makefile.in +++ b/dlls/rsaenh/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ rsaenh.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 94da11659ce..94b1ed0b9a7 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -128,16 +128,28 @@ static int init_base_environment(DWORD dwKeyFlags) hProv = (HCRYPTPROV)INVALID_HANDLE_VALUE; result = CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d, %08x\n", result, GetLastError()); + ok(!result && (GetLastError()==NTE_BAD_FLAGS || + broken(GetLastError() == NTE_KEYSET_NOT_DEF /* Win9x/NT4 */)), + "%d, %08x\n", result, GetLastError()); if (!CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, 0)) { - ok(GetLastError()==NTE_BAD_KEYSET, "%08x\n", GetLastError()); - if (GetLastError()!=NTE_BAD_KEYSET) return 0; + ok(GetLastError()==NTE_BAD_KEYSET || + broken(GetLastError() == NTE_KEYSET_NOT_DEF /* Win9x/NT4 */), + "%08x\n", GetLastError()); + if (GetLastError()!=NTE_BAD_KEYSET) + { + win_skip("RSA full provider not available\n"); + return 0; + } result = CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_NEWKEYSET); ok(result, "%08x\n", GetLastError()); - if (!result) return 0; + if (!result) + { + win_skip("Couldn't create crypto provider\n"); + return 0; + } result = CryptGenKey(hProv, AT_KEYEXCHANGE, dwKeyFlags, &hKey); ok(result, "%08x\n", GetLastError()); if (result) CryptDestroyKey(hKey); @@ -440,6 +452,17 @@ static void test_hashes(void) result = CryptDestroyHash(hHash); ok(result, "%08x\n", GetLastError()); + + /* The SHA-2 variants aren't supported in the RSA full provider */ + result = CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash); + ok(!result && GetLastError() == NTE_BAD_ALGID, + "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + result = CryptCreateHash(hProv, CALG_SHA_384, 0, 0, &hHash); + ok(!result && GetLastError() == NTE_BAD_ALGID, + "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + result = CryptCreateHash(hProv, CALG_SHA_512, 0, 0, &hHash); + ok(!result && GetLastError() == NTE_BAD_ALGID, + "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); } static void test_block_cipher_modes(void) @@ -746,6 +769,108 @@ static void test_aes(int keylen) ok(result, "%08x\n", GetLastError()); } +static void test_sha2(void) +{ + static const unsigned char sha256hash[32] = { + 0x10, 0xfc, 0x3c, 0x51, 0xa1, 0x52, 0xe9, 0x0e, 0x5b, 0x90, + 0x31, 0x9b, 0x60, 0x1d, 0x92, 0xcc, 0xf3, 0x72, 0x90, 0xef, + 0x53, 0xc3, 0x5f, 0xf9, 0x25, 0x07, 0x68, 0x7d, 0x8a, 0x91, + 0x1a, 0x08 + }; + static const unsigned char sha384hash[48] = { + 0x98, 0xd3, 0x3f, 0x89, 0x0b, 0x23, 0x33, 0x44, 0x61, 0x32, + 0x5a, 0x7c, 0xa3, 0x03, 0x89, 0xb5, 0x11, 0xd7, 0x41, 0xc8, + 0x54, 0x6b, 0x12, 0x0c, 0x40, 0x15, 0xb6, 0x2a, 0x03, 0x43, + 0xe5, 0x64, 0x7f, 0x10, 0x1e, 0xae, 0x47, 0xa9, 0x39, 0x05, + 0x6f, 0x40, 0x60, 0x94, 0xd6, 0xad, 0x80, 0x55 + }; + static const unsigned char sha512hash[64] = { + 0x37, 0x86, 0x0e, 0x7d, 0x25, 0xd9, 0xf9, 0x84, 0x3e, 0x3d, + 0xc7, 0x13, 0x95, 0x73, 0x42, 0x04, 0xfd, 0x13, 0xad, 0x23, + 0x39, 0x16, 0x32, 0x5f, 0x99, 0x3e, 0x3c, 0xee, 0x3f, 0x11, + 0x36, 0xf9, 0xc9, 0x66, 0x08, 0x70, 0xcc, 0x49, 0xd8, 0xe0, + 0x7d, 0xa1, 0x57, 0x62, 0x71, 0xa6, 0xc9, 0xa4, 0x24, 0x60, + 0xfc, 0xde, 0x9d, 0xb2, 0xf1, 0xd2, 0xc2, 0xfb, 0x2d, 0xbf, + 0xb7, 0xf4, 0x81, 0xd4 + }; + unsigned char pbData[2048]; + BOOL result; + HCRYPTHASH hHash; + BYTE pbHashValue[64]; + DWORD hashlen, len; + int i; + + for (i=0; i<2048; i++) pbData[i] = (unsigned char)i; + + /* SHA-256 hash */ + SetLastError(0xdeadbeef); + result = CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash); + if (!result && GetLastError() == NTE_BAD_ALGID) { + win_skip("SHA-256/384/512 hashes are not supported before Windows XP SP3\n"); + return; + } + ok(result, "%08x\n", GetLastError()); + if (result) { + len = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); + ok(result && (hashlen == 32), "%08x, hashlen: %d\n", GetLastError(), hashlen); + + result = CryptHashData(hHash, pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + + len = 32; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, sha256hash, 32), "Wrong SHA-256 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + } + + /* SHA-384 hash */ + result = CryptCreateHash(hProv, CALG_SHA_384, 0, 0, &hHash); + ok(result, "%08x\n", GetLastError()); + if (result) { + len = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); + ok(result && (hashlen == 48), "%08x, hashlen: %d\n", GetLastError(), hashlen); + + result = CryptHashData(hHash, pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + + len = 48; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, sha384hash, 48), "Wrong SHA-384 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + } + + /* SHA-512 hash */ + result = CryptCreateHash(hProv, CALG_SHA_512, 0, 0, &hHash); + ok(result, "%08x\n", GetLastError()); + if (result) { + len = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); + ok(result && (hashlen == 64), "%08x, hashlen: %d\n", GetLastError(), hashlen); + + result = CryptHashData(hHash, pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + + len = 64; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, sha512hash, 64), "Wrong SHA-512 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + } +} + static void test_rc2(void) { static const BYTE rc2_40_encrypted[16] = { @@ -2569,5 +2694,6 @@ START_TEST(rsaenh) test_aes(128); test_aes(192); test_aes(256); + test_sha2(); clean_up_aes_environment(); } diff --git a/dlls/rtutils/Makefile.in b/dlls/rtutils/Makefile.in index d695502c50f..c922c847602 100644 --- a/dlls/rtutils/Makefile.in +++ b/dlls/rtutils/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ tracing.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sane.ds/Makefile.in b/dlls/sane.ds/Makefile.in index e5c3fd45a5e..1c065d9fd35 100644 --- a/dlls/sane.ds/Makefile.in +++ b/dlls/sane.ds/Makefile.in @@ -35,5 +35,3 @@ RC_SRCS = \ sane_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sccbase/Makefile.in b/dlls/sccbase/Makefile.in index a24f1233666..cf678c01e4f 100644 --- a/dlls/sccbase/Makefile.in +++ b/dlls/sccbase/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/schannel/Makefile.in b/dlls/schannel/Makefile.in index 273aed285f0..7a640a1e364 100644 --- a/dlls/schannel/Makefile.in +++ b/dlls/schannel/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/schannel/tests/Makefile.in b/dlls/schannel/tests/Makefile.in index a9e273fe89d..609e2a9eb82 100644 --- a/dlls/schannel/tests/Makefile.in +++ b/dlls/schannel/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/secur32/Makefile.in b/dlls/secur32/Makefile.in index 788f4dea1c2..0e44d4940e7 100644 --- a/dlls/secur32/Makefile.in +++ b/dlls/secur32/Makefile.in @@ -22,5 +22,3 @@ C_SRCS = \ wrapper.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/secur32/tests/Makefile.in b/dlls/secur32/tests/Makefile.in index ad2740d0056..54ea51c1668 100644 --- a/dlls/secur32/tests/Makefile.in +++ b/dlls/secur32/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ secur32.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/security/Makefile.in b/dlls/security/Makefile.in index d72e17cbdec..4edfac33821 100644 --- a/dlls/security/Makefile.in +++ b/dlls/security/Makefile.in @@ -6,5 +6,3 @@ MODULE = security.dll IMPORTS = secur32 kernel32 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sensapi/Makefile.in b/dlls/sensapi/Makefile.in index fcf99f1d6c6..1d969fce4d8 100644 --- a/dlls/sensapi/Makefile.in +++ b/dlls/sensapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ sensapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/serialui/Makefile.in b/dlls/serialui/Makefile.in index 8b3f1cab49e..7534c358c1c 100644 --- a/dlls/serialui/Makefile.in +++ b/dlls/serialui/Makefile.in @@ -34,5 +34,3 @@ RC_SRCS = \ Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/serialui/tests/Makefile.in b/dlls/serialui/tests/Makefile.in index cc9c962264e..2b8ecea29fc 100644 --- a/dlls/serialui/tests/Makefile.in +++ b/dlls/serialui/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ confdlg.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/setupapi/Makefile.in b/dlls/setupapi/Makefile.in index b72c61206db..2e644d50445 100644 --- a/dlls/setupapi/Makefile.in +++ b/dlls/setupapi/Makefile.in @@ -51,5 +51,3 @@ RC_SRCS = \ Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index ec586e723c8..31269ff901d 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -1556,6 +1556,18 @@ BOOL WINAPI SetupDiRegisterDeviceInfo( } /*********************************************************************** + * SetupDiRemoveDevice (SETUPAPI.@) + */ +BOOL WINAPI SetupDiRemoveDevice( + HDEVINFO devinfo, + PSP_DEVINFO_DATA info) +{ + FIXME("(%p, %p): stub\n", devinfo, info); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/*********************************************************************** * SetupDiEnumDeviceInfo (SETUPAPI.@) */ BOOL WINAPI SetupDiEnumDeviceInfo( diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 51a5c2e011c..5532aaaf94e 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -375,7 +375,7 @@ @ stub SetupDiOpenDeviceInterfaceRegKey @ stdcall SetupDiOpenDeviceInterfaceW(ptr wstr long ptr) @ stdcall SetupDiRegisterDeviceInfo(ptr ptr long ptr ptr ptr) -@ stub SetupDiRemoveDevice +@ stdcall SetupDiRemoveDevice(ptr ptr) @ stub SetupDiRemoveDeviceInterface @ stub SetupDiSelectDevice @ stub SetupDiSelectOEMDrv diff --git a/dlls/setupapi/tests/Makefile.in b/dlls/setupapi/tests/Makefile.in index fe6840d36f7..ed3a4c0ea8d 100644 --- a/dlls/setupapi/tests/Makefile.in +++ b/dlls/setupapi/tests/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ stringtable.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/setupx.dll16/Makefile.in b/dlls/setupx.dll16/Makefile.in index 40c73f98410..73cecccc121 100644 --- a/dlls/setupx.dll16/Makefile.in +++ b/dlls/setupx.dll16/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ virtcopy.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sfc/Makefile.in b/dlls/sfc/Makefile.in index ef2ff22bae3..dea5def92ce 100644 --- a/dlls/sfc/Makefile.in +++ b/dlls/sfc/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = sfc_os kernel32 C_SRCS = sfc_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sfc_os/Makefile.in b/dlls/sfc_os/Makefile.in index 725ebd81096..29678e7e93a 100644 --- a/dlls/sfc_os/Makefile.in +++ b/dlls/sfc_os/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 C_SRCS = sfc_os.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shdoclc/Makefile.in b/dlls/shdoclc/Makefile.in index 600564c981c..1834384bec3 100644 --- a/dlls/shdoclc/Makefile.in +++ b/dlls/shdoclc/Makefile.in @@ -28,5 +28,3 @@ RC_SRCS = \ Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shdocvw/Makefile.in b/dlls/shdocvw/Makefile.in index d8035ff78c7..f6239329980 100644 --- a/dlls/shdocvw/Makefile.in +++ b/dlls/shdocvw/Makefile.in @@ -32,5 +32,3 @@ RC_SRCS = shdocvw.rc IDL_TLB_SRCS = shdocvw_v1.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c index e8982e4f12a..2196eb9c02e 100644 --- a/dlls/shdocvw/dochost.c +++ b/dlls/shdocvw/dochost.c @@ -21,9 +21,14 @@ #include "hlink.h" #include "exdispid.h" #include "mshtml.h" +#include "initguid.h" WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); +DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); + +#define DOCHOST_DOCCANNAVIGATE 0 + static ATOM doc_view_atom = 0; void push_dochost_task(DocHost *This, task_header_t *task, task_proc_t proc, BOOL send) @@ -154,16 +159,23 @@ static void advise_prop_notif(DocHost *This, BOOL set) This->is_prop_notif = set; } +void set_doc_state(DocHost *This, READYSTATE doc_state) +{ + This->doc_state = doc_state; + if(doc_state > This->ready_state) + This->ready_state = doc_state; +} + static void update_ready_state(DocHost *This, READYSTATE ready_state) { - if(ready_state > READYSTATE_LOADING && This->ready_state <= READYSTATE_LOADING) { + if(ready_state > READYSTATE_LOADING && This->doc_state <= READYSTATE_LOADING) notif_complete(This, DISPID_NAVIGATECOMPLETE2); - This->ready_state = ready_state; - } - if(ready_state == READYSTATE_COMPLETE && This->ready_state < READYSTATE_COMPLETE) { - This->ready_state = READYSTATE_COMPLETE; + if(ready_state == READYSTATE_COMPLETE && This->doc_state < READYSTATE_COMPLETE) { + set_doc_state(This, READYSTATE_COMPLETE); notif_complete(This, DISPID_DOCUMENTCOMPLETE); + }else { + set_doc_state(This, ready_state); } } @@ -236,7 +248,7 @@ HRESULT dochost_object_available(DocHost *This, IUnknown *doc) if(SUCCEEDED(hres)) { if(ready_state == READYSTATE_COMPLETE) push_ready_state_task(This, READYSTATE_COMPLETE); - else + if(ready_state != READYSTATE_COMPLETE || This->doc_navigate) advise_prop_notif(This, TRUE); } @@ -314,6 +326,11 @@ void deactivate_document(DocHost *This) IHlinkTarget *hlink = NULL; HRESULT hres; + if(This->doc_navigate) { + IUnknown_Release(This->doc_navigate); + This->doc_navigate = NULL; + } + if(This->is_prop_notif) advise_prop_notif(This, FALSE); @@ -425,8 +442,34 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface, VARIANT *pvaOut) { DocHost *This = OLECMD_THIS(iface); - FIXME("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID, - nCmdexecopt, pvaIn, pvaOut); + + TRACE("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID, + nCmdexecopt, debugstr_variant(pvaIn), debugstr_variant(pvaOut)); + + if(!pguidCmdGroup) { + FIXME("Unimplemented cmdid %d\n", nCmdID); + return E_NOTIMPL; + } + + if(IsEqualGUID(pguidCmdGroup, &CGID_DocHostCmdPriv)) { + switch(nCmdID) { + case DOCHOST_DOCCANNAVIGATE: + if(!pvaIn || V_VT(pvaIn) != VT_UNKNOWN) + return E_INVALIDARG; + + if(This->doc_navigate) + IUnknown_Release(This->doc_navigate); + IUnknown_AddRef(V_UNKNOWN(pvaIn)); + This->doc_navigate = V_UNKNOWN(pvaIn); + return S_OK; + + default: + FIXME("unsupported command %d of CGID_DocHostCmdPriv\n", nCmdID); + return E_NOTIMPL; + } + } + + FIXME("Unimplemented group %s\n", debugstr_guid(pguidCmdGroup)); return E_NOTIMPL; } @@ -709,7 +752,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D if(FAILED(hres)) return hres; - if(ready_state == READYSTATE_COMPLETE) + if(ready_state == READYSTATE_COMPLETE && !This->doc_navigate) advise_prop_notif(This, FALSE); push_ready_state_task(This, ready_state); diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c index ca2c868d13d..d65810f58f9 100644 --- a/dlls/shdocvw/iexplore.c +++ b/dlls/shdocvw/iexplore.c @@ -163,7 +163,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv) TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv); - ret = heap_alloc(sizeof(InternetExplorer)); + ret = heap_alloc_zero(sizeof(InternetExplorer)); ret->ref = 0; ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret); diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index 54c4cf0c6ed..332c0807f66 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -27,6 +27,7 @@ #include "winreg.h" #include "shlwapi.h" #include "wininet.h" +#include "mshtml.h" WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); @@ -378,8 +379,7 @@ static BindStatusCallback *create_callback(DocHost *doc_host, LPCWSTR url, PBYTE return ret; } -static void on_before_navigate2(DocHost *This, LPCWSTR url, const BYTE *post_data, - ULONG post_data_len, LPWSTR headers, VARIANT_BOOL *cancel) +static void on_before_navigate2(DocHost *This, LPCWSTR url, SAFEARRAY *post_data, LPWSTR headers, VARIANT_BOOL *cancel) { VARIANT var_url, var_flags, var_frame_name, var_post_data, var_post_data2, var_headers; DISPPARAMS dispparams; @@ -404,18 +404,12 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, const BYTE *post_dat V_VARIANTREF(params+2) = &var_post_data2; V_VT(&var_post_data2) = (VT_BYREF|VT_VARIANT); V_VARIANTREF(&var_post_data2) = &var_post_data; - VariantInit(&var_post_data); - - if(post_data_len) { - SAFEARRAYBOUND bound = {post_data_len, 0}; - void *data; + if(post_data) { V_VT(&var_post_data) = VT_UI1|VT_ARRAY; - V_ARRAY(&var_post_data) = SafeArrayCreate(VT_UI1, 1, &bound); - - SafeArrayAccessData(V_ARRAY(&var_post_data), &data); - memcpy(data, post_data, post_data_len); - SafeArrayUnaccessData(V_ARRAY(&var_post_data)); + V_ARRAY(&var_post_data) = post_data; + }else { + V_VT(&var_post_data) = VT_EMPTY; } V_VT(params+3) = (VT_BYREF|VT_VARIANT); @@ -439,8 +433,6 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, const BYTE *post_dat call_sink(This->cps.wbe2, DISPID_BEFORENAVIGATE2, &dispparams); SysFreeString(V_BSTR(&var_url)); - if(post_data_len) - SafeArrayDestroy(V_ARRAY(&var_post_data)); } /* FIXME: urlmon should handle it */ @@ -543,15 +535,153 @@ static HRESULT bind_to_object(DocHost *This, IMoniker *mon, LPCWSTR url, IBindCt return S_OK; } +static void html_window_navigate(DocHost *This, IHTMLPrivateWindow *window, BSTR url, BSTR headers, SAFEARRAY *post_data) +{ + VARIANT headers_var, post_data_var; + WCHAR *new_url; + BSTR empty_str; + DWORD size; + HRESULT hres; + + size = (strlenW(url)+1)*sizeof(WCHAR); + new_url = CoTaskMemAlloc(size); + if(!new_url) + return; + memcpy(new_url, url, size); + CoTaskMemFree(This->url); + This->url = new_url; + + empty_str = SysAllocStringLen(NULL, 0); + + if(headers) { + V_VT(&headers_var) = VT_BSTR; + V_BSTR(&headers_var) = headers; + }else { + V_VT(&headers_var) = VT_EMPTY; + } + + if(post_data) { + V_VT(&post_data_var) = VT_UI1|VT_ARRAY; + V_ARRAY(&post_data_var) = post_data; + }else { + V_VT(&post_data_var) = VT_EMPTY; + } + + set_doc_state(This, READYSTATE_LOADING); + hres = IHTMLPrivateWindow_SuperNavigate(window, url, empty_str, NULL, NULL, &post_data_var, &headers_var, 0); + SysFreeString(empty_str); + if(FAILED(hres)) + WARN("SuprtNavigate failed: %08x\n", hres); +} + +typedef struct { + task_header_t header; + BSTR url; + BSTR headers; + SAFEARRAY *post_data; + BOOL async_notif; +} task_doc_navigate_t; + +static HRESULT free_doc_navigate_task(task_doc_navigate_t *task, BOOL free_task) +{ + SysFreeString(task->url); + SysFreeString(task->headers); + if(task->post_data) + SafeArrayDestroy(task->post_data); + if(free_task) + heap_free(task); + return E_OUTOFMEMORY; +} + +static void doc_navigate_proc(DocHost *This, task_header_t *t) +{ + task_doc_navigate_t *task = (task_doc_navigate_t*)t; + IHTMLPrivateWindow *priv_window; + HRESULT hres; + + if(!This->doc_navigate) + return; + + if(task->async_notif) { + VARIANT_BOOL cancel = VARIANT_FALSE; + on_before_navigate2(This, task->url, task->post_data, task->headers, &cancel); + if(cancel) { + TRACE("Navigation calnceled\n"); + free_doc_navigate_task(task, FALSE); + return; + } + } + + hres = IUnknown_QueryInterface(This->doc_navigate, &IID_IHTMLPrivateWindow, (void**)&priv_window); + if(SUCCEEDED(hres)) { + html_window_navigate(This, priv_window, task->url, task->headers, task->post_data); + IHTMLPrivateWindow_Release(priv_window); + }else { + WARN("Could not get IHTMLPrivateWindow iface: %08x\n", hres); + } + + free_doc_navigate_task(task, FALSE); +} + +static HRESULT async_doc_navigate(DocHost *This, LPCWSTR url, LPCWSTR headers, PBYTE post_data, ULONG post_data_size, + BOOL async_notif) +{ + task_doc_navigate_t *task; + + task = heap_alloc_zero(sizeof(*task)); + if(!task) + return E_OUTOFMEMORY; + + task->url = SysAllocString(url); + if(!task->url) + return free_doc_navigate_task(task, TRUE); + + if(headers) { + task->headers = SysAllocString(headers); + if(!task->headers) + return free_doc_navigate_task(task, TRUE); + } + + if(task->post_data) { + task->post_data = SafeArrayCreateVector(VT_UI1, 0, post_data_size); + if(!task->post_data) + return free_doc_navigate_task(task, TRUE); + memcpy(task->post_data->pvData, post_data, post_data_size); + } + + if(!async_notif) { + VARIANT_BOOL cancel = VARIANT_FALSE; + + on_before_navigate2(This, task->url, task->post_data, task->headers, &cancel); + if(cancel) { + TRACE("Navigation calnceled\n"); + free_doc_navigate_task(task, TRUE); + return S_OK; + } + } + + task->async_notif = async_notif; + push_dochost_task(This, &task->header, doc_navigate_proc, FALSE); + return S_OK; +} + static HRESULT navigate_bsc(DocHost *This, BindStatusCallback *bsc, IMoniker *mon) { - IBindCtx *bindctx; VARIANT_BOOL cancel = VARIANT_FALSE; + SAFEARRAY *post_data = NULL; + IBindCtx *bindctx; HRESULT hres; - This->ready_state = READYSTATE_LOADING; + set_doc_state(This, READYSTATE_LOADING); + + if(bsc->post_data) { + post_data = SafeArrayCreateVector(VT_UI1, 0, bsc->post_data_len); + memcpy(post_data->pvData, post_data, bsc->post_data_len); + } - on_before_navigate2(This, bsc->url, bsc->post_data, bsc->post_data_len, bsc->headers, &cancel); + on_before_navigate2(This, bsc->url, post_data, bsc->headers, &cancel); + if(post_data) + SafeArrayDestroy(post_data); if(cancel) { FIXME("Navigation canceled\n"); return S_OK; @@ -596,10 +726,10 @@ static void navigate_bsc_proc(DocHost *This, task_header_t *t) HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags, const VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers) { - task_navigate_bsc_t *task; PBYTE post_data = NULL; ULONG post_data_len = 0; LPWSTR headers = NULL; + HRESULT hres = S_OK; TRACE("navigating to %s\n", debugstr_w(url)); @@ -626,15 +756,23 @@ HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags, TRACE("Headers: %s\n", debugstr_w(headers)); } - task = heap_alloc(sizeof(*task)); - task->bsc = create_callback(This, url, post_data, post_data_len, headers); + set_doc_state(This, READYSTATE_LOADING); + This->ready_state = READYSTATE_LOADING; + + if(This->doc_navigate) { + hres = async_doc_navigate(This, url, headers, post_data, post_data_len, TRUE); + }else { + task_navigate_bsc_t *task; + + task = heap_alloc(sizeof(*task)); + task->bsc = create_callback(This, url, post_data, post_data_len, headers); + push_dochost_task(This, &task->header, navigate_bsc_proc, This->url == NULL); + } if(post_data) SafeArrayUnaccessData(V_ARRAY(PostData)); - push_dochost_task(This, &task->header, navigate_bsc_proc, This->url == NULL); - - return S_OK; + return hres; } static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, @@ -649,6 +787,10 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, DWORD bindf = 0; HRESULT hres; + hres = IMoniker_GetDisplayName(mon, 0, NULL, &url); + if(FAILED(hres)) + FIXME("GetDisplayName failed: %08x\n", hres); + hres = IBindStatusCallback_QueryInterface(callback, &IID_IHttpNegotiate, (void**)&http_negotiate); if(SUCCEEDED(hres)) { @@ -670,16 +812,15 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, post_data = bindinfo.stgmedData.u.hGlobal; } - hres = IMoniker_GetDisplayName(mon, 0, NULL, &url); - if(FAILED(hres)) - FIXME("GetDisplayName failed: %08x\n", hres); + if(This->doc_navigate) { + hres = async_doc_navigate(This, url, headers, post_data, post_data_len, FALSE); + }else { + bsc = create_callback(This, url, post_data, post_data_len, headers); + hres = navigate_bsc(This, bsc, mon); + IBindStatusCallback_Release(BINDSC(bsc)); + } - bsc = create_callback(This, url, post_data, post_data_len, headers); CoTaskMemFree(url); - - hres = navigate_bsc(This, bsc, mon); - - IBindStatusCallback_Release(BINDSC(bsc)); CoTaskMemFree(headers); ReleaseBindInfo(&bindinfo); diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index f67edb7583e..933b5629cea 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -960,17 +960,6 @@ void WebBrowser_OleObject_Init(WebBrowser *This) This->lpOleInPlaceActiveObjectVtbl = &OleInPlaceActiveObjectVtbl; This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl; - This->client = NULL; - This->inplace = NULL; - This->container = NULL; - This->frame_hwnd = NULL; - This->uiwindow = NULL; - This->shell_embedding_hwnd = NULL; - - memset(&This->pos_rect, 0, sizeof(RECT)); - memset(&This->clip_rect, 0, sizeof(RECT)); - memset(&This->frameinfo, 0, sizeof(OLEINPLACEFRAMEINFO)); - /* Default size is 50x20 pixels, in himetric units */ This->extent.cx = MulDiv( 50, 2540, dpi_x ); This->extent.cy = MulDiv( 20, 2540, dpi_y ); diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index c5b9c9a1be5..1184298dca9 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -92,6 +92,7 @@ struct DocHost { IUnknown *document; IOleDocumentView *view; + IUnknown *doc_navigate; HWND hwnd; HWND frame_hwnd; @@ -103,6 +104,7 @@ struct DocHost { VARIANT_BOOL busy; READYSTATE ready_state; + READYSTATE doc_state; DWORD prop_notif_cookie; BOOL is_prop_notif; @@ -222,6 +224,7 @@ HRESULT dochost_object_available(DocHost*,IUnknown*); void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*); HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*); HRESULT go_home(DocHost*); +void set_doc_state(DocHost*,READYSTATE); #define WM_DOCHOSTTASK (WM_USER+0x300) void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL); @@ -262,6 +265,11 @@ static inline void *heap_alloc(size_t len) return HeapAlloc(GetProcessHeap(), 0, len); } +static inline void *heap_alloc_zero(size_t len) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); +} + static inline void *heap_realloc(void *mem, size_t len) { return HeapReAlloc(GetProcessHeap(), 0, mem, len); diff --git a/dlls/shdocvw/tests/Makefile.in b/dlls/shdocvw/tests/Makefile.in index 24a3153b542..5e4e087bb9f 100644 --- a/dlls/shdocvw/tests/Makefile.in +++ b/dlls/shdocvw/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ webbrowser.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index cd82924b87d..f3963731c8b 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -41,6 +41,7 @@ #include "mimeinfo.h" DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); +DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); #define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE @@ -128,16 +129,22 @@ DEFINE_EXPECT(QueryStatus_STOP); DEFINE_EXPECT(DocHost_EnableModeless_TRUE); DEFINE_EXPECT(DocHost_EnableModeless_FALSE); DEFINE_EXPECT(GetDropTarget); +DEFINE_EXPECT(TranslateUrl); static const WCHAR wszItem[] = {'i','t','e','m',0}; -static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; static const WCHAR emptyW[] = {0}; static VARIANT_BOOL exvb; static IWebBrowser2 *wb; static HWND container_hwnd, shell_embedding_hwnd; -static BOOL is_downloading = FALSE; +static BOOL is_downloading, is_first_load; +static const char *current_url; + +#define DWL_EXPECT_BEFORE_NAVIGATE 0x01 +#define DWL_FROM_PUT_HREF 0x02 + +static DWORD dwl_flags; static int strcmp_wa(LPCWSTR strw, const char *stra) { @@ -158,8 +165,20 @@ static const char *debugstr_guid(REFIID riid) return buf; } +static BSTR a2bstr(const char *str) +{ + BSTR ret; + int len; + + len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + ret = SysAllocStringLen(NULL, len); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); + + return ret; +} + #define test_LocationURL(a,b) _test_LocationURL(__LINE__,a,b) -static void _test_LocationURL(unsigned line, IUnknown *unk, LPCWSTR exurl) +static void _test_LocationURL(unsigned line, IUnknown *unk, const char *exurl) { IWebBrowser2 *wb; BSTR url = (void*)0xdeadbeef; @@ -172,7 +191,7 @@ static void _test_LocationURL(unsigned line, IUnknown *unk, LPCWSTR exurl) hres = IWebBrowser2_get_LocationURL(wb, &url); ok_(__FILE__,line) (hres == (*exurl ? S_OK : S_FALSE), "get_LocationURL failed: %08x\n", hres); - ok_(__FILE__,line) (!lstrcmpW(url, exurl), "unexpected URL: %s\n", wine_dbgstr_w(url)); + ok_(__FILE__,line) (!strcmp_wa(url, exurl), "unexpected URL: %s\n", wine_dbgstr_w(url)); SysFreeString(url); IWebBrowser2_Release(wb); @@ -297,6 +316,13 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID default: ok(0, "unexpected nCmdID %d\n", nCmdID); } + }else if(IsEqualGUID(&CGID_DocHostCmdPriv, pguidCmdGroup)) { + switch(nCmdID) { + case 11: /* TODO */ + break; + default: + ok(0, "unexpected nCmdID %d of CGID_DocHostCmdPriv\n", nCmdID); + } }else { ok(0, "unexpected pguidCmdGroup %s\n", debugstr_guid(pguidCmdGroup)); } @@ -505,8 +531,8 @@ static void test_OnBeforeNavigate(const VARIANT *disp, const VARIANT *url, const ok(V_VT(V_VARIANTREF(url)) == VT_BSTR, "V_VT(V_VARIANTREF(url))=%d, expected VT_BSTR\n", V_VT(V_VARIANTREF(url))); ok(V_BSTR(V_VARIANTREF(url)) != NULL, "V_BSTR(V_VARIANTREF(url)) == NULL\n"); - ok(!lstrcmpW(V_BSTR(V_VARIANTREF(url)), about_blankW), "unexpected url %s\n", - wine_dbgstr_w(V_BSTR(V_VARIANTREF(url)))); + ok(!strcmp_wa(V_BSTR(V_VARIANTREF(url)), current_url), "unexpected url %s, expected %s\n", + wine_dbgstr_w(V_BSTR(V_VARIANTREF(url))), current_url); } ok(V_VT(flags) == (VT_BYREF|VT_VARIANT), "V_VT(flags)=%x, expected VT_BYREF|VT_VARIANT\n", @@ -517,8 +543,13 @@ static void test_OnBeforeNavigate(const VARIANT *disp, const VARIANT *url, const if(V_VARIANTREF(flags)) { ok(V_VT(V_VARIANTREF(flags)) == VT_I4, "V_VT(V_VARIANTREF(flags))=%d, expected VT_I4\n", V_VT(V_VARIANTREF(flags))); - ok(V_I4(V_VARIANTREF(flags)) == 0, "V_I4(V_VARIANTREF(flags)) = %d, expected 0\n", - V_I4(V_VARIANTREF(flags))); + if(is_first_load) { + ok(V_I4(V_VARIANTREF(flags)) == 0, "V_I4(V_VARIANTREF(flags)) = %x, expected 0\n", + V_I4(V_VARIANTREF(flags))); + }else { + ok((V_I4(V_VARIANTREF(flags)) & ~0x40) == 0, "V_I4(V_VARIANTREF(flags)) = %x, expected 0x40 or 0\n", + V_I4(V_VARIANTREF(flags))); + } } ok(V_VT(frame) == (VT_BYREF|VT_VARIANT), "V_VT(frame)=%x, expected VT_BYREF|VT_VARIANT\n", @@ -624,7 +655,7 @@ static HRESULT WINAPI WebBrowserEvents2_Invoke(IDispatch *iface, DISPID dispIdMe test_OnBeforeNavigate(pDispParams->rgvarg+6, pDispParams->rgvarg+5, pDispParams->rgvarg+4, pDispParams->rgvarg+3, pDispParams->rgvarg+2, pDispParams->rgvarg+1, pDispParams->rgvarg); - test_ready_state(READYSTATE_LOADING); + test_ready_state((dwl_flags & DWL_FROM_PUT_HREF) ? READYSTATE_COMPLETE : READYSTATE_LOADING); break; case DISPID_SETSECURELOCKICON: @@ -702,7 +733,7 @@ static HRESULT WINAPI WebBrowserEvents2_Invoke(IDispatch *iface, DISPID dispIdMe case DISPID_NAVIGATECOMPLETE2: CHECK_EXPECT(Invoke_NAVIGATECOMPLETE2); /* FIXME */ - test_ready_state(READYSTATE_LOADING); + test_ready_state((dwl_flags & DWL_FROM_PUT_HREF) ? READYSTATE_COMPLETE : READYSTATE_LOADING); break; case DISPID_PROGRESSCHANGE: @@ -1249,7 +1280,10 @@ static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, ID static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut) { - ok(0, "unexpected call\n"); + if(is_downloading && !(dwl_flags & DWL_EXPECT_BEFORE_NAVIGATE)) + todo_wine CHECK_EXPECT(TranslateUrl); + else + CHECK_EXPECT(TranslateUrl); return E_NOTIMPL; } @@ -1492,7 +1526,7 @@ static void test_SetHostNames(IOleObject *oleobj) ok(hres == S_OK, "SetHostNames failed: %08x\n", hres); } -static void test_ClientSite(IUnknown *unk, IOleClientSite *client) +static void test_ClientSite(IUnknown *unk, IOleClientSite *client, BOOL stop_download) { IOleObject *oleobj; IOleInPlaceObject *inplace; @@ -1523,7 +1557,7 @@ static void test_ClientSite(IUnknown *unk, IOleClientSite *client) SET_EXPECT(Site_GetWindow); SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); SET_EXPECT(Invoke_AMBIENT_SILENT); - }else if(!is_downloading) { + }else if(stop_download) { SET_EXPECT(Invoke_DOWNLOADCOMPLETE); SET_EXPECT(Exec_SETDOWNLOADSTATE_0); SET_EXPECT(Invoke_COMMANDSTATECHANGE); @@ -1537,7 +1571,7 @@ static void test_ClientSite(IUnknown *unk, IOleClientSite *client) CHECK_CALLED(Site_GetWindow); CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_CALLED(Invoke_AMBIENT_SILENT); - }else if(!is_downloading) { + }else if(stop_download) { todo_wine CHECK_CALLED(Invoke_DOWNLOADCOMPLETE); todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); @@ -2127,60 +2161,65 @@ static void test_Navigate2(IUnknown *unk) if(FAILED(hres)) return; - test_LocationURL(unk, emptyW); - test_ready_state(READYSTATE_UNINITIALIZED); + test_LocationURL(unk, is_first_load ? "" : current_url); + test_ready_state(is_first_load ? READYSTATE_UNINITIALIZED : READYSTATE_COMPLETE); V_VT(&url) = VT_BSTR; - V_BSTR(&url) = SysAllocString(about_blankW); - - SET_EXPECT(Invoke_AMBIENT_USERMODE); - SET_EXPECT(Invoke_PROPERTYCHANGE); - SET_EXPECT(Invoke_BEFORENAVIGATE2); - SET_EXPECT(Invoke_DOWNLOADBEGIN); - SET_EXPECT(Exec_SETDOWNLOADSTATE_1); - SET_EXPECT(EnableModeless_FALSE); - SET_EXPECT(Invoke_STATUSTEXTCHANGE); - SET_EXPECT(SetStatusText); - SET_EXPECT(GetHostInfo); - SET_EXPECT(Invoke_AMBIENT_DLCONTROL); - SET_EXPECT(Invoke_AMBIENT_USERAGENT); - SET_EXPECT(Invoke_AMBIENT_PALETTE); - SET_EXPECT(GetOptionKeyPath); - SET_EXPECT(GetOverridesKeyPath); - SET_EXPECT(QueryStatus_SETPROGRESSTEXT); - SET_EXPECT(Exec_SETPROGRESSMAX); - SET_EXPECT(Exec_SETPROGRESSPOS); - SET_EXPECT(Invoke_SETSECURELOCKICON); - SET_EXPECT(Invoke_FILEDOWNLOAD); - SET_EXPECT(Exec_SETDOWNLOADSTATE_0); - SET_EXPECT(Invoke_COMMANDSTATECHANGE); - SET_EXPECT(EnableModeless_TRUE); + V_BSTR(&url) = a2bstr("about:blank"); + current_url = "about:blank"; + + if(is_first_load) { + SET_EXPECT(Invoke_AMBIENT_USERMODE); + SET_EXPECT(Invoke_PROPERTYCHANGE); + SET_EXPECT(Invoke_BEFORENAVIGATE2); + SET_EXPECT(Invoke_DOWNLOADBEGIN); + SET_EXPECT(Exec_SETDOWNLOADSTATE_1); + SET_EXPECT(EnableModeless_FALSE); + SET_EXPECT(Invoke_STATUSTEXTCHANGE); + SET_EXPECT(SetStatusText); + SET_EXPECT(GetHostInfo); + SET_EXPECT(Invoke_AMBIENT_DLCONTROL); + SET_EXPECT(Invoke_AMBIENT_USERAGENT); + SET_EXPECT(Invoke_AMBIENT_PALETTE); + SET_EXPECT(GetOptionKeyPath); + SET_EXPECT(GetOverridesKeyPath); + SET_EXPECT(QueryStatus_SETPROGRESSTEXT); + SET_EXPECT(Exec_SETPROGRESSMAX); + SET_EXPECT(Exec_SETPROGRESSPOS); + SET_EXPECT(Invoke_SETSECURELOCKICON); + SET_EXPECT(Invoke_FILEDOWNLOAD); + SET_EXPECT(Exec_SETDOWNLOADSTATE_0); + SET_EXPECT(Invoke_COMMANDSTATECHANGE); + SET_EXPECT(EnableModeless_TRUE); + } hres = IWebBrowser2_Navigate2(webbrowser, &url, NULL, NULL, NULL, NULL); ok(hres == S_OK, "Navigate2 failed: %08x\n", hres); - CHECK_CALLED(Invoke_AMBIENT_USERMODE); - todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); - CHECK_CALLED(Invoke_BEFORENAVIGATE2); - todo_wine CHECK_CALLED(Invoke_DOWNLOADBEGIN); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); - CHECK_CALLED(EnableModeless_FALSE); - CHECK_CALLED(Invoke_STATUSTEXTCHANGE); - CHECK_CALLED(SetStatusText); - CHECK_CALLED(GetHostInfo); - CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); - CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); - CHECK_CALLED(GetOptionKeyPath); - CHECK_CALLED_BROKEN(GetOverridesKeyPath); - todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT); - todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); - todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); - todo_wine CHECK_CALLED_BROKEN(Invoke_SETSECURELOCKICON); - todo_wine CHECK_CALLED_BROKEN(Invoke_FILEDOWNLOAD); - todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); - CHECK_CALLED(EnableModeless_TRUE); + if(is_first_load) { + CHECK_CALLED(Invoke_AMBIENT_USERMODE); + todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); + CHECK_CALLED(Invoke_BEFORENAVIGATE2); + todo_wine CHECK_CALLED(Invoke_DOWNLOADBEGIN); + todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); + CHECK_CALLED(EnableModeless_FALSE); + CHECK_CALLED(Invoke_STATUSTEXTCHANGE); + CHECK_CALLED(SetStatusText); + CHECK_CALLED(GetHostInfo); + CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); + CHECK_CALLED(Invoke_AMBIENT_USERAGENT); + CHECK_CALLED(Invoke_AMBIENT_PALETTE); + CHECK_CALLED(GetOptionKeyPath); + CHECK_CALLED_BROKEN(GetOverridesKeyPath); + todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT); + todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); + todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); + todo_wine CHECK_CALLED_BROKEN(Invoke_SETSECURELOCKICON); + todo_wine CHECK_CALLED_BROKEN(Invoke_FILEDOWNLOAD); + todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); + todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); + CHECK_CALLED(EnableModeless_TRUE); + } VariantClear(&url); IWebBrowser2_Release(webbrowser); @@ -2188,14 +2227,20 @@ static void test_Navigate2(IUnknown *unk) test_ready_state(READYSTATE_LOADING); } -static void test_download(void) +static void test_download(DWORD flags) { MSG msg; is_downloading = TRUE; + dwl_flags = flags; - test_ready_state(READYSTATE_LOADING); + test_ready_state((flags & DWL_FROM_PUT_HREF) ? READYSTATE_COMPLETE : READYSTATE_LOADING); + if(flags & DWL_EXPECT_BEFORE_NAVIGATE) { + SET_EXPECT(Invoke_PROPERTYCHANGE); + SET_EXPECT(Invoke_BEFORENAVIGATE2); + SET_EXPECT(TranslateUrl); + } SET_EXPECT(Exec_SETPROGRESSMAX); SET_EXPECT(Exec_SETPROGRESSPOS); SET_EXPECT(Exec_SETDOWNLOADSTATE_1); @@ -2208,19 +2253,27 @@ static void test_download(void) SET_EXPECT(Invoke_STATUSTEXTCHANGE); SET_EXPECT(SetStatusText); SET_EXPECT(EnableModeless_TRUE); - SET_EXPECT(QueryStatus_STOP); + if(is_first_load) + SET_EXPECT(QueryStatus_STOP); + else + SET_EXPECT(GetHostInfo); SET_EXPECT(Exec_SETDOWNLOADSTATE_0); SET_EXPECT(Invoke_TITLECHANGE); SET_EXPECT(Invoke_NAVIGATECOMPLETE2); - SET_EXPECT(GetDropTarget); + if(is_first_load) + SET_EXPECT(GetDropTarget); SET_EXPECT(Invoke_PROGRESSCHANGE); SET_EXPECT(Invoke_DOCUMENTCOMPLETE); - while(!called_Invoke_DOCUMENTCOMPLETE && GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } + if(flags & DWL_EXPECT_BEFORE_NAVIGATE) { + todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); + CHECK_CALLED(Invoke_BEFORENAVIGATE2); + CHECK_CALLED(TranslateUrl); + } todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); @@ -2228,19 +2281,31 @@ static void test_download(void) CLEAR_CALLED(DocHost_EnableModeless_TRUE); /* IE 7 */ todo_wine CHECK_CALLED(Invoke_SETSECURELOCKICON); CLEAR_CALLED(Invoke_282); /* IE 7 */ - todo_wine CHECK_CALLED(EnableModeless_FALSE); - todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); + if(is_first_load) + todo_wine CHECK_CALLED(EnableModeless_FALSE); + else + CLEAR_CALLED(EnableModeless_FALSE); /* IE 8 */ + CLEAR_CALLED(Invoke_COMMANDSTATECHANGE); todo_wine CHECK_CALLED(Invoke_STATUSTEXTCHANGE); todo_wine CHECK_CALLED(SetStatusText); - todo_wine CHECK_CALLED(EnableModeless_TRUE); - todo_wine CHECK_CALLED(QueryStatus_STOP); + if(is_first_load) + todo_wine CHECK_CALLED(EnableModeless_TRUE); + else + CLEAR_CALLED(EnableModeless_FALSE); /* IE 8 */ + if(is_first_load) + todo_wine CHECK_CALLED(QueryStatus_STOP); + else + todo_wine CHECK_CALLED(GetHostInfo); todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); todo_wine CHECK_CALLED(Invoke_TITLECHANGE); CHECK_CALLED(Invoke_NAVIGATECOMPLETE2); - todo_wine CHECK_CALLED(GetDropTarget); + if(is_first_load) + todo_wine CHECK_CALLED(GetDropTarget); todo_wine CHECK_CALLED(Invoke_PROGRESSCHANGE); CHECK_CALLED(Invoke_DOCUMENTCOMPLETE); + is_downloading = FALSE; + test_ready_state(READYSTATE_COMPLETE); } @@ -2298,6 +2363,67 @@ static void test_IServiceProvider(IUnknown *unk) IServiceProvider_Release(servprov); } +#define get_document(u) _get_document(__LINE__,u) +static IDispatch *_get_document(unsigned line, IUnknown *unk) +{ + IWebBrowser2 *wb; + IDispatch *disp; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); + ok_(__FILE__,line)(hres == S_OK, "QueryInterface(IID_IWebBrowser2) failed: %08x\n", hres); + + disp = NULL; + hres = IWebBrowser2_get_Document(wb, &disp); + IWebBrowser2_Release(wb); + ok_(__FILE__,line)(hres == S_OK, "get_Document failed: %08x\n", hres); + ok_(__FILE__,line)(disp != NULL, "doc_disp == NULL\n"); + + return disp; +} + +static void test_put_href(IUnknown *unk) +{ + IHTMLLocation *location; + IHTMLDocument2 *doc; + IDispatch *doc_disp; + BSTR str; + HRESULT hres; + + doc_disp = get_document(unk); + + hres = IDispatch_QueryInterface(doc_disp, &IID_IHTMLDocument2, (void**)&doc); + IDispatch_Release(doc_disp); + ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument2 failed: %08x\n", hres); + + location = NULL; + hres = IHTMLDocument2_get_location(doc, &location); + IHTMLDocument2_Release(doc); + ok(hres == S_OK, "get_location failed: %08x\n", hres); + ok(location != NULL, "location == NULL\n"); + + SET_EXPECT(TranslateUrl); + SET_EXPECT(Invoke_BEFORENAVIGATE2); + SET_EXPECT(Invoke_PROPERTYCHANGE); + + dwl_flags = DWL_FROM_PUT_HREF; + + str = a2bstr("about:test"); + current_url = "about:test"; + is_first_load = FALSE; + hres = IHTMLLocation_put_href(location, str); + + CHECK_CALLED(TranslateUrl); + CHECK_CALLED(Invoke_BEFORENAVIGATE2); + todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); + + IHTMLLocation_Release(location); + SysFreeString(str); + ok(hres == S_OK, "put_href failed: %08x\n", hres); + + test_ready_state(READYSTATE_COMPLETE); +} + static void test_QueryInterface(IUnknown *unk) { IQuickActivate *qa = (IQuickActivate*)0xdeadbeef; @@ -2352,6 +2478,7 @@ static void test_WebBrowser(BOOL do_download) return; is_downloading = FALSE; + is_first_load = TRUE; hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); ok(hres == S_OK, "Could not get IWebBrowser2 iface: %08x\n", hres); @@ -2359,9 +2486,9 @@ static void test_WebBrowser(BOOL do_download) test_QueryInterface(unk); test_ready_state(READYSTATE_UNINITIALIZED); test_ClassInfo(unk); - test_LocationURL(unk, emptyW); + test_LocationURL(unk, ""); test_ConnectionPoint(unk, TRUE); - test_ClientSite(unk, &ClientSite); + test_ClientSite(unk, &ClientSite, !do_download); test_Extent(unk); test_wb_funcs(unk, TRUE); test_DoVerb(unk); @@ -2369,11 +2496,27 @@ static void test_WebBrowser(BOOL do_download) test_Navigate2(unk); if(do_download) { - test_download(); + IDispatch *doc, *doc2; + + test_download(0); test_olecmd(unk, TRUE); + doc = get_document(unk); + + test_put_href(unk); + test_download(DWL_FROM_PUT_HREF); + doc2 = get_document(unk); + ok(doc == doc2, "doc != doc2\n"); + IDispatch_Release(doc2); + + test_Navigate2(unk); + test_download(DWL_EXPECT_BEFORE_NAVIGATE); + doc2 = get_document(unk); + ok(doc == doc2, "doc != doc2\n"); + IDispatch_Release(doc2); + IDispatch_Release(doc2); } - test_ClientSite(unk, NULL); + test_ClientSite(unk, NULL, !do_download); test_ie_funcs(unk); test_GetControlInfo(unk); test_wb_funcs(unk, FALSE); diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index b0633b03f19..2ac9b9985d5 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -1115,23 +1115,20 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi TRACE("(%p %s %p) version=%d\n", pOuter, debugstr_guid(riid), ppv, version); - ret = heap_alloc(sizeof(WebBrowser)); + ret = heap_alloc_zero(sizeof(WebBrowser)); ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl; ret->lpServiceProviderVtbl = &ServiceProviderVtbl; - ret->ref = 0; + ret->ref = 1; ret->version = version; DocHost_Init(&ret->doc_host, (IDispatch*)WEBBROWSER2(ret)); - ret->register_browser = VARIANT_FALSE; ret->visible = VARIANT_TRUE; ret->menu_bar = VARIANT_TRUE; ret->address_bar = VARIANT_TRUE; ret->status_bar = VARIANT_TRUE; ret->tool_bar = VARIANT_TRUE; - ret->full_screen = VARIANT_FALSE; - ret->theater_mode = VARIANT_FALSE; WebBrowser_OleObject_Init(ret); WebBrowser_ViewObject_Init(ret); @@ -1139,14 +1136,11 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi WebBrowser_ClassInfo_Init(ret); WebBrowser_HlinkFrame_Init(ret); + SHDOCVW_LockModule(); + hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv); - if(SUCCEEDED(hres)) { - SHDOCVW_LockModule(); - }else { - heap_free(ret); - return hres; - } + IWebBrowser2_Release(WEBBROWSER(ret)); return hres; } diff --git a/dlls/shell.dll16/Makefile.in b/dlls/shell.dll16/Makefile.in index 36b23fc3cd2..ae43d9e3826 100644 --- a/dlls/shell.dll16/Makefile.in +++ b/dlls/shell.dll16/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = shell.c RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in index 867f46e46cd..e52d970cbe8 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -106,5 +106,3 @@ authors.c: $(TOPSRCDIR)/AUTHORS clean:: $(RM) authors.c - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index fc1347ed810..7a5d4ed8b11 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -258,6 +258,7 @@ 714 stdcall @(ptr) SHELL32_714 # PathIsTemporaryW 727 stdcall SHGetImageList(long ptr ptr) 730 stdcall -noname RestartDialogEx(long wstr long long) + 743 stdcall SHCreateFileExtractIconW(wstr long ptr ptr) 1217 stub FOOBAR1217 # no joke! This is the real name!! diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 969dfad45ea..db63e16e9da 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -795,6 +795,13 @@ HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex return NULL; } +HRESULT WINAPI SHCreateFileExtractIconW(LPCWSTR file, DWORD attribs, REFIID riid, void **ppv) +{ + FIXME("%s, %x, %s, %p\n", debugstr_w(file), attribs, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOTIMPL; +} + /************************************************************************* * Printer_LoadIconsW [SHELL32.205] */ diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 1718df72dd7..88a188f96a0 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -161,6 +161,8 @@ typedef struct BOOL bDirty; INT iIdOpen; /* id of the "Open" entry in the context menu */ IUnknown *site; + + LPOLESTR filepath; /* file path returned by IPersistFile::GetCurFile */ } IShellLinkImpl; static inline IShellLinkImpl *impl_from_IShellLinkW( IShellLinkW *iface ) @@ -307,6 +309,7 @@ static ULONG ShellLink_Release( IShellLinkImpl *This ) HeapFree(GetProcessHeap(), 0, This->sPathRel); HeapFree(GetProcessHeap(), 0, This->sProduct); HeapFree(GetProcessHeap(), 0, This->sComponent); + HeapFree(GetProcessHeap(), 0, This->filepath); if (This->site) IUnknown_Release( This->site ); @@ -392,6 +395,11 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFile r = IPersistStream_Load(StreamThis, stm); ShellLink_UpdatePath(This->sPathRel, pszFileName, This->sWorkDir, &This->sPath); IStream_Release( stm ); + + /* update file path */ + HeapFree(GetProcessHeap(), 0, This->filepath); + This->filepath = strdupW(pszFileName); + This->bDirty = FALSE; } TRACE("-- returning hr %08x\n", r); @@ -477,6 +485,10 @@ static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFile { StartLinkProcessor( pszFileName ); + /* update file path */ + HeapFree(GetProcessHeap(), 0, This->filepath); + This->filepath = strdupW(pszFileName); + This->bDirty = FALSE; } else @@ -496,11 +508,26 @@ static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLEST return NOERROR; } -static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName) +static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *filename) { - IShellLinkImpl *This = impl_from_IPersistFile(iface); - FIXME("(%p)->(%p): stub\n", This, ppszFileName); - return NOERROR; + IShellLinkImpl *This = impl_from_IPersistFile(iface); + IMalloc *pMalloc; + + TRACE("(%p)->(%p)\n", This, filename); + + if (!This->filepath) + { + *filename = NULL; + return S_FALSE; + } + + SHGetMalloc(&pMalloc); + *filename = IMalloc_Alloc(pMalloc, (strlenW(This->filepath)+1)*sizeof(WCHAR)); + if (!*filename) return E_OUTOFMEMORY; + + strcpyW(*filename, This->filepath); + + return S_OK; } static const IPersistFileVtbl pfvt = @@ -1239,6 +1266,7 @@ HRESULT WINAPI IShellLink_Constructor( IUnknown *pUnkOuter, sl->bDirty = FALSE; sl->iIdOpen = -1; sl->site = NULL; + sl->filepath = NULL; TRACE("(%p)->()\n",sl); diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 940633e59d5..9e6425c2c7b 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -1807,34 +1807,40 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_ break; } - dwClsidSize = sizeof(szClsidHandler); - if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS) + /* The CLSID is stored either in the key itself or in its default value. */ + if (!SUCCEEDED(lRet = SHCLSIDFromStringW(szHandler, &clsid))) { - /* Force a NULL-termination and convert the string */ - szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0; - if (SUCCEEDED(SHCLSIDFromStringW(szClsidHandler, &clsid))) + dwClsidSize = sizeof(szClsidHandler); + if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS) { - /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance. - Only if both interfaces are supported it's a real shell extension. - Then call IShellExtInit's Initialize method. */ - if (SUCCEEDED(CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, &IID_IShellPropSheetExt, (LPVOID *)&pspsx))) + /* Force a NULL-termination and convert the string */ + szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0; + lRet = SHCLSIDFromStringW(szClsidHandler, &clsid); + } + } + + if (SUCCEEDED(lRet)) + { + /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance. + Only if both interfaces are supported it's a real shell extension. + Then call IShellExtInit's Initialize method. */ + if (SUCCEEDED(CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, &IID_IShellPropSheetExt, (LPVOID *)&pspsx))) + { + if (SUCCEEDED(pspsx->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi))) { - if (SUCCEEDED(pspsx->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi))) + if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey))) { - if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey))) - { - /* Add the IShellPropSheetExt instance to the array */ - psxa->pspsx[psxa->uiCount++] = pspsx; - } - else - { - psxi->lpVtbl->Release(psxi); - pspsx->lpVtbl->Release(pspsx); - } + /* Add the IShellPropSheetExt instance to the array */ + psxa->pspsx[psxa->uiCount++] = pspsx; } else + { + psxi->lpVtbl->Release(psxi); pspsx->lpVtbl->Release(pspsx); + } } + else + pspsx->lpVtbl->Release(pspsx); } } diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 80c4c3a6757..7809344f4ae 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -634,96 +634,97 @@ static INT CALLBACK fill_list( LPVOID ptr, LPVOID arg ) return TRUE; } -static HRESULT ShellView_FillList(IShellViewImpl * This) +static HRESULT ShellView_FillList(IShellViewImpl *This) { - LPENUMIDLIST pEnumIDList; - LPITEMIDLIST pidl; - DWORD dwFetched; - HRESULT hRes; - HDPA hdpa; - - TRACE("%p\n",This); - - /* get the itemlist from the shfolder*/ - hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); - if (hRes != S_OK) - { - if (hRes==S_FALSE) - return(NOERROR); - return(hRes); - } + LPENUMIDLIST pEnumIDList; + LPITEMIDLIST pidl; + DWORD fetched; + HRESULT hr; + HDPA hdpa; - /* create a pointer array */ - hdpa = DPA_Create(16); - if (!hdpa) - { - return(E_OUTOFMEMORY); - } + TRACE("(%p)\n", This); - /* copy the items into the array*/ - while((S_OK == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched) - { - if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) - { - SHFree(pidl); - } - } + /* get the itemlist from the shfolder*/ + hr = IShellFolder_EnumObjects(This->pSFParent, This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); + if (hr != S_OK) return hr; - /* sort the array */ - DPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent); + /* create a pointer array */ + hdpa = DPA_Create(16); + if (!hdpa) + { + IEnumIDList_Release(pEnumIDList); + return E_OUTOFMEMORY; + } - /*turn the listview's redrawing off*/ - SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0); + /* copy the items into the array*/ + while((S_OK == IEnumIDList_Next(pEnumIDList, 1, &pidl, &fetched)) && fetched) + { + if (DPA_InsertPtr(hdpa, DPA_GetPtrCount(hdpa), pidl) == -1) + { + SHFree(pidl); + } + } - DPA_DestroyCallback( hdpa, fill_list, This ); + /* sort the array */ + DPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent); - /*turn the listview's redrawing back on and force it to draw*/ - SendMessageA(This->hWndList, WM_SETREDRAW, TRUE, 0); + SendMessageW(This->hWndList, WM_SETREDRAW, FALSE, 0); + DPA_DestroyCallback(hdpa, fill_list, This); + SendMessageW(This->hWndList, WM_SETREDRAW, TRUE, 0); - IEnumIDList_Release(pEnumIDList); /* destroy the list*/ + IEnumIDList_Release(pEnumIDList); - return S_OK; + return S_OK; } /********************************************************** * ShellView_OnCreate() */ -static LRESULT ShellView_OnCreate(IShellViewImpl * This) +static LRESULT ShellView_OnCreate(IShellViewImpl *This) { - IDropTarget* pdt; - SHChangeNotifyEntry ntreg; - IPersistFolder2 * ppf2 = NULL; + IShellView2 *iface = (IShellView2*)This; + static const WCHAR accel_nameW[] = {'s','h','v','_','a','c','c','e','l',0}; + IPersistFolder2 *ppf2; + IDropTarget* pdt; + HRESULT hr; - TRACE("%p\n",This); + TRACE("(%p)\n", This); - if(ShellView_CreateList(This)) - { - if(ShellView_InitList(This)) - { + if (ShellView_CreateList(This)) + { + if (ShellView_InitList(This)) + { ShellView_FillList(This); - } - } + } + } - if (SUCCEEDED(IUnknown_QueryInterface((IUnknown*)&This->lpVtbl, &IID_IDropTarget, (LPVOID*)&pdt))) - { - RegisterDragDrop(This->hWnd, pdt); - IDropTarget_Release(pdt); - } + hr = IShellView2_QueryInterface(iface, &IID_IDropTarget, (LPVOID*)&pdt); + if (hr == S_OK) + { + RegisterDragDrop(This->hWnd, pdt); + IDropTarget_Release(pdt); + } - /* register for receiving notifications */ - IShellFolder_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&ppf2); - if (ppf2) - { - IPersistFolder2_GetCurFolder(ppf2, (LPITEMIDLIST*)&ntreg.pidl); - ntreg.fRecursive = TRUE; - This->hNotify = SHChangeNotifyRegister(This->hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg); - SHFree((LPITEMIDLIST)ntreg.pidl); - IPersistFolder2_Release(ppf2); - } + /* register for receiving notifications */ + hr = IShellFolder_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&ppf2); + if (hr == S_OK) + { + SHChangeNotifyEntry ntreg; - This->hAccel = LoadAcceleratorsA(shell32_hInstance, "shv_accel"); + hr = IPersistFolder2_GetCurFolder(ppf2, (LPITEMIDLIST*)&ntreg.pidl); + if (hr == S_OK) + { + ntreg.fRecursive = TRUE; + This->hNotify = SHChangeNotifyRegister(This->hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, + SHV_CHANGE_NOTIFY, 1, &ntreg); + SHFree((LPITEMIDLIST)ntreg.pidl); + } + IPersistFolder2_Release(ppf2); + } - return S_OK; + This->hAccel = LoadAcceleratorsW(shell32_hInstance, accel_nameW); + + return S_OK; } /********************************************************** @@ -776,57 +777,64 @@ static HMENU ShellView_BuildFileMenu(IShellViewImpl * This) /********************************************************** * ShellView_MergeFileMenu() */ -static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu) -{ TRACE("(%p)->(submenu=%p) stub\n",This,hSubMenu); - - if(hSubMenu) - { /*insert This item at the beginning of the menu */ - MENUITEMINFOA mii; - - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_ID | MIIM_TYPE; - mii.wID = 0; - mii.fType = MFT_SEPARATOR; - InsertMenuItemA(hSubMenu, 0, TRUE, &mii); +static void ShellView_MergeFileMenu(IShellViewImpl *This, HMENU hSubMenu) +{ + TRACE("(%p)->(submenu=%p) stub\n",This,hSubMenu); + + if (hSubMenu) + { + static const WCHAR dummyW[] = {'d','u','m','m','y','4','5',0}; + MENUITEMINFOW mii; + + /* insert This item at the beginning of the menu */ + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE; + mii.wID = 0; + mii.fType = MFT_SEPARATOR; + InsertMenuItemW(hSubMenu, 0, TRUE, &mii); + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + mii.dwTypeData = (LPWSTR)dummyW; + mii.fState = MFS_ENABLED; + mii.wID = IDM_MYFILEITEM; + mii.fType = MFT_STRING; + InsertMenuItemW(hSubMenu, 0, TRUE, &mii); + } - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; - mii.dwTypeData = (LPSTR)"dummy45"; - mii.fState = MFS_ENABLED; - mii.wID = IDM_MYFILEITEM; - mii.fType = MFT_STRING; - InsertMenuItemA(hSubMenu, 0, TRUE, &mii); - } - TRACE("--\n"); + TRACE("--\n"); } /********************************************************** * ShellView_MergeViewMenu() */ -static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu) +static void ShellView_MergeViewMenu(IShellViewImpl *This, HMENU hSubMenu) { - TRACE("(%p)->(submenu=%p)\n",This,hSubMenu); + TRACE("(%p)->(submenu=%p)\n",This,hSubMenu); - if(hSubMenu) - { /*add a separator at the correct position in the menu*/ - MENUITEMINFOA mii; - static char view[] = "View"; - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_ID | MIIM_TYPE; - mii.wID = 0; - mii.fType = MFT_SEPARATOR; - InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); - - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA; - mii.fType = MFT_STRING; - mii.dwTypeData = view; - mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001"); - InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); - } + /* add a separator at the correct position in the menu */ + if (hSubMenu) + { + static const WCHAR menuW[] = {'M','E','N','U','_','0','0','1',0}; + static const WCHAR viewW[] = {'V','i','e','w',0}; + MENUITEMINFOW mii; + + memset(&mii, 0, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE; + mii.wID = 0; + mii.fType = MFT_SEPARATOR; + InsertMenuItemW(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA; + mii.fType = MFT_STRING; + mii.dwTypeData = (LPWSTR)viewW; + mii.hSubMenu = LoadMenuW(shell32_hInstance, menuW); + InsertMenuItemW(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); + } } /********************************************************** @@ -1116,79 +1124,76 @@ static void ShellView_OnDeactivate(IShellViewImpl * This) /********************************************************** * ShellView_OnActivate() */ -static LRESULT ShellView_OnActivate(IShellViewImpl * This, UINT uState) -{ OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} }; - MENUITEMINFOA mii; - CHAR szText[MAX_PATH]; +static LRESULT ShellView_OnActivate(IShellViewImpl *This, UINT uState) +{ + OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} }; + MENUITEMINFOW mii; - TRACE("%p uState=%x\n",This,uState); + TRACE("(%p) uState=%x\n",This,uState); - /*don't do anything if the state isn't really changing */ - if(This->uState == uState) - { - return S_OK; - } + /* don't do anything if the state isn't really changing */ + if (This->uState == uState) return S_OK; - ShellView_OnDeactivate(This); + ShellView_OnDeactivate(This); - /*only do This if we are active */ - if(uState != SVUIA_DEACTIVATE) + /* only do This if we are active */ + if (uState != SVUIA_DEACTIVATE) + { + /* merge the menus */ + This->hMenu = CreateMenu(); + + if (This->hMenu) { - /*merge the menus */ - This->hMenu = CreateMenu(); + static const WCHAR dummyW[] = {'d','u','m','m','y',' ','3','1',0}; - if(This->hMenu) - { - IShellBrowser_InsertMenusSB(This->pShellBrowser, This->hMenu, &omw); + IShellBrowser_InsertMenusSB(This->pShellBrowser, This->hMenu, &omw); TRACE("-- after fnInsertMenusSB\n"); - /*build the top level menu get the menu item's text*/ - strcpy(szText,"dummy 31"); - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_STATE; - mii.fType = MFT_STRING; - mii.fState = MFS_ENABLED; - mii.dwTypeData = szText; - mii.hSubMenu = ShellView_BuildFileMenu(This); - - /*insert our menu into the menu bar*/ - if(mii.hSubMenu) - { - InsertMenuItemA(This->hMenu, FCIDM_MENU_HELP, FALSE, &mii); - } - - /*get the view menu so we can merge with it*/ - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU; + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_STATE; + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.wID = 0; + mii.hSubMenu = ShellView_BuildFileMenu(This); + mii.hbmpChecked = NULL; + mii.hbmpUnchecked = NULL; + mii.dwItemData = 0; + /* build the top level menu get the menu item's text */ + mii.dwTypeData = (LPWSTR)dummyW; + mii.cch = 0; + mii.hbmpItem = NULL; + + /* insert our menu into the menu bar */ + if (mii.hSubMenu) + InsertMenuItemW(This->hMenu, FCIDM_MENU_HELP, FALSE, &mii); + + /* get the view menu so we can merge with it */ + memset(&mii, 0, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU; - if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_VIEW, FALSE, &mii)) - { - ShellView_MergeViewMenu(This, mii.hSubMenu); - } + if (GetMenuItemInfoW(This->hMenu, FCIDM_MENU_VIEW, FALSE, &mii)) + ShellView_MergeViewMenu(This, mii.hSubMenu); - /*add the items that should only be added if we have the focus*/ - if(SVUIA_ACTIVATE_FOCUS == uState) + /* add the items that should only be added if we have the focus */ + if (SVUIA_ACTIVATE_FOCUS == uState) { - /*get the file menu so we can merge with it */ - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU; + /* get the file menu so we can merge with it */ + memset(&mii, 0, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU; - if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_FILE, FALSE, &mii)) - { - ShellView_MergeFileMenu(This, mii.hSubMenu); - } + if (GetMenuItemInfoW(This->hMenu, FCIDM_MENU_FILE, FALSE, &mii)) + ShellView_MergeFileMenu(This, mii.hSubMenu); } - TRACE("-- before fnSetMenuSB\n"); - IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd); - } + + TRACE("-- before fnSetMenuSB\n"); + IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd); } - This->uState = uState; - TRACE("--\n"); - return S_OK; + } + This->uState = uState; + TRACE("--\n"); + return S_OK; } /********************************************************** @@ -1273,7 +1278,7 @@ static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dw This->ListViewSortInfo.nHeaderID = dwCmdID - 0x30; This->ListViewSortInfo.bIsAscending = TRUE; This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; - SendMessageA(This->hWndList, LVM_SORTITEMS, (WPARAM) &This->ListViewSortInfo, (LPARAM)ShellView_ListViewCompareItems); + SendMessageW(This->hWndList, LVM_SORTITEMS, (WPARAM) &This->ListViewSortInfo, (LPARAM)ShellView_ListViewCompareItems); break; default: @@ -1548,7 +1553,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn MAKELPARAM (LVNI_SELECTED, 0)); item.iItem = item_index; item.mask = LVIF_PARAM; - SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &item); + SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &item); /* get item pidl */ pItems[i] = (LPITEMIDLIST)item.lParam; @@ -1655,7 +1660,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara case WM_SHOWWINDOW: UpdateWindow(pThis->hWndList); break; - case WM_GETDLGCODE: return SendMessageA(pThis->hWndList,uMessage,0,0); + case WM_GETDLGCODE: return SendMessageW(pThis->hWndList, uMessage, 0, 0); case WM_DESTROY: RevokeDragDrop(pThis->hWnd); @@ -1875,7 +1880,7 @@ static HRESULT WINAPI IShellView_fnRefresh(IShellView2 * iface) { IShellViewImpl *This = (IShellViewImpl *)iface; - TRACE("(%p)\n",This); + TRACE("(%p)\n", This); SendMessageW(This->hWndList, LVM_DELETEALLITEMS, 0, 0); ShellView_FillList(This); @@ -2018,6 +2023,7 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2* iface, LPSV2C { IShellViewImpl *This = (IShellViewImpl *)iface; WNDCLASSW wc; + HRESULT hr; HWND wnd; TRACE("(%p)->(view_params %p)\n", iface, view_params); @@ -2034,6 +2040,8 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2* iface, LPSV2C view_params->pfs->ViewMode, view_params->pfs->fFlags, view_params->prcView->left, view_params->prcView->top, view_params->prcView->right, view_params->prcView->bottom); + if (!view_params->psbOwner) return E_UNEXPECTED; + /* Set up the member variables */ This->pShellBrowser = view_params->psbOwner; This->FolderSettings = *view_params->pfs; @@ -2060,19 +2068,17 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2* iface, LPSV2C /* Get our parent window */ IShellBrowser_AddRef(This->pShellBrowser); - IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent)); + IShellBrowser_GetWindow(This->pShellBrowser, &This->hWndParent); /* Try to get the ICommDlgBrowserInterface, adds a reference !!! */ This->pCommDlgBrowser = NULL; - if (SUCCEEDED(IShellBrowser_QueryInterface(This->pShellBrowser, &IID_ICommDlgBrowser, (void **)&This->pCommDlgBrowser))) - { + hr = IShellBrowser_QueryInterface(This->pShellBrowser, &IID_ICommDlgBrowser, (void **)&This->pCommDlgBrowser); + if (hr == S_OK) TRACE("-- CommDlgBrowser %p\n", This->pCommDlgBrowser); - } /* If our window class has not been registered, then do so */ if (!GetClassInfoW(shell32_hInstance, SV_CLASS_NAME, &wc)) { - ZeroMemory(&wc, sizeof(wc)); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = ShellView_WndProc; wc.cbClsExtra = 0; @@ -2095,7 +2101,11 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2* iface, LPSV2C CheckToolbar(This); - if (!wnd) return E_FAIL; + if (!wnd) + { + IShellBrowser_Release(This->pShellBrowser); + return E_FAIL; + } SetWindowPos(wnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); UpdateWindow(wnd); @@ -2397,17 +2407,25 @@ static HRESULT WINAPI ISVDropTarget_DragOver(IDropTarget *iface, DWORD grfKeySta return drag_notify_subitem(This, grfKeyState, pt, pdwEffect); } -static HRESULT WINAPI ISVDropTarget_DragLeave(IDropTarget *iface) { +static HRESULT WINAPI ISVDropTarget_DragLeave(IDropTarget *iface) +{ IShellViewImpl *This = impl_from_IDropTarget(iface); - IDropTarget_DragLeave(This->pCurDropTarget); + if (This->pCurDropTarget) + { + IDropTarget_DragLeave(This->pCurDropTarget); + IDropTarget_Release(This->pCurDropTarget); + This->pCurDropTarget = NULL; + } + + if (This->pCurDataObject) + { + IDataObject_Release(This->pCurDataObject); + This->pCurDataObject = NULL; + } - IDropTarget_Release(This->pCurDropTarget); - IDataObject_Release(This->pCurDataObject); - This->pCurDataObject = NULL; - This->pCurDropTarget = NULL; This->iDragOverItem = 0; - + return S_OK; } @@ -2701,9 +2719,19 @@ static HRESULT WINAPI IFView_SetCurrentViewMode(IFolderView *iface, UINT mode) static HRESULT WINAPI IFView_GetFolder(IFolderView *iface, REFIID riid, void **ppv) { - IShellViewImpl *This = impl_from_IFolderView(iface); - FIXME("(%p)->(%s, %p), stub\n", This, debugstr_guid(riid), ppv); - return E_NOTIMPL; + IShellViewImpl *This = impl_from_IFolderView(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); + + if (!ppv) return E_POINTER; + + if (IsEqualIID(riid, &IID_IShellFolder)) + { + *ppv = This->pSFParent; + return S_OK; + } + + return E_NOINTERFACE; } static HRESULT WINAPI IFView_Item(IFolderView *iface, int index, PITEMID_CHILD *ppidl) @@ -2715,9 +2743,16 @@ static HRESULT WINAPI IFView_Item(IFolderView *iface, int index, PITEMID_CHILD * static HRESULT WINAPI IFView_ItemCount(IFolderView *iface, UINT flags, int *items) { - IShellViewImpl *This = impl_from_IFolderView(iface); - FIXME("(%p)->(%u %p), stub\n", This, flags, items); - return E_NOTIMPL; + IShellViewImpl *This = impl_from_IFolderView(iface); + + TRACE("(%p)->(%u %p)\n", This, flags, items); + + if (flags != SVGIO_ALLVIEW) + FIXME("some flags unsupported, %x\n", flags & ~SVGIO_ALLVIEW); + + *items = SendMessageW(This->hWndList, LVM_GETITEMCOUNT, 0, 0); + + return S_OK; } static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid, void **ppv) @@ -2729,16 +2764,24 @@ static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid, static HRESULT WINAPI IFView_GetSelectionMarkedItem(IFolderView *iface, int *item) { - IShellViewImpl *This = impl_from_IFolderView(iface); - FIXME("(%p)->(%p), stub\n", This, item); - return E_NOTIMPL; + IShellViewImpl *This = impl_from_IFolderView(iface); + + TRACE("(%p)->(%p)\n", This, item); + + *item = SendMessageW(This->hWndList, LVM_GETSELECTIONMARK, 0, 0); + + return S_OK; } static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item) { - IShellViewImpl *This = impl_from_IFolderView(iface); - FIXME("(%p)->(%p), stub\n", This, item); - return E_NOTIMPL; + IShellViewImpl *This = impl_from_IFolderView(iface); + + TRACE("(%p)->(%p)\n", This, item); + + *item = SendMessageW(This->hWndList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED); + + return S_OK; } static HRESULT WINAPI IFView_GetItemPosition(IFolderView *iface, PCUITEMID_CHILD pidl, POINT *ppt) @@ -2750,9 +2793,22 @@ static HRESULT WINAPI IFView_GetItemPosition(IFolderView *iface, PCUITEMID_CHILD static HRESULT WINAPI IFView_GetSpacing(IFolderView *iface, POINT *pt) { - IShellViewImpl *This = impl_from_IFolderView(iface); - FIXME("(%p)->(%p), stub\n", This, pt); - return E_NOTIMPL; + IShellViewImpl *This = impl_from_IFolderView(iface); + + TRACE("(%p)->(%p)\n", This, pt); + + if (!This->hWndList) return S_FALSE; + + if (pt) + { + DWORD ret; + ret = SendMessageW(This->hWndList, LVM_GETITEMSPACING, 0, 0); + + pt->x = LOWORD(ret); + pt->y = HIWORD(ret); + } + + return S_OK; } static HRESULT WINAPI IFView_GetDefaultSpacing(IFolderView *iface, POINT *pt) diff --git a/dlls/shell32/shv_item_cmenu.c b/dlls/shell32/shv_item_cmenu.c index 6beb08f0bdf..1bab77b68c3 100644 --- a/dlls/shell32/shv_item_cmenu.c +++ b/dlls/shell32/shv_item_cmenu.c @@ -32,6 +32,8 @@ #include "pidl.h" #include "undocshell.h" #include "shlobj.h" +#include "winreg.h" +#include "prsht.h" #include "shell32_main.h" #include "shellfolder.h" @@ -381,6 +383,130 @@ static BOOL DoCopyOrCut( } return TRUE; } + +/************************************************************************** + * Properties_AddPropSheetCallback + * + * Used by DoOpenProperties through SHCreatePropSheetExtArrayEx to add + * propertysheet pages from shell extensions. + */ +static BOOL Properties_AddPropSheetCallback(HPROPSHEETPAGE hpage, LPARAM lparam) +{ + LPPROPSHEETHEADERW psh = (LPPROPSHEETHEADERW) lparam; + psh->u3.phpage[psh->nPages++] = hpage; + + return TRUE; +} + +/************************************************************************** + * DoOpenProperties + */ +static void DoOpenProperties(IContextMenu2 *iface, HWND hwnd) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + static const UINT MAX_PROP_PAGES = 99; + static const WCHAR wszFolder[] = {'F','o','l','d','e','r', 0}; + static const WCHAR wszFiletypeAll[] = {'*',0}; + LPSHELLFOLDER lpDesktopSF; + LPSHELLFOLDER lpSF; + LPDATAOBJECT lpDo; + WCHAR wszFiletype[MAX_PATH]; + WCHAR wszFilename[MAX_PATH]; + PROPSHEETHEADERW psh; + HPROPSHEETPAGE hpages[MAX_PROP_PAGES]; + HPSXA hpsxa; + UINT ret; + + TRACE("(%p)->(wnd=%p)\n", This, hwnd); + + ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); + psh.dwSize = sizeof (PROPSHEETHEADERW); + psh.hwndParent = hwnd; + psh.dwFlags = PSH_PROPTITLE; + psh.nPages = 0; + psh.u3.phpage = hpages; + psh.u2.nStartPage = 0; + + _ILSimpleGetTextW(This->apidl[0], (LPVOID)&wszFilename, MAX_PATH); + psh.pszCaption = (LPCWSTR)&wszFilename; + + /* Find out where to look for the shell extensions */ + if (_ILIsValue(This->apidl[0])) + { + char sTemp[64]; + sTemp[0] = 0; + if (_ILGetExtension(This->apidl[0], sTemp, 64)) + { + HCR_MapTypeToValueA(sTemp, sTemp, 64, TRUE); + MultiByteToWideChar(CP_ACP, 0, sTemp, -1, wszFiletype, MAX_PATH); + } + else + { + wszFiletype[0] = 0; + } + } + else if (_ILIsFolder(This->apidl[0])) + { + lstrcpynW(wszFiletype, wszFolder, 64); + } + else if (_ILIsSpecialFolder(This->apidl[0])) + { + LPGUID folderGUID; + static const WCHAR wszclsid[] = {'C','L','S','I','D','\\', 0}; + folderGUID = _ILGetGUIDPointer(This->apidl[0]); + lstrcpyW(wszFiletype, wszclsid); + StringFromGUID2(folderGUID, &wszFiletype[6], MAX_PATH - 6); + } + else + { + FIXME("Requested properties for unknown type.\n"); + return; + } + + /* Get a suitable DataObject for accessing the files */ + SHGetDesktopFolder(&lpDesktopSF); + if (_ILIsPidlSimple(This->pidl)) + { + ret = IShellFolder_GetUIObjectOf(lpDesktopSF, hwnd, This->cidl, (LPCITEMIDLIST*)This->apidl, + &IID_IDataObject, NULL, (LPVOID *)&lpDo); + IShellFolder_Release(lpDesktopSF); + } + else + { + IShellFolder_BindToObject(lpDesktopSF, This->pidl, NULL, &IID_IShellFolder, (LPVOID*) &lpSF); + ret = IShellFolder_GetUIObjectOf(lpSF, hwnd, This->cidl, (LPCITEMIDLIST*)This->apidl, + &IID_IDataObject, NULL, (LPVOID *)&lpDo); + IShellFolder_Release(lpSF); + IShellFolder_Release(lpDesktopSF); + } + + if (SUCCEEDED(ret)) + { + hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletype, MAX_PROP_PAGES - psh.nPages, lpDo); + if (hpsxa != NULL) + { + SHAddFromPropSheetExtArray((HPSXA)hpsxa, + (LPFNADDPROPSHEETPAGE)&Properties_AddPropSheetCallback, + (LPARAM)&psh); + SHDestroyPropSheetExtArray(hpsxa); + } + hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletypeAll, MAX_PROP_PAGES - psh.nPages, lpDo); + if (hpsxa != NULL) + { + SHAddFromPropSheetExtArray((HPSXA)hpsxa, + (LPFNADDPROPSHEETPAGE)&Properties_AddPropSheetCallback, + (LPARAM)&psh); + SHDestroyPropSheetExtArray(hpsxa); + } + IDataObject_Release(lpDo); + } + + if (psh.nPages) + PropertySheetW(&psh); + else + FIXME("No property pages found.\n"); +} + /************************************************************************** * ISvItemCm_fnInvokeCommand() */ @@ -429,6 +555,10 @@ static HRESULT WINAPI ISvItemCm_fnInvokeCommand( TRACE("Verb FCIDM_SHVIEW_CUT\n"); DoCopyOrCut(iface, lpcmi->hwnd, TRUE); break; + case FCIDM_SHVIEW_PROPERTIES: + TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n"); + DoOpenProperties(iface, lpcmi->hwnd); + break; default: FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); } @@ -438,6 +568,8 @@ static HRESULT WINAPI ISvItemCm_fnInvokeCommand( TRACE("Verb is %s\n",debugstr_a(lpcmi->lpVerb)); if (strcmp(lpcmi->lpVerb,"delete")==0) DoDelete(iface); + else if (strcmp(lpcmi->lpVerb,"properties")==0) + DoOpenProperties(iface, lpcmi->hwnd); else FIXME("Unhandled string verb %s\n",debugstr_a(lpcmi->lpVerb)); } diff --git a/dlls/shell32/tests/Makefile.in b/dlls/shell32/tests/Makefile.in index b53507d3542..2849a330a32 100644 --- a/dlls/shell32/tests/Makefile.in +++ b/dlls/shell32/tests/Makefile.in @@ -16,11 +16,10 @@ C_SRCS = \ shlexec.c \ shlfileop.c \ shlfolder.c \ + shlview.c \ string.c \ systray.c RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shell32/tests/msg.h b/dlls/shell32/tests/msg.h new file mode 100644 index 00000000000..361ccdbf598 --- /dev/null +++ b/dlls/shell32/tests/msg.h @@ -0,0 +1,294 @@ +/* Message Sequence Testing Code + * + * Copyright (C) 2007 James Hawkins + * Copyright (C) 2007 Lei Zhang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include "wine/test.h" + +/* undocumented SWP flags - from SDK 3.1 */ +#define SWP_NOCLIENTSIZE 0x0800 +#define SWP_NOCLIENTMOVE 0x1000 + +typedef enum +{ + sent = 0x1, + posted = 0x2, + parent = 0x4, + wparam = 0x8, + lparam = 0x10, + defwinproc = 0x20, + beginpaint = 0x40, + optional = 0x80, + hook = 0x100, + winevent_hook =0x200, + id = 0x400 +} msg_flags_t; + +struct message +{ + UINT message; /* the WM_* code */ + msg_flags_t flags; /* message props */ + WPARAM wParam; /* expected value of wParam */ + LPARAM lParam; /* expected value of lParam */ + UINT id; /* extra message data: id of the window, + notify code etc. */ +}; + +struct msg_sequence +{ + int count; + int size; + struct message *sequence; +}; + +static void add_message(struct msg_sequence **seq, int sequence_index, + const struct message *msg) +{ + struct msg_sequence *msg_seq = seq[sequence_index]; + + if (!msg_seq->sequence) + { + msg_seq->size = 10; + msg_seq->sequence = HeapAlloc(GetProcessHeap(), 0, + msg_seq->size * sizeof (struct message)); + } + + if (msg_seq->count == msg_seq->size) + { + msg_seq->size *= 2; + msg_seq->sequence = HeapReAlloc(GetProcessHeap(), 0, + msg_seq->sequence, + msg_seq->size * sizeof (struct message)); + } + + assert(msg_seq->sequence); + + msg_seq->sequence[msg_seq->count].message = msg->message; + msg_seq->sequence[msg_seq->count].flags = msg->flags; + msg_seq->sequence[msg_seq->count].wParam = msg->wParam; + msg_seq->sequence[msg_seq->count].lParam = msg->lParam; + msg_seq->sequence[msg_seq->count].id = msg->id; + + msg_seq->count++; +} + +static void flush_sequence(struct msg_sequence **seg, int sequence_index) +{ + struct msg_sequence *msg_seq = seg[sequence_index]; + HeapFree(GetProcessHeap(), 0, msg_seq->sequence); + msg_seq->sequence = NULL; + msg_seq->count = msg_seq->size = 0; +} + +static void flush_sequences(struct msg_sequence **seq, int n) +{ + int i; + + for (i = 0; i < n; i++) + flush_sequence(seq, i); +} + +static void ok_sequence_(struct msg_sequence **seq, int sequence_index, + const struct message *expected, const char *context, int todo, + const char *file, int line) +{ + struct msg_sequence *msg_seq = seq[sequence_index]; + static const struct message end_of_sequence = {0, 0, 0, 0}; + const struct message *actual, *sequence; + int failcount = 0; + + add_message(seq, sequence_index, &end_of_sequence); + + sequence = msg_seq->sequence; + actual = sequence; + + while (expected->message && actual->message) + { + trace_( file, line)("expected %04x - actual %04x\n", expected->message, actual->message); + + if (expected->message == actual->message) + { + if (expected->flags & wparam) + { + if (expected->wParam != actual->wParam && todo) + { + todo_wine + { + failcount++; + ok_(file, line) (FALSE, + "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + context, expected->message, expected->wParam, actual->wParam); + } + } + else + { + ok_(file, line) (expected->wParam == actual->wParam, + "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + context, expected->message, expected->wParam, actual->wParam); + } + } + + if (expected->flags & lparam) + { + if (expected->lParam != actual->lParam && todo) + { + todo_wine + { + failcount++; + ok_(file, line) (FALSE, + "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + context, expected->message, expected->lParam, actual->lParam); + } + } + else + { + ok_(file, line) (expected->lParam == actual->lParam, + "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + context, expected->message, expected->lParam, actual->lParam); + } + } + + if (expected->flags & id) + { + if (expected->id != actual->id && expected->flags & optional) + { + expected++; + continue; + } + if (expected->id != actual->id && todo) + { + todo_wine + { + failcount++; + ok_(file, line) (FALSE, + "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", + context, expected->message, expected->id, actual->id); + } + } + else + { + ok_(file, line) (expected->id == actual->id, + "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", + context, expected->message, expected->id, actual->id); + } + } + + if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo) + { + todo_wine + { + failcount++; + ok_(file, line) (FALSE, + "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", + context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); + } + } + else + { + ok_(file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc), + "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", + context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); + } + + ok_(file, line) ((expected->flags & beginpaint) == (actual->flags & beginpaint), + "%s: the msg 0x%04x should %shave been sent by BeginPaint\n", + context, expected->message, (expected->flags & beginpaint) ? "" : "NOT "); + ok_(file, line) ((expected->flags & (sent|posted)) == (actual->flags & (sent|posted)), + "%s: the msg 0x%04x should have been %s\n", + context, expected->message, (expected->flags & posted) ? "posted" : "sent"); + ok_(file, line) ((expected->flags & parent) == (actual->flags & parent), + "%s: the msg 0x%04x was expected in %s\n", + context, expected->message, (expected->flags & parent) ? "parent" : "child"); + ok_(file, line) ((expected->flags & hook) == (actual->flags & hook), + "%s: the msg 0x%04x should have been sent by a hook\n", + context, expected->message); + ok_(file, line) ((expected->flags & winevent_hook) == (actual->flags & winevent_hook), + "%s: the msg 0x%04x should have been sent by a winevent hook\n", + context, expected->message); + expected++; + actual++; + } + else if (expected->flags & optional) + expected++; + else if (todo) + { + failcount++; + todo_wine + { + ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", + context, expected->message, actual->message); + } + + flush_sequence(seq, sequence_index); + return; + } + else + { + ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", + context, expected->message, actual->message); + expected++; + actual++; + } + } + + /* skip all optional trailing messages */ + while (expected->message && ((expected->flags & optional))) + expected++; + + if (todo) + { + todo_wine + { + if (expected->message || actual->message) + { + failcount++; + ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", + context, expected->message, actual->message); + } + } + } + else if (expected->message || actual->message) + { + ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", + context, expected->message, actual->message); + } + + if(todo && !failcount) /* succeeded yet marked todo */ + { + todo_wine + { + ok_(file, line)(TRUE, "%s: marked \"todo_wine\" but succeeds\n", context); + } + } + + flush_sequence(seq, sequence_index); +} + +#define ok_sequence(seq, index, exp, contx, todo) \ + ok_sequence_(seq, index, (exp), (contx), (todo), __FILE__, __LINE__) + + +static void init_msg_sequences(struct msg_sequence **seq, int n) +{ + int i; + + for (i = 0; i < n; i++) + seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct msg_sequence)); +} diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index bb2d5b366db..52a21f12eed 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -421,6 +421,22 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) lok(SUCCEEDED(r), "no IID_IPersistFile (0x%08x)\n", r); if (SUCCEEDED(r)) { + CHAR buff[MAX_PATH], buff2[MAX_PATH]; + IMalloc *pmalloc; + LPOLESTR str; + + if (0) + { + /* crashes on XP */ + r = IPersistFile_GetCurFile(pf, NULL); + } + + /* test GetCurFile before ::Save */ + str = (LPWSTR)0xdeadbeef; + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_FALSE, "got 0x%08x\n", r); + ok(str == NULL, "got %p\n", str); + r = IPersistFile_Save(pf, path, TRUE); if (save_fails) { @@ -432,6 +448,18 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) { lok(SUCCEEDED(r), "save failed (0x%08x)\n", r); } + + /* test GetCurFile after ::Save */ + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_OK, "got 0x%08x\n", r); + + WideCharToMultiByte( CP_ACP, 0, str, -1, buff, sizeof(buff), NULL, NULL ); + WideCharToMultiByte( CP_ACP, 0, path, -1, buff2, sizeof(buff2), NULL, NULL ); + + lok(!strcmp(buff, buff2), "Expected %s, got %s\n", buff2, buff); + + SHGetMalloc(&pmalloc); + IMalloc_Free(pmalloc, str); IPersistFile_Release(pf); } @@ -444,6 +472,9 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) IShellLinkA *sl; IPersistFile *pf; char buffer[INFOTIPSIZE]; + CHAR buff[MAX_PATH], buff2[MAX_PATH]; + IMalloc *pmalloc; + LPOLESTR str; r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); @@ -459,8 +490,28 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) return; } + SHGetMalloc(&pmalloc); + + /* test GetCurFile before ::Load */ + str = (LPWSTR)0xdeadbeef; + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_FALSE, "got 0x%08x\n", r); + lok(str == NULL, "got %p\n", str); + r = IPersistFile_Load(pf, path, STGM_READ); lok(SUCCEEDED(r), "load failed (0x%08x)\n", r); + + /* test GetCurFile after ::Save */ + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_OK, "got 0x%08x\n", r); + + WideCharToMultiByte( CP_ACP, 0, str, -1, buff, sizeof(buff), NULL, NULL ); + WideCharToMultiByte( CP_ACP, 0, path, -1, buff2, sizeof(buff2), NULL, NULL ); + + lok(!strcmp(buff, buff2), "Expected %s, got %s\n", buff2, buff); + + IMalloc_Free(pmalloc, str); + IPersistFile_Release(pf); if (FAILED(r)) { @@ -744,10 +795,11 @@ static void test_datalink(void) r = IShellLinkW_SetPath(sl, lnk); ok(r == S_OK, "set path failed\n"); - /* - * The following crashes: - * r = IShellLinkDataList_GetFlags( dl, NULL ); - */ +if (0) +{ + /* the following crashes */ + r = IShellLinkDataList_GetFlags( dl, NULL ); +} flags = 0; r = IShellLinkDataList_GetFlags( dl, &flags ); diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 5d5db34d2b4..ffdf393d98b 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -797,6 +797,10 @@ static const char* testfiles[]= "%s\\test file.sde", "%s\\test file.exe", "%s\\test2.exe", + "%s\\simple.shlexec", + "%s\\drawback_file.noassoc", + "%s\\drawback_file.noassoc foo.shlexec", + "%s\\drawback_nonexist.noassoc foo.shlexec", NULL }; @@ -852,6 +856,112 @@ static filename_tests_t noquotes_tests[]= {NULL, NULL, 0} }; +static void test_lpFile_parsed(void) +{ + /* basename tmpdir */ + const char* shorttmpdir; + + const char *testfile; + char fileA[MAX_PATH]; + + int rc; + + GetTempPathA(sizeof(fileA), fileA); + shorttmpdir = tmpdir + strlen(fileA); + + /* ensure tmpdir is in %TEMP%: GetTempPath() can succeed even if TEMP is undefined */ + SetEnvironmentVariableA("TEMP", fileA); + + /* existing "drawback_file.noassoc" prevents finding "drawback_file.noassoc foo.shlexec" on wine */ + testfile = "%s\\drawback_file.noassoc foo.shlexec"; + sprintf(fileA, testfile, tmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + todo_wine { + ok(rc>32, + "expected success (33), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + } + + /* if quoted, existing "drawback_file.noassoc" not prevents finding "drawback_file.noassoc foo.shlexec" on wine */ + testfile = "\"%s\\drawback_file.noassoc foo.shlexec\""; + sprintf(fileA, testfile, tmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + ok(rc>32 || broken(rc == 2) /* Win95/NT4 */, + "expected success (33), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + + /* error should be 2, not 31 */ + testfile = "\"%s\\drawback_file.noassoc\" foo.shlexec"; + sprintf(fileA, testfile, tmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + ok(rc==2, + "expected failure (2), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + + /* ""command"" not works on wine (and real win9x and w2k) */ + testfile = "\"\"%s\\simple.shlexec\"\""; + sprintf(fileA, testfile, tmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + todo_wine { + ok(rc>32 || broken(rc == 2) /* Win9x/2000 */, + "expected success (33), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + } + + /* nonexisting "drawback_nonexist.noassoc" not prevents finding "drawback_nonexist.noassoc foo.shlexec" on wine */ + testfile = "%s\\drawback_nonexist.noassoc foo.shlexec"; + sprintf(fileA, testfile, tmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + ok(rc>32, + "expected success (33), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + + /* is SEE_MASK_DOENVSUBST default flag? Should only be when XP emulates 9x (XP bug or real 95 or ME behavior ?) */ + testfile = "%%TEMP%%\\%s\\simple.shlexec"; + sprintf(fileA, testfile, shorttmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + todo_wine { + ok(rc==2, + "expected failure (2), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + } + + /* quoted */ + testfile = "\"%%TEMP%%\\%s\\simple.shlexec\""; + sprintf(fileA, testfile, shorttmpdir); + rc=shell_execute(NULL, fileA, NULL, NULL); + todo_wine { + ok(rc==2, + "expected failure (2), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + } + + /* test SEE_MASK_DOENVSUBST works */ + testfile = "%%TEMP%%\\%s\\simple.shlexec"; + sprintf(fileA, testfile, shorttmpdir); + rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, fileA, NULL, NULL); + ok(rc>32, + "expected success (33), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); + + /* quoted lpFile not works only on real win95 and nt4 */ + testfile = "\"%%TEMP%%\\%s\\simple.shlexec\""; + sprintf(fileA, testfile, shorttmpdir); + rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, fileA, NULL, NULL); + ok(rc>32 || broken(rc == 2) /* Win95/NT4 */, + "expected success (33), got %s (%d), lpFile: %s \n", + rc > 32 ? "success" : "failure", rc, fileA + ); +} + static void test_filename(void) { char filename[MAX_PATH]; @@ -1938,6 +2048,7 @@ START_TEST(shlexec) init_test(); + test_lpFile_parsed(); test_filename(); test_find_executable(); test_lnks(); diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c new file mode 100644 index 00000000000..31f47c1bb72 --- /dev/null +++ b/dlls/shell32/tests/shlview.c @@ -0,0 +1,514 @@ +/* + * Unit test of the IShellView + * + * Copyright 2010 Nikolay Sivov for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#define COBJMACROS +#define CONST_VTABLE + +#include "windef.h" +#include "winbase.h" +#include "wtypes.h" +#include "shellapi.h" + +#include "shlguid.h" +#include "shlobj.h" +#include "shobjidl.h" +#include "shlwapi.h" +#include "ocidl.h" +#include "oleauto.h" + +#include "wine/test.h" + +#include "msg.h" + +#define LISTVIEW_SEQ_INDEX 0 +#define NUM_MSG_SEQUENCES 1 + +static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; + +static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); + static LONG defwndproc_counter = 0; + LRESULT ret; + struct message msg; + + trace("listview: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + + msg.message = message; + msg.flags = sent|wparam|lparam; + if (defwndproc_counter) msg.flags |= defwinproc; + msg.wParam = wParam; + msg.lParam = lParam; + add_message(sequences, LISTVIEW_SEQ_INDEX, &msg); + + defwndproc_counter++; + ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); + defwndproc_counter--; + return ret; +} + +static HWND subclass_listview(HWND hwnd) +{ + WNDPROC oldproc; + HWND listview; + + /* listview is a first child */ + listview = FindWindowExA(hwnd, NULL, WC_LISTVIEWA, NULL); + + oldproc = (WNDPROC)SetWindowLongPtrA(listview, GWLP_WNDPROC, + (LONG_PTR)listview_subclass_proc); + SetWindowLongPtrA(listview, GWLP_USERDATA, (LONG_PTR)oldproc); + + return listview; +} + +typedef struct { + + const IShellBrowserVtbl *lpVtbl; + LONG ref; +} IShellBrowserImpl; + +/* dummy IShellBrowser implementation */ +static const IShellBrowserVtbl IShellBrowserImpl_Vtbl; + +IShellBrowser* IShellBrowserImpl_Construct(void) +{ + IShellBrowserImpl *browser; + + browser = HeapAlloc(GetProcessHeap(), 0, sizeof(*browser)); + browser->lpVtbl = &IShellBrowserImpl_Vtbl; + browser->ref = 1; + + return (IShellBrowser*)browser; +} + +static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, + REFIID riid, + LPVOID *ppvObj) +{ + IShellBrowserImpl *This = (IShellBrowserImpl *)iface; + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IOleWindow)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IShellBrowser)) + { + *ppvObj = This; + } + + if(*ppvObj) + { + IUnknown_AddRef( (IShellBrowser*) *ppvObj); + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface) +{ + IShellBrowserImpl *This = (IShellBrowserImpl *)iface; + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface) +{ + IShellBrowserImpl *This = (IShellBrowserImpl *)iface; + ULONG ref = InterlockedDecrement(&This->ref); + + if (!ref) + { + HeapFree(GetProcessHeap(), 0, This); + return 0; + } + return ref; +} + +static HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser *iface, + HWND *phwnd) +{ + if (phwnd) *phwnd = GetDesktopWindow(); + return S_OK; +} + +static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser *iface, + BOOL fEnterMode) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, + LPCITEMIDLIST pidl, + UINT wFlags) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, + BOOL fEnable) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface, + UINT id, + HWND *lphwnd) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, + DWORD mode, + LPSTREAM *pStrm) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, + HMENU hmenuShared, + LPOLEMENUGROUPWIDTHS lpMenuWidths) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, + IShellView *ppshv) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, + IShellView **ppshv) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, + HMENU hmenuShared) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, + UINT id, + UINT uMsg, + WPARAM wParam, + LPARAM lParam, + LRESULT *pret) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, + HMENU hmenuShared, + HOLEMENU holemenuReserved, + HWND hwndActiveObject) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, + LPCOLESTR lpszStatusText) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface, + LPTBBUTTON lpButtons, + UINT nButtons, + UINT uFlags) + +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, + LPMSG lpmsg, + WORD wID) + +{ + return E_NOTIMPL; +} + +static const IShellBrowserVtbl IShellBrowserImpl_Vtbl = +{ + IShellBrowserImpl_QueryInterface, + IShellBrowserImpl_AddRef, + IShellBrowserImpl_Release, + IShellBrowserImpl_GetWindow, + IShellBrowserImpl_ContextSensitiveHelp, + IShellBrowserImpl_InsertMenusSB, + IShellBrowserImpl_SetMenuSB, + IShellBrowserImpl_RemoveMenusSB, + IShellBrowserImpl_SetStatusTextSB, + IShellBrowserImpl_EnableModelessSB, + IShellBrowserImpl_TranslateAcceleratorSB, + IShellBrowserImpl_BrowseObject, + IShellBrowserImpl_GetViewStateStream, + IShellBrowserImpl_GetControlWindow, + IShellBrowserImpl_SendControlMsg, + IShellBrowserImpl_QueryActiveShellView, + IShellBrowserImpl_OnViewWindowActive, + IShellBrowserImpl_SetToolbarItems +}; + +static const struct message empty_seq[] = { + { 0 } +}; + +static const struct message folderview_getspacing_seq[] = { + { LVM_GETITEMSPACING, wparam|sent, FALSE }, + { 0 } +}; + +static const struct message folderview_getselectionmarked_seq[] = { + { LVM_GETSELECTIONMARK, sent }, + { 0 } +}; + +static const struct message folderview_getfocused_seq[] = { + { LVM_GETNEXTITEM, sent|wparam|lparam, -1, LVNI_FOCUSED }, + { 0 } +}; + +static const struct message folderview_itemcount_seq[] = { + { LVM_GETITEMCOUNT, sent }, + { 0 } +}; + +static void test_IShellView_CreateViewWindow(void) +{ + IShellFolder *desktop; + FOLDERSETTINGS settings; + IShellView *view; + IDropTarget *dt; + HWND hwnd_view; + HRESULT hr; + RECT r = {0}; + + hr = SHGetDesktopFolder(&desktop); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); + ok(hr == S_OK, "got (0x%08x)\n", hr); + +if (0) +{ + /* crashes on native */ + hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, NULL, NULL); +} + + settings.ViewMode = FVM_ICON; + settings.fFlags = 0; + hwnd_view = (HWND)0xdeadbeef; + hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, NULL, &hwnd_view); + ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hwnd_view == 0, "got %p\n", hwnd_view); + + hwnd_view = (HWND)0xdeadbeef; + hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, &r, &hwnd_view); + ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hwnd_view == 0, "got %p\n", hwnd_view); + + /* ::DragLeave without drag operation */ + hr = IShellView_QueryInterface(view, &IID_IDropTarget, (void**)&dt); + ok(hr == S_OK, "got (0x%08x)\n", hr); + hr = IDropTarget_DragLeave(dt); + ok(hr == S_OK, "got (0x%08x)\n", hr); + IDropTarget_Release(dt); + + IShellView_Release(view); + IShellFolder_Release(desktop); +} + +static void test_IFolderView(void) +{ + IShellFolder *desktop, *folder; + FOLDERSETTINGS settings; + IShellView *view; + IShellBrowser *browser; + IFolderView *fv; + HWND hwnd_view, hwnd_list; + HRESULT hr; + INT ret; + POINT pt; + LONG ref1, ref2; + RECT r; + + hr = SHGetDesktopFolder(&desktop); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellView_QueryInterface(view, &IID_IFolderView, (void**)&fv); + if (hr != S_OK) + { + win_skip("IFolderView not supported by desktop folder\n"); + IShellView_Release(view); + IShellFolder_Release(desktop); + return; + } + + /* call methods before window creation */ + hr = IFolderView_GetSpacing(fv, NULL); + ok(hr == S_FALSE || broken(hr == S_OK) /* win7 */, "got (0x%08x)\n", hr); + +if (0) +{ + /* crashes on Vista and Win2k8 - List not created yet case */ + hr = IFolderView_GetSpacing(fv, &pt); + + /* crashes on XP */ + hr = IFolderView_GetSelectionMarkedItem(fv, NULL); + hr = IFolderView_GetFocusedItem(fv, NULL); +} + + browser = IShellBrowserImpl_Construct(); + + settings.ViewMode = FVM_ICON; + settings.fFlags = 0; + hwnd_view = (HWND)0xdeadbeef; + r.left = r.top = 0; + r.right = r.bottom = 100; + hr = IShellView_CreateViewWindow(view, NULL, &settings, browser, &r, &hwnd_view); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(IsWindow(hwnd_view), "got %p\n", hwnd_view); + + hwnd_list = subclass_listview(hwnd_view); + if (!hwnd_list) + { + win_skip("Failed to subclass ListView control\n"); + IShellBrowser_Release(browser); + IFolderView_Release(fv); + IShellView_Release(view); + IShellFolder_Release(desktop); + return; + } + + /* IFolderView::GetSpacing */ + flush_sequences(sequences, NUM_MSG_SEQUENCES); + hr = IFolderView_GetSpacing(fv, NULL); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, empty_seq, "IFolderView::GetSpacing, empty", FALSE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + hr = IFolderView_GetSpacing(fv, &pt); + ok(hr == S_OK, "got (0x%08x)\n", hr); + /* fails with empty sequence on win7 for unknown reason */ + if (sequences[LISTVIEW_SEQ_INDEX]->count) + { + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getspacing_seq, "IFolderView::GetSpacing", FALSE); + ok(pt.x > 0, "got %d\n", pt.x); + ok(pt.y > 0, "got %d\n", pt.y); + ret = SendMessageA(hwnd_list, LVM_GETITEMSPACING, 0, 0); + ok(pt.x == LOWORD(ret) && pt.y == HIWORD(ret), "got (%d, %d)\n", LOWORD(ret), HIWORD(ret)); + } + + /* IFolderView::GetSelectionMarkedItem */ +if (0) +{ + /* crashes on XP */ + hr = IFolderView_GetSelectionMarkedItem(fv, NULL); +} + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + hr = IFolderView_GetSelectionMarkedItem(fv, &ret); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq, + "IFolderView::GetSelectionMarkedItem", FALSE); + + /* IFolderView::GetFocusedItem */ + flush_sequences(sequences, NUM_MSG_SEQUENCES); + hr = IFolderView_GetFocusedItem(fv, &ret); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getfocused_seq, + "IFolderView::GetFocusedItem", FALSE); + + /* IFolderView::GetFolder, just return pointer */ +if (0) +{ + /* crashes on XP */ + hr = IFolderView_GetFolder(fv, NULL, (void**)&folder); + hr = IFolderView_GetFolder(fv, NULL, NULL); +} + + hr = IFolderView_GetFolder(fv, &IID_IShellFolder, NULL); + ok(hr == E_POINTER, "got (0x%08x)\n", hr); + + ref1 = IShellFolder_AddRef(desktop); + IShellFolder_Release(desktop); + hr = IFolderView_GetFolder(fv, &IID_IShellFolder, (void**)&folder); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ref2 = IShellFolder_AddRef(desktop); + IShellFolder_Release(desktop); + ok(ref1 == ref2, "expected same refcount, got %d\n", ref2); + ok(desktop == folder, "\n"); + + /* IFolderView::ItemCount */ +if (0) +{ + /* crashes on XP */ + hr = IFolderView_ItemCount(fv, SVGIO_ALLVIEW, NULL); +} + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + hr = IFolderView_ItemCount(fv, SVGIO_ALLVIEW, &ret); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_itemcount_seq, + "IFolderView::ItemCount", FALSE); + + IShellBrowser_Release(browser); + IFolderView_Release(fv); + IShellView_Release(view); + IShellFolder_Release(desktop); +} + +START_TEST(shlview) +{ + OleInitialize(NULL); + + init_msg_sequences(sequences, NUM_MSG_SEQUENCES); + + test_IShellView_CreateViewWindow(); + test_IFolderView(); + + OleUninitialize(); +} diff --git a/dlls/shfolder/Makefile.in b/dlls/shfolder/Makefile.in index 507f3310e12..f8f0461fbe1 100644 --- a/dlls/shfolder/Makefile.in +++ b/dlls/shfolder/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = shell32 kernel32 RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shlwapi/Makefile.in b/dlls/shlwapi/Makefile.in index 673f4adc001..57ef9cca139 100644 --- a/dlls/shlwapi/Makefile.in +++ b/dlls/shlwapi/Makefile.in @@ -52,5 +52,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 375ddaf7ad2..364bbfe8af8 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -402,7 +402,9 @@ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown) V_VT(&var) = VT_UNKNOWN; V_UNKNOWN(&var) = (IUnknown*)pIEnumFormatEtc; - hRet = IWebBrowserApp_PutProperty(pBrowser, (BSTR)szProperty, var); + property = SysAllocString(szProperty); + hRet = IWebBrowserApp_PutProperty(pBrowser, property, var); + SysFreeString(property); if (FAILED(hRet)) { IEnumFORMATETC_Release(pIEnumFormatEtc); @@ -4854,3 +4856,127 @@ BOOL WINAPI SHPropertyBag_ReadLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LPLON } return hr; } + +/* return flags for SHGetObjectCompatFlags, names derived from registry value names */ +#define OBJCOMPAT_OTNEEDSSFCACHE 0x00000001 +#define OBJCOMPAT_NO_WEBVIEW 0x00000002 +#define OBJCOMPAT_UNBINDABLE 0x00000004 +#define OBJCOMPAT_PINDLL 0x00000008 +#define OBJCOMPAT_NEEDSFILESYSANCESTOR 0x00000010 +#define OBJCOMPAT_NOTAFILESYSTEM 0x00000020 +#define OBJCOMPAT_CTXMENU_NOVERBS 0x00000040 +#define OBJCOMPAT_CTXMENU_LIMITEDQI 0x00000080 +#define OBJCOMPAT_COCREATESHELLFOLDERONLY 0x00000100 +#define OBJCOMPAT_NEEDSSTORAGEANCESTOR 0x00000200 +#define OBJCOMPAT_NOLEGACYWEBVIEW 0x00000400 +#define OBJCOMPAT_CTXMENU_XPQCMFLAGS 0x00001000 +#define OBJCOMPAT_NOIPROPERTYSTORE 0x00002000 + +/* a search table for compatibility flags */ +struct objcompat_entry { + const WCHAR name[30]; + DWORD value; +}; + +/* expected to be sorted by name */ +static const struct objcompat_entry objcompat_table[] = { + { {'C','O','C','R','E','A','T','E','S','H','E','L','L','F','O','L','D','E','R','O','N','L','Y',0}, + OBJCOMPAT_COCREATESHELLFOLDERONLY }, + { {'C','T','X','M','E','N','U','_','L','I','M','I','T','E','D','Q','I',0}, + OBJCOMPAT_CTXMENU_LIMITEDQI }, + { {'C','T','X','M','E','N','U','_','N','O','V','E','R','B','S',0}, + OBJCOMPAT_CTXMENU_LIMITEDQI }, + { {'C','T','X','M','E','N','U','_','X','P','Q','C','M','F','L','A','G','S',0}, + OBJCOMPAT_CTXMENU_XPQCMFLAGS }, + { {'N','E','E','D','S','F','I','L','E','S','Y','S','A','N','C','E','S','T','O','R',0}, + OBJCOMPAT_NEEDSFILESYSANCESTOR }, + { {'N','E','E','D','S','S','T','O','R','A','G','E','A','N','C','E','S','T','O','R',0}, + OBJCOMPAT_NEEDSSTORAGEANCESTOR }, + { {'N','O','I','P','R','O','P','E','R','T','Y','S','T','O','R','E',0}, + OBJCOMPAT_NOIPROPERTYSTORE }, + { {'N','O','L','E','G','A','C','Y','W','E','B','V','I','E','W',0}, + OBJCOMPAT_NOLEGACYWEBVIEW }, + { {'N','O','T','A','F','I','L','E','S','Y','S','T','E','M',0}, + OBJCOMPAT_NOTAFILESYSTEM }, + { {'N','O','_','W','E','B','V','I','E','W',0}, + OBJCOMPAT_NO_WEBVIEW }, + { {'O','T','N','E','E','D','S','S','F','C','A','C','H','E',0}, + OBJCOMPAT_OTNEEDSSFCACHE }, + { {'P','I','N','D','L','L',0}, + OBJCOMPAT_PINDLL }, + { {'U','N','B','I','N','D','A','B','L','E',0}, + OBJCOMPAT_UNBINDABLE } +}; + +/************************************************************************** + * SHGetObjectCompatFlags (SHLWAPI.476) + * + * Function returns an integer representation of compatibility flags stored + * in registry for CLSID under ShellCompatibility subkey. + * + * PARAMS + * pUnk: pointer to object IUnknown interface, idetifies CLSID + * clsid: pointer to CLSID to retrieve data for + * + * RETURNS + * 0 on failure, flags set on success + */ +DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid) +{ + static const WCHAR compatpathW[] = + {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\', + 'O','b','j','e','c','t','s','\\','%','s',0}; + WCHAR strW[sizeof(compatpathW)/sizeof(WCHAR) + 38 /* { CLSID } */]; + DWORD ret, length = sizeof(strW)/sizeof(WCHAR); + OLECHAR *clsid_str; + HKEY key; + INT i; + + TRACE("%p %s\n", pUnk, debugstr_guid(clsid)); + + if (!pUnk && !clsid) return 0; + + if (pUnk && !clsid) + { + FIXME("iface not handled\n"); + return 0; + } + + StringFromCLSID(clsid, &clsid_str); + sprintfW(strW, compatpathW, clsid_str); + CoTaskMemFree(clsid_str); + + ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, strW, &key); + if (ret != ERROR_SUCCESS) return 0; + + /* now collect flag values */ + ret = 0; + for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++) + { + INT left, right, res, x; + + /* search in table */ + left = 0; + right = sizeof(objcompat_table) / sizeof(struct objcompat_entry) - 1; + + while (right >= left) { + x = (left + right) / 2; + res = strcmpW(strW, objcompat_table[x].name); + if (res == 0) + { + ret |= objcompat_table[x].value; + break; + } + else if (res < 0) + right = x - 1; + else + left = x + 1; + } + + length = sizeof(strW)/sizeof(WCHAR); + } + + return ret; +} diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 3091783f580..d899232f9c5 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -473,7 +473,7 @@ 473 stub -noname SHGetIniStringUTF7W 474 stub -noname SHSetIniStringUTF7W 475 stdcall -noname GetShellSecurityDescriptor(ptr long) -476 stub -noname SHGetObjectCompatFlags +476 stdcall -noname SHGetObjectCompatFlags(ptr ptr) 477 stub -noname SHCreatePropertyBagOnMemory 478 stdcall -noname IUnknown_TranslateAcceleratorIO(ptr ptr) 479 stdcall -noname IUnknown_UIActivateIO(ptr long ptr) @@ -559,6 +559,7 @@ @ stdcall ColorAdjustLuma(long long long) @ stdcall ColorHLSToRGB(long long long) @ stdcall ColorRGBToHLS(long ptr ptr ptr) +@ stdcall DelayLoadFailureHook(str str) kernel32.DelayLoadFailureHook @ stdcall -private DllGetVersion(ptr) @ stdcall GetMenuPosFromID(ptr long) @ stdcall HashData (ptr long ptr long) diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index cfb59ea4400..e00a92582e0 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -507,22 +507,32 @@ LPWSTR WINAPI StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc) * Copy a string to another string, up to a maximum number of characters. * * PARAMS - * lpszStr [O] Destination string - * lpszSrc [I] Source string - * iLen [I] Maximum number of chars to copy + * dst [O] Destination string + * src [I] Source string + * count [I] Maximum number of chars to copy * * RETURNS - * lpszStr. + * dst. */ -LPWSTR WINAPI StrCpyNW(LPWSTR lpszStr, LPCWSTR lpszSrc, int iLen) +LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count) { - TRACE("(%p,%s,%i)\n", lpszStr, debugstr_w(lpszSrc), iLen); + LPWSTR d = dst; + LPCWSTR s = src; - lstrcpynW(lpszStr, lpszSrc, iLen); - return lpszStr; -} + TRACE("(%p,%s,%i)\n", dst, debugstr_w(src), count); + if (s) + { + while ((count > 1) && *s) + { + count--; + *d++ = *s++; + } + } + if (count) *d = 0; + return dst; +} /************************************************************************* * SHLWAPI_StrStrHelperA diff --git a/dlls/shlwapi/tests/Makefile.in b/dlls/shlwapi/tests/Makefile.in index 99aac87fb72..585607c4f03 100644 --- a/dlls/shlwapi/tests/Makefile.in +++ b/dlls/shlwapi/tests/Makefile.in @@ -18,5 +18,3 @@ C_SRCS = \ url.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c index 9501cd8a58f..4a36b3ab0ba 100644 --- a/dlls/shlwapi/tests/istream.c +++ b/dlls/shlwapi/tests/istream.c @@ -432,6 +432,11 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); + if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { + win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); + Sleep(1000); + ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); + } ok( ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or " @@ -491,6 +496,11 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); + if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { + win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); + Sleep(1000); + ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); + } ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); @@ -507,6 +517,11 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); + if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { + win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); + Sleep(1000); + ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); + } ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c index 83aec78cd1f..17813c19e9f 100644 --- a/dlls/shlwapi/tests/ordinal.c +++ b/dlls/shlwapi/tests/ordinal.c @@ -47,6 +47,8 @@ static HRESULT(WINAPI *pSHPropertyBag_ReadLONG)(IPropertyBag *,LPCWSTR,LPLONG); static LONG (WINAPI *pSHSetWindowBits)(HWND, INT, UINT, UINT); static INT (WINAPI *pSHFormatDateTimeA)(const FILETIME UNALIGNED*, DWORD*, LPSTR, UINT); static INT (WINAPI *pSHFormatDateTimeW)(const FILETIME UNALIGNED*, DWORD*, LPWSTR, UINT); +static DWORD (WINAPI *pSHGetObjectCompatFlags)(IUnknown*, const CLSID*); +static BOOL (WINAPI *pGUIDFromStringA)(LPSTR, CLSID *); static HMODULE hmlang; static HRESULT (WINAPI *pLcidToRfc1766A)(LCID, LPSTR, INT); @@ -1516,20 +1518,22 @@ if (0) ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); ok(buff[0] == 'a', "expected same string, got %s\n", buff); + /* flags needs to have FDTF_NOAUTOREADINGORDER for these tests to succeed on Vista+ */ + /* all combinations documented as invalid succeeded */ - flags = FDTF_SHORTTIME | FDTF_LONGTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTTIME | FDTF_LONGTIME; SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - flags = FDTF_SHORTDATE | FDTF_LONGDATE; + flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_LONGDATE; SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; + flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); @@ -1538,14 +1542,14 @@ if (0) "expected 0xdeadbeef, got %d\n", GetLastError()); /* now check returned strings */ - flags = FDTF_SHORTTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff2, sizeof(buff2)); ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - flags = FDTF_LONGTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, buff2, sizeof(buff2)); @@ -1553,21 +1557,21 @@ if (0) ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); /* both time flags */ - flags = FDTF_LONGTIME | FDTF_SHORTTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGTIME | FDTF_SHORTTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, buff2, sizeof(buff2)); ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - flags = FDTF_SHORTDATE; + flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)); ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - flags = FDTF_LONGDATE; + flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); @@ -1575,7 +1579,7 @@ if (0) ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); /* both date flags */ - flags = FDTF_LONGDATE | FDTF_SHORTDATE; + flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE | FDTF_SHORTDATE; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); @@ -1583,7 +1587,7 @@ if (0) ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); /* various combinations of date/time flags */ - flags = FDTF_LONGDATE | FDTF_SHORTTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE | FDTF_SHORTTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d, length %d\n", ret, lstrlenA(buff)+1); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); @@ -1594,7 +1598,7 @@ if (0) strcat(buff2, buff3); ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - flags = FDTF_LONGDATE | FDTF_LONGTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE | FDTF_LONGTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); @@ -1605,7 +1609,7 @@ if (0) strcat(buff2, buff3); ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - flags = FDTF_SHORTDATE | FDTF_SHORTTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_SHORTTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)); @@ -1616,7 +1620,7 @@ if (0) strcat(buff2, buff3); ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - flags = FDTF_SHORTDATE | FDTF_LONGTIME; + flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_LONGTIME; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)); @@ -1683,10 +1687,11 @@ if (0) flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; SetLastError(0xdeadbeef); + buff[0] = 0; /* NT4 doesn't clear the buffer on failure */ ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); ok(ret == lstrlenW(buff)+1, "got %d\n", ret); ok(GetLastError() == 0xdeadbeef || - broken(GetLastError() == ERROR_INVALID_FLAGS), /* Win9x/WinMe */ + broken(GetLastError() == ERROR_INVALID_FLAGS), /* Win9x/WinMe/NT4 */ "expected 0xdeadbeef, got %d\n", GetLastError()); /* now check returned strings */ @@ -1786,6 +1791,88 @@ if (0) ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); } +static void test_SHGetObjectCompatFlags(void) +{ + struct compat_value { + CHAR nameA[30]; + DWORD value; + }; + + struct compat_value values[] = { + { "OTNEEDSSFCACHE", 0x1 }, + { "NO_WEBVIEW", 0x2 }, + { "UNBINDABLE", 0x4 }, + { "PINDLL", 0x8 }, + { "NEEDSFILESYSANCESTOR", 0x10 }, + { "NOTAFILESYSTEM", 0x20 }, + { "CTXMENU_NOVERBS", 0x40 }, + { "CTXMENU_LIMITEDQI", 0x80 }, + { "COCREATESHELLFOLDERONLY", 0x100 }, + { "NEEDSSTORAGEANCESTOR", 0x200 }, + { "NOLEGACYWEBVIEW", 0x400 }, + { "CTXMENU_XPQCMFLAGS", 0x1000 }, + { "NOIPROPERTYSTORE", 0x2000 } + }; + + static const char compat_path[] = "Software\\Microsoft\\Windows\\CurrentVersion\\ShellCompatibility\\Objects"; + CHAR keyA[39]; /* {CLSID} */ + HKEY root; + DWORD ret; + int i; + + if (!pSHGetObjectCompatFlags) + { + win_skip("SHGetObjectCompatFlags isn't available\n"); + return; + } + + /* null args */ + ret = pSHGetObjectCompatFlags(NULL, NULL); + ok(ret == 0, "got %d\n", ret); + + ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, compat_path, &root); + if (ret != ERROR_SUCCESS) + { + skip("No compatibility class data found\n"); + return; + } + + for (i = 0; RegEnumKeyA(root, i, keyA, sizeof(keyA)) == ERROR_SUCCESS; i++) + { + HKEY clsid_key; + + if (RegOpenKeyA(root, keyA, &clsid_key) == ERROR_SUCCESS) + { + CHAR valueA[30]; + DWORD expected = 0, got, length = sizeof(valueA); + CLSID clsid; + int v; + + for (v = 0; RegEnumValueA(clsid_key, v, valueA, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; v++) + { + int j; + + for (j = 0; j < sizeof(values)/sizeof(struct compat_value); j++) + if (lstrcmpA(values[j].nameA, valueA) == 0) + { + expected |= values[j].value; + break; + } + + length = sizeof(valueA); + } + + pGUIDFromStringA(keyA, &clsid); + got = pSHGetObjectCompatFlags(NULL, &clsid); + ok(got == expected, "got 0x%08x, expected 0x%08x. Key %s\n", got, expected, keyA); + + RegCloseKey(clsid_key); + } + } + + RegCloseKey(root); +} + static void init_pointers(void) { #define MAKEFUNC(f, ord) (p##f = (void*)GetProcAddress(hShlwapi, (LPSTR)(ord))) @@ -1797,11 +1884,13 @@ static void init_pointers(void) MAKEFUNC(SHSetWindowBits, 165); MAKEFUNC(ConnectToConnectionPoint, 168); MAKEFUNC(SHSearchMapInt, 198); + MAKEFUNC(GUIDFromStringA, 269); MAKEFUNC(SHPackDispParams, 282); MAKEFUNC(IConnectionPoint_InvokeWithCancel, 283); MAKEFUNC(IConnectionPoint_SimpleInvoke, 284); MAKEFUNC(SHFormatDateTimeA, 353); MAKEFUNC(SHFormatDateTimeW, 354); + MAKEFUNC(SHGetObjectCompatFlags, 476); MAKEFUNC(SHPropertyBag_ReadLONG, 496); #undef MAKEFUNC } @@ -1826,4 +1915,5 @@ START_TEST(ordinal) test_SHSetWindowBits(); test_SHFormatDateTimeA(); test_SHFormatDateTimeW(); + test_SHGetObjectCompatFlags(); } diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 00f0b023046..17c652de411 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -863,6 +863,33 @@ static void test_StrXXX_overflows(void) else win_skip("StrCatBuffA() is not available\n"); +if (0) +{ + /* crashes on XP */ + StrCpyNW(wbuf, (LPCWSTR)0x1, 10); + StrCpyNW((LPWSTR)0x1, wstr1, 10); +} + + memset(wbuf, 0xbf, sizeof(wbuf)); + expect_eq(StrCpyNW(wbuf, (LPCWSTR)0x1, 1), wbuf, PWCHAR, "%p"); + expect_eq(wbuf[0], 0, WCHAR, "%x"); + expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); + + memset(wbuf, 0xbf, sizeof(wbuf)); + expect_eq(StrCpyNW(wbuf, 0, 10), wbuf, PWCHAR, "%p"); + expect_eq(wbuf[0], 0, WCHAR, "%x"); + expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); + + memset(wbuf, 0xbf, sizeof(wbuf)); + expect_eq(StrCpyNW(wbuf, 0, 0), wbuf, PWCHAR, "%p"); + expect_eq(wbuf[0], (WCHAR)0xbfbf, WCHAR, "%x"); + expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); + + memset(wbuf, 0xbf, sizeof(wbuf)); + expect_eq(StrCpyNW(wbuf, wstr1, 0), wbuf, PWCHAR, "%p"); + expect_eq(wbuf[0], (WCHAR)0xbfbf, WCHAR, "%x"); + expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); + memset(wbuf, 0xbf, sizeof(wbuf)); expect_eq(StrCpyNW(wbuf, wstr1, 10), wbuf, PWCHAR, "%p"); expect_eq(wbuf[9], 0, WCHAR, "%x"); diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index 31df64e48ab..f7c94551e3d 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -160,6 +160,7 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"A", 0, S_OK, "A", FALSE}, {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, S_OK, "/uri-res/N2R?urn:sha1:B3K", FALSE} /*LimeWire online installer calls this*/, {"http:www.winehq.org/dir/../index.html", 0, S_OK, "http:www.winehq.org/index.html"}, + {"http://localhost/test.html", URL_FILE_USE_PATHURL, S_OK, "http://localhost/test.html"} }; /* ################ */ @@ -542,6 +543,13 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const HRESULT res; DWORD dwSize; + dwSize = 1; + res = pUrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags); + ok(res == E_POINTER, "UrlGetPart for \"%s\" gave: 0x%08x\n", szUrl, res); + ok(dwSize == strlen(szExpected)+1 || + (*szExpected == '?' && dwSize == strlen(szExpected)), + "UrlGetPart for \"%s\" gave size: %u\n", szUrl, dwSize); + dwSize = INTERNET_MAX_URL_LENGTH; res = pUrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags); ok(res == S_OK, @@ -575,6 +583,7 @@ static void test_UrlGetPart(void) { const char* file_url = "file://h o s t/c:/windows/file"; const char* http_url = "http://user:pass 123@www.wine hq.org"; + const char* res_url = "res://some.dll/find.dlg"; const char* about_url = "about:blank"; CHAR szPart[INTERNET_MAX_URL_LENGTH]; @@ -586,20 +595,38 @@ static void test_UrlGetPart(void) return; } + res = pUrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0); + ok(res == E_INVALIDARG, "null params gave: 0x%08x\n", res); + + res = pUrlGetPartA(NULL, szPart, &dwSize, URL_PART_SCHEME, 0); + ok(res == E_INVALIDARG, "null URL gave: 0x%08x\n", res); + + res = pUrlGetPartA(res_url, NULL, &dwSize, URL_PART_SCHEME, 0); + ok(res == E_INVALIDARG, "null szPart gave: 0x%08x\n", res); + + res = pUrlGetPartA(res_url, szPart, NULL, URL_PART_SCHEME, 0); + ok(res == E_INVALIDARG, "null URL gave: 0x%08x\n", res); + + dwSize = 0; + szPart[0]='x'; szPart[1]=0; + res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0); + ok(res == E_INVALIDARG, "UrlGetPartA(*pcchOut = 0) returned %08X\n", res); + ok(szPart[0] == 'x' && szPart[1] == 0, "UrlGetPartA(*pcchOut = 0) modified szPart: \"%s\"\n", szPart); + ok(dwSize == 0, "dwSize = %d\n", dwSize); + dwSize = sizeof szPart; szPart[0]='x'; szPart[1]=0; res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0); - todo_wine { ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res); ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart); - } + ok(dwSize == 0, "dwSize = %d\n", dwSize); + dwSize = sizeof szPart; szPart[0]='x'; szPart[1]=0; res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_QUERY, 0); - todo_wine { ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res); ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart); - } + ok(dwSize == 0, "dwSize = %d\n", dwSize); test_url_part(TEST_URL_3, URL_PART_HOSTNAME, 0, "localhost"); test_url_part(TEST_URL_3, URL_PART_PORT, 0, "21"); @@ -619,9 +646,20 @@ static void test_UrlGetPart(void) res = pUrlGetPartA(about_url, szPart, &dwSize, URL_PART_HOSTNAME, 0); ok(res==E_FAIL, "returned %08x\n", res); + test_url_part(res_url, URL_PART_SCHEME, 0, "res"); + test_url_part("http://www.winehq.org", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, "http:www.winehq.org"); + + dwSize = sizeof szPart; + szPart[0]='x'; szPart[1]=0; + res = pUrlGetPartA(res_url, szPart, &dwSize, URL_PART_QUERY, 0); + ok(res==S_FALSE, "UrlGetPartA returned %08X\n", res); + ok(szPart[0]==0, "UrlGetPartA gave \"%s\" instead of \"\"\n", szPart); + ok(dwSize == 0, "dwSize = %d\n", dwSize); + dwSize = sizeof(szPart); res = pUrlGetPartA("file://c:\\index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0); ok(res==S_FALSE, "returned %08x\n", res); + ok(dwSize == 0, "dwSize = %d\n", dwSize); dwSize = sizeof(szPart); szPart[0] = 'x'; szPart[1] = '\0'; @@ -629,6 +667,11 @@ static void test_UrlGetPart(void) ok(res==S_FALSE, "returned %08x\n", res); ok(szPart[0] == '\0', "szPart[0] = %c\n", szPart[0]); ok(dwSize == 0, "dwSize = %d\n", dwSize); + + dwSize = sizeof(szPart); + szPart[0] = 'x'; szPart[1] = '\0'; + res = pUrlGetPartA("index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0); + ok(res==E_FAIL, "returned %08x\n", res); } /* ########################### */ diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 2fdae3de523..958a8429f53 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -359,6 +359,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, if (*wk1 != '/') {state = 6; break;} *wk2++ = *wk1++; if((dwFlags & URL_FILE_USE_PATHURL) && nByteLen >= sizeof(wszLocalhost) + && !strncmpW(wszFile, pszUrl, sizeof(wszFile)/sizeof(WCHAR)) && !memcmp(wszLocalhost, wk1, sizeof(wszLocalhost))){ wk1 += sizeof(wszLocalhost)/sizeof(WCHAR); while(*wk1 == '\\' && (dwFlags & URL_FILE_USE_PATHURL)) @@ -2051,6 +2052,9 @@ HRESULT WINAPI UrlGetPartA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, LPWSTR in, out; DWORD ret, len, len2; + if(!pszIn || !pszOut || !pcchOut || *pcchOut <= 0) + return E_INVALIDARG; + in = HeapAlloc(GetProcessHeap(), 0, (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR)); out = in + INTERNET_MAX_URL_LENGTH; @@ -2067,7 +2071,7 @@ HRESULT WINAPI UrlGetPartA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, len2 = WideCharToMultiByte(0, 0, out, len, 0, 0, 0, 0); if (len2 > *pcchOut) { - *pcchOut = len2; + *pcchOut = len2+1; HeapFree(GetProcessHeap(), 0, in); return E_POINTER; } @@ -2093,20 +2097,25 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, TRACE("(%s %p %p(%d) %08x %08x)\n", debugstr_w(pszIn), pszOut, pcchOut, *pcchOut, dwPart, dwFlags); + if(!pszIn || !pszOut || !pcchOut || *pcchOut <= 0) + return E_INVALIDARG; + + *pszOut = '\0'; + addr = strchrW(pszIn, ':'); if(!addr) - return E_FAIL; - - scheme = get_scheme_code(pszIn, addr-pszIn); + scheme = URL_SCHEME_UNKNOWN; + else + scheme = get_scheme_code(pszIn, addr-pszIn); ret = URL_ParseUrl(pszIn, &pl); - if (ret == S_OK) { - schaddr = pl.pScheme; - schsize = pl.szScheme; switch (dwPart) { case URL_PART_SCHEME: - if (!pl.szScheme) return E_INVALIDARG; + if (!pl.szScheme || scheme == URL_SCHEME_UNKNOWN) { + *pcchOut = 0; + return S_FALSE; + } addr = pl.pScheme; size = pl.szScheme; break; @@ -2121,55 +2130,76 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, case URL_SCHEME_HTTPS: break; default: + *pcchOut = 0; return E_FAIL; } if(scheme==URL_SCHEME_FILE && (!pl.szHostName || (pl.szHostName==1 && *(pl.pHostName+1)==':'))) { - if(pcchOut) - *pszOut = '\0'; *pcchOut = 0; return S_FALSE; } - if (!pl.szHostName) return E_INVALIDARG; + if (!pl.szHostName) { + *pcchOut = 0; + return S_FALSE; + } addr = pl.pHostName; size = pl.szHostName; break; case URL_PART_USERNAME: - if (!pl.szUserName) return E_INVALIDARG; + if (!pl.szUserName) { + *pcchOut = 0; + return S_FALSE; + } addr = pl.pUserName; size = pl.szUserName; break; case URL_PART_PASSWORD: - if (!pl.szPassword) return E_INVALIDARG; + if (!pl.szPassword) { + *pcchOut = 0; + return S_FALSE; + } addr = pl.pPassword; size = pl.szPassword; break; case URL_PART_PORT: - if (!pl.szPort) return E_INVALIDARG; + if (!pl.szPort) { + *pcchOut = 0; + return S_FALSE; + } addr = pl.pPort; size = pl.szPort; break; case URL_PART_QUERY: - if (!pl.szQuery) return E_INVALIDARG; + if (!pl.szQuery) { + *pcchOut = 0; + return S_FALSE; + } addr = pl.pQuery; size = pl.szQuery; break; default: + *pcchOut = 0; return E_INVALIDARG; } if (dwFlags == URL_PARTFLAG_KEEPSCHEME) { + if(!pl.pScheme || !pl.szScheme) { + *pcchOut = 0; + return E_FAIL; + } + schaddr = pl.pScheme; + schsize = pl.szScheme; if (*pcchOut < schsize + size + 2) { *pcchOut = schsize + size + 2; - return E_POINTER; - } + return E_POINTER; + } memcpy(pszOut, schaddr, schsize*sizeof(WCHAR)); pszOut[schsize] = ':'; memcpy(pszOut+schsize+1, addr, size*sizeof(WCHAR)); @@ -2183,12 +2213,6 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, *pcchOut = size; } TRACE("len=%d %s\n", *pcchOut, debugstr_w(pszOut)); - }else if(dwPart==URL_PART_HOSTNAME && scheme==URL_SCHEME_FILE) { - if(*pcchOut) - *pszOut = '\0'; - *pcchOut = 0; - return S_FALSE; - } return ret; } diff --git a/dlls/slbcsp/Makefile.in b/dlls/slbcsp/Makefile.in index f42320b02ba..ae4d1282fde 100644 --- a/dlls/slbcsp/Makefile.in +++ b/dlls/slbcsp/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/slc/Makefile.in b/dlls/slc/Makefile.in index 9baa876422c..dfc15e783f6 100644 --- a/dlls/slc/Makefile.in +++ b/dlls/slc/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ slc.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/snmpapi/Makefile.in b/dlls/snmpapi/Makefile.in index a9e5420c267..3eb4ee144e3 100644 --- a/dlls/snmpapi/Makefile.in +++ b/dlls/snmpapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/snmpapi/tests/Makefile.in b/dlls/snmpapi/tests/Makefile.in index 7fec0f1fcaa..86ce182dd58 100644 --- a/dlls/snmpapi/tests/Makefile.in +++ b/dlls/snmpapi/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ util.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/softpub/Makefile.in b/dlls/softpub/Makefile.in index 8166939c033..34189ee0bee 100644 --- a/dlls/softpub/Makefile.in +++ b/dlls/softpub/Makefile.in @@ -6,5 +6,3 @@ MODULE = softpub.dll IMPORTS = wintrust kernel32 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sound.drv16/Makefile.in b/dlls/sound.drv16/Makefile.in index 8e43a7d443b..9b93b30a251 100644 --- a/dlls/sound.drv16/Makefile.in +++ b/dlls/sound.drv16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,winmm.dll C_SRCS = sound.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/spoolss/Makefile.in b/dlls/spoolss/Makefile.in index 646a11d6f7e..325cece5fa6 100644 --- a/dlls/spoolss/Makefile.in +++ b/dlls/spoolss/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ spoolss_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/spoolss/tests/Makefile.in b/dlls/spoolss/tests/Makefile.in index dcb2153744c..c3c457d900a 100644 --- a/dlls/spoolss/tests/Makefile.in +++ b/dlls/spoolss/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ spoolss.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/stdole2.tlb/Makefile.in b/dlls/stdole2.tlb/Makefile.in index 765a0bac6d0..81fc482ca2f 100644 --- a/dlls/stdole2.tlb/Makefile.in +++ b/dlls/stdole2.tlb/Makefile.in @@ -9,5 +9,3 @@ RC_SRCS = rsrc.rc IDL_TLB_SRCS = std_ole_v2.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/stdole32.tlb/Makefile.in b/dlls/stdole32.tlb/Makefile.in index a5815d4fadf..d38d37c91ba 100644 --- a/dlls/stdole32.tlb/Makefile.in +++ b/dlls/stdole32.tlb/Makefile.in @@ -9,5 +9,3 @@ RC_SRCS = rsrc.rc IDL_TLB_SRCS = std_ole_v1.idl @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sti/Makefile.in b/dlls/sti/Makefile.in index 247c1e19a17..03f32d4c427 100644 --- a/dlls/sti/Makefile.in +++ b/dlls/sti/Makefile.in @@ -18,5 +18,3 @@ IDL_P_SRCS = \ EXTRA_OBJS = dlldata.o @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sti/tests/Makefile.in b/dlls/sti/tests/Makefile.in index c7da0b68ade..754a3f75110 100644 --- a/dlls/sti/tests/Makefile.in +++ b/dlls/sti/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ sti.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/storage.dll16/Makefile.in b/dlls/storage.dll16/Makefile.in index ab2716b83ac..f6793d3308b 100644 --- a/dlls/storage.dll16/Makefile.in +++ b/dlls/storage.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ole32.dll C_SRCS = storage.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/stress.dll16/Makefile.in b/dlls/stress.dll16/Makefile.in index e4f17ac02ea..faae603f1d3 100644 --- a/dlls/stress.dll16/Makefile.in +++ b/dlls/stress.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = stress.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/strmiids/Makefile.in b/dlls/strmiids/Makefile.in index fb9d996709d..f0cbdd11392 100644 --- a/dlls/strmiids/Makefile.in +++ b/dlls/strmiids/Makefile.in @@ -8,5 +8,3 @@ C_SRCS = \ strmiids.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/svrapi/Makefile.in b/dlls/svrapi/Makefile.in index 7db585d0176..4612d4e9e25 100644 --- a/dlls/svrapi/Makefile.in +++ b/dlls/svrapi/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ svrapi_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/sxs/Makefile.in b/dlls/sxs/Makefile.in index da028e4071b..66e42aaf949 100644 --- a/dlls/sxs/Makefile.in +++ b/dlls/sxs/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ sxs.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/system.drv16/Makefile.in b/dlls/system.drv16/Makefile.in index ac04f5064ca..9b5273e7dfb 100644 --- a/dlls/system.drv16/Makefile.in +++ b/dlls/system.drv16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = system.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/t2embed/Makefile.in b/dlls/t2embed/Makefile.in index 3445c0cc168..e85805a8f63 100644 --- a/dlls/t2embed/Makefile.in +++ b/dlls/t2embed/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/tapi32/Makefile.in b/dlls/tapi32/Makefile.in index 8d5f5654795..11176209e35 100644 --- a/dlls/tapi32/Makefile.in +++ b/dlls/tapi32/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ phone.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/toolhelp.dll16/Makefile.in b/dlls/toolhelp.dll16/Makefile.in index 81630378d1c..7ab487e847d 100644 --- a/dlls/toolhelp.dll16/Makefile.in +++ b/dlls/toolhelp.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = toolhelp.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/traffic/Makefile.in b/dlls/traffic/Makefile.in index 9af37e2c91a..6c6fc9f1d32 100644 --- a/dlls/traffic/Makefile.in +++ b/dlls/traffic/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ traffic_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/twain.dll16/Makefile.in b/dlls/twain.dll16/Makefile.in index 09c6ff7c736..85b51d57a7a 100644 --- a/dlls/twain.dll16/Makefile.in +++ b/dlls/twain.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,twain_32.dll C_SRCS = twain.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/twain_32/Makefile.in b/dlls/twain_32/Makefile.in index 17151c0094c..bc46aad3e84 100644 --- a/dlls/twain_32/Makefile.in +++ b/dlls/twain_32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ twain32_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/twain_32/tests/Makefile.in b/dlls/twain_32/tests/Makefile.in index 47e38c15ab2..d07d11ee6e3 100644 --- a/dlls/twain_32/tests/Makefile.in +++ b/dlls/twain_32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ dsm.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/typelib.dll16/Makefile.in b/dlls/typelib.dll16/Makefile.in index 37ebe953beb..9126d3ee06d 100644 --- a/dlls/typelib.dll16/Makefile.in +++ b/dlls/typelib.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,oleaut32.dll C_SRCS = typelib.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/unicows/Makefile.in b/dlls/unicows/Makefile.in index bc7f8db377a..5dd15fa9024 100644 --- a/dlls/unicows/Makefile.in +++ b/dlls/unicows/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = avicap32 msvfw32 oledlg comdlg32 shell32 winmm winspool \ rasapi32 secur32 sensapi version user32 mpr gdi32 advapi32 kernel32 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/updspapi/Makefile.in b/dlls/updspapi/Makefile.in index 5f4182fa09b..8ba88805049 100644 --- a/dlls/updspapi/Makefile.in +++ b/dlls/updspapi/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/url/Makefile.in b/dlls/url/Makefile.in index 63e22284814..7d82d89ee2a 100644 --- a/dlls/url/Makefile.in +++ b/dlls/url/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = shell32 shlwapi kernel32 C_SRCS = url_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/urlmon/Makefile.in b/dlls/urlmon/Makefile.in index 6a9182c7bd2..419745b7131 100644 --- a/dlls/urlmon/Makefile.in +++ b/dlls/urlmon/Makefile.in @@ -39,5 +39,3 @@ IDL_P_SRCS = urlmon_urlmon.idl EXTRA_OBJS = dlldata.o @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/urlmon/internet.c b/dlls/urlmon/internet.c index 6a79e48b526..3d41defe8f6 100644 --- a/dlls/urlmon/internet.c +++ b/dlls/urlmon/internet.c @@ -405,3 +405,12 @@ HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST feature, DWORD fl FIXME("%d, 0x%08x, %x, stub\n", feature, flags, enable); return E_NOTIMPL; } + +/*********************************************************************** + * CoInternetIsFeatureEnabled (URLMON.@) + */ +HRESULT WINAPI CoInternetIsFeatureEnabled(INTERNETFEATURELIST feature, DWORD flags) +{ + FIXME("%d, 0x%08x, stub\n", feature, flags); + return E_NOTIMPL; +} diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 81f2f507d0d..f984aa4e907 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -1287,11 +1287,13 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA return S_OK; } - hres = CoInternetParseUrl(url, PARSE_ROOTDOCUMENT, 0, domain, 0, &len, 0); - if(hres == S_FALSE) { - hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, domain, - INTERNET_MAX_URL_LENGTH, &len, 0); - if(hres == S_OK) { + hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, domain, + INTERNET_MAX_URL_LENGTH, &len, 0); + if(hres == S_OK){ + const WCHAR fileW[] = {'f','i','l','e',0}; + if(!strcmpW(domain, fileW)){ + hres = CoInternetParseUrl(url, PARSE_ROOTDOCUMENT, 0, domain, INTERNET_MAX_URL_LENGTH, &len, 0); + }else{ domain[len] = ':'; hres = CoInternetParseUrl(url, PARSE_DOMAIN, 0, domain+len+1, INTERNET_MAX_URL_LENGTH-len-1, &len, 0); @@ -1305,7 +1307,8 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA return S_OK; } } - } + }else + return hres; len = lstrlenW(url)+1; *ppwzSecUrl = CoTaskMemAlloc(len*sizeof(WCHAR)); diff --git a/dlls/urlmon/tests/Makefile.in b/dlls/urlmon/tests/Makefile.in index 61c28336c4f..3f621d6f48e 100644 --- a/dlls/urlmon/tests/Makefile.in +++ b/dlls/urlmon/tests/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ url.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index d4d6b47e5ab..668aa9b7109 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -26,7 +26,13 @@ typedef struct { LONG ref; } Uri; -#define URI(x) ((IUri*) &(x)->lpIUriVtbl) +typedef struct { + const IUriBuilderVtbl *lpIUriBuilderVtbl; + LONG ref; +} UriBuilder; + +#define URI(x) ((IUri*) &(x)->lpIUriVtbl) +#define URIBUILDER(x) ((IUriBuilder*) &(x)->lpIUriBuilderVtbl) #define URI_THIS(iface) DEFINE_THIS(Uri, IUri, iface) @@ -300,3 +306,273 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU *ppURI = URI(ret); return S_OK; } + +#define URIBUILDER_THIS(iface) DEFINE_THIS(UriBuilder, IUriBuilder, iface) + +static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void **ppv) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = URIBUILDER(This); + }else if(IsEqualGUID(&IID_IUriBuilder, riid)) { + TRACE("(%p)->(IID_IUri %p)\n", This, ppv); + *ppv = URIBUILDER(This); + }else { + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if(!ref) + heap_free(This); + + return ref; +} + +static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface, + DWORD dwAllowEncodingPropertyMask, + DWORD_PTR dwReserved, + IUri **ppIUri) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%d %d %p)\n", This, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface, + DWORD dwCreateFlags, + DWORD dwAllowEncodingPropertyMask, + DWORD_PTR dwReserved, + IUri **ppIUri) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(0x%08x %d %d %p)\n", This, dwCreateFlags, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface, + DWORD dwCreateFlags, + DWORD dwUriBuilderFlags, + DWORD dwAllowEncodingPropertyMask, + DWORD_PTR dwReserved, + IUri **ppIUri) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(0x%08x 0x%08x %d %d %p)\n", This, dwCreateFlags, dwUriBuilderFlags, + dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppIUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p)\n", This, pIUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment, LPCWSTR *ppwzFragment) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchFragment, ppwzFragment); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR *ppwzHost) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchHost, ppwzHost); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword, LPCWSTR *ppwzPassword) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchPassword, ppwzPassword); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR *ppwzPath) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchPath, ppwzPath); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD *pdwPort) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pfHasPort, pdwPort); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR *ppwzQuery) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchQuery, ppwzQuery); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName, LPCWSTR *ppwzSchemeName) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchSchemeName, ppwzSchemeName); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName, LPCWSTR *ppwzUserName) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pcchUserName, ppwzUserName); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD dwNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%d %d)\n", This, fHasPort, dwNewValue); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue)); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPropertyMask) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(0x%08x)\n", This, dwPropertyMask); + return E_NOTIMPL; +} + +static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified) +{ + UriBuilder *This = URIBUILDER_THIS(iface); + FIXME("(%p)->(%p)\n", This, pfModified); + return E_NOTIMPL; +} + +#undef URIBUILDER_THIS + +static const IUriBuilderVtbl UriBuilderVtbl = { + UriBuilder_QueryInterface, + UriBuilder_AddRef, + UriBuilder_Release, + UriBuilder_CreateUriSimple, + UriBuilder_CreateUri, + UriBuilder_CreateUriWithFlags, + UriBuilder_GetIUri, + UriBuilder_SetIUri, + UriBuilder_GetFragment, + UriBuilder_GetHost, + UriBuilder_GetPassword, + UriBuilder_GetPath, + UriBuilder_GetPort, + UriBuilder_GetQuery, + UriBuilder_GetSchemeName, + UriBuilder_GetUserName, + UriBuilder_SetFragment, + UriBuilder_SetHost, + UriBuilder_SetPassword, + UriBuilder_SetPath, + UriBuilder_SetPort, + UriBuilder_SetQuery, + UriBuilder_SetSchemeName, + UriBuilder_SetUserName, + UriBuilder_RemoveProperties, + UriBuilder_HasBeenModified, +}; + +/*********************************************************************** + * CreateIUriBuilder (urlmon.@) + */ +HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder) +{ + UriBuilder *ret; + + TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved, ppIUriBuilder); + + ret = heap_alloc(sizeof(UriBuilder)); + if(!ret) + return E_OUTOFMEMORY; + + ret->lpIUriBuilderVtbl = &UriBuilderVtbl; + ret->ref = 1; + + *ppIUriBuilder = URIBUILDER(ret); + return S_OK; +} diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index a67004a9b0b..e79850c4f19 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -17,6 +17,7 @@ @ stub CoInternetGetProtocolFlags @ stdcall CoInternetGetSecurityUrl(ptr ptr long long) @ stdcall CoInternetGetSession(long ptr long) +@ stdcall CoInternetIsFeatureEnabled(long long) @ stdcall CoInternetParseUrl(wstr long long wstr long ptr long) @ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long) @ stdcall CoInternetSetFeatureEnabled(long long long) @@ -26,6 +27,7 @@ @ stdcall CreateAsyncBindCtx(long ptr ptr ptr) @ stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long) @ stdcall CreateFormatEnumerator(long ptr ptr) +@ stdcall CreateIUriBuilder(ptr long long ptr) @ stdcall CreateUri(wstr long long ptr) @ stdcall CreateURLMoniker(ptr wstr ptr) @ stdcall CreateURLMonikerEx(ptr wstr ptr long) diff --git a/dlls/usbd.sys/Makefile.in b/dlls/usbd.sys/Makefile.in new file mode 100644 index 00000000000..9fe2fedede5 --- /dev/null +++ b/dlls/usbd.sys/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = usbd.sys +IMPORTLIB = usbd.sys +IMPORTS = kernel32 ntoskrnl.exe +EXTRADLLFLAGS = -Wb,--subsystem,native + +C_SRCS = \ + usbd.c + +@MAKE_DLL_RULES@ diff --git a/dlls/usbd.sys/usbd.c b/dlls/usbd.sys/usbd.c new file mode 100644 index 00000000000..daeb5c0131d --- /dev/null +++ b/dlls/usbd.sys/usbd.c @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2010 Damjan Jovanovic + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winternl.h" +#include "ddk/wdm.h" +#include "ddk/usb.h" +#include "ddk/usbdlib.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(usbd); + +PUSB_INTERFACE_DESCRIPTOR WINAPI USBD_ParseConfigurationDescriptorEx( + PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + PVOID StartPosition, LONG InterfaceNumber, + LONG AlternateSetting, LONG InterfaceClass, + LONG InterfaceSubClass, LONG InterfaceProtocol ) +{ + /* http://blogs.msdn.com/usbcoreblog/archive/2009/12/12/ + * what-is-the-right-way-to-validate-and-parse-configuration-descriptors.aspx + */ + + PUSB_INTERFACE_DESCRIPTOR interface; + + TRACE( "(%p, %p, %d, %d, %d, %d, %d)\n", ConfigurationDescriptor, + StartPosition, InterfaceNumber, AlternateSetting, + InterfaceClass, InterfaceSubClass, InterfaceProtocol ); + + interface = (PUSB_INTERFACE_DESCRIPTOR) USBD_ParseDescriptors( + ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, + StartPosition, USB_INTERFACE_DESCRIPTOR_TYPE ); + while (interface != NULL) + { + if ((InterfaceNumber == -1 || interface->bInterfaceNumber == InterfaceNumber) && + (AlternateSetting == -1 || interface->bAlternateSetting == AlternateSetting) && + (InterfaceClass == -1 || interface->bInterfaceClass == InterfaceClass) && + (InterfaceSubClass == -1 || interface->bInterfaceSubClass == InterfaceSubClass) && + (InterfaceProtocol == -1 || interface->bInterfaceProtocol == InterfaceProtocol)) + { + return interface; + } + interface = (PUSB_INTERFACE_DESCRIPTOR) USBD_ParseDescriptors( + ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, + interface + 1, USB_INTERFACE_DESCRIPTOR_TYPE ); + } + return NULL; +} + +PUSB_COMMON_DESCRIPTOR WINAPI USBD_ParseDescriptors( + PVOID DescriptorBuffer, + ULONG TotalLength, + PVOID StartPosition, + LONG DescriptorType ) +{ + PUSB_COMMON_DESCRIPTOR common; + + TRACE( "(%p, %u, %p, %d)\n", DescriptorBuffer, TotalLength, StartPosition, DescriptorType ); + + for (common = (PUSB_COMMON_DESCRIPTOR)DescriptorBuffer; + ((char*)common) + sizeof(USB_COMMON_DESCRIPTOR) <= ((char*)DescriptorBuffer) + TotalLength; + common = (PUSB_COMMON_DESCRIPTOR)(((char*)common) + common->bLength)) + { + if (StartPosition <= (PVOID)common && common->bDescriptorType == DescriptorType) + return common; + } + return NULL; +} + +ULONG WINAPI USBD_GetInterfaceLength( + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor, + PUCHAR BufferEnd ) +{ + PUSB_COMMON_DESCRIPTOR common; + ULONG total = InterfaceDescriptor->bLength; + + TRACE( "(%p, %p)\n", InterfaceDescriptor, BufferEnd ); + + for (common = (PUSB_COMMON_DESCRIPTOR)(InterfaceDescriptor + 1); + (((PUCHAR)common) + sizeof(USB_COMMON_DESCRIPTOR)) <= BufferEnd && + common->bDescriptorType != USB_INTERFACE_DESCRIPTOR_TYPE; + common = (PUSB_COMMON_DESCRIPTOR)(((char*)common) + common->bLength)) + { + total += common->bLength; + } + return total; +} + +NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) +{ + TRACE( "(%p, %s)\n", driver, debugstr_w(path->Buffer) ); + return STATUS_SUCCESS; +} diff --git a/dlls/usbd.sys/usbd.sys.spec b/dlls/usbd.sys/usbd.sys.spec new file mode 100644 index 00000000000..47e0bdb0bc5 --- /dev/null +++ b/dlls/usbd.sys/usbd.sys.spec @@ -0,0 +1,33 @@ +@ stub USBD_CreateConfigurationRequestEx +@ stdcall USBD_ParseConfigurationDescriptorEx(ptr ptr long long long long long) +@ stdcall USBD_ParseDescriptors(ptr long ptr long) +@ stub USBD_AllocateDeviceName +@ stub USBD_CalculateUsbBandwidth +@ stub USBD_CompleteRequest +@ stub USBD_CreateConfigurationRequest +@ stub _USBD_CreateConfigurationRequestEx@8 +@ stub USBD_CreateDevice +@ stub USBD_Debug_GetHeap +@ stub USBD_Debug_LogEntry +@ stub USBD_Debug_RetHeap +@ stub USBD_Dispatch +@ stub USBD_FreeDeviceMutex +@ stub USBD_FreeDeviceName +@ stub USBD_GetDeviceInformation +@ stdcall USBD_GetInterfaceLength(ptr ptr) +@ stub USBD_GetPdoRegistryParameter +@ stub USBD_GetSuspendPowerState +@ stub USBD_GetUSBDIVersion +@ stub USBD_InitializeDevice +@ stub USBD_MakePdoName +@ stub USBD_ParseConfigurationDescriptor +@ stdcall _USBD_ParseConfigurationDescriptorEx@28(ptr ptr long long long long long) USBD_ParseConfigurationDescriptorEx +@ stdcall _USBD_ParseDescriptors@16(ptr long ptr long) USBD_ParseDescriptors +@ stub USBD_QueryBusTime +@ stub USBD_RegisterHcDeviceCapabilities +@ stub USBD_RegisterHcFilter +@ stub USBD_RegisterHostController +@ stub USBD_RemoveDevice +@ stub USBD_RestoreDevice +@ stub USBD_SetSuspendPowerState +@ stub USBD_WaitDeviceMutex diff --git a/dlls/user.exe16/Makefile.in b/dlls/user.exe16/Makefile.in index e5015cbda1e..c0ac137b571 100644 --- a/dlls/user.exe16/Makefile.in +++ b/dlls/user.exe16/Makefile.in @@ -20,5 +20,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/user32/Makefile.in b/dlls/user32/Makefile.in index aa5d7f8f7fa..ed0533ae64c 100644 --- a/dlls/user32/Makefile.in +++ b/dlls/user32/Makefile.in @@ -91,5 +91,3 @@ SVG_SRCS = resources/oic_winlogo.svg EXTRASUBDIRS = resources @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index a003cb06e93..0a9a89560de 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -765,6 +765,7 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, int sizeAnd, sizeXor; HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */ BITMAP bmpXor, bmpAnd; + BOOL do_stretch; INT size; BITMAPINFO *pSrcInfo, *pDestInfo; @@ -788,10 +789,11 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, if (!width) width = bmi->bmiHeader.biWidth; if (!height) height = bmi->bmiHeader.biHeight/2; + do_stretch = (bmi->bmiHeader.biHeight/2 != height) || + (bmi->bmiHeader.biWidth != width); /* Scale the hotspot */ - if (((bmi->bmiHeader.biHeight/2 != height) || (bmi->bmiHeader.biWidth != width)) && - hotspot.x != ICON_HOTSPOT && hotspot.y != ICON_HOTSPOT) + if (do_stretch && hotspot.x != ICON_HOTSPOT && hotspot.y != ICON_HOTSPOT) { hotspot.x = (hotspot.x * width) / bmi->bmiHeader.biWidth; hotspot.y = (hotspot.y * height) / (bmi->bmiHeader.biHeight / 2); @@ -842,16 +844,30 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, } else { - hXorBits = CreateCompatibleBitmap(screen_dc, width, height); - - if(hXorBits) + if (do_stretch) { - if(!stretch_blt_icon(hXorBits, pDestInfo, pSrcInfo, (char*)bmi + size)) + hXorBits = CreateCompatibleBitmap(screen_dc, width, height); + if (hXorBits) { - DeleteObject(hXorBits); - hXorBits = 0; + if (!stretch_blt_icon(hXorBits, pDestInfo, pSrcInfo, (char*)bmi + size)) + { + DeleteObject(hXorBits); + hXorBits = 0; + } } } + else + { + if (is_dib_monochrome(bmi)) + { + hXorBits = CreateBitmap(width, height, 1, 1, NULL); + SetDIBits(screen_dc, hXorBits, 0, height, + (char *)bmi + size, pSrcInfo, DIB_RGB_COLORS); + } + else + hXorBits = CreateDIBitmap(screen_dc, &pSrcInfo->bmiHeader, + CBM_INIT, (char *)bmi + size, pSrcInfo, DIB_RGB_COLORS); + } } if( hXorBits ) @@ -879,12 +895,21 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, } /* Create the AND bitmap */ - hAndBits = CreateBitmap(width, height, 1, 1, NULL); + if (do_stretch) + { + hAndBits = CreateBitmap(width, height, 1, 1, NULL); - if(!stretch_blt_icon(hAndBits, pDestInfo, pSrcInfo, xbits)) + if (!stretch_blt_icon(hAndBits, pDestInfo, pSrcInfo, xbits)) + { + DeleteObject(hAndBits); + hAndBits = 0; + } + } + else { - DeleteObject(hAndBits); - hAndBits = 0; + hAndBits = CreateBitmap(width, height, 1, 1, NULL); + SetDIBits(screen_dc, hAndBits, 0, height, + xbits, pSrcInfo, DIB_RGB_COLORS); } if( !hAndBits ) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 22d236eeeb9..f14590d1cbc 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -208,8 +208,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetCursorPos( POINT *pt ) BOOL WINAPI GetCursorInfo( PCURSORINFO pci ) { if (!pci) return 0; - if (get_user_thread_info()->cursor_count >= 0) pci->flags = CURSOR_SHOWING; - else pci->flags = 0; + pci->hCursor = LoadCursorW( 0, (LPCWSTR)IDC_ARROW ); + pci->flags = CURSOR_SHOWING; GetCursorPos(&pci->ptScreenPos); return 1; } diff --git a/dlls/user32/tests/Makefile.in b/dlls/user32/tests/Makefile.in index 5b6ce7eb043..9018b40d7b6 100644 --- a/dlls/user32/tests/Makefile.in +++ b/dlls/user32/tests/Makefile.in @@ -34,5 +34,3 @@ C_SRCS = \ RC_SRCS = resource.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index ff86cd0d1ab..650e5fcaffd 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -64,6 +64,8 @@ static HANDLE child_process; #define PROC_INIT (WM_USER+1) +static BOOL (WINAPI *pGetCursorInfo)(CURSORINFO *); + static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { BOOL ret; @@ -1353,6 +1355,250 @@ cleanup: DeleteDC(hdcDst); } +static DWORD parent_id; + +static DWORD CALLBACK set_cursor_thread( void *arg ) +{ + HCURSOR ret; + + PeekMessage( 0, 0, 0, 0, PM_NOREMOVE ); /* create a msg queue */ + if (parent_id) + { + BOOL ret = AttachThreadInput( GetCurrentThreadId(), parent_id, TRUE ); + ok( ret, "AttachThreadInput failed\n" ); + } + if (arg) ret = SetCursor( (HCURSOR)arg ); + else ret = GetCursor(); + return (DWORD_PTR)ret; +} + +static void test_SetCursor(void) +{ + static const BYTE bmp_bits[4096]; + ICONINFO cursorInfo; + HCURSOR cursor, old_cursor, global_cursor = 0; + DWORD error, id, result; + UINT display_bpp; + HDC hdc; + HANDLE thread; + CURSORINFO info; + + if (pGetCursorInfo) + { + memset( &info, 0, sizeof(info) ); + info.cbSize = sizeof(info); + if (!pGetCursorInfo( &info )) + { + win_skip( "GetCursorInfo not working\n" ); + pGetCursorInfo = NULL; + } + else global_cursor = info.hCursor; + } + cursor = GetCursor(); + thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)cursor, "wrong thread cursor %x/%p\n", result, cursor ); + + hdc = GetDC(0); + display_bpp = GetDeviceCaps(hdc, BITSPIXEL); + ReleaseDC(0, hdc); + + cursorInfo.fIcon = FALSE; + cursorInfo.xHotspot = 0; + cursorInfo.yHotspot = 0; + cursorInfo.hbmMask = CreateBitmap(32, 32, 1, 1, bmp_bits); + cursorInfo.hbmColor = CreateBitmap(32, 32, 1, display_bpp, bmp_bits); + + cursor = CreateIconIndirect(&cursorInfo); + ok(cursor != NULL, "CreateIconIndirect returned %p\n", cursor); + old_cursor = SetCursor( cursor ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + /* global cursor doesn't change since we don't have a window */ + ok( info.hCursor == global_cursor || broken(info.hCursor != cursor), /* win9x */ + "wrong info cursor %p/%p\n", info.hCursor, global_cursor ); + } + thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + + SetCursor( 0 ); + ok( GetCursor() == 0, "wrong cursor %p\n", GetCursor() ); + thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + + thread = CreateThread( NULL, 0, set_cursor_thread, cursor, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + ok( GetCursor() == 0, "wrong cursor %p/0\n", GetCursor() ); + + parent_id = GetCurrentThreadId(); + thread = CreateThread( NULL, 0, set_cursor_thread, cursor, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + todo_wine ok( GetCursor() == cursor, "wrong cursor %p/0\n", cursor ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.hCursor == global_cursor || broken(info.hCursor != cursor), /* win9x */ + "wrong info cursor %p/%p\n", info.hCursor, global_cursor ); + } + SetCursor( old_cursor ); + DestroyCursor( cursor ); + + SetLastError( 0xdeadbeef ); + cursor = SetCursor( (HCURSOR)0xbadbad ); + error = GetLastError(); + ok( cursor == 0, "wrong cursor %p/0\n", cursor ); + todo_wine ok( error == ERROR_INVALID_CURSOR_HANDLE || broken( error == 0xdeadbeef ), /* win9x */ + "wrong error %u\n", error ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.hCursor == global_cursor || broken(info.hCursor != cursor), /* win9x */ + "wrong info cursor %p/%p\n", info.hCursor, global_cursor ); + } +} + +static HANDLE event_start, event_next; + +static DWORD CALLBACK show_cursor_thread( void *arg ) +{ + DWORD count = (DWORD_PTR)arg; + int ret; + + PeekMessage( 0, 0, 0, 0, PM_NOREMOVE ); /* create a msg queue */ + if (parent_id) + { + BOOL ret = AttachThreadInput( GetCurrentThreadId(), parent_id, TRUE ); + ok( ret, "AttachThreadInput failed\n" ); + } + if (!count) ret = ShowCursor( FALSE ); + else while (count--) ret = ShowCursor( TRUE ); + SetEvent( event_start ); + WaitForSingleObject( event_next, 2000 ); + return ret; +} + +static void test_ShowCursor(void) +{ + int count; + DWORD id, result; + HANDLE thread; + CURSORINFO info; + + if (pGetCursorInfo) + { + memset( &info, 0, sizeof(info) ); + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } + + event_start = CreateEvent( NULL, FALSE, FALSE, NULL ); + event_next = CreateEvent( NULL, FALSE, FALSE, NULL ); + + count = ShowCursor( TRUE ); + ok( count == 1, "wrong count %d\n", count ); + count = ShowCursor( TRUE ); + ok( count == 2, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == 1, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == 0, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == -1, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == -2, "wrong count %d\n", count ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + /* global show count is not affected since we don't have a window */ + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } + + parent_id = 0; + thread = CreateThread( NULL, 0, show_cursor_thread, NULL, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( FALSE ); + ok( count == -3, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == -1, "wrong thread count %d\n", result ); + count = ShowCursor( FALSE ); + ok( count == -4, "wrong count %d\n", count ); + + thread = CreateThread( NULL, 0, show_cursor_thread, (void *)1, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( TRUE ); + ok( count == -3, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == 1, "wrong thread count %d\n", result ); + count = ShowCursor( TRUE ); + ok( count == -2, "wrong count %d\n", count ); + + parent_id = GetCurrentThreadId(); + thread = CreateThread( NULL, 0, show_cursor_thread, NULL, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( TRUE ); + todo_wine ok( count == -2, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + todo_wine ok( result == -3, "wrong thread count %d\n", result ); + count = ShowCursor( FALSE ); + ok( count == -2, "wrong count %d\n", count ); + + thread = CreateThread( NULL, 0, show_cursor_thread, (void *)3, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( TRUE ); + todo_wine ok( count == 2, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + todo_wine ok( result == 1, "wrong thread count %d\n", result ); + count = ShowCursor( FALSE ); + ok( count == -2, "wrong count %d\n", count ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } + + count = ShowCursor( TRUE ); + ok( count == -1, "wrong count %d\n", count ); + count = ShowCursor( TRUE ); + ok( count == 0, "wrong count %d\n", count ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } +} + + static void test_DestroyCursor(void) { static const BYTE bmp_bits[4096]; @@ -1435,6 +1681,7 @@ static void test_DestroyCursor(void) START_TEST(cursoricon) { + pGetCursorInfo = (void *)GetProcAddress( GetModuleHandleA("user32.dll"), "GetCursorInfo" ); test_argc = winetest_get_mainargs(&test_argv); if (test_argc >= 3) @@ -1463,6 +1710,8 @@ START_TEST(cursoricon) test_DrawIcon(); test_DrawIconEx(); test_DrawState(); + test_SetCursor(); + test_ShowCursor(); test_DestroyCursor(); do_parent(); test_child_process(); diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 03ff8f5b0e2..af0fa497ccc 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2476,10 +2476,39 @@ static void test_SetActiveWindow(HWND hwnd) check_wnd_state(hwnd, hwnd, hwnd, 0); } +struct create_window_thread_params +{ + HWND window; + HANDLE window_created; + HANDLE test_finished; +}; + +static DWORD WINAPI create_window_thread(void *param) +{ + struct create_window_thread_params *p = param; + DWORD res; + BOOL ret; + + p->window = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0); + + ret = SetEvent(p->window_created); + ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(p->test_finished, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + + DestroyWindow(p->window); + return 0; +} + static void test_SetForegroundWindow(HWND hwnd) { + struct create_window_thread_params thread_params; + HANDLE thread; + DWORD res, tid; BOOL ret; HWND hwnd2; + MSG msg; flush_events( TRUE ); ShowWindow(hwnd, SW_HIDE); @@ -2552,6 +2581,34 @@ static void test_SetForegroundWindow(HWND hwnd) DestroyWindow(hwnd2); check_wnd_state(hwnd, hwnd, hwnd, 0); + + hwnd2 = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0); + check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + + thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid); + ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + res = WaitForSingleObject(thread_params.window_created, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + check_wnd_state(hwnd2, thread_params.window, hwnd2, 0); + + SetForegroundWindow(hwnd2); + check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); + if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow()); + todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus()); + + SetEvent(thread_params.test_finished); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread_params.test_finished); + CloseHandle(thread_params.window_created); + CloseHandle(thread); + DestroyWindow(hwnd2); } static WNDPROC old_button_proc; diff --git a/dlls/userenv/Makefile.in b/dlls/userenv/Makefile.in index 07bba8fa8a6..2d4420de2f8 100644 --- a/dlls/userenv/Makefile.in +++ b/dlls/userenv/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ userenv_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/userenv/tests/Makefile.in b/dlls/userenv/tests/Makefile.in index 0510a60f1a2..5c4559eb753 100644 --- a/dlls/userenv/tests/Makefile.in +++ b/dlls/userenv/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ userenv.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/usp10/Makefile.in b/dlls/usp10/Makefile.in index 0aa59cad634..cf9b33e23dc 100644 --- a/dlls/usp10/Makefile.in +++ b/dlls/usp10/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ usp10.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/usp10/tests/Makefile.in b/dlls/usp10/tests/Makefile.in index 5a2f1a80ca5..c461590d8f3 100644 --- a/dlls/usp10/tests/Makefile.in +++ b/dlls/usp10/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ usp10.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 5795e909cd6..e6c7d77516b 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -636,6 +636,78 @@ static void test_ScriptTextOut2(HDC hdc) } } +static void test_ScriptTextOut3(HDC hdc) +{ + HRESULT hr; + + int cInChars; + int cMaxItems; + SCRIPT_ITEM pItem[255]; + int pcItems; + WCHAR TestItem1[] = {' ','\r', 0}; + + SCRIPT_CACHE psc; + int cChars; + int cMaxGlyphs; + unsigned short pwOutGlyphs1[256]; + WORD pwLogClust[256]; + SCRIPT_VISATTR psva[256]; + int pcGlyphs; + int piAdvance[256]; + GOFFSET pGoffset[256]; + ABC pABC[256]; + RECT rect; + + /* This is to ensure that non exisiting glyphs are translated into a valid glyph number */ + cInChars = 2; + cMaxItems = 255; + hr = ScriptItemize(TestItem1, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); + ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); + /* This test is for the interim operation of ScriptItemize where only one SCRIPT_ITEM is * + * returned. */ + ok (pcItems > 0, "The number of SCRIPT_ITEMS should be greater than 0\n"); + if (pcItems > 0) + ok (pItem[0].iCharPos == 0 && pItem[2].iCharPos == cInChars, + "Start pos not = 0 (%d) or end pos not = %d (%d)\n", + pItem[0].iCharPos, cInChars, pItem[2].iCharPos); + + /* It would appear that we have a valid SCRIPT_ANALYSIS and can continue + * ie. ScriptItemize has succeeded and that pItem has been set */ + cInChars = 2; + cMaxItems = 255; + if (hr == 0) { + psc = NULL; /* must be null on first call */ + cChars = cInChars; + cMaxGlyphs = cInChars; + cMaxGlyphs = 256; + hr = ScriptShape(hdc, &psc, TestItem1, cChars, + cMaxGlyphs, &pItem[0].a, + pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); + ok (hr == 0, "ScriptShape should return 0 not (%08x)\n", hr); + ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); + ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); + if (hr ==0) { + /* Note hdc is needed as glyph info is not yet in psc */ + hr = ScriptPlace(hdc, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, + pGoffset, pABC); + ok (hr == 0, "Should return 0 not (%08x)\n", hr); + + /* Test Rect Rgn is acceptable */ + rect.top = 10; + rect.bottom = 20; + rect.left = 10; + rect.right = 40; + hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, + piAdvance, NULL, pGoffset); + ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr); + + } + /* Clean up and go */ + ScriptFreeCache(&psc); + ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); + } +} + static void test_ScriptXtoX(void) /**************************************************************************************** * This routine tests the ScriptXtoCP and ScriptCPtoX functions using static variables * @@ -1334,6 +1406,7 @@ START_TEST(usp10) test_ScriptGetFontProperties(hdc); test_ScriptTextOut(hdc); test_ScriptTextOut2(hdc); + test_ScriptTextOut3(hdc); test_ScriptXtoX(); test_ScriptString(hdc); test_ScriptStringXtoCP_CPtoX(hdc); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 28984e0a11f..b9c3adbf377 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1308,7 +1308,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, { WORD glyph; if (!hdc) return E_PENDING; - if (GetGlyphIndicesW(hdc, &pwcChars[i], 1, &glyph, GGI_MARK_NONEXISTING_GLYPHS) == GDI_ERROR) return S_FALSE; + if (GetGlyphIndicesW(hdc, &pwcChars[i], 1, &glyph, 0) == GDI_ERROR) return S_FALSE; pwOutGlyphs[i] = set_cache_glyph(psc, pwcChars[i], glyph); } } diff --git a/dlls/uuid/Makefile.in b/dlls/uuid/Makefile.in index 7bd993cf351..729d36816dd 100644 --- a/dlls/uuid/Makefile.in +++ b/dlls/uuid/Makefile.in @@ -8,5 +8,3 @@ C_SRCS = \ uuid.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/uuid/uuid.c b/dlls/uuid/uuid.c index e27dcac02e8..5a1a255bd3c 100644 --- a/dlls/uuid/uuid.c +++ b/dlls/uuid/uuid.c @@ -121,6 +121,7 @@ DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529a9e6b,0x6587,0x4f23,0xab,0x9e,0x9 DEFINE_GUID(CLSID_TF_InputProcessorProfiles, 0x33c53a50,0xf456,0x4884,0xb0,0x49,0x85,0xfd,0x64,0x3e,0xcf,0xed); DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7); DEFINE_GUID(CLSID_TF_LangBarMgr, 0xebb08c45,0x6c4a,0x4fdc,0xae,0x53,0x4e,0xb8,0xc4,0xc7,0xdb,0x8e); +DEFINE_GUID(CLSID_TF_DisplayAttributeMgr, 0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53); DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90); DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31); DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14); diff --git a/dlls/uxtheme/Makefile.in b/dlls/uxtheme/Makefile.in index fb1c44d8f51..6e7dfb48334 100644 --- a/dlls/uxtheme/Makefile.in +++ b/dlls/uxtheme/Makefile.in @@ -21,5 +21,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/uxtheme/tests/Makefile.in b/dlls/uxtheme/tests/Makefile.in index 761e423e76f..3420be9ce7e 100644 --- a/dlls/uxtheme/tests/Makefile.in +++ b/dlls/uxtheme/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ system.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vdhcp.vxd/Makefile.in b/dlls/vdhcp.vxd/Makefile.in index 1659bf0911d..bec67a37a7a 100644 --- a/dlls/vdhcp.vxd/Makefile.in +++ b/dlls/vdhcp.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ vdhcp.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vdmdbg/Makefile.in b/dlls/vdmdbg/Makefile.in index 0dd4f504519..094347b2353 100644 --- a/dlls/vdmdbg/Makefile.in +++ b/dlls/vdmdbg/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ vdmdbg.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ver.dll16/Makefile.in b/dlls/ver.dll16/Makefile.in index 855c50cf598..68bc397e9c2 100644 --- a/dlls/ver.dll16/Makefile.in +++ b/dlls/ver.dll16/Makefile.in @@ -10,5 +10,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,version.dll C_SRCS = version.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/version/Makefile.in b/dlls/version/Makefile.in index 7f7ce74415b..0ae0d407e7f 100644 --- a/dlls/version/Makefile.in +++ b/dlls/version/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/version/tests/Makefile.in b/dlls/version/tests/Makefile.in index 8d74fbbbfc4..8b2ce2939bb 100644 --- a/dlls/version/tests/Makefile.in +++ b/dlls/version/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vmm.vxd/Makefile.in b/dlls/vmm.vxd/Makefile.in index ce1603fa1a0..05880b69a7a 100644 --- a/dlls/vmm.vxd/Makefile.in +++ b/dlls/vmm.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ vmm.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vnbt.vxd/Makefile.in b/dlls/vnbt.vxd/Makefile.in index 839e17a4c57..e21d5b7a3d6 100644 --- a/dlls/vnbt.vxd/Makefile.in +++ b/dlls/vnbt.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ vnbt.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vnetbios.vxd/Makefile.in b/dlls/vnetbios.vxd/Makefile.in index 1436d0800f4..0a2603dbd97 100644 --- a/dlls/vnetbios.vxd/Makefile.in +++ b/dlls/vnetbios.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ vnetbios.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vtdapi.vxd/Makefile.in b/dlls/vtdapi.vxd/Makefile.in index 4601675e5c9..8520c20a1d7 100644 --- a/dlls/vtdapi.vxd/Makefile.in +++ b/dlls/vtdapi.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ vtdapi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/vwin32.vxd/Makefile.in b/dlls/vwin32.vxd/Makefile.in index afec3bd20b9..c288b1342f1 100644 --- a/dlls/vwin32.vxd/Makefile.in +++ b/dlls/vwin32.vxd/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ vwin32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/w32skrnl/Makefile.in b/dlls/w32skrnl/Makefile.in index c0d3df5ad3d..71d86b5fe6a 100644 --- a/dlls/w32skrnl/Makefile.in +++ b/dlls/w32skrnl/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = kernel32 kernel ntdll C_SRCS = w32skernel.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/w32sys.dll16/Makefile.in b/dlls/w32sys.dll16/Makefile.in index 46e50e93c9d..68d51b4e5c4 100644 --- a/dlls/w32sys.dll16/Makefile.in +++ b/dlls/w32sys.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,w32skrnl.dll C_SRCS = w32sys.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wbemprox/Makefile.in b/dlls/wbemprox/Makefile.in index 0e3b9dc73a6..548add49d5b 100644 --- a/dlls/wbemprox/Makefile.in +++ b/dlls/wbemprox/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ wbemlocator.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wiaservc/Makefile.in b/dlls/wiaservc/Makefile.in index f73e8dd23cb..9574472e102 100644 --- a/dlls/wiaservc/Makefile.in +++ b/dlls/wiaservc/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/win32s16.dll16/Makefile.in b/dlls/win32s16.dll16/Makefile.in index 06e1a628734..ef81916113b 100644 --- a/dlls/win32s16.dll16/Makefile.in +++ b/dlls/win32s16.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,w32skrnl.dll C_SRCS = win32s16.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/win87em.dll16/Makefile.in b/dlls/win87em.dll16/Makefile.in index a74f4b56b81..ef6bd80004e 100644 --- a/dlls/win87em.dll16/Makefile.in +++ b/dlls/win87em.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = win87em.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winaspi.dll16/Makefile.in b/dlls/winaspi.dll16/Makefile.in index 5b87efa99a7..ad73410e741 100644 --- a/dlls/winaspi.dll16/Makefile.in +++ b/dlls/winaspi.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,wnaspi32.dll C_SRCS = winaspi.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/windebug.dll16/Makefile.in b/dlls/windebug.dll16/Makefile.in index 8d0777f75cb..fbc07c917ad 100644 --- a/dlls/windebug.dll16/Makefile.in +++ b/dlls/windebug.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = windebug.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/windowscodecs/Makefile.in b/dlls/windowscodecs/Makefile.in index d78fbf96483..83e7935640a 100644 --- a/dlls/windowscodecs/Makefile.in +++ b/dlls/windowscodecs/Makefile.in @@ -28,5 +28,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index f909d3a6b6e..2e558a80619 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -726,6 +726,7 @@ typedef struct { LONG ref; struct list objects; struct list *cursor; + CRITICAL_SECTION lock; /* Must be held when reading or writing cursor */ } ComponentEnum; typedef struct { @@ -783,6 +784,8 @@ static ULONG WINAPI ComponentEnum_Release(IEnumUnknown *iface) list_remove(&cursor->entry); HeapFree(GetProcessHeap(), 0, cursor); } + This->lock.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&This->lock); HeapFree(GetProcessHeap(), 0, This); } @@ -795,15 +798,17 @@ static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt, ComponentEnum *This = (ComponentEnum*)iface; int num_fetched=0; ComponentEnumItem *item; + HRESULT hr=S_OK; TRACE("(%p,%u,%p,%p)\n", iface, celt, rgelt, pceltFetched); + EnterCriticalSection(&This->lock); while (num_fetchedcursor) { - *pceltFetched = num_fetched; - return S_FALSE; + hr = S_FALSE; + break; } item = LIST_ENTRY(This->cursor, ComponentEnumItem, entry); IUnknown_AddRef(item->unk); @@ -811,24 +816,31 @@ static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt, num_fetched++; This->cursor = list_next(&This->objects, This->cursor); } + LeaveCriticalSection(&This->lock); *pceltFetched = num_fetched; - return S_OK; + return hr; } static HRESULT WINAPI ComponentEnum_Skip(IEnumUnknown *iface, ULONG celt) { ComponentEnum *This = (ComponentEnum*)iface; int i; + HRESULT hr=S_OK; TRACE("(%p,%u)\n", iface, celt); + EnterCriticalSection(&This->lock); for (i=0; icursor) - return S_FALSE; + { + hr = S_FALSE; + break; + } This->cursor = list_next(&This->objects, This->cursor); } - return S_OK; + LeaveCriticalSection(&This->lock); + return hr; } static HRESULT WINAPI ComponentEnum_Reset(IEnumUnknown *iface) @@ -837,7 +849,9 @@ static HRESULT WINAPI ComponentEnum_Reset(IEnumUnknown *iface) TRACE("(%p)\n", iface); + EnterCriticalSection(&This->lock); This->cursor = list_head(&This->objects); + LeaveCriticalSection(&This->lock); return S_OK; } @@ -847,6 +861,7 @@ static HRESULT WINAPI ComponentEnum_Clone(IEnumUnknown *iface, IEnumUnknown **pp ComponentEnum *new_enum; ComponentEnumItem *old_item, *new_item; HRESULT ret=S_OK; + struct list *old_cursor; new_enum = HeapAlloc(GetProcessHeap(), 0, sizeof(ComponentEnum)); if (!new_enum) @@ -858,8 +873,14 @@ static HRESULT WINAPI ComponentEnum_Clone(IEnumUnknown *iface, IEnumUnknown **pp new_enum->IEnumUnknown_Vtbl = &ComponentEnumVtbl; new_enum->ref = 1; new_enum->cursor = NULL; - list_init(&new_enum->objects); + InitializeCriticalSection(&new_enum->lock); + new_enum->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ComponentEnum.lock"); + + EnterCriticalSection(&This->lock); + old_cursor = This->cursor; + LeaveCriticalSection(&This->lock); + LIST_FOR_EACH_ENTRY(old_item, &This->objects, ComponentEnumItem, entry) { new_item = HeapAlloc(GetProcessHeap(), 0, sizeof(ComponentEnumItem)); @@ -871,7 +892,7 @@ static HRESULT WINAPI ComponentEnum_Clone(IEnumUnknown *iface, IEnumUnknown **pp new_item->unk = old_item->unk; list_add_tail(&new_enum->objects, &new_item->entry); IUnknown_AddRef(new_item->unk); - if (&old_item->entry == This->cursor) new_enum->cursor = &new_item->entry; + if (&old_item->entry == old_cursor) new_enum->cursor = &new_item->entry; } if (FAILED(ret)) @@ -923,6 +944,8 @@ HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnkn This->IEnumUnknown_Vtbl = &ComponentEnumVtbl; This->ref = 1; list_init(&This->objects); + InitializeCriticalSection(&This->lock); + This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ComponentEnum.lock"); for (category=categories; category->type && hr == S_OK; category++) { diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index 6f788216fbe..017e6045790 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -570,7 +570,7 @@ HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) { - ERR("Trying to load JPEG picture, but JPEG supported not compiled in.\n"); + ERR("Trying to load JPEG picture, but JPEG support is not compiled in.\n"); return E_FAIL; } diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 22b37b063f4..5af680e876c 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -1320,13 +1320,13 @@ HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) { - ERR("Trying to load PNG picture, but PNG supported not compiled in.\n"); + ERR("Trying to load PNG picture, but PNG support is not compiled in.\n"); return E_FAIL; } HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) { - ERR("Trying to save PNG picture, but PNG supported not compiled in.\n"); + ERR("Trying to save PNG picture, but PNG support is not compiled in.\n"); return E_FAIL; } diff --git a/dlls/windowscodecs/tests/Makefile.in b/dlls/windowscodecs/tests/Makefile.in index 815b67bd0f6..382fb7efe3a 100644 --- a/dlls/windowscodecs/tests/Makefile.in +++ b/dlls/windowscodecs/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ stream.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winealsa.drv/Makefile.in b/dlls/winealsa.drv/Makefile.in index 1f7a78d4f14..0d4552aba8d 100644 --- a/dlls/winealsa.drv/Makefile.in +++ b/dlls/winealsa.drv/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ waveout.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wineaudioio.drv/Makefile.in b/dlls/wineaudioio.drv/Makefile.in index 668d83693a4..d35961aa51f 100644 --- a/dlls/wineaudioio.drv/Makefile.in +++ b/dlls/wineaudioio.drv/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ audioio.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winecoreaudio.drv/Makefile.in b/dlls/winecoreaudio.drv/Makefile.in index 584ca2eb9c6..e1ca45b54dc 100644 --- a/dlls/winecoreaudio.drv/Makefile.in +++ b/dlls/winecoreaudio.drv/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ mixer.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index 0f3b2deebb8..04a39d6bbf5 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -18,5 +18,3 @@ C_SRCS = \ stub.c @MAKE_IMPLIB_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wined3d/Makefile.in b/dlls/wined3d/Makefile.in index f238be770c2..4f74c8e9ed1 100644 --- a/dlls/wined3d/Makefile.in +++ b/dlls/wined3d/Makefile.in @@ -45,5 +45,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index cf7638605eb..da8072ceb3f 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -576,7 +576,7 @@ static inline void shader_arb_vs_local_constants(IWineD3DDeviceImpl* deviceImpl) /* GL locking is done by the caller (state handler) */ static void shader_arb_load_constants(const struct wined3d_context *context, char usePixelShader, char useVertexShader) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; + IWineD3DDeviceImpl *device = context->swapchain->device; IWineD3DStateBlockImpl* stateBlock = device->stateBlock; const struct wined3d_gl_info *gl_info = context->gl_info; @@ -606,7 +606,7 @@ static void shader_arb_update_float_vertex_constants(IWineD3DDevice *iface, UINT /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active * context. On a context switch the old context will be fully dirtified */ - if (!context || ((IWineD3DSurfaceImpl *)context->surface)->resource.device != This) return; + if (!context || context->swapchain->device != This) return; memset(context->vshader_const_dirty + start, 1, sizeof(*context->vshader_const_dirty) * count); This->highest_dirty_vs_const = max(This->highest_dirty_vs_const, start + count); @@ -619,7 +619,7 @@ static void shader_arb_update_float_pixel_constants(IWineD3DDevice *iface, UINT /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active * context. On a context switch the old context will be fully dirtified */ - if (!context || ((IWineD3DSurfaceImpl *)context->surface)->resource.device != This) return; + if (!context || context->swapchain->device != This) return; memset(context->pshader_const_dirty + start, 1, sizeof(*context->pshader_const_dirty) * count); This->highest_dirty_ps_const = max(This->highest_dirty_ps_const, start + count); @@ -4339,7 +4339,7 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW /* GL locking is done by the caller */ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) { - IWineD3DDeviceImpl *This = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; + IWineD3DDeviceImpl *This = context->swapchain->device; struct shader_arb_priv *priv = This->shader_priv; const struct wined3d_gl_info *gl_info = context->gl_info; int i; @@ -6720,7 +6720,7 @@ static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, enum complex_fixup yuv_ } /* Context activation is done by the caller. */ -static HRESULT arbfp_blit_set(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc, +static HRESULT arbfp_blit_set(IWineD3DDevice *iface, const struct wined3d_format_desc *format_desc, GLenum textype, UINT width, UINT height) { GLenum shader; @@ -6808,7 +6808,7 @@ static void arbfp_blit_unset(IWineD3DDevice *iface) { LEAVE_GL(); } -static BOOL arbfp_blit_color_fixup_supported(struct color_fixup_desc fixup) +static BOOL arbfp_blit_color_fixup_supported(const struct wined3d_gl_info *gl_info, struct color_fixup_desc fixup) { enum complex_fixup complex_fixup; diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index f3c3fe74e1b..488fd67c2d6 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DRESOURCETYPE resource_type, - IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc, + IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format_desc *format_desc, WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { HRESULT hr; diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index e22d311beb9..46798ddafa2 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -766,6 +766,67 @@ static DWORD STDMETHODCALLTYPE buffer_GetPriority(IWineD3DBuffer *iface) return resource_get_priority((IWineD3DResource *)iface); } +/* The caller provides a GL context */ +static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info, DWORD flags) +{ + BYTE *map; + UINT start = 0, len = 0; + + ENTER_GL(); + GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + checkGLcall("glBindBufferARB"); + if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + { + GLbitfield mapflags; + mapflags = GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + if (flags & WINED3D_BUFFER_DISCARD) + { + mapflags |= GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_BUFFER_BIT; + } + else if (flags & WINED3D_BUFFER_NOSYNC) + { + mapflags |= GL_MAP_UNSYNCHRONIZED_BIT; + } + map = GL_EXTCALL(glMapBufferRange(This->buffer_type_hint, 0, + This->resource.size, mapflags)); + checkGLcall("glMapBufferRange"); + } + else + { + map = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_WRITE_ONLY_ARB)); + checkGLcall("glMapBufferARB"); + } + if (!map) + { + LEAVE_GL(); + ERR("Failed to map opengl buffer\n"); + return; + } + + while(This->modified_areas) + { + This->modified_areas--; + start = This->maps[This->modified_areas].offset; + len = This->maps[This->modified_areas].size; + + memcpy(map + start, This->resource.allocatedMemory + start, len); + + if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + { + GL_EXTCALL(glFlushMappedBufferRange(This->buffer_type_hint, start, len)); + checkGLcall("glFlushMappedBufferRange"); + } + else if (This->flags & WINED3D_BUFFER_FLUSH) + { + GL_EXTCALL(glFlushMappedBufferRangeAPPLE(This->buffer_type_hint, start, len)); + checkGLcall("glFlushMappedBufferRangeAPPLE"); + } + } + GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); + checkGLcall("glUnmapBufferARB"); + LEAVE_GL(); +} + static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) { struct wined3d_buffer *This = (struct wined3d_buffer *)iface; @@ -775,8 +836,10 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) BOOL decl_changed = FALSE; unsigned int i, j; BYTE *data; + DWORD flags = This->flags & (WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD); TRACE("iface %p\n", iface); + This->flags &= ~(WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD); context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); @@ -837,6 +900,19 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) goto end; } buffer_check_buffer_object_size(This); + + /* The declaration changed, reload the whole buffer */ + WARN("Reloading buffer because of decl change\n"); + buffer_clear_dirty_areas(This); + if(!buffer_add_dirty_area(This, 0, 0)) + { + ERR("buffer_add_dirty_area failed, this is not expected\n"); + return; + } + /* Avoid unfenced updates, we might overwrite more areas of the buffer than the application + * cleared for unsynchronized updates + */ + flags = 0; } else { @@ -864,18 +940,6 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) } } - if (decl_changed) - { - /* The declaration changed, reload the whole buffer */ - WARN("Reloading buffer because of decl change\n"); - buffer_clear_dirty_areas(This); - if(!buffer_add_dirty_area(This, 0, 0)) - { - ERR("buffer_add_dirty_area failed, this is not expected\n"); - return; - } - } - if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) { IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); @@ -896,18 +960,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) return; } - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); - checkGLcall("glBindBufferARB"); - while(This->modified_areas) - { - This->modified_areas--; - start = This->maps[This->modified_areas].offset; - len = This->maps[This->modified_areas].size; - GL_EXTCALL(glBufferSubDataARB(This->buffer_type_hint, start, len, This->resource.allocatedMemory + start)); - checkGLcall("glBufferSubDataARB"); - } - LEAVE_GL(); + buffer_direct_upload(This, context->gl_info, flags); context_release(context); return; @@ -1033,7 +1086,7 @@ static WINED3DRESOURCETYPE STDMETHODCALLTYPE buffer_GetType(IWineD3DBuffer *ifac /* IWineD3DBuffer methods */ -static DWORD buffer_sanitize_flags(DWORD flags) +static DWORD buffer_sanitize_flags(struct wined3d_buffer *buffer, DWORD flags) { /* Not all flags make sense together, but Windows never returns an error. Catch the * cases that could cause issues */ @@ -1055,6 +1108,11 @@ static DWORD buffer_sanitize_flags(DWORD flags) WARN("WINED3DLOCK_DISCARD and WINED3DLOCK_NOOVERWRITE used together, ignoring\n"); return 0; } + else if (flags & (WINED3DLOCK_DISCARD | WINED3DLOCK_NOOVERWRITE) && !(buffer->resource.usage & WINED3DUSAGE_DYNAMIC)) + { + WARN("DISCARD or NOOVERWRITE lock on non-dynamic buffer, ignoring\n"); + return 0; + } return flags; } @@ -1082,10 +1140,11 @@ static HRESULT STDMETHODCALLTYPE buffer_Map(IWineD3DBuffer *iface, UINT offset, { struct wined3d_buffer *This = (struct wined3d_buffer *)iface; LONG count; + BOOL dirty = buffer_is_dirty(This); TRACE("iface %p, offset %u, size %u, data %p, flags %#x\n", iface, offset, size, data, flags); - flags = buffer_sanitize_flags(flags); + flags = buffer_sanitize_flags(This, flags); if (!(flags & WINED3DLOCK_READONLY)) { if (!buffer_add_dirty_area(This, offset, size)) return E_OUTOFMEMORY; @@ -1093,36 +1152,75 @@ static HRESULT STDMETHODCALLTYPE buffer_Map(IWineD3DBuffer *iface, UINT offset, count = InterlockedIncrement(&This->lock_count); - if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER) && This->buffer_object) + if (This->buffer_object) { - if(count == 1) + if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { - IWineD3DDeviceImpl *device = This->resource.device; - struct wined3d_context *context; - const struct wined3d_gl_info *gl_info; - - if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + if(count == 1) { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); - } + IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_context *context; + const struct wined3d_gl_info *gl_info; - context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); - gl_info = context->gl_info; - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + { + IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); + } - if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); + gl_info = context->gl_info; + ENTER_GL(); + GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + + if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + { + GLbitfield mapflags = buffer_gl_map_flags(flags); + This->resource.allocatedMemory = GL_EXTCALL(glMapBufferRange(This->buffer_type_hint, 0, + This->resource.size, mapflags)); + checkGLcall("glMapBufferRange"); + } + else + { + This->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_READ_WRITE_ARB)); + checkGLcall("glMapBufferARB"); + } + LEAVE_GL(); + + if (((DWORD_PTR) This->resource.allocatedMemory) & (RESOURCE_ALIGNMENT - 1)) + { + WARN("Pointer %p is not %u byte aligned, falling back to double buffered operation\n", + This->resource.allocatedMemory, RESOURCE_ALIGNMENT); + + ENTER_GL(); + GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); + checkGLcall("glUnmapBufferARB"); + LEAVE_GL(); + This->resource.allocatedMemory = NULL; + + buffer_get_sysmem(This); + TRACE("New pointer is %p\n", This->resource.allocatedMemory); + } + context_release(context); + } + } + else + { + if (dirty) { - GLbitfield mapflags = buffer_gl_map_flags(flags); - This->resource.allocatedMemory = GL_EXTCALL(glMapBufferRange(This->buffer_type_hint, 0, - This->resource.size, mapflags)); + if (This->flags & WINED3D_BUFFER_NOSYNC && !(flags & WINED3DLOCK_NOOVERWRITE)) + { + This->flags &= ~WINED3D_BUFFER_NOSYNC; + } } - else + else if(flags & WINED3DLOCK_NOOVERWRITE) { - This->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_READ_WRITE_ARB)); + This->flags |= WINED3D_BUFFER_NOSYNC; + } + + if (flags & WINED3DLOCK_DISCARD) + { + This->flags |= WINED3D_BUFFER_DISCARD; } - LEAVE_GL(); - context_release(context); } } @@ -1251,7 +1349,7 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device, UINT size, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, GLenum bind_hint, const char *data, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, &device->adapter->gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, &device->adapter->gl_info); HRESULT hr; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; BOOL dynamic_buffer_ok; diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 08789855812..aa53d3e8970 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -116,15 +116,16 @@ static void context_destroy_fbo(struct wined3d_context *context, GLuint *fbo) /* GL locking is done by the caller */ static void context_apply_attachment_filter_states(IWineD3DSurface *surface) { - const IWineD3DSurfaceImpl *surface_impl = (IWineD3DSurfaceImpl *)surface; - IWineD3DDeviceImpl *device = surface_impl->resource.device; IWineD3DBaseTextureImpl *texture_impl; - BOOL update_minfilter = FALSE; - BOOL update_magfilter = FALSE; /* Update base texture states array */ if (SUCCEEDED(IWineD3DSurface_GetContainer(surface, &IID_IWineD3DBaseTexture, (void **)&texture_impl))) { + IWineD3DSurfaceImpl *surface_impl = (IWineD3DSurfaceImpl *)surface; + IWineD3DDeviceImpl *device = surface_impl->resource.device; + BOOL update_minfilter = FALSE; + BOOL update_magfilter = FALSE; + if (texture_impl->baseTexture.texture_rgb.states[WINED3DTEXSTA_MINFILTER] != WINED3DTEXF_POINT || texture_impl->baseTexture.texture_rgb.states[WINED3DTEXSTA_MIPFILTER] != WINED3DTEXF_NONE) { @@ -146,33 +147,37 @@ static void context_apply_attachment_filter_states(IWineD3DSurface *surface) } IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture_impl); - } - - if (update_minfilter || update_magfilter) - { - GLenum target, bind_target; - GLint old_binding; - target = surface_impl->texture_target; - if (target == GL_TEXTURE_2D) + if (update_minfilter || update_magfilter) { - bind_target = GL_TEXTURE_2D; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); - } else if (target == GL_TEXTURE_RECTANGLE_ARB) { - bind_target = GL_TEXTURE_RECTANGLE_ARB; - glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding); - } else { - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARB, &old_binding); + GLenum target, bind_target; + GLint old_binding; + + target = surface_impl->texture_target; + if (target == GL_TEXTURE_2D) + { + bind_target = GL_TEXTURE_2D; + glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); + } + else if (target == GL_TEXTURE_RECTANGLE_ARB) + { + bind_target = GL_TEXTURE_RECTANGLE_ARB; + glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding); + } + else + { + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARB, &old_binding); + } + + glBindTexture(bind_target, surface_impl->texture_name); + if (update_minfilter) glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + if (update_magfilter) glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glBindTexture(bind_target, old_binding); } - glBindTexture(bind_target, surface_impl->texture_name); - if (update_minfilter) glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - if (update_magfilter) glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glBindTexture(bind_target, old_binding); + checkGLcall("apply_attachment_filter_states()"); } - - checkGLcall("apply_attachment_filter_states()"); } /* GL locking is done by the caller */ @@ -206,7 +211,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context, } else { - surface_prepare_texture(depth_stencil_impl, FALSE); + surface_prepare_texture(depth_stencil_impl, gl_info, FALSE); context_apply_attachment_filter_states(depth_stencil); if (format_flags & WINED3DFMT_FLAG_DEPTH) @@ -259,7 +264,7 @@ void context_attach_surface_fbo(const struct wined3d_context *context, if (surface) { - surface_prepare_texture(surface_impl, FALSE); + surface_prepare_texture(surface_impl, gl_info, FALSE); context_apply_attachment_filter_states(surface); gl_info->fbo_ops.glFramebufferTexture2D(fbo_target, GL_COLOR_ATTACHMENT0 + idx, surface_impl->texture_target, @@ -317,8 +322,8 @@ static void context_check_fbo_status(struct wined3d_context *context) static struct fbo_entry *context_create_fbo_entry(struct wined3d_context *context) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + IWineD3DDeviceImpl *device = context->swapchain->device; struct fbo_entry *entry; entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*entry)); @@ -334,8 +339,8 @@ static struct fbo_entry *context_create_fbo_entry(struct wined3d_context *contex /* GL locking is done by the caller */ static void context_reuse_fbo_entry(struct wined3d_context *context, struct fbo_entry *entry) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + IWineD3DDeviceImpl *device = context->swapchain->device; context_bind_fbo(context, GL_FRAMEBUFFER, &entry->id); context_clean_fbo_attachments(gl_info); @@ -363,8 +368,8 @@ static void context_destroy_fbo_entry(struct wined3d_context *context, struct fb /* GL locking is done by the caller */ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + IWineD3DDeviceImpl *device = context->swapchain->device; struct fbo_entry *entry; LIST_FOR_EACH_ENTRY(entry, &context->fbo_list, struct fbo_entry, entry) @@ -399,8 +404,8 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context) /* GL locking is done by the caller */ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_entry *entry) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + IWineD3DDeviceImpl *device = context->swapchain->device; unsigned int i; context_bind_fbo(context, GL_FRAMEBUFFER, &entry->id); @@ -456,6 +461,12 @@ static void context_apply_fbo_state(struct wined3d_context *context) context_destroy_fbo_entry(context, entry); } + if (context->rebind_fbo) + { + context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + context->rebind_fbo = FALSE; + } + if (context->render_offscreen) { context->current_fbo = context_find_fbo_entry(context); @@ -647,6 +658,115 @@ void context_resource_released(IWineD3DDevice *iface, IWineD3DResource *resource } } +void context_surface_update(struct wined3d_context *context, IWineD3DSurfaceImpl *surface) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + struct fbo_entry *entry = context->current_fbo; + unsigned int i; + + if (!entry || context->rebind_fbo) return; + + for (i = 0; i < gl_info->limits.buffers; ++i) + { + if (surface == (IWineD3DSurfaceImpl *)entry->render_targets[i]) + { + TRACE("Updated surface %p is bound as color attachment %u to the current FBO.\n", surface, i); + context->rebind_fbo = TRUE; + return; + } + } + + if (surface == (IWineD3DSurfaceImpl *)entry->depth_stencil) + { + TRACE("Updated surface %p is bound as depth attachment to the current FBO.\n", surface); + context->rebind_fbo = TRUE; + } +} + +static BOOL context_set_pixel_format(const struct wined3d_gl_info *gl_info, HDC dc, int format) +{ + int current = GetPixelFormat(dc); + + if (current == format) return TRUE; + + if (!current) + { + if (!SetPixelFormat(dc, format, NULL)) + { + ERR("Failed to set pixel format %d on device context %p, last error %#x.\n", + format, dc, GetLastError()); + return FALSE; + } + return TRUE; + } + + /* By default WGL doesn't allow pixel format adjustments but we need it + * here. For this reason there's a Wine specific wglSetPixelFormat() + * which allows us to set the pixel format multiple times. Only use it + * when really needed. */ + if (gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH]) + { + if (!GL_EXTCALL(wglSetPixelFormatWINE(dc, format, NULL))) + { + ERR("wglSetPixelFormatWINE failed to set pixel format %d on device context %p.\n", + format, dc); + return FALSE; + } + return TRUE; + } + + /* OpenGL doesn't allow pixel format adjustments. Print an error and + * continue using the old format. There's a big chance that the old + * format works although with a performance hit and perhaps rendering + * errors. */ + ERR("Unable to set pixel format %d on device context %p. Already using format %d.\n", + format, dc, current); + return TRUE; +} + +static void context_update_window(struct wined3d_context *context) +{ + TRACE("Updating context %p window from %p to %p.\n", + context, context->win_handle, context->swapchain->win_handle); + + if (context->valid) + { + if (!ReleaseDC(context->win_handle, context->hdc)) + { + ERR("Failed to release device context %p, last error %#x.\n", + context->hdc, GetLastError()); + } + } + else context->valid = 1; + + context->win_handle = context->swapchain->win_handle; + + if (!(context->hdc = GetDC(context->win_handle))) + { + ERR("Failed to get a device context for window %p.\n", context->win_handle); + goto err; + } + + if (!context_set_pixel_format(context->gl_info, context->hdc, context->pixel_format)) + { + ERR("Failed to set pixel format %d on device context %p.\n", + context->pixel_format, context->hdc); + goto err; + } + + if (!pwglMakeCurrent(context->hdc, context->glCtx)) + { + ERR("Failed to make GL context %p current on device context %p, last error %#x.\n", + context->glCtx, context->hdc, GetLastError()); + goto err; + } + + return; + +err: + context->valid = 0; +} + static void context_validate(struct wined3d_context *context) { HWND wnd = WindowFromDC(context->hdc); @@ -657,6 +777,9 @@ static void context_validate(struct wined3d_context *context) context->hdc, wnd, context->win_handle); context->valid = 0; } + + if (context->win_handle != context->swapchain->win_handle) + context_update_window(context); } static void context_destroy_gl_resources(struct wined3d_context *context) @@ -772,15 +895,7 @@ static void context_destroy_gl_resources(struct wined3d_context *context) ERR("Failed to disable GL context.\n"); } - if (context->pbuffer) - { - GL_EXTCALL(wglReleasePbufferDCARB(context->pbuffer, context->hdc)); - GL_EXTCALL(wglDestroyPbufferARB(context->pbuffer)); - } - else - { - ReleaseDC(context->win_handle, context->hdc); - } + ReleaseDC(context->win_handle, context->hdc); if (!pwglDeleteContext(context->glCtx)) { @@ -928,68 +1043,10 @@ static void Context_MarkStateDirty(struct wined3d_context *context, DWORD state, context->isStateDirty[idx] |= (1 << shift); } -/***************************************************************************** - * AddContextToArray - * - * Adds a context to the context array. Helper function for context_create(). - * - * This method is not called in performance-critical code paths, only when a - * new render target or swapchain is created. Thus performance is not an issue - * here. - * - * Params: - * This: Device to add the context for - * hdc: device context - * glCtx: WGL context to add - * pbuffer: optional pbuffer used with this context - * - *****************************************************************************/ -static struct wined3d_context *AddContextToArray(IWineD3DDeviceImpl *This, - HWND win_handle, HDC hdc, HGLRC glCtx, HPBUFFERARB pbuffer) -{ - struct wined3d_context **oldArray = This->contexts; - DWORD state; - - This->contexts = HeapAlloc(GetProcessHeap(), 0, sizeof(*This->contexts) * (This->numContexts + 1)); - if(This->contexts == NULL) { - ERR("Unable to grow the context array\n"); - This->contexts = oldArray; - return NULL; - } - if(oldArray) { - memcpy(This->contexts, oldArray, sizeof(*This->contexts) * This->numContexts); - } - - This->contexts[This->numContexts] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(**This->contexts)); - if(This->contexts[This->numContexts] == NULL) { - ERR("Unable to allocate a new context\n"); - HeapFree(GetProcessHeap(), 0, This->contexts); - This->contexts = oldArray; - return NULL; - } - - This->contexts[This->numContexts]->hdc = hdc; - This->contexts[This->numContexts]->glCtx = glCtx; - This->contexts[This->numContexts]->pbuffer = pbuffer; - This->contexts[This->numContexts]->win_handle = win_handle; - HeapFree(GetProcessHeap(), 0, oldArray); - - /* Mark all states dirty to force a proper initialization of the states on the first use of the context - */ - for(state = 0; state <= STATE_HIGHEST; state++) { - if (This->StateTable[state].representative) - Context_MarkStateDirty(This->contexts[This->numContexts], state, This->StateTable); - } - - This->numContexts++; - TRACE("Created context %p\n", This->contexts[This->numContexts - 1]); - return This->contexts[This->numContexts - 1]; -} - /* This function takes care of WineD3D pixel format selection. */ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, - const struct GlPixelFormatDesc *color_format_desc, const struct GlPixelFormatDesc *ds_format_desc, - BOOL auxBuffers, int numSamples, BOOL pbuffer, BOOL findCompatible) + const struct wined3d_format_desc *color_format_desc, const struct wined3d_format_desc *ds_format_desc, + BOOL auxBuffers, int numSamples, BOOL findCompatible) { int iPixelFormat=0; unsigned int matchtry; @@ -1019,9 +1076,9 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, int i = 0; int nCfgs = This->adapter->nCfgs; - TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, pbuffer=%d, findCompatible=%d\n", + TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, findCompatible=%d\n", debug_d3dformat(color_format_desc->format), debug_d3dformat(ds_format_desc->format), - auxBuffers, numSamples, pbuffer, findCompatible); + auxBuffers, numSamples, findCompatible); if (!getColorBits(color_format_desc, &redBits, &greenBits, &blueBits, &alphaBits, &colorBits)) { @@ -1059,18 +1116,14 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, if(cfg->iPixelType != WGL_TYPE_RGBA_ARB) continue; - /* In window mode (!pbuffer) we need a window drawable format and double buffering. */ - if(!pbuffer && !(cfg->windowDrawable && cfg->doubleBuffer)) + /* In window mode we need a window drawable format and double buffering. */ + if(!(cfg->windowDrawable && cfg->doubleBuffer)) continue; /* We like to have aux buffers in backbuffer mode */ if(auxBuffers && !cfg->auxBuffers && matches[matchtry].require_aux) continue; - /* In pbuffer-mode we need a pbuffer-capable format but we don't want double buffering */ - if(pbuffer && (!cfg->pbufferDrawable || cfg->doubleBuffer)) - continue; - if(matches[matchtry].exact_color) { if(cfg->redSize != redBits) continue; @@ -1167,225 +1220,179 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, /***************************************************************************** * context_create * - * Creates a new context for a window, or a pbuffer context. + * Creates a new context. * * * Params: * This: Device to activate the context for * target: Surface this context will render to * win_handle: handle to the window which we are drawing to - * create_pbuffer: tells whether to create a pbuffer or not * pPresentParameters: contains the pixelformats to use for onscreen rendering * *****************************************************************************/ -struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, - HWND win_handle, BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *pPresentParms) +struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, IWineD3DSurfaceImpl *target) { - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - struct wined3d_context *ret = NULL; - HPBUFFERARB pbuffer = NULL; + IWineD3DDeviceImpl *device = swapchain->device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_format_desc *color_format_desc; + const struct wined3d_format_desc *ds_format_desc; + struct wined3d_context *ret; + PIXELFORMATDESCRIPTOR pfd; + BOOL auxBuffers = FALSE; + int numSamples = 0; + int pixel_format; unsigned int s; + DWORD state; HGLRC ctx; HDC hdc; - TRACE("(%p): Creating a %s context for render target %p\n", This, create_pbuffer ? "offscreen" : "onscreen", target); + TRACE("swapchain %p, target %p, window %p.\n", swapchain, target, swapchain->win_handle); - if(create_pbuffer) { - HDC hdc_parent = GetDC(win_handle); - int iPixelFormat = 0; - - IWineD3DSurface *StencilSurface = This->stencilBufferTarget; - const struct GlPixelFormatDesc *ds_format_desc = StencilSurface - ? ((IWineD3DSurfaceImpl *)StencilSurface)->resource.format_desc - : getFormatDescEntry(WINED3DFMT_UNKNOWN, &This->adapter->gl_info); - - /* Try to find a pixel format with pbuffer support. */ - iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc_parent, target->resource.format_desc, - ds_format_desc, FALSE /* auxBuffers */, 0 /* numSamples */, TRUE /* PBUFFER */, - FALSE /* findCompatible */); - if(!iPixelFormat) { - TRACE("Trying to locate a compatible pixel format because an exact match failed.\n"); + ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)); + if (!ret) + { + ERR("Failed to allocate context memory.\n"); + return NULL; + } - /* For some reason we weren't able to find a format, try to find something instead of crashing. - * A reason for failure could have been wglChoosePixelFormatARB strictness. */ - iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc_parent, target->resource.format_desc, - ds_format_desc, FALSE /* auxBuffer */, 0 /* numSamples */, TRUE /* PBUFFER */, - TRUE /* findCompatible */); - } + if (!(hdc = GetDC(swapchain->win_handle))) + { + ERR("Failed to retrieve a device context.\n"); + goto out; + } - /* This shouldn't happen as ChoosePixelFormat always returns something */ - if(!iPixelFormat) { - ERR("Unable to locate a pixel format for a pbuffer\n"); - ReleaseDC(win_handle, hdc_parent); - goto out; - } + ds_format_desc = getFormatDescEntry(WINED3DFMT_UNKNOWN, gl_info); + color_format_desc = target->resource.format_desc; - TRACE("Creating a pBuffer drawable for the new context\n"); - pbuffer = GL_EXTCALL(wglCreatePbufferARB(hdc_parent, iPixelFormat, target->currentDesc.Width, target->currentDesc.Height, 0)); - if(!pbuffer) { - ERR("Cannot create a pbuffer\n"); - ReleaseDC(win_handle, hdc_parent); - goto out; - } + /* In case of ORM_BACKBUFFER, make sure to request an alpha component for + * X4R4G4B4/X8R8G8B8 as we might need it for the backbuffer. */ + if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) + { + auxBuffers = TRUE; - /* In WGL a pbuffer is 'wrapped' inside a HDC to 'fool' wglMakeCurrent */ - hdc = GL_EXTCALL(wglGetPbufferDCARB(pbuffer)); - if(!hdc) { - ERR("Cannot get a HDC for pbuffer (%p)\n", pbuffer); - GL_EXTCALL(wglDestroyPbufferARB(pbuffer)); - ReleaseDC(win_handle, hdc_parent); - goto out; - } - ReleaseDC(win_handle, hdc_parent); - } else { - PIXELFORMATDESCRIPTOR pfd; - int iPixelFormat; - int res; - const struct GlPixelFormatDesc *color_format_desc = target->resource.format_desc; - const struct GlPixelFormatDesc *ds_format_desc = getFormatDescEntry(WINED3DFMT_UNKNOWN, - &This->adapter->gl_info); - BOOL auxBuffers = FALSE; - int numSamples = 0; - - hdc = GetDC(win_handle); - if(hdc == NULL) { - ERR("Cannot retrieve a device context!\n"); - goto out; - } - - /* In case of ORM_BACKBUFFER, make sure to request an alpha component for X4R4G4B4/X8R8G8B8 as we might need it for the backbuffer. */ - if(wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) { - auxBuffers = TRUE; - - if (color_format_desc->format == WINED3DFMT_B4G4R4X4_UNORM) - color_format_desc = getFormatDescEntry(WINED3DFMT_B4G4R4A4_UNORM, &This->adapter->gl_info); - else if (color_format_desc->format == WINED3DFMT_B8G8R8X8_UNORM) - color_format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, &This->adapter->gl_info); - } - - /* DirectDraw supports 8bit paletted render targets and these are used by old games like Starcraft and C&C. - * Most modern hardware doesn't support 8bit natively so we perform some form of 8bit -> 32bit conversion. - * The conversion (ab)uses the alpha component for storing the palette index. For this reason we require - * a format with 8bit alpha, so request A8R8G8B8. */ - if (color_format_desc->format == WINED3DFMT_P8_UINT) - color_format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, &This->adapter->gl_info); - - /* Retrieve the depth stencil format from the present parameters. - * The choice of the proper format can give a nice performance boost - * in case of GPU limited programs. */ - if(pPresentParms->EnableAutoDepthStencil) { - TRACE("pPresentParms->EnableAutoDepthStencil=enabled; using AutoDepthStencilFormat=%s\n", debug_d3dformat(pPresentParms->AutoDepthStencilFormat)); - ds_format_desc = getFormatDescEntry(pPresentParms->AutoDepthStencilFormat, &This->adapter->gl_info); - } - - /* D3D only allows multisampling when SwapEffect is set to WINED3DSWAPEFFECT_DISCARD */ - if(pPresentParms->MultiSampleType && (pPresentParms->SwapEffect == WINED3DSWAPEFFECT_DISCARD)) { - if (!gl_info->supported[ARB_MULTISAMPLE]) - ERR("The program is requesting multisampling without support!\n"); - else - { - TRACE("Requesting multisample type %#x.\n", pPresentParms->MultiSampleType); - numSamples = pPresentParms->MultiSampleType; - } - } + if (color_format_desc->format == WINED3DFMT_B4G4R4X4_UNORM) + color_format_desc = getFormatDescEntry(WINED3DFMT_B4G4R4A4_UNORM, gl_info); + else if (color_format_desc->format == WINED3DFMT_B8G8R8X8_UNORM) + color_format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, gl_info); + } - /* Try to find a pixel format which matches our requirements */ - iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc, color_format_desc, ds_format_desc, - auxBuffers, numSamples, FALSE /* PBUFFER */, FALSE /* findCompatible */); + /* DirectDraw supports 8bit paletted render targets and these are used by + * old games like Starcraft and C&C. Most modern hardware doesn't support + * 8bit natively so we perform some form of 8bit -> 32bit conversion. The + * conversion (ab)uses the alpha component for storing the palette index. + * For this reason we require a format with 8bit alpha, so request + * A8R8G8B8. */ + if (color_format_desc->format == WINED3DFMT_P8_UINT) + color_format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, gl_info); - /* Try to locate a compatible format if we weren't able to find anything */ - if(!iPixelFormat) { - TRACE("Trying to locate a compatible pixel format because an exact match failed.\n"); - iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc, color_format_desc, ds_format_desc, - auxBuffers, 0 /* numSamples */, FALSE /* PBUFFER */, TRUE /* findCompatible */ ); - } + /* Retrieve the depth stencil format from the present parameters. + * The choice of the proper format can give a nice performance boost + * in case of GPU limited programs. */ + if (swapchain->presentParms.EnableAutoDepthStencil) + { + TRACE("Auto depth stencil enabled, using format %s.\n", + debug_d3dformat(swapchain->presentParms.AutoDepthStencilFormat)); + ds_format_desc = getFormatDescEntry(swapchain->presentParms.AutoDepthStencilFormat, gl_info); + } - /* If we still don't have a pixel format, something is very wrong as ChoosePixelFormat barely fails */ - if(!iPixelFormat) { - ERR("Can't find a suitable iPixelFormat\n"); - return NULL; + /* D3D only allows multisampling when SwapEffect is set to WINED3DSWAPEFFECT_DISCARD. */ + if (swapchain->presentParms.MultiSampleType && (swapchain->presentParms.SwapEffect == WINED3DSWAPEFFECT_DISCARD)) + { + if (!gl_info->supported[ARB_MULTISAMPLE]) + WARN("The application is requesting multisampling without support.\n"); + else + { + TRACE("Requesting multisample type %#x.\n", swapchain->presentParms.MultiSampleType); + numSamples = swapchain->presentParms.MultiSampleType; } + } - DescribePixelFormat(hdc, iPixelFormat, sizeof(pfd), &pfd); - res = SetPixelFormat(hdc, iPixelFormat, NULL); - if(!res) { - int oldPixelFormat = GetPixelFormat(hdc); + /* Try to find a pixel format which matches our requirements. */ + pixel_format = WineD3D_ChoosePixelFormat(device, hdc, color_format_desc, ds_format_desc, + auxBuffers, numSamples, FALSE /* findCompatible */); - /* By default WGL doesn't allow pixel format adjustments but we need it here. - * For this reason there is a WINE-specific wglSetPixelFormat which allows you to - * set the pixel format multiple times. Only use it when it is really needed. */ + /* Try to locate a compatible format if we weren't able to find anything. */ + if (!pixel_format) + { + TRACE("Trying to locate a compatible pixel format because an exact match failed.\n"); + pixel_format = WineD3D_ChoosePixelFormat(device, hdc, color_format_desc, ds_format_desc, + auxBuffers, 0 /* numSamples */, TRUE /* findCompatible */); + } - if(oldPixelFormat == iPixelFormat) { - /* We don't have to do anything as the formats are the same :) */ - } - else if (oldPixelFormat && gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH]) - { - res = GL_EXTCALL(wglSetPixelFormatWINE(hdc, iPixelFormat, NULL)); + /* If we still don't have a pixel format, something is very wrong as ChoosePixelFormat barely fails */ + if (!pixel_format) + { + ERR("Can't find a suitable pixel format.\n"); + goto out; + } - if(!res) { - ERR("wglSetPixelFormatWINE failed on HDC=%p for iPixelFormat=%d\n", hdc, iPixelFormat); - return NULL; - } - } else if(oldPixelFormat) { - /* OpenGL doesn't allow pixel format adjustments. Print an error and continue using the old format. - * There's a big chance that the old format works although with a performance hit and perhaps rendering errors. */ - ERR("HDC=%p is already set to iPixelFormat=%d and OpenGL doesn't allow changes!\n", hdc, oldPixelFormat); - } else { - ERR("SetPixelFormat failed on HDC=%p for iPixelFormat=%d\n", hdc, iPixelFormat); - return NULL; - } - } + DescribePixelFormat(hdc, pixel_format, sizeof(pfd), &pfd); + if (!context_set_pixel_format(gl_info, hdc, pixel_format)) + { + ERR("Failed to set pixel format %d on device context %p.\n", pixel_format, hdc); + goto out; } ctx = pwglCreateContext(hdc); - if (This->numContexts) + if (device->numContexts) { - if (!pwglShareLists(This->contexts[0]->glCtx, ctx)) + if (!pwglShareLists(device->contexts[0]->glCtx, ctx)) { DWORD err = GetLastError(); ERR("wglShareLists(%p, %p) failed, last error %#x.\n", - This->contexts[0]->glCtx, ctx, err); + device->contexts[0]->glCtx, ctx, err); } } if(!ctx) { ERR("Failed to create a WGL context\n"); - if(create_pbuffer) { - GL_EXTCALL(wglReleasePbufferDCARB(pbuffer, hdc)); - GL_EXTCALL(wglDestroyPbufferARB(pbuffer)); - } goto out; } - ret = AddContextToArray(This, win_handle, hdc, ctx, pbuffer); - if(!ret) { + + if (!device_context_add(device, ret)) + { ERR("Failed to add the newly created context to the context list\n"); if (!pwglDeleteContext(ctx)) { DWORD err = GetLastError(); ERR("wglDeleteContext(%p) failed, last error %#x.\n", ctx, err); } - if(create_pbuffer) { - GL_EXTCALL(wglReleasePbufferDCARB(pbuffer, hdc)); - GL_EXTCALL(wglDestroyPbufferARB(pbuffer)); - } goto out; } - ret->valid = 1; - ret->gl_info = &This->adapter->gl_info; - ret->surface = (IWineD3DSurface *) target; + + ret->gl_info = gl_info; + + /* Mark all states dirty to force a proper initialization of the states + * on the first use of the context. */ + for (state = 0; state <= STATE_HIGHEST; ++state) + { + if (device->StateTable[state].representative) + Context_MarkStateDirty(ret, state, device->StateTable); + } + + ret->swapchain = swapchain; ret->current_rt = (IWineD3DSurface *)target; + ret->tid = GetCurrentThreadId(); + ret->render_offscreen = surface_is_offscreen((IWineD3DSurface *) target); ret->draw_buffer_dirty = TRUE; - ret->tid = GetCurrentThreadId(); - if(This->shader_backend->shader_dirtifyable_constants((IWineD3DDevice *) This)) { + ret->valid = 1; + + ret->glCtx = ctx; + ret->win_handle = swapchain->win_handle; + ret->hdc = hdc; + ret->pixel_format = pixel_format; + + if (device->shader_backend->shader_dirtifyable_constants((IWineD3DDevice *)device)) + { /* Create the dirty constants array and initialize them to dirty */ ret->vshader_const_dirty = HeapAlloc(GetProcessHeap(), 0, - sizeof(*ret->vshader_const_dirty) * This->d3d_vshader_constantF); + sizeof(*ret->vshader_const_dirty) * device->d3d_vshader_constantF); ret->pshader_const_dirty = HeapAlloc(GetProcessHeap(), 0, - sizeof(*ret->pshader_const_dirty) * This->d3d_pshader_constantF); + sizeof(*ret->pshader_const_dirty) * device->d3d_pshader_constantF); memset(ret->vshader_const_dirty, 1, - sizeof(*ret->vshader_const_dirty) * This->d3d_vshader_constantF); + sizeof(*ret->vshader_const_dirty) * device->d3d_vshader_constantF); memset(ret->pshader_const_dirty, 1, - sizeof(*ret->pshader_const_dirty) * This->d3d_pshader_constantF); + sizeof(*ret->pshader_const_dirty) * device->d3d_pshader_constantF); } ret->free_occlusion_query_size = 4; @@ -1440,10 +1447,10 @@ struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurface glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); checkGLcall("glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);"); - glPixelStorei(GL_PACK_ALIGNMENT, This->surface_alignment); - checkGLcall("glPixelStorei(GL_PACK_ALIGNMENT, This->surface_alignment);"); - glPixelStorei(GL_UNPACK_ALIGNMENT, This->surface_alignment); - checkGLcall("glPixelStorei(GL_UNPACK_ALIGNMENT, This->surface_alignment);"); + glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment); + checkGLcall("glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment);"); + glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment); + checkGLcall("glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment);"); if (gl_info->supported[APPLE_CLIENT_STORAGE]) { @@ -1512,84 +1519,22 @@ struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurface LEAVE_GL(); - This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE); + device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + + TRACE("Created context %p.\n", ret); return ret; out: - if (ret) - { - HeapFree(GetProcessHeap(), 0, ret->free_event_queries); - HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); - HeapFree(GetProcessHeap(), 0, ret->pshader_const_dirty); - HeapFree(GetProcessHeap(), 0, ret->vshader_const_dirty); - HeapFree(GetProcessHeap(), 0, ret); - } + HeapFree(GetProcessHeap(), 0, ret->free_event_queries); + HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); + HeapFree(GetProcessHeap(), 0, ret->pshader_const_dirty); + HeapFree(GetProcessHeap(), 0, ret->vshader_const_dirty); + HeapFree(GetProcessHeap(), 0, ret); return NULL; } /***************************************************************************** - * RemoveContextFromArray - * - * Removes a context from the context manager. The opengl context is not - * destroyed or unset. context is not a valid pointer after that call. - * - * Similar to the former call this isn't a performance critical function. A - * helper function for context_destroy(). - * - * Params: - * This: Device to activate the context for - * context: Context to remove - * - *****************************************************************************/ -static void RemoveContextFromArray(IWineD3DDeviceImpl *This, struct wined3d_context *context) -{ - struct wined3d_context **new_array; - BOOL found = FALSE; - UINT i; - - TRACE("Removing ctx %p\n", context); - - for (i = 0; i < This->numContexts; ++i) - { - if (This->contexts[i] == context) - { - found = TRUE; - break; - } - } - - if (!found) - { - ERR("Context %p doesn't exist in context array\n", context); - return; - } - - while (i < This->numContexts - 1) - { - This->contexts[i] = This->contexts[i + 1]; - ++i; - } - - --This->numContexts; - if (!This->numContexts) - { - HeapFree(GetProcessHeap(), 0, This->contexts); - This->contexts = NULL; - return; - } - - new_array = HeapReAlloc(GetProcessHeap(), 0, This->contexts, This->numContexts * sizeof(*This->contexts)); - if (!new_array) - { - ERR("Failed to shrink context array. Oh well.\n"); - return; - } - - This->contexts = new_array; -} - -/***************************************************************************** * context_destroy * * Destroys a wined3d context @@ -1619,7 +1564,7 @@ void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) HeapFree(GetProcessHeap(), 0, context->vshader_const_dirty); HeapFree(GetProcessHeap(), 0, context->pshader_const_dirty); - RemoveContextFromArray(This, context); + device_context_remove(This, context); if (destroy) HeapFree(GetProcessHeap(), 0, context); } @@ -1897,7 +1842,7 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur { if (current_context && current_context->current_rt - && ((IWineD3DSurfaceImpl *)current_context->surface)->resource.device == This) + && current_context->swapchain->device == This) { target = current_context->current_rt; } @@ -1922,78 +1867,26 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur old_render_offscreen = context->render_offscreen; context->render_offscreen = surface_is_offscreen(target); - /* The context != This->activeContext will catch a NOP context change. This can occur - * if we are switching back to swapchain rendering in case of FBO or Back Buffer offscreen - * rendering. No context change is needed in that case - */ - - if(wined3d_settings.offscreen_rendering_mode == ORM_PBUFFER) { - if(This->pbufferContext && tid == This->pbufferContext->tid) { - This->pbufferContext->tid = 0; - } - } IWineD3DSwapChain_Release(swapchain); } else { TRACE("Rendering offscreen\n"); -retry: - if (wined3d_settings.offscreen_rendering_mode == ORM_PBUFFER) + /* Stay with the currently active context. */ + if (current_context && current_context->swapchain->device == This) { - IWineD3DSurfaceImpl *targetimpl = (IWineD3DSurfaceImpl *)target; - if (!This->pbufferContext - || This->pbufferWidth < targetimpl->currentDesc.Width - || This->pbufferHeight < targetimpl->currentDesc.Height) - { - if (This->pbufferContext) context_destroy(This, This->pbufferContext); - - /* The display is irrelevant here, the window is 0. But - * context_create() needs a valid X connection. Create the context - * on the same server as the primary swapchain. The primary - * swapchain is exists at this point. */ - This->pbufferContext = context_create(This, targetimpl, - ((IWineD3DSwapChainImpl *)This->swapchains[0])->context[0]->win_handle, - TRUE /* pbuffer */, &((IWineD3DSwapChainImpl *)This->swapchains[0])->presentParms); - This->pbufferWidth = targetimpl->currentDesc.Width; - This->pbufferHeight = targetimpl->currentDesc.Height; - if (This->pbufferContext) context_release(This->pbufferContext); - } - - if (This->pbufferContext) - { - if (This->pbufferContext->tid && This->pbufferContext->tid != tid) - { - FIXME("The PBuffer context is only supported for one thread for now!\n"); - } - This->pbufferContext->tid = tid; - context = This->pbufferContext; - } - else - { - ERR("Failed to create a buffer context and drawable, falling back to back buffer offscreen rendering.\n"); - wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER; - goto retry; - } + context = current_context; } else { - /* Stay with the currently active context. */ - if (current_context - && ((IWineD3DSurfaceImpl *)current_context->surface)->resource.device == This) - { - context = current_context; - } - else - { - /* This may happen if the app jumps straight into offscreen rendering - * Start using the context of the primary swapchain. tid == 0 is no problem - * for findThreadContextForSwapChain. - * - * Can also happen on thread switches - in that case findThreadContextForSwapChain - * is perfect to call. */ - context = findThreadContextForSwapChain(This->swapchains[0], tid); - } + /* This may happen if the app jumps straight into offscreen rendering + * Start using the context of the primary swapchain. tid == 0 is no problem + * for findThreadContextForSwapChain. + * + * Can also happen on thread switches - in that case findThreadContextForSwapChain + * is perfect to call. */ + context = findThreadContextForSwapChain(This->swapchains[0], tid); } old_render_offscreen = context->render_offscreen; @@ -2019,8 +1912,8 @@ retry: } else { - const struct GlPixelFormatDesc *old = ((IWineD3DSurfaceImpl *)context->current_rt)->resource.format_desc; - const struct GlPixelFormatDesc *new = ((IWineD3DSurfaceImpl *)target)->resource.format_desc; + const struct wined3d_format_desc *old = ((IWineD3DSurfaceImpl *)context->current_rt)->resource.format_desc; + const struct wined3d_format_desc *new = ((IWineD3DSurfaceImpl *)target)->resource.format_desc; if (old->format != new->format) { diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index c5fa6ba280f..ed714b1620b 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -433,7 +433,7 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, gl_info); UINT pow2_edge_length; unsigned int i, j; UINT tmp_w; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6682aa4635e..5355f51ae9c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -334,7 +334,7 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, static void stream_info_element_from_strided(const struct wined3d_gl_info *gl_info, const struct WineDirect3DStridedData *strided, struct wined3d_stream_info_element *e) { - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(strided->format, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(strided->format, gl_info); e->format_desc = format_desc; e->stride = strided->dwStride; e->data = strided->lpData; @@ -494,6 +494,68 @@ void device_preload_textures(IWineD3DDeviceImpl *device) } } +BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) +{ + struct wined3d_context **new_array; + + TRACE("Adding context %p.\n", context); + + if (!device->contexts) new_array = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_array)); + else new_array = HeapReAlloc(GetProcessHeap(), 0, device->contexts, sizeof(*new_array) * (device->numContexts + 1)); + + if (!new_array) + { + ERR("Failed to grow the context array.\n"); + return FALSE; + } + + new_array[device->numContexts++] = context; + device->contexts = new_array; + return TRUE; +} + +void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) +{ + struct wined3d_context **new_array; + BOOL found = FALSE; + UINT i; + + TRACE("Removing context %p.\n", context); + + for (i = 0; i < device->numContexts; ++i) + { + if (device->contexts[i] == context) + { + found = TRUE; + break; + } + } + + if (!found) + { + ERR("Context %p doesn't exist in context array.\n", context); + return; + } + + if (!--device->numContexts) + { + HeapFree(GetProcessHeap(), 0, device->contexts); + device->contexts = NULL; + return; + } + + memmove(&device->contexts[i], &device->contexts[i + 1], (device->numContexts - i) * sizeof(*device->contexts)); + new_array = HeapReAlloc(GetProcessHeap(), 0, device->contexts, device->numContexts * sizeof(*device->contexts)); + if (!new_array) + { + ERR("Failed to shrink context array. Oh well.\n"); + return; + } + + device->contexts = new_array; +} + + /********************************************************** * IUnknown parts follows **********************************************************/ @@ -1156,7 +1218,8 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the /* Now compute offsets, and initialize the rest of the fields */ for (idx = 0, offset = 0; idx < size; ++idx) { - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(elements[idx].format, &This->adapter->gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(elements[idx].format, + &This->adapter->gl_info); elements[idx].input_slot = 0; elements[idx].method = WINED3DDECLMETHOD_DEFAULT; elements[idx].offset = offset; @@ -1429,6 +1492,30 @@ static void destroy_dummy_textures(IWineD3DDeviceImpl *device, const struct wine memset(device->dummyTextureName, 0, gl_info->limits.textures * sizeof(*device->dummyTextureName)); } +static HRESULT WINAPI IWineD3DDeviceImpl_AcquireFocusWindow(IWineD3DDevice *iface, HWND window) +{ + IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; + + if (!wined3d_register_window(window, device)) + { + ERR("Failed to register window %p.\n", window); + return E_FAIL; + } + + device->focus_window = window; + SetForegroundWindow(window); + + return WINED3D_OK; +} + +static void WINAPI IWineD3DDeviceImpl_ReleaseFocusWindow(IWineD3DDevice *iface) +{ + IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; + + if (device->focus_window) wined3d_unregister_window(device->focus_window); + device->focus_window = NULL; +} + static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters) { @@ -1445,17 +1532,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, if(This->d3d_initialized) return WINED3DERR_INVALIDCALL; if(!This->adapter->opengl) return WINED3DERR_INVALIDCALL; - if (!pPresentationParameters->Windowed) - { - This->focus_window = This->createParms.hFocusWindow; - if (!This->focus_window) This->focus_window = pPresentationParameters->hDeviceWindow; - if (!wined3d_register_window(This->focus_window, This)) - { - ERR("Failed to register window %p.\n", This->focus_window); - return E_FAIL; - } - } - TRACE("(%p) : Creating stateblock\n", This); /* Creating the startup stateBlock - Note Special Case: 0 => Don't fill in yet! */ hr = IWineD3DDevice_CreateStateBlock(iface, @@ -1509,8 +1585,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, } } - if (This->focus_window) SetFocus(This->focus_window); - /* Setup the implicit swapchain. This also initializes a context. */ TRACE("Creating implicit swapchain\n"); hr = IWineD3DDeviceParent_CreateSwapChain(This->device_parent, @@ -1583,10 +1657,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, This->offscreenBuffer = GL_COLOR_ATTACHMENT0; break; - case ORM_PBUFFER: - This->offscreenBuffer = GL_BACK; - break; - case ORM_BACKBUFFER: { if (context_get_current()->aux_buffers > 0) @@ -1645,7 +1715,6 @@ err_out: if (This->shader_priv) { This->shader_backend->shader_free_private(iface); } - if (This->focus_window) wined3d_unregister_window(This->focus_window); return hr; } @@ -1720,9 +1789,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, } } - /* Delete the pbuffer context if there is any */ - if(This->pbufferContext) context_destroy(This, This->pbufferContext); - /* Delete the mouse cursor texture */ if(This->cursorTexture) { ENTER_GL(); @@ -1828,8 +1894,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, This->d3d_initialized = FALSE; - if (This->focus_window) wined3d_unregister_window(This->focus_window); - return WINED3D_OK; } @@ -1867,8 +1931,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U const WINED3DDISPLAYMODE* pMode) { DEVMODEW devmode; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + const struct wined3d_format_desc *format_desc = getFormatDescEntry(pMode->Format, &This->adapter->gl_info); LONG ret; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(pMode->Format, &This->adapter->gl_info); RECT clip_rc; TRACE("(%p)->(%d,%p) Mode=%dx%dx@%d, %s\n", This, iSwapChain, pMode, pMode->Width, pMode->Height, pMode->RefreshRate, debug_d3dformat(pMode->Format)); @@ -4250,15 +4314,42 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Present(IWineD3DDevice *iface, return WINED3D_OK; } +static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const WINED3DVIEWPORT *viewport, + const RECT *scissor_rect, const WINED3DRECT *clear_rect) +{ + /* partial viewport*/ + if (viewport->X != 0 || viewport->Y != 0 + || viewport->Width < target->currentDesc.Width + || viewport->Height < target->currentDesc.Height) + return FALSE; + + /* partial scissor rect */ + if (scissor_rect && (scissor_rect->left > 0 || scissor_rect->top > 0 + || scissor_rect->right < target->currentDesc.Width + || scissor_rect->bottom < target->currentDesc.Height)) + return FALSE; + + /* partial clear rect */ + if (clear_rect && (clear_rect->x1 > 0 || clear_rect->y1 > 0 + || clear_rect->x2 < target->currentDesc.Width + || clear_rect->y2 < target->currentDesc.Height)) + return FALSE; + + return TRUE; +} + /* Not called from the VTable (internal subroutine) */ -HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count, - CONST WINED3DRECT* pRects, DWORD Flags, WINED3DCOLOR Color, - float Z, DWORD Stencil) { +HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count, + const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) +{ + IWineD3DStateBlockImpl *stateblock = This->stateBlock; + const RECT *scissor_rect = stateblock->renderState[WINED3DRS_SCISSORTESTENABLE] ? &stateblock->scissorRect : NULL; + const WINED3DRECT *clear_rect = (Count > 0 && pRects) ? pRects : NULL; + const WINED3DVIEWPORT *vp = &stateblock->viewport; GLbitfield glMask = 0; unsigned int i; WINED3DRECT curRect; RECT vp_rect; - const WINED3DVIEWPORT *vp = &This->stateBlock->viewport; UINT drawable_width, drawable_height; IWineD3DSurfaceImpl *depth_stencil = (IWineD3DSurfaceImpl *) This->stencilBufferTarget; struct wined3d_context *context; @@ -4272,32 +4363,19 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa * the drawable up to date. We have to check all settings that limit the clear area though. Do not bother * checking all this if the dest surface is in the drawable anyway. */ - if((Flags & WINED3DCLEAR_TARGET) && !(target->Flags & SFLAG_INDRAWABLE)) { - while(1) { - if(vp->X != 0 || vp->Y != 0 || - vp->Width < target->currentDesc.Width || vp->Height < target->currentDesc.Height) { - IWineD3DSurface_LoadLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, NULL); - break; - } - if(This->stateBlock->renderState[WINED3DRS_SCISSORTESTENABLE] && ( - This->stateBlock->scissorRect.left > 0 || This->stateBlock->scissorRect.top > 0 || - This->stateBlock->scissorRect.right < target->currentDesc.Width || - This->stateBlock->scissorRect.bottom < target->currentDesc.Height)) { - IWineD3DSurface_LoadLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, NULL); - break; - } - if(Count > 0 && pRects && ( - pRects[0].x1 > 0 || pRects[0].y1 > 0 || - pRects[0].x2 < target->currentDesc.Width || - pRects[0].y2 < target->currentDesc.Height)) { - IWineD3DSurface_LoadLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, NULL); - break; - } - break; - } + if (Flags & WINED3DCLEAR_TARGET && !(target->Flags & SFLAG_INDRAWABLE)) + { + if (!is_full_clear(target, vp, scissor_rect, clear_rect)) + IWineD3DSurface_LoadLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, NULL); } context = context_acquire(This, (IWineD3DSurface *)target, CTXUSAGE_CLEAR); + if (!context->valid) + { + context_release(context); + WARN("Invalid context, skipping clear.\n"); + return WINED3D_OK; + } target->get_drawable_size(context, &drawable_width, &drawable_height); @@ -4319,22 +4397,8 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa glMask = glMask | GL_DEPTH_BUFFER_BIT; IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); - if (vp->X != 0 || vp->Y != 0 || - vp->Width < depth_stencil->currentDesc.Width || vp->Height < depth_stencil->currentDesc.Height) { - surface_load_ds_location(This->stencilBufferTarget, context, location); - } - else if (This->stateBlock->renderState[WINED3DRS_SCISSORTESTENABLE] && ( - This->stateBlock->scissorRect.left > 0 || This->stateBlock->scissorRect.top > 0 || - This->stateBlock->scissorRect.right < depth_stencil->currentDesc.Width || - This->stateBlock->scissorRect.bottom < depth_stencil->currentDesc.Height)) { - surface_load_ds_location(This->stencilBufferTarget, context, location); - } - else if (Count > 0 && pRects && ( - pRects[0].x1 > 0 || pRects[0].y1 > 0 || - pRects[0].x2 < depth_stencil->currentDesc.Width || - pRects[0].y2 < depth_stencil->currentDesc.Height)) { + if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect)) surface_load_ds_location(This->stencilBufferTarget, context, location); - } } if (Flags & WINED3DCLEAR_TARGET) { @@ -5084,6 +5148,7 @@ static float WINAPI IWineD3DDeviceImpl_GetNPatchMode(IWineD3DDevice *iface) } static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3DSurface *pSourceSurface, CONST RECT* pSourceRect, IWineD3DSurface *pDestinationSurface, CONST POINT* pDestPoint) { + const struct wined3d_format_desc *src_format_desc, *dst_format_desc; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; /** TODO: remove casts to IWineD3DSurfaceImpl * NOTE: move code to surface to accomplish this @@ -5098,7 +5163,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, WINED3DPOOL srcPool, destPool; int offset = 0; int rowoffset = 0; /* how many bytes to add onto the end of a row to wraparound to the beginning of the next */ - const struct GlPixelFormatDesc *src_format_desc, *dst_format_desc; GLenum dummy; DWORD sampler; int bpp; @@ -5370,19 +5434,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DeletePatch(IWineD3DDevice *iface, UINT return WINED3DERR_INVALIDCALL; } -static IWineD3DSwapChain *get_swapchain(IWineD3DSurface *target) { - HRESULT hr; - IWineD3DSwapChain *swapchain; - - hr = IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **)&swapchain); - if (SUCCEEDED(hr)) { - IWineD3DSwapChain_Release((IUnknown *)swapchain); - return swapchain; - } - - return NULL; -} - static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, const WINED3DRECT *rect, const float color[4]) { @@ -5652,104 +5703,97 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface } static HRESULT WINAPI IWineD3DDeviceImpl_SetFrontBackBuffers(IWineD3DDevice *iface, - IWineD3DSurface *Front, IWineD3DSurface *Back) + IWineD3DSurface *front, IWineD3DSurface *back) { - IWineD3DSurfaceImpl *FrontImpl = (IWineD3DSurfaceImpl *) Front; - IWineD3DSurfaceImpl *BackImpl = (IWineD3DSurfaceImpl *) Back; - IWineD3DSwapChainImpl *Swapchain; + IWineD3DSurfaceImpl *front_impl = (IWineD3DSurfaceImpl *)front; + IWineD3DSurfaceImpl *back_impl = (IWineD3DSurfaceImpl *)back; + IWineD3DSwapChainImpl *swapchain; HRESULT hr; - TRACE("iface %p, front %p, back %p.\n", iface, Front, Back); + TRACE("iface %p, front %p, back %p.\n", iface, front, back); - hr = IWineD3DDevice_GetSwapChain(iface, 0, (IWineD3DSwapChain **) &Swapchain); - if(hr != WINED3D_OK) { - ERR("Can't get the swapchain\n"); + if (FAILED(hr = IWineD3DDevice_GetSwapChain(iface, 0, (IWineD3DSwapChain **)&swapchain))) + { + ERR("Failed to get the swapchain, hr %#x.\n", hr); return hr; } - /* Make sure to release the swapchain */ - IWineD3DSwapChain_Release((IWineD3DSwapChain *) Swapchain); - - if(FrontImpl && !(FrontImpl->resource.usage & WINED3DUSAGE_RENDERTARGET) ) { - ERR("Trying to set a front buffer which doesn't have WINED3DUSAGE_RENDERTARGET usage\n"); - return WINED3DERR_INVALIDCALL; - } - else if(BackImpl && !(BackImpl->resource.usage & WINED3DUSAGE_RENDERTARGET)) { - ERR("Trying to set a back buffer which doesn't have WINED3DUSAGE_RENDERTARGET usage\n"); + if (front_impl && !(front_impl->resource.usage & WINED3DUSAGE_RENDERTARGET)) + { + ERR("Trying to set a front buffer which doesn't have WINED3DUSAGE_RENDERTARGET usage.\n"); + IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); return WINED3DERR_INVALIDCALL; } - if(Swapchain->frontBuffer != Front) { - TRACE("Changing the front buffer from %p to %p\n", Swapchain->frontBuffer, Front); - - if(Swapchain->frontBuffer) + if (back_impl) + { + if (!(back_impl->resource.usage & WINED3DUSAGE_RENDERTARGET)) { - IWineD3DSurface_SetContainer(Swapchain->frontBuffer, NULL); - ((IWineD3DSurfaceImpl *)Swapchain->frontBuffer)->Flags &= ~SFLAG_SWAPCHAIN; + ERR("Trying to set a back buffer which doesn't have WINED3DUSAGE_RENDERTARGET usage.\n"); + IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); + return WINED3DERR_INVALIDCALL; } - Swapchain->frontBuffer = Front; - if(Swapchain->frontBuffer) { - IWineD3DSurface_SetContainer(Swapchain->frontBuffer, (IWineD3DBase *) Swapchain); - ((IWineD3DSurfaceImpl *)Swapchain->frontBuffer)->Flags |= SFLAG_SWAPCHAIN; + if (!swapchain->backBuffer) + { + swapchain->backBuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*swapchain->backBuffer)); + if (!swapchain->backBuffer) + { + ERR("Failed to allocate back buffer array memory.\n"); + IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); + return E_OUTOFMEMORY; + } } } - if(Back && !Swapchain->backBuffer) { - /* We need memory for the back buffer array - only one back buffer this way */ - Swapchain->backBuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DSurface *)); - if(!Swapchain->backBuffer) { - ERR("Out of memory\n"); - return E_OUTOFMEMORY; + if (swapchain->frontBuffer != front) + { + TRACE("Changing the front buffer from %p to %p.\n", swapchain->frontBuffer, front); + + if (swapchain->frontBuffer) + { + IWineD3DSurface_SetContainer(swapchain->frontBuffer, NULL); + ((IWineD3DSurfaceImpl *)swapchain->frontBuffer)->Flags &= ~SFLAG_SWAPCHAIN; } - } + swapchain->frontBuffer = front; - if(Swapchain->backBuffer[0] != Back) { - TRACE("Changing the back buffer from %p to %p\n", Swapchain->backBuffer, Back); + if (front) + { + IWineD3DSurface_SetContainer(front, (IWineD3DBase *)swapchain); + front_impl->Flags |= SFLAG_SWAPCHAIN; + } + } - /* What to do about the context here in the case of multithreading? Not sure. - * This function is called by IDirect3D7::CreateDevice so in theory its initialization code - */ - WARN("No active context?\n"); + if (swapchain->backBuffer[0] != back) + { + TRACE("Changing the back buffer from %p to %p.\n", swapchain->backBuffer[0], back); - ENTER_GL(); - if(!Swapchain->backBuffer[0]) { - /* GL was told to draw to the front buffer at creation, - * undo that - */ - glDrawBuffer(GL_BACK); - checkGLcall("glDrawBuffer(GL_BACK)"); - /* Set the backbuffer count to 1 because other code uses it to fing the back buffers */ - Swapchain->presentParms.BackBufferCount = 1; - } else if (!Back) { - /* That makes problems - disable for now */ - /* glDrawBuffer(GL_FRONT); */ - checkGLcall("glDrawBuffer(GL_FRONT)"); - /* We have lost our back buffer, set this to 0 to avoid confusing other code */ - Swapchain->presentParms.BackBufferCount = 0; + if (swapchain->backBuffer[0]) + { + IWineD3DSurface_SetContainer(swapchain->backBuffer[0], NULL); + ((IWineD3DSurfaceImpl *)swapchain->backBuffer[0])->Flags &= ~SFLAG_SWAPCHAIN; } - LEAVE_GL(); + swapchain->backBuffer[0] = back; - if(Swapchain->backBuffer[0]) + if (back) { - IWineD3DSurface_SetContainer(Swapchain->backBuffer[0], NULL); - ((IWineD3DSurfaceImpl *)Swapchain->backBuffer[0])->Flags &= ~SFLAG_SWAPCHAIN; + swapchain->presentParms.BackBufferWidth = back_impl->currentDesc.Width; + swapchain->presentParms.BackBufferHeight = back_impl->currentDesc.Height; + swapchain->presentParms.BackBufferFormat = back_impl->resource.format_desc->format; + swapchain->presentParms.BackBufferCount = 1; + + IWineD3DSurface_SetContainer(back, (IWineD3DBase *)swapchain); + back_impl->Flags |= SFLAG_SWAPCHAIN; } - Swapchain->backBuffer[0] = Back; - - if(Swapchain->backBuffer[0]) { - IWineD3DSurface_SetContainer(Swapchain->backBuffer[0], (IWineD3DBase *) Swapchain); - ((IWineD3DSurfaceImpl *)Swapchain->backBuffer[0])->Flags |= SFLAG_SWAPCHAIN; - Swapchain->presentParms.BackBufferWidth = BackImpl->currentDesc.Width; - Swapchain->presentParms.BackBufferHeight = BackImpl->currentDesc.Height; - Swapchain->presentParms.BackBufferFormat = BackImpl->resource.format_desc->format; - } else { - HeapFree(GetProcessHeap(), 0, Swapchain->backBuffer); - Swapchain->backBuffer = NULL; + else + { + swapchain->presentParms.BackBufferCount = 0; + HeapFree(GetProcessHeap(), 0, swapchain->backBuffer); + swapchain->backBuffer = NULL; } - } + IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); return WINED3D_OK; } @@ -5772,7 +5816,6 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; GLbitfield mask = GL_COLOR_BUFFER_BIT; /* TODO: Support blitting depth/stencil surfaces */ - IWineD3DSwapChain *src_swapchain, *dst_swapchain; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; GLenum gl_filter; @@ -5802,14 +5845,17 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED IWineD3DSurface_LoadLocation(src_surface, SFLAG_INDRAWABLE, NULL); IWineD3DSurface_LoadLocation(dst_surface, SFLAG_INDRAWABLE, NULL); - /* Attach src surface to src fbo */ - src_swapchain = get_swapchain(src_surface); - dst_swapchain = get_swapchain(dst_surface); - - if (src_swapchain) context = context_acquire(This, src_surface, CTXUSAGE_RESOURCELOAD); - else if (dst_swapchain) context = context_acquire(This, dst_surface, CTXUSAGE_RESOURCELOAD); + if (!surface_is_offscreen(src_surface)) context = context_acquire(This, src_surface, CTXUSAGE_RESOURCELOAD); + else if (!surface_is_offscreen(dst_surface)) context = context_acquire(This, dst_surface, CTXUSAGE_RESOURCELOAD); else context = context_acquire(This, NULL, CTXUSAGE_RESOURCELOAD); + if (!context->valid) + { + context_release(context); + WARN("Invalid context, skipping blit.\n"); + return; + } + gl_info = context->gl_info; if (!surface_is_offscreen(src_surface)) @@ -5821,8 +5867,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED if(buffer == GL_FRONT) { RECT windowsize; UINT h; - ClientToScreen(((IWineD3DSwapChainImpl *)src_swapchain)->win_handle, &offset); - GetClientRect(((IWineD3DSwapChainImpl *)src_swapchain)->win_handle, &windowsize); + ClientToScreen(context->win_handle, &offset); + GetClientRect(context->win_handle, &windowsize); h = windowsize.bottom - windowsize.top; src_rect->x1 -= offset.x; src_rect->x2 -=offset.x; src_rect->y1 = offset.y + h - src_rect->y1; @@ -5857,8 +5903,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED if(buffer == GL_FRONT) { RECT windowsize; UINT h; - ClientToScreen(((IWineD3DSwapChainImpl *)dst_swapchain)->win_handle, &offset); - GetClientRect(((IWineD3DSwapChainImpl *)dst_swapchain)->win_handle, &windowsize); + ClientToScreen(context->win_handle, &offset); + GetClientRect(context->win_handle, &windowsize); h = windowsize.bottom - windowsize.top; dst_rect->x1 -= offset.x; dst_rect->x2 -=offset.x; dst_rect->y1 = offset.y + h - dst_rect->y1; @@ -6065,15 +6111,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* i if (SUCCEEDED(IWineD3DSurface_LockRect(pCursorBitmap, &rect, NULL, WINED3DLOCK_READONLY))) { const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - const struct GlPixelFormatDesc *glDesc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, gl_info); struct wined3d_context *context; char *mem, *bits = rect.pBits; - GLint intfmt = glDesc->glInternal; - GLint format = glDesc->glFormat; - GLint type = glDesc->glType; + GLint intfmt = format_desc->glInternal; + GLint format = format_desc->glFormat; + GLint type = format_desc->glType; INT height = This->cursorHeight; INT width = This->cursorWidth; - INT bpp = glDesc->byte_count; + INT bpp = format_desc->byte_count; DWORD sampler; INT i; @@ -6387,8 +6433,7 @@ HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain * } target = (IWineD3DSurfaceImpl *)(swapchain->backBuffer ? swapchain->backBuffer[0] : swapchain->frontBuffer); - context = context_create(This, target, swapchain->win_handle, FALSE, &swapchain->presentParms); - if (!context) + if (!(context = context_create(swapchain, target))) { WARN("Failed to create context.\n"); HeapFree(GetProcessHeap(), 0, swapchain->context); @@ -6583,24 +6628,26 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE } } - if((pPresentationParameters->Windowed && !swapchain->presentParms.Windowed) || - (swapchain->presentParms.Windowed && !pPresentationParameters->Windowed) || - DisplayModeChanged) { - + if (!pPresentationParameters->Windowed != !swapchain->presentParms.Windowed + || DisplayModeChanged) + { IWineD3DDevice_SetDisplayMode(iface, 0, &mode); - if(swapchain->win_handle && !pPresentationParameters->Windowed) { + if (!pPresentationParameters->Windowed) + { if(swapchain->presentParms.Windowed) { /* switch from windowed to fs */ swapchain_setup_fullscreen_window(swapchain, pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight); } else { /* Fullscreen -> fullscreen mode change */ - MoveWindow(swapchain->win_handle, 0, 0, + MoveWindow(swapchain->device_window, 0, 0, pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight, TRUE); } - } else if(swapchain->win_handle && !swapchain->presentParms.Windowed) { + } + else if (!swapchain->presentParms.Windowed) + { /* Fullscreen -> windowed switch */ swapchain_restore_fullscreen_window(swapchain); } @@ -6845,6 +6892,28 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EnumResources(IWineD3DDevice *iface, D3 return WINED3D_OK; } +static HRESULT WINAPI IWineD3DDeviceImpl_GetSurfaceFromDC(IWineD3DDevice *iface, HDC dc, IWineD3DSurface **surface) +{ + IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; + IWineD3DResourceImpl *resource; + + LIST_FOR_EACH_ENTRY(resource, &This->resources, IWineD3DResourceImpl, resource.resource_list_entry) + { + WINED3DRESOURCETYPE type = IWineD3DResource_GetType((IWineD3DResource *)resource); + if (type == WINED3DRTYPE_SURFACE) + { + if (((IWineD3DSurfaceImpl *)resource)->hDC == dc) + { + TRACE("Found surface %p for dc %p.\n", resource, dc); + *surface = (IWineD3DSurface *)resource; + return WINED3D_OK; + } + } + } + + return WINED3DERR_INVALIDCALL; +} + /********************************************************** * IWineD3DDevice VTbl follows **********************************************************/ @@ -6993,7 +7062,10 @@ static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl = IWineD3DDeviceImpl_UpdateSurface, IWineD3DDeviceImpl_GetFrontBufferData, /*** object tracking ***/ - IWineD3DDeviceImpl_EnumResources + IWineD3DDeviceImpl_EnumResources, + IWineD3DDeviceImpl_GetSurfaceFromDC, + IWineD3DDeviceImpl_AcquireFocusWindow, + IWineD3DDeviceImpl_ReleaseFocusWindow, }; HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, @@ -7090,14 +7162,6 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) { } } -void get_drawable_size_pbuffer(struct wined3d_context *context, UINT *width, UINT *height) -{ - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->current_rt)->resource.device; - /* The drawable size of a pbuffer render target is the current pbuffer size. */ - *width = device->pbufferWidth; - *height = device->pbufferHeight; -} - void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height) { IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->current_rt; @@ -7108,13 +7172,12 @@ void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *h void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->surface; + IWineD3DSwapChainImpl *swapchain = context->swapchain; /* The drawable size of a backbuffer / aux buffer offscreen target is the size of the * current context's drawable, which is the size of the back buffer of the swapchain - * the active context belongs to. The back buffer of the swapchain is stored as the - * surface the context belongs to. */ - *width = surface->currentDesc.Width; - *height = surface->currentDesc.Height; + * the active context belongs to. */ + *width = swapchain->presentParms.BackBufferWidth; + *height = swapchain->presentParms.BackBufferHeight; } LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index abed2b6ee69..64542a10965 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -669,6 +669,56 @@ static BOOL match_broken_nv_clip(const struct wined3d_gl_info *gl_info, const ch return ret; } +static BOOL match_fbo_tex_update(const struct wined3d_gl_info *gl_info, const char *gl_renderer, + enum wined3d_gl_vendor gl_vendor, enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device) +{ + char data[4 * 4 * 4]; + GLuint tex, fbo; + GLenum status; + + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return FALSE; + + memset(data, 0xcc, sizeof(data)); + + glGenTextures(1, &tex); + glBindTexture(GL_TEXTURE_2D, tex); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); + checkGLcall("glTexImage2D"); + + gl_info->fbo_ops.glGenFramebuffers(1, &fbo); + gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, fbo); + gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0); + checkGLcall("glFramebufferTexture2D"); + + status = gl_info->fbo_ops.glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) ERR("FBO status %#x\n", status); + checkGLcall("glCheckFramebufferStatus"); + + memset(data, 0x11, sizeof(data)); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data); + checkGLcall("glTexSubImage2D"); + + glClearColor(0.996, 0.729, 0.745, 0.792); + glClear(GL_COLOR_BUFFER_BIT); + checkGLcall("glClear"); + + glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data); + checkGLcall("glGetTexImage"); + + gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0); + gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindTexture(GL_TEXTURE_2D, 0); + checkGLcall("glBindTexture"); + + gl_info->fbo_ops.glDeleteFramebuffers(1, &fbo); + glDeleteTextures(1, &tex); + checkGLcall("glDeleteTextures"); + + return *(DWORD *)data == 0x11111111; +} + static void quirk_arb_constants(struct wined3d_gl_info *gl_info) { TRACE_(d3d_caps)("Using ARB vs constant limit(=%u) for GLSL.\n", gl_info->limits.arb_vs_native_constants); @@ -797,6 +847,11 @@ static void quirk_disable_nvvp_clip(struct wined3d_gl_info *gl_info) gl_info->quirks |= WINED3D_QUIRK_NV_CLIP_BROKEN; } +static void quirk_fbo_tex_update(struct wined3d_gl_info *gl_info) +{ + gl_info->quirks |= WINED3D_QUIRK_FBO_TEX_UPDATE; +} + struct driver_quirk { BOOL (*match)(const struct wined3d_gl_info *gl_info, const char *gl_renderer, @@ -876,6 +931,11 @@ static const struct driver_quirk quirk_table[] = quirk_disable_nvvp_clip, "Apple NV_vertex_program clip bug quirk" }, + { + match_fbo_tex_update, + quirk_fbo_tex_update, + "FBO rebind for attachment updates" + }, }; /* Certain applications (Steam) complain if we report an outdated driver version. In general, @@ -2522,10 +2582,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) ThisExtn[len] = '\0'; TRACE_(d3d_caps)("- %s\n", debugstr_a(ThisExtn)); - if (!strcmp(ThisExtn, "WGL_ARB_pbuffer")) { - gl_info->supported[WGL_ARB_PBUFFER] = TRUE; - TRACE_(d3d_caps)("FOUND: WGL_ARB_pbuffer support\n"); - } if (!strcmp(ThisExtn, "WGL_ARB_pixel_format")) { gl_info->supported[WGL_ARB_PIXEL_FORMAT] = TRUE; TRACE_(d3d_caps)("FOUND: WGL_ARB_pixel_format support\n"); @@ -2590,7 +2646,7 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad /* TODO: Store modes per adapter and read it from the adapter structure */ if (Adapter == 0) { /* Display */ - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(Format, &This->adapters[Adapter].gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(Format, &This->adapters[Adapter].gl_info); UINT format_bits = format_desc->byte_count * CHAR_BIT; unsigned int i = 0; unsigned int j = 0; @@ -2637,7 +2693,7 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte /* TODO: Store modes per adapter and read it from the adapter structure */ if (Adapter == 0) { - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(Format, &This->adapters[Adapter].gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(Format, &This->adapters[Adapter].gl_info); UINT format_bits = format_desc->byte_count * CHAR_BIT; DEVMODEW DevModeW; int ModeIdx = 0; @@ -2802,7 +2858,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad } static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined3d_gl_info *gl_info, - const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc) + const WineD3D_PixelFormat *cfg, const struct wined3d_format_desc *format_desc) { short redSize, greenSize, blueSize, alphaSize, colorBits; @@ -2851,7 +2907,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined } static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3d_gl_info *gl_info, - const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc) + const WineD3D_PixelFormat *cfg, const struct wined3d_format_desc *format_desc) { short depthSize, stencilSize; BOOL lockable = FALSE; @@ -2890,8 +2946,8 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT int nCfgs; const WineD3D_PixelFormat *cfgs; const struct wined3d_adapter *adapter; - const struct GlPixelFormatDesc *rt_format_desc; - const struct GlPixelFormatDesc *ds_format_desc; + const struct wined3d_format_desc *rt_format_desc; + const struct wined3d_format_desc *ds_format_desc; int it; WARN_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))\n", @@ -2930,7 +2986,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U WINED3DFORMAT SurfaceFormat, BOOL Windowed, WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels) { IWineD3DImpl *This = (IWineD3DImpl *)iface; - const struct GlPixelFormatDesc *glDesc; + const struct wined3d_format_desc *glDesc; const struct wined3d_adapter *adapter; TRACE_(d3d_caps)("(%p)-> (Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x, pQual:%p)\n", @@ -3110,7 +3166,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter /* Check if we support bumpmapping for a format */ static BOOL CheckBumpMapCapability(struct wined3d_adapter *adapter, - WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc) + WINED3DDEVTYPE DeviceType, const struct wined3d_format_desc *format_desc) { switch(format_desc->format) { @@ -3138,7 +3194,7 @@ static BOOL CheckBumpMapCapability(struct wined3d_adapter *adapter, /* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */ static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter, - const struct GlPixelFormatDesc *display_format_desc, const struct GlPixelFormatDesc *ds_format_desc) + const struct wined3d_format_desc *display_format_desc, const struct wined3d_format_desc *ds_format_desc) { int it=0; @@ -3161,7 +3217,7 @@ static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter, return FALSE; } -static BOOL CheckFilterCapability(struct wined3d_adapter *adapter, const struct GlPixelFormatDesc *format_desc) +static BOOL CheckFilterCapability(struct wined3d_adapter *adapter, const struct wined3d_format_desc *format_desc) { /* The flags entry of a format contains the filtering capability */ if (format_desc->Flags & WINED3DFMT_FLAG_FILTERING) return TRUE; @@ -3171,7 +3227,7 @@ static BOOL CheckFilterCapability(struct wined3d_adapter *adapter, const struct /* Check the render target capabilities of a format */ static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter, - const struct GlPixelFormatDesc *adapter_format_desc, const struct GlPixelFormatDesc *check_format_desc) + const struct wined3d_format_desc *adapter_format_desc, const struct wined3d_format_desc *check_format_desc) { /* Filter out non-RT formats */ if (!(check_format_desc->Flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE; @@ -3204,23 +3260,9 @@ static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter, return TRUE; } } - } else if(wined3d_settings.offscreen_rendering_mode == ORM_PBUFFER) { - /* We can probably use this function in FBO mode too on some drivers to get some basic indication of the capabilities. */ - WineD3D_PixelFormat *cfgs = adapter->cfgs; - int it; - - /* Check if there is a WGL pixel format matching the requirements, the pixel format should also be usable with pbuffers */ - for (it = 0; it < adapter->nCfgs; ++it) - { - if (cfgs[it].pbufferDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, - &cfgs[it], check_format_desc)) - { - TRACE_(d3d_caps)("iPixelFormat=%d is compatible with CheckFormat=%s\n", - cfgs[it].iPixelFormat, debug_d3dformat(check_format_desc->format)); - return TRUE; - } - } - } else if(wined3d_settings.offscreen_rendering_mode == ORM_FBO){ + } + else if(wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { /* For now return TRUE for FBOs until we have some proper checks. * Note that this function will only be called when the format is around for texturing. */ return TRUE; @@ -3228,7 +3270,7 @@ static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter, return FALSE; } -static BOOL CheckSrgbReadCapability(struct wined3d_adapter *adapter, const struct GlPixelFormatDesc *format_desc) +static BOOL CheckSrgbReadCapability(struct wined3d_adapter *adapter, const struct wined3d_format_desc *format_desc) { const struct wined3d_gl_info *gl_info = &adapter->gl_info; @@ -3262,7 +3304,7 @@ static BOOL CheckSrgbReadCapability(struct wined3d_adapter *adapter, const struc } static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter, - WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc) + WINED3DDEVTYPE DeviceType, const struct wined3d_format_desc *format_desc) { /* Only offer SRGB writing on X8R8G8B8/A8R8G8B8 when we use ARB or GLSL shaders as we are * doing the color fixup in shaders. @@ -3285,7 +3327,7 @@ static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter, /* Check if a format support blending in combination with pixel shaders */ static BOOL CheckPostPixelShaderBlendingCapability(struct wined3d_adapter *adapter, - const struct GlPixelFormatDesc *format_desc) + const struct wined3d_format_desc *format_desc) { /* The flags entry of a format contains the post pixel shader blending capability */ if (format_desc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) return TRUE; @@ -3293,7 +3335,7 @@ static BOOL CheckPostPixelShaderBlendingCapability(struct wined3d_adapter *adapt return FALSE; } -static BOOL CheckWrapAndMipCapability(struct wined3d_adapter *adapter, const struct GlPixelFormatDesc *format_desc) +static BOOL CheckWrapAndMipCapability(struct wined3d_adapter *adapter, const struct wined3d_format_desc *format_desc) { /* OpenGL supports mipmapping on all formats basically. Wrapping is unsupported, * but we have to report mipmapping so we cannot reject this flag. Tests show that @@ -3309,7 +3351,7 @@ static BOOL CheckWrapAndMipCapability(struct wined3d_adapter *adapter, const str /* Check if a texture format is supported on the given adapter */ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, - WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc) + WINED3DDEVTYPE DeviceType, const struct wined3d_format_desc *format_desc) { const struct wined3d_gl_info *gl_info = &adapter->gl_info; @@ -3539,8 +3581,10 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, return FALSE; } -static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, const struct GlPixelFormatDesc *adapter_format_desc, - WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *check_format_desc, WINED3DSURFTYPE SurfaceType) +static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, + const struct wined3d_format_desc *adapter_format_desc, + WINED3DDEVTYPE DeviceType, const struct wined3d_format_desc *check_format_desc, + WINED3DSURFTYPE SurfaceType) { if(SurfaceType == SURFACE_GDI) { switch(check_format_desc->format) @@ -3577,7 +3621,7 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, const struct if (CheckDepthStencilCapability(adapter, adapter_format_desc, check_format_desc)) return TRUE; /* If opengl can't process the format natively, the blitter may be able to convert it */ - if (adapter->blitter->color_fixup_supported(check_format_desc->color_fixup)) + if (adapter->blitter->color_fixup_supported(&adapter->gl_info, check_format_desc->color_fixup)) { TRACE_(d3d_caps)("[OK]\n"); return TRUE; @@ -3588,7 +3632,8 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, const struct return FALSE; } -static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter, const struct GlPixelFormatDesc *format_desc) +static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter, + const struct wined3d_format_desc *format_desc) { const struct wined3d_gl_info *gl_info = &adapter->gl_info; @@ -3623,8 +3668,8 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt IWineD3DImpl *This = (IWineD3DImpl *)iface; struct wined3d_adapter *adapter = &This->adapters[Adapter]; const struct wined3d_gl_info *gl_info = &adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(CheckFormat, gl_info); - const struct GlPixelFormatDesc *adapter_format_desc = getFormatDescEntry(AdapterFormat, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(CheckFormat, gl_info); + const struct wined3d_format_desc *adapter_format_desc = getFormatDescEntry(AdapterFormat, gl_info); DWORD UsageCaps = 0; TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%u,%s,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s))\n", @@ -5120,17 +5165,6 @@ BOOL InitAdapters(IWineD3DImpl *This) cfgs->doubleBuffer = values[9]; cfgs->auxBuffers = values[10]; - cfgs->pbufferDrawable = FALSE; - /* Check for pbuffer support when it is around as - * wglGetPixelFormatAttribiv fails for unknown attributes. */ - if (gl_info->supported[WGL_ARB_PBUFFER]) - { - int attrib = WGL_DRAW_TO_PBUFFER_ARB; - int value; - if(GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 1, &attrib, &value))) - cfgs->pbufferDrawable = value; - } - cfgs->numSamples = 0; /* Check multisample support */ if (gl_info->supported[ARB_MULTISAMPLE]) @@ -5145,7 +5179,11 @@ BOOL InitAdapters(IWineD3DImpl *This) } } - TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d, samples=%d, windowDrawable=%d, pbufferDrawable=%d\n", cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize, cfgs->numSamples, cfgs->windowDrawable, cfgs->pbufferDrawable); + TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, " + "depth=%d, stencil=%d, samples=%d, windowDrawable=%d\n", + cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, + cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, + cfgs->depthSize, cfgs->stencilSize, cfgs->numSamples, cfgs->windowDrawable); cfgs++; } } @@ -5182,14 +5220,17 @@ BOOL InitAdapters(IWineD3DImpl *This) cfgs->colorSize = ppfd.cColorBits; cfgs->depthSize = ppfd.cDepthBits; cfgs->stencilSize = ppfd.cStencilBits; - cfgs->pbufferDrawable = 0; cfgs->windowDrawable = (ppfd.dwFlags & PFD_DRAW_TO_WINDOW) ? 1 : 0; cfgs->iPixelType = (ppfd.iPixelType == PFD_TYPE_RGBA) ? WGL_TYPE_RGBA_ARB : WGL_TYPE_COLORINDEX_ARB; cfgs->doubleBuffer = (ppfd.dwFlags & PFD_DOUBLEBUFFER) ? 1 : 0; cfgs->auxBuffers = ppfd.cAuxBuffers; cfgs->numSamples = 0; - TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d, windowDrawable=%d, pbufferDrawable=%d\n", cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize, cfgs->windowDrawable, cfgs->pbufferDrawable); + TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, " + "depth=%d, stencil=%d, windowDrawable=%d\n", + cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, + cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, + cfgs->depthSize, cfgs->stencilSize, cfgs->windowDrawable); cfgs++; adapter->nCfgs++; } diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index b29d012b9d1..da7aab4b325 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -102,7 +102,6 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context } /* Start drawing in GL */ - VTRACE(("glBegin(%x)\n", glPrimType)); glBegin(glPrimType); if (si->use_map & (1 << WINED3D_FFP_POSITION)) @@ -226,13 +225,10 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context if (idxData != NULL) { /* Indexed so work out the number of strides to skip */ - if (idxSize == 2) { - VTRACE(("Idx for vertex %u = %u\n", vx_index, pIdxBufS[startIdx+vx_index])); + if (idxSize == 2) SkipnStrides = pIdxBufS[startIdx + vx_index] + This->stateBlock->loadBaseVertexIndex; - } else { - VTRACE(("Idx for vertex %u = %u\n", vx_index, pIdxBufL[startIdx+vx_index])); + else SkipnStrides = pIdxBufL[startIdx + vx_index] + This->stateBlock->loadBaseVertexIndex; - } } tmp_tex_mask = tex_mask; @@ -451,20 +447,16 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, const struct wined3d_stream } /* Start drawing in GL */ - VTRACE(("glBegin(%x)\n", glPrimitiveType)); glBegin(glPrimitiveType); for (vx_index = 0; vx_index < numberOfVertices; ++vx_index) { if (idxData != NULL) { /* Indexed so work out the number of strides to skip */ - if (idxSize == 2) { - VTRACE(("Idx for vertex %d = %d\n", vx_index, pIdxBufS[startIdx+vx_index])); + if (idxSize == 2) SkipnStrides = pIdxBufS[startIdx + vx_index] + stateblock->loadBaseVertexIndex; - } else { - VTRACE(("Idx for vertex %d = %d\n", vx_index, pIdxBufL[startIdx+vx_index])); + else SkipnStrides = pIdxBufL[startIdx + vx_index] + stateblock->loadBaseVertexIndex; - } } for (i = MAX_ATTRIBS - 1; i >= 0; i--) @@ -604,6 +596,12 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT This->isInDraw = TRUE; context = context_acquire(This, This->render_targets[0], CTXUSAGE_DRAWPRIM); + if (!context->valid) + { + context_release(context); + WARN("Invalid context, skipping draw.\n"); + return; + } if (This->stencilBufferTarget) { /* Note that this depends on the context_acquire() call above to set diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index cb23ee6aa0e..9bce13b6123 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -719,8 +719,8 @@ static void shader_glsl_load_np2fixup_constants( static void shader_glsl_load_constants(const struct wined3d_context *context, char usePixelShader, char useVertexShader) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + IWineD3DDeviceImpl *device = context->swapchain->device; IWineD3DStateBlockImpl* stateBlock = device->stateBlock; struct shader_glsl_priv *priv = device->shader_priv; @@ -2164,16 +2164,26 @@ static void shader_glsl_nrm(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; glsl_src_param_t src_param; + unsigned int mask_size; DWORD write_mask; char dst_mask[6]; write_mask = shader_glsl_get_write_mask(ins->dst, dst_mask); + mask_size = shader_glsl_get_write_mask_size(write_mask); shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param); shader_addline(buffer, "tmp0.x = length(%s);\n", src_param.param_str); shader_glsl_append_dst(buffer, ins); - shader_addline(buffer, "tmp0.x == 0.0 ? (%s * FLT_MAX) : (%s / tmp0.x));", - src_param.param_str, src_param.param_str); + if (mask_size > 1) + { + shader_addline(buffer, "tmp0.x == 0.0 ? vec%u(0.0) : (%s / tmp0.x));\n", + mask_size, src_param.param_str); + } + else + { + shader_addline(buffer, "tmp0.x == 0.0 ? 0.0 : (%s / tmp0.x));\n", + src_param.param_str); + } } /** Process the WINED3DSIO_EXPP instruction in GLSL: @@ -4530,8 +4540,8 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info, /* GL locking is done by the caller */ static void shader_glsl_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) { - IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->surface)->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + IWineD3DDeviceImpl *device = context->swapchain->device; struct shader_glsl_priv *priv = device->shader_priv; GLhandleARB program_id = 0; GLenum old_vertex_color_clamp, current_vertex_color_clamp; diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index b867586096d..154ff8b6da5 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type, - IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc, + IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format_desc *format_desc, WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { struct IWineD3DResourceClass *resource = &((IWineD3DResourceImpl *)iface)->resource; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 5efe069bb19..b9578076c78 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4225,11 +4225,6 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB GL_EXTCALL(glVertexBlendARB(e->format_desc->component_count + 1)); - VTRACE(("glWeightPointerARB(%d, GL_FLOAT, %d, %p)\n", - WINED3D_ATR_FORMAT(sd->u.s.blendWeights.dwType) , - sd->u.s.blendWeights.dwStride, - sd->u.s.blendWeights.lpData + stateblock->loadBaseVertexIndex * sd->u.s.blendWeights.dwStride + offset[sd->u.s.blendWeights.streamNo])); - if (curVBO != e->buffer_object) { GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object)); @@ -4237,8 +4232,13 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB curVBO = e->buffer_object; } - GL_EXTCALL(glWeightPointerARB)(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride, - e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + TRACE("glWeightPointerARB(%#x, %#x, %#x, %p);\n", + e->format_desc->gl_vtx_format, + e->format_desc->gl_vtx_type, + e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + GL_EXTCALL(glWeightPointerARB(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx])); checkGLcall("glWeightPointerARB"); @@ -4279,8 +4279,6 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB /* Vertex Pointers -----------------------------------------*/ if (si->use_map & (1 << WINED3D_FFP_POSITION)) { - VTRACE(("glVertexPointer(%d, GL_FLOAT, %d, %p)\n", e->stride, e->size, e->data)); - e = &si->elements[WINED3D_FFP_POSITION]; if (curVBO != e->buffer_object) { @@ -4299,9 +4297,16 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB */ if (!e->buffer_object) { + TRACE("glVertexPointer(3, %#x, %#x, %p);\n", e->format_desc->gl_vtx_type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); glVertexPointer(3 /* min(e->format_desc->gl_vtx_format, 3) */, e->format_desc->gl_vtx_type, e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); - } else { + } + else + { + TRACE("glVertexPointer(%#x, %#x, %#x, %p);\n", + e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); glVertexPointer(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); } @@ -4313,8 +4318,6 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB /* Normals -------------------------------------------------*/ if (si->use_map & (1 << WINED3D_FFP_NORMAL)) { - VTRACE(("glNormalPointer(GL_FLOAT, %d, %p)\n", e->stride, e->data)); - e = &si->elements[WINED3D_FFP_NORMAL]; if (curVBO != e->buffer_object) { @@ -4322,6 +4325,9 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB checkGLcall("glBindBufferARB"); curVBO = e->buffer_object; } + + TRACE("glNormalPointer(%#x, %#x, %p);\n", e->format_desc->gl_vtx_type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); glNormalPointer(e->format_desc->gl_vtx_type, e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); checkGLcall("glNormalPointer(...)"); @@ -4344,8 +4350,6 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB if (si->use_map & (1 << WINED3D_FFP_DIFFUSE)) { - VTRACE(("glColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n", e->stride, e->data)); - e = &si->elements[WINED3D_FFP_DIFFUSE]; if (curVBO != e->buffer_object) { @@ -4354,6 +4358,9 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB curVBO = e->buffer_object; } + TRACE("glColorPointer(%#x, %#x %#x, %p);\n", + e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); glColorPointer(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); checkGLcall("glColorPointer(4, GL_UNSIGNED_BYTE, ...)"); @@ -4369,7 +4376,6 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB if (si->use_map & (1 << WINED3D_FFP_SPECULAR)) { TRACE("setting specular colour\n"); - VTRACE(("glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n", e->stride, e->data)); e = &si->elements[WINED3D_FFP_SPECULAR]; if (gl_info->supported[EXT_SECONDARY_COLOR]) @@ -4391,8 +4397,10 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB * vertex pipeline can pass the specular alpha through, and pixel shaders can read it. So it GL accepts * 4 component secondary colors use it */ - GL_EXTCALL(glSecondaryColorPointerEXT)(format, type, - e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + TRACE("glSecondaryColorPointer(%#x, %#x, %#x, %p);\n", format, type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + GL_EXTCALL(glSecondaryColorPointerEXT(format, type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx])); checkGLcall("glSecondaryColorPointerEXT(format, type, ...)"); } else @@ -4400,25 +4408,29 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB switch(type) { case GL_UNSIGNED_BYTE: - GL_EXTCALL(glSecondaryColorPointerEXT)(3, GL_UNSIGNED_BYTE, - e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + TRACE("glSecondaryColorPointer(3, GL_UNSIGNED_BYTE, %#x, %p);\n", e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + GL_EXTCALL(glSecondaryColorPointerEXT(3, GL_UNSIGNED_BYTE, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx])); checkGLcall("glSecondaryColorPointerEXT(3, GL_UNSIGNED_BYTE, ...)"); break; default: FIXME("Add 4 component specular color pointers for type %x\n", type); /* Make sure that the right color component is dropped */ - GL_EXTCALL(glSecondaryColorPointerEXT)(3, type, - e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + TRACE("glSecondaryColorPointer(3, %#x, %#x, %p);\n", type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]); + GL_EXTCALL(glSecondaryColorPointerEXT(3, type, e->stride, + e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx])); checkGLcall("glSecondaryColorPointerEXT(3, type, ...)"); } } glEnableClientState(GL_SECONDARY_COLOR_ARRAY_EXT); checkGLcall("glEnableClientState(GL_SECONDARY_COLOR_ARRAY_EXT)"); - } else { - - /* Missing specular color is not critical, no warnings */ - VTRACE(("Specular colour is not supported in this GL implementation\n")); + } + else + { + WARN("Specular colour is not supported in this GL implementation.\n"); } } else @@ -4427,10 +4439,10 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB { GL_EXTCALL(glSecondaryColor3fEXT)(0, 0, 0); checkGLcall("glSecondaryColor3fEXT(0, 0, 0)"); - } else { - - /* Missing specular color is not critical, no warnings */ - VTRACE(("Specular colour is not supported in this GL implementation\n")); + } + else + { + WARN("Specular colour is not supported in this GL implementation.\n"); } } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d17d35cc16d..54eb6ec7fae 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -98,7 +98,7 @@ static void surface_cleanup(IWineD3DSurfaceImpl *This) if (context) context_release(context); } -UINT surface_calculate_size(const struct GlPixelFormatDesc *format_desc, UINT alignment, UINT width, UINT height) +UINT surface_calculate_size(const struct wined3d_format_desc *format_desc, UINT alignment, UINT width, UINT height) { UINT size; @@ -123,13 +123,220 @@ UINT surface_calculate_size(const struct GlPixelFormatDesc *format_desc, UINT al return size; } +struct blt_info +{ + GLenum binding; + GLenum bind_target; + enum tex_types tex_type; + GLfloat coords[4][3]; +}; + +struct float_rect +{ + float l; + float t; + float r; + float b; +}; + +static inline void cube_coords_float(const RECT *r, UINT w, UINT h, struct float_rect *f) +{ + f->l = ((r->left * 2.0f) / w) - 1.0f; + f->t = ((r->top * 2.0f) / h) - 1.0f; + f->r = ((r->right * 2.0f) / w) - 1.0f; + f->b = ((r->bottom * 2.0f) / h) - 1.0f; +} + +static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, GLsizei h, struct blt_info *info) +{ + GLfloat (*coords)[3] = info->coords; + RECT rect; + struct float_rect f; + + if (rect_in) + rect = *rect_in; + else + { + rect.left = 0; + rect.top = 0; + rect.right = w; + rect.bottom = h; + } + + switch (target) + { + default: + FIXME("Unsupported texture target %#x\n", target); + /* Fall back to GL_TEXTURE_2D */ + case GL_TEXTURE_2D: + info->binding = GL_TEXTURE_BINDING_2D; + info->bind_target = GL_TEXTURE_2D; + info->tex_type = tex_2d; + coords[0][0] = (float)rect.left / w; + coords[0][1] = (float)rect.top / h; + coords[0][2] = 0.0f; + + coords[1][0] = (float)rect.right / w; + coords[1][1] = (float)rect.top / h; + coords[1][2] = 0.0f; + + coords[2][0] = (float)rect.left / w; + coords[2][1] = (float)rect.bottom / h; + coords[2][2] = 0.0f; + + coords[3][0] = (float)rect.right / w; + coords[3][1] = (float)rect.bottom / h; + coords[3][2] = 0.0f; + break; + + case GL_TEXTURE_RECTANGLE_ARB: + info->binding = GL_TEXTURE_BINDING_RECTANGLE_ARB; + info->bind_target = GL_TEXTURE_RECTANGLE_ARB; + info->tex_type = tex_rect; + coords[0][0] = rect.left; coords[0][1] = rect.top; coords[0][2] = 0.0f; + coords[1][0] = rect.right; coords[1][1] = rect.top; coords[1][2] = 0.0f; + coords[2][0] = rect.left; coords[2][1] = rect.bottom; coords[2][2] = 0.0f; + coords[3][0] = rect.right; coords[3][1] = rect.bottom; coords[3][2] = 0.0f; + break; + + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; + info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; + info->tex_type = tex_cube; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = 1.0f; coords[0][1] = -f.t; coords[0][2] = -f.l; + coords[1][0] = 1.0f; coords[1][1] = -f.t; coords[1][2] = -f.r; + coords[2][0] = 1.0f; coords[2][1] = -f.b; coords[2][2] = -f.l; + coords[3][0] = 1.0f; coords[3][1] = -f.b; coords[3][2] = -f.r; + break; + + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; + info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; + info->tex_type = tex_cube; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = -1.0f; coords[0][1] = -f.t; coords[0][2] = f.l; + coords[1][0] = -1.0f; coords[1][1] = -f.t; coords[1][2] = f.r; + coords[2][0] = -1.0f; coords[2][1] = -f.b; coords[2][2] = f.l; + coords[3][0] = -1.0f; coords[3][1] = -f.b; coords[3][2] = f.r; + break; + + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; + info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; + info->tex_type = tex_cube; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = f.l; coords[0][1] = 1.0f; coords[0][2] = f.t; + coords[1][0] = f.r; coords[1][1] = 1.0f; coords[1][2] = f.t; + coords[2][0] = f.l; coords[2][1] = 1.0f; coords[2][2] = f.b; + coords[3][0] = f.r; coords[3][1] = 1.0f; coords[3][2] = f.b; + break; + + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; + info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; + info->tex_type = tex_cube; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = f.l; coords[0][1] = -1.0f; coords[0][2] = -f.t; + coords[1][0] = f.r; coords[1][1] = -1.0f; coords[1][2] = -f.t; + coords[2][0] = f.l; coords[2][1] = -1.0f; coords[2][2] = -f.b; + coords[3][0] = f.r; coords[3][1] = -1.0f; coords[3][2] = -f.b; + break; + + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; + info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; + info->tex_type = tex_cube; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = f.l; coords[0][1] = -f.t; coords[0][2] = 1.0f; + coords[1][0] = f.r; coords[1][1] = -f.t; coords[1][2] = 1.0f; + coords[2][0] = f.l; coords[2][1] = -f.b; coords[2][2] = 1.0f; + coords[3][0] = f.r; coords[3][1] = -f.b; coords[3][2] = 1.0f; + break; + + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; + info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; + info->tex_type = tex_cube; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = -f.l; coords[0][1] = -f.t; coords[0][2] = -1.0f; + coords[1][0] = -f.r; coords[1][1] = -f.t; coords[1][2] = -1.0f; + coords[2][0] = -f.l; coords[2][1] = -f.b; coords[2][2] = -1.0f; + coords[3][0] = -f.r; coords[3][1] = -f.b; coords[3][2] = -1.0f; + break; + } +} + +/* GL locking and context activation is done by the caller */ +static void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter) +{ + IWineD3DBaseTextureImpl *texture; + struct blt_info info; + + surface_get_blt_info(src_surface->texture_target, src_rect, src_surface->pow2Width, src_surface->pow2Height, &info); + + glEnable(info.bind_target); + checkGLcall("glEnable(bind_target)"); + + /* Bind the texture */ + glBindTexture(info.bind_target, src_surface->texture_name); + checkGLcall("glBindTexture"); + + /* Filtering for StretchRect */ + glTexParameteri(info.bind_target, GL_TEXTURE_MAG_FILTER, + wined3d_gl_mag_filter(magLookup, Filter)); + checkGLcall("glTexParameteri"); + glTexParameteri(info.bind_target, GL_TEXTURE_MIN_FILTER, + wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE)); + checkGLcall("glTexParameteri"); + glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + checkGLcall("glTexEnvi"); + + /* Draw a quad */ + glBegin(GL_TRIANGLE_STRIP); + glTexCoord3fv(info.coords[0]); + glVertex2i(dst_rect->left, dst_rect->top); + + glTexCoord3fv(info.coords[1]); + glVertex2i(dst_rect->right, dst_rect->top); + + glTexCoord3fv(info.coords[2]); + glVertex2i(dst_rect->left, dst_rect->bottom); + + glTexCoord3fv(info.coords[3]); + glVertex2i(dst_rect->right, dst_rect->bottom); + glEnd(); + + /* Unbind the texture */ + glBindTexture(info.bind_target, 0); + checkGLcall("glBindTexture(info->bind_target, 0)"); + + /* We changed the filtering settings on the texture. Inform the + * container about this to get the filters reset properly next draw. */ + if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)src_surface, &IID_IWineD3DBaseTexture, (void **)&texture))) + { + texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; + texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; + texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; + IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture); + } +} + HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, gl_info); void (*cleanup)(IWineD3DSurfaceImpl *This); unsigned int resource_size; HRESULT hr; @@ -343,15 +550,12 @@ static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device) return FALSE; } -#undef GLINFO_LOCATION - -#define GLINFO_LOCATION This->resource.device->adapter->gl_info - /* This call just downloads data, the caller is responsible for binding the * correct texture. */ /* Context activation is done by the caller. */ -static void surface_download_data(IWineD3DSurfaceImpl *This) { - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; +static void surface_download_data(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info) +{ + const struct wined3d_format_desc *format_desc = This->resource.format_desc; /* Only support read back of converted P8 surfaces */ if (This->Flags & SFLAG_CONVERTED && format_desc->format != WINED3DFMT_P8_UINT) @@ -502,8 +706,10 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { /* This call just uploads data, the caller is responsible for binding the * correct texture. */ /* Context activation is done by the caller. */ -static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data) { - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; +static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info, + GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data) +{ + const struct wined3d_format_desc *format_desc = This->resource.format_desc; TRACE("This %p, internal %#x, width %d, height %d, format %#x, type %#x, data %p.\n", This, internal, width, height, format, type, data); @@ -547,14 +753,26 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsi } LEAVE_GL(); + + if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE) + { + IWineD3DDeviceImpl *device = This->resource.device; + unsigned int i; + + for (i = 0; i < device->numContexts; ++i) + { + context_surface_update(device->contexts[i], This); + } + } } /* This call just allocates the texture, the caller is responsible for binding * the correct texture. */ /* Context activation is done by the caller. */ -static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type) { - const struct wined3d_gl_info *gl_info = &This->resource.device->adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; +static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info, + GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type) +{ + const struct wined3d_format_desc *format_desc = This->resource.format_desc; BOOL enable_client_storage = FALSE; const BYTE *mem = NULL; @@ -568,11 +786,10 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal, if (gl_info->supported[APPLE_CLIENT_STORAGE]) { - if(This->Flags & (SFLAG_NONPOW2 | SFLAG_DIBSECTION | SFLAG_OVERSIZE | SFLAG_CONVERTED) || This->resource.allocatedMemory == NULL) { + if(This->Flags & (SFLAG_NONPOW2 | SFLAG_DIBSECTION | SFLAG_CONVERTED) || This->resource.allocatedMemory == NULL) { /* In some cases we want to disable client storage. * SFLAG_NONPOW2 has a bigger opengl texture than the client memory, and different pitches * SFLAG_DIBSECTION: Dibsections may have read / write protections on the memory. Avoid issues... - * SFLAG_OVERSIZE: The gl texture is smaller than the allocated memory * SFLAG_CONVERTED: The conversion destination memory is freed after loading the surface * allocatedMemory == NULL: Not defined in the extension. Seems to disable client storage effectively */ @@ -816,7 +1033,8 @@ static void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) { } /* Context activation is done by the caller. */ -static void surface_remove_pbo(IWineD3DSurfaceImpl *This) { +static void surface_remove_pbo(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info) +{ This->resource.heapMemory = HeapAlloc(GetProcessHeap() ,0 , This->resource.size + RESOURCE_ALIGNMENT); This->resource.allocatedMemory = (BYTE *)(((ULONG_PTR) This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); @@ -893,9 +1111,8 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) { gl_info = context->gl_info; /* Destroy PBOs, but load them into real sysmem before */ - if(This->Flags & SFLAG_PBO) { - surface_remove_pbo(This); - } + if (This->Flags & SFLAG_PBO) + surface_remove_pbo(This, gl_info); /* Destroy fbo render buffers. This is needed for implicit render targets, for * all application-created targets the application has to release the surface @@ -937,6 +1154,7 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) { static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, void *dest, UINT pitch) { IWineD3DDeviceImpl *myDevice = This->resource.device; + const struct wined3d_gl_info *gl_info; struct wined3d_context *context; BYTE *mem; GLint fmt; @@ -965,6 +1183,8 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v * context->last_was_blit set on the unlock. */ context = context_acquire(myDevice, (IWineD3DSurface *) This, CTXUSAGE_BLIT); + gl_info = context->gl_info; + ENTER_GL(); /* Select the correct read buffer, and give some debug output. @@ -1180,6 +1400,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) { IWineD3DDeviceImpl *device = This->resource.device; + const struct wined3d_gl_info *gl_info; struct wined3d_context *context; int bpp; GLenum format, internal, type; @@ -1194,6 +1415,8 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) * states in the stateblock, and no driver was found yet that had bugs in that regard. */ context = context_acquire(device, (IWineD3DSurface *) This, CTXUSAGE_RESOURCELOAD); + gl_info = context->gl_info; + surface_bind_and_dirtify(This, srgb); ENTER_GL(); @@ -1226,9 +1449,9 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) LEAVE_GL(); } - if(!(This->Flags & alloc_flag)) { - surface_allocate_surface(This, internal, This->pow2Width, - This->pow2Height, format, type); + if (!(This->Flags & alloc_flag)) + { + surface_allocate_surface(This, gl_info, internal, This->pow2Width, This->pow2Height, format, type); This->Flags |= alloc_flag; } @@ -1254,7 +1477,7 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) } /* Context activation is done by the caller. */ -void surface_prepare_texture(IWineD3DSurfaceImpl *surface, BOOL srgb) +void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) { DWORD alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED; GLenum format, internal, type; @@ -1268,7 +1491,7 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface, BOOL srgb) if(convert != NO_CONVERSION) surface->Flags |= SFLAG_CONVERTED; else surface->Flags &= ~SFLAG_CONVERTED; - if ((surface->Flags & SFLAG_NONPOW2) && !(surface->Flags & SFLAG_OVERSIZE)) + if (surface->Flags & SFLAG_NONPOW2) { width = surface->pow2Width; height = surface->pow2Height; @@ -1280,7 +1503,7 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface, BOOL srgb) } surface_bind_and_dirtify(surface, srgb); - surface_allocate_surface(surface, internal, width, height, format, type); + surface_allocate_surface(surface, gl_info, internal, width, height, format, type); surface->Flags |= alloc_flag; } @@ -1412,9 +1635,12 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED lock_end: if (This->Flags & SFLAG_PBO) { + const struct wined3d_gl_info *gl_info; struct wined3d_context *context; context = context_acquire(myDevice, NULL, CTXUSAGE_RESOURCELOAD); + gl_info = context->gl_info; + ENTER_GL(); GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); checkGLcall("glBindBufferARB"); @@ -1464,10 +1690,13 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm GLint skipBytes = 0; UINT pitch = IWineD3DSurface_GetPitch((IWineD3DSurface *) This); /* target is argb, 4 byte */ IWineD3DDeviceImpl *myDevice = This->resource.device; + const struct wined3d_gl_info *gl_info; struct wined3d_context *context; /* Activate the correct context for the render target */ context = context_acquire(myDevice, (IWineD3DSurface *) This, CTXUSAGE_BLIT); + gl_info = context->gl_info; + ENTER_GL(); if (!surface_is_offscreen((IWineD3DSurface *)This)) @@ -1563,11 +1792,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { if (This->Flags & SFLAG_PBO) { + const struct wined3d_gl_info *gl_info; struct wined3d_context *context; TRACE("Freeing PBO memory\n"); context = context_acquire(myDevice, NULL, CTXUSAGE_RESOURCELOAD); + gl_info = context->gl_info; + ENTER_GL(); GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); @@ -1817,7 +2049,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_texturing, GLenum *format, GLenum *internal, GLenum *type, CONVERT_TYPES *convert, int *target_bpp, BOOL srgb_mode) { BOOL colorkey_active = need_alpha_ck && (This->CKeyFlags & WINEDDSD_CKSRCBLT); - const struct GlPixelFormatDesc *glDesc = This->resource.format_desc; + const struct wined3d_format_desc *glDesc = This->resource.format_desc; IWineD3DDeviceImpl *device = This->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; @@ -1846,14 +2078,13 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ Paletted Texture **************** */ - /* Use conversion when the paletted texture extension OR fragment shaders are available. When either - * of the two is available make sure texturing is requested as neither of the two works in - * conjunction with calls like glDraw-/glReadPixels. Further also use conversion in case of color keying. + /* Use conversion when the blit_shader backend supports it. It only supports this in case of + * texturing. Further also use conversion in case of color keying. * Paletted textures can be emulated using shaders but only do that for 2D purposes e.g. situations * in which the main render target uses p8. Some games like GTA Vice City use P8 for texturing which * conflicts with this. */ - if (!(gl_info->supported[EXT_PALETTED_TEXTURE] || (device->blitter->color_fixup_supported(This->resource.format_desc->color_fixup) + if (!((device->blitter->color_fixup_supported(gl_info, This->resource.format_desc->color_fixup) && device->render_targets && This == (IWineD3DSurfaceImpl*)device->render_targets[0])) || colorkey_active || !use_texturing) { @@ -1867,7 +2098,8 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ *convert = CONVERT_PALETTED; } } - else if (!gl_info->supported[EXT_PALETTED_TEXTURE] && device->blitter->color_fixup_supported(This->resource.format_desc->color_fixup)) + /* TODO: this check is evil and should die (it basically checks which blitter backend is used) */ + else if (!gl_info->supported[EXT_PALETTED_TEXTURE] && device->blitter->color_fixup_supported(gl_info, This->resource.format_desc->color_fixup)) { *format = GL_ALPHA; *type = GL_UNSIGNED_BYTE; @@ -2562,11 +2794,12 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI extensions like ATI_fragment_shaders is possible. */ /* Context activation is done by the caller. */ -static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, CONVERT_TYPES convert) { +static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, + const struct wined3d_gl_info *gl_info, CONVERT_TYPES convert) +{ IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; BYTE table[256][4]; IWineD3DDeviceImpl *device = This->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; d3dfmt_p8_init_palette(This, table, (convert == CONVERT_PALETTED_CK)); @@ -3731,7 +3964,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const return WINED3D_OK; } else if(Src) { /* Blit from offscreen surface to render target */ - float glTexCoord[4]; DWORD oldCKeyFlags = Src->CKeyFlags; WINEDDCOLORKEY oldBltCKey = Src->SrcBltCKey; struct wined3d_context *context; @@ -3781,14 +4013,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const return WINED3D_OK; } - if(!CalculateTexRect(Src, &SourceRectangle, glTexCoord)) { - /* Fall back to software */ - WARN("(%p) Source texture area (%d,%d)-(%d,%d) is too big\n", Src, - SourceRectangle.left, SourceRectangle.top, - SourceRectangle.right, SourceRectangle.bottom); - return WINED3DERR_INVALIDCALL; - } - /* Color keying: Check if we have to do a color keyed blt, * and if not check if a color key is activated. * @@ -3823,8 +4047,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const RECT windowsize; POINT offset = {0,0}; UINT h; - ClientToScreen(dstSwapchain->win_handle, &offset); - GetClientRect(dstSwapchain->win_handle, &windowsize); + ClientToScreen(context->win_handle, &offset); + GetClientRect(context->win_handle, &windowsize); h = windowsize.bottom - windowsize.top; rect.x1 -= offset.x; rect.x2 -=offset.x; rect.y1 -= offset.y; rect.y2 -=offset.y; @@ -3838,7 +4062,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const dump_color_fixup_desc(This->resource.format_desc->color_fixup); } - if (!myDevice->blitter->color_fixup_supported(Src->resource.format_desc->color_fixup)) + if (!myDevice->blitter->color_fixup_supported(&myDevice->adapter->gl_info, Src->resource.format_desc->color_fixup)) { FIXME("Source format %s has an unsupported fixup:\n", debug_d3dformat(Src->resource.format_desc->format)); @@ -3850,22 +4074,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const ENTER_GL(); - /* Bind the texture */ - glBindTexture(Src->texture_target, Src->texture_name); - checkGLcall("glBindTexture"); - - /* Filtering for StretchRect */ - glTexParameteri(Src->texture_target, GL_TEXTURE_MAG_FILTER, - wined3d_gl_mag_filter(magLookup, Filter)); - checkGLcall("glTexParameteri"); - glTexParameteri(Src->texture_target, GL_TEXTURE_MIN_FILTER, - wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE)); - checkGLcall("glTexParameteri"); - glTexParameteri(Src->texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(Src->texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - checkGLcall("glTexEnvi"); - /* This is for color keying */ if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { glEnable(GL_ALPHA_TEST); @@ -3886,32 +4094,13 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const /* Draw a textured quad */ - glBegin(GL_QUADS); - - glColor3f(1.0f, 1.0f, 1.0f); - glTexCoord2f(glTexCoord[0], glTexCoord[2]); - glVertex3f(rect.x1, rect.y1, 0.0f); - - glTexCoord2f(glTexCoord[0], glTexCoord[3]); - glVertex3f(rect.x1, rect.y2, 0.0f); - - glTexCoord2f(glTexCoord[1], glTexCoord[3]); - glVertex3f(rect.x2, rect.y2, 0.0f); - - glTexCoord2f(glTexCoord[1], glTexCoord[2]); - glVertex3f(rect.x2, rect.y1, 0.0f); - - glEnd(); - checkGLcall("glEnd"); + draw_textured_quad(Src, &SourceRectangle, (RECT*)&rect, Filter); if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { glDisable(GL_ALPHA_TEST); checkGLcall("glDisable(GL_ALPHA_TEST)"); } - glBindTexture(Src->texture_target, 0); - checkGLcall("glBindTexture(Src->texture_target, 0)"); - /* Restore the color key parameters */ Src->CKeyFlags = oldCKeyFlags; Src->SrcBltCKey = oldBltCKey; @@ -4166,19 +4355,10 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) if (This->resource.format_desc->format == WINED3DFMT_P8_UINT || This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM) { - int bpp; - GLenum format, internal, type; - CONVERT_TYPES convert; - - /* Check if we are using a RTL mode which uses texturing for uploads */ - BOOL use_texture = (wined3d_settings.rendertargetlock_mode == RTL_READTEX); - - /* Check if we have hardware palette conversion if we have convert is set to NO_CONVERSION */ - d3dfmt_get_conv(This, TRUE, use_texture, &format, &internal, &type, &convert, &bpp, FALSE); - - if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) && (convert == NO_CONVERSION)) + IWineD3DDeviceImpl *device = This->resource.device; + if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) && + device->blitter->color_fixup_supported(&device->adapter->gl_info, This->resource.format_desc->color_fixup)) { - IWineD3DDeviceImpl *device = This->resource.device; struct wined3d_context *context; /* Make sure the texture is up to date. This call doesn't do anything if the texture is already up to date. */ @@ -4189,7 +4369,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) /* Re-upload the palette */ context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); - d3dfmt_p8_upload_palette(iface, convert); + d3dfmt_p8_upload_palette(iface, context->gl_info, NO_CONVERSION); context_release(context); } else { if(!(This->Flags & SFLAG_INSYSMEM)) { @@ -4269,9 +4449,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { 3: WARN and return WINED3DERR_NOTAVAILABLE; 4: Create the surface, but allow it to be used only for DirectDraw Blts. Some apps(e.g. Swat 3) create textures with a Height of 16 and a Width > 3000 and blt 16x16 letter areas from them to the render target. */ - WARN("(%p) Creating an oversized surface: %ux%u (texture is %ux%u)\n", - This, This->pow2Width, This->pow2Height, This->currentDesc.Width, This->currentDesc.Height); - This->Flags |= SFLAG_OVERSIZE; + if(This->resource.pool == WINED3DPOOL_DEFAULT || This->resource.pool == WINED3DPOOL_MANAGED) + { + WARN("(%p) Unable to allocate a surface which exceeds the maximum OpenGL texture size\n", This); + return WINED3DERR_NOTAVAILABLE; + } + + /* We should never use this surface in combination with OpenGL! */ + TRACE("(%p) Creating an oversized surface: %ux%u\n", This, This->pow2Width, This->pow2Height); /* This will be initialized on the first blt */ This->glRect.left = 0; @@ -4279,8 +4464,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { This->glRect.right = 0; This->glRect.bottom = 0; } else { - /* Check this after the oversize check - do not make an oversized surface a texture_rectangle one. - Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE + /* Don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE doesn't work in combination with ARB_TEXTURE_RECTANGLE. */ @@ -4295,8 +4479,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { This->Flags &= ~(SFLAG_NONPOW2 | SFLAG_NORMCOORD); } - /* No oversize, gl rect is the full texture size */ - This->Flags &= ~SFLAG_OVERSIZE; This->glRect.left = 0; This->glRect.top = 0; This->glRect.right = This->pow2Width; @@ -4306,7 +4488,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) { switch(wined3d_settings.offscreen_rendering_mode) { case ORM_FBO: This->get_drawable_size = get_drawable_size_fbo; break; - case ORM_PBUFFER: This->get_drawable_size = get_drawable_size_pbuffer; break; case ORM_BACKBUFFER: This->get_drawable_size = get_drawable_size_backbuffer; break; } } @@ -4316,104 +4497,12 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { return WINED3D_OK; } -struct depth_blt_info -{ - GLenum binding; - GLenum bind_target; - enum tex_types tex_type; - GLfloat coords[4][3]; -}; - -static void surface_get_depth_blt_info(GLenum target, GLsizei w, GLsizei h, struct depth_blt_info *info) -{ - GLfloat (*coords)[3] = info->coords; - - switch (target) - { - default: - FIXME("Unsupported texture target %#x\n", target); - /* Fall back to GL_TEXTURE_2D */ - case GL_TEXTURE_2D: - info->binding = GL_TEXTURE_BINDING_2D; - info->bind_target = GL_TEXTURE_2D; - info->tex_type = tex_2d; - coords[0][0] = 0.0f; coords[0][1] = 1.0f; coords[0][2] = 0.0f; - coords[1][0] = 1.0f; coords[1][1] = 1.0f; coords[1][2] = 0.0f; - coords[2][0] = 0.0f; coords[2][1] = 0.0f; coords[2][2] = 0.0f; - coords[3][0] = 1.0f; coords[3][1] = 0.0f; coords[3][2] = 0.0f; - break; - - case GL_TEXTURE_RECTANGLE_ARB: - info->binding = GL_TEXTURE_BINDING_RECTANGLE_ARB; - info->bind_target = GL_TEXTURE_RECTANGLE_ARB; - info->tex_type = tex_rect; - coords[0][0] = 0.0f; coords[0][1] = h; coords[0][2] = 0.0f; - coords[1][0] = w; coords[1][1] = h; coords[1][2] = 0.0f; - coords[2][0] = 0.0f; coords[2][1] = 0.0f; coords[2][2] = 0.0f; - coords[3][0] = w; coords[3][1] = 0.0f; coords[3][2] = 0.0f; - break; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; - info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; - info->tex_type = tex_cube; - coords[0][0] = 1.0f; coords[0][1] = -1.0f; coords[0][2] = 1.0f; - coords[1][0] = 1.0f; coords[1][1] = -1.0f; coords[1][2] = -1.0f; - coords[2][0] = 1.0f; coords[2][1] = 1.0f; coords[2][2] = 1.0f; - coords[3][0] = 1.0f; coords[3][1] = 1.0f; coords[3][2] = -1.0f; - - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; - info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; - info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = -1.0f; coords[0][2] = -1.0f; - coords[1][0] = -1.0f; coords[1][1] = -1.0f; coords[1][2] = 1.0f; - coords[2][0] = -1.0f; coords[2][1] = 1.0f; coords[2][2] = -1.0f; - coords[3][0] = -1.0f; coords[3][1] = 1.0f; coords[3][2] = 1.0f; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; - info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; - info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = 1.0f; coords[0][2] = 1.0f; - coords[1][0] = 1.0f; coords[1][1] = 1.0f; coords[1][2] = 1.0f; - coords[2][0] = -1.0f; coords[2][1] = 1.0f; coords[2][2] = -1.0f; - coords[3][0] = 1.0f; coords[3][1] = 1.0f; coords[3][2] = -1.0f; - - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; - info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; - info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = -1.0f; coords[0][2] = -1.0f; - coords[1][0] = 1.0f; coords[1][1] = -1.0f; coords[1][2] = -1.0f; - coords[2][0] = -1.0f; coords[2][1] = -1.0f; coords[2][2] = 1.0f; - coords[3][0] = 1.0f; coords[3][1] = -1.0f; coords[3][2] = 1.0f; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; - info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; - info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = -1.0f; coords[0][2] = 1.0f; - coords[1][0] = 1.0f; coords[1][1] = -1.0f; coords[1][2] = 1.0f; - coords[2][0] = -1.0f; coords[2][1] = 1.0f; coords[2][2] = 1.0f; - coords[3][0] = 1.0f; coords[3][1] = 1.0f; coords[3][2] = 1.0f; - - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; - info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; - info->tex_type = tex_cube; - coords[0][0] = 1.0f; coords[0][1] = -1.0f; coords[0][2] = -1.0f; - coords[1][0] = -1.0f; coords[1][1] = -1.0f; coords[1][2] = -1.0f; - coords[2][0] = 1.0f; coords[2][1] = 1.0f; coords[2][2] = -1.0f; - coords[3][0] = -1.0f; coords[3][1] = 1.0f; coords[3][2] = -1.0f; - } -} - /* GL locking is done by the caller */ -static void surface_depth_blt(IWineD3DSurfaceImpl *This, GLuint texture, GLsizei w, GLsizei h, GLenum target) +static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info, + GLuint texture, GLsizei w, GLsizei h, GLenum target) { IWineD3DDeviceImpl *device = This->resource.device; - struct depth_blt_info info; + struct blt_info info; GLint old_binding = 0; glPushAttrib(GL_ENABLE_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_VIEWPORT_BIT); @@ -4429,7 +4518,7 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, GLuint texture, GLsizei glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glViewport(0, 0, w, h); - surface_get_depth_blt_info(target, w, h, &info); + surface_get_blt_info(target, NULL, w, h, &info); GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); glGetIntegerv(info.binding, &old_binding); glBindTexture(info.bind_target, texture); @@ -4547,7 +4636,8 @@ void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *co context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, iface, FALSE); /* Do the actual blit */ - surface_depth_blt(This, device->depth_blt_texture, This->currentDesc.Width, This->currentDesc.Height, bind_target); + surface_depth_blt(This, gl_info, device->depth_blt_texture, + This->currentDesc.Width, This->currentDesc.Height, bind_target); checkGLcall("depth_blt"); if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); @@ -4568,8 +4658,8 @@ void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *co ENTER_GL(); context_bind_fbo(context, GL_FRAMEBUFFER, NULL); - surface_depth_blt(This, This->texture_name, This->currentDesc.Width, - This->currentDesc.Height, This->texture_target); + surface_depth_blt(This, gl_info, This->texture_name, + This->currentDesc.Width, This->currentDesc.Height, This->texture_target); checkGLcall("depth_blt"); if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); @@ -4643,186 +4733,40 @@ static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW } } -struct coords { - GLfloat x, y, z; -}; - -struct float_rect -{ - float l; - float t; - float r; - float b; -}; - -static inline void cube_coords_float(const RECT *r, UINT w, UINT h, struct float_rect *f) -{ - f->l = ((r->left * 2.0f) / w) - 1.0f; - f->t = ((r->top * 2.0f) / h) - 1.0f; - f->r = ((r->right * 2.0f) / w) - 1.0f; - f->b = ((r->bottom * 2.0f) / h) - 1.0f; -} - static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT *rect_in) { IWineD3DDeviceImpl *device = This->resource.device; - IWineD3DBaseTextureImpl *texture; struct wined3d_context *context; - struct coords coords[4]; - RECT rect; - GLenum bind_target; - struct float_rect f; + RECT src_rect, dst_rect; if(rect_in) { - rect = *rect_in; + src_rect = *rect_in; } else { - rect.left = 0; - rect.top = 0; - rect.right = This->currentDesc.Width; - rect.bottom = This->currentDesc.Height; - } - - switch (This->texture_target) - { - case GL_TEXTURE_2D: - bind_target = GL_TEXTURE_2D; - - coords[0].x = (float)rect.left / This->pow2Width; - coords[0].y = (float)rect.top / This->pow2Height; - coords[0].z = 0; - - coords[1].x = (float)rect.left / This->pow2Width; - coords[1].y = (float)rect.bottom / This->pow2Height; - coords[1].z = 0; - - coords[2].x = (float)rect.right / This->pow2Width; - coords[2].y = (float)rect.bottom / This->pow2Height; - coords[2].z = 0; - - coords[3].x = (float)rect.right / This->pow2Width; - coords[3].y = (float)rect.top / This->pow2Height; - coords[3].z = 0; - break; - - case GL_TEXTURE_RECTANGLE_ARB: - bind_target = GL_TEXTURE_RECTANGLE_ARB; - coords[0].x = rect.left; coords[0].y = rect.top; coords[0].z = 0; - coords[1].x = rect.left; coords[1].y = rect.bottom; coords[1].z = 0; - coords[2].x = rect.right; coords[2].y = rect.bottom; coords[2].z = 0; - coords[3].x = rect.right; coords[3].y = rect.top; coords[3].z = 0; - break; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - cube_coords_float(&rect, This->pow2Width, This->pow2Height, &f); - coords[0].x = 1; coords[0].y = -f.t; coords[0].z = -f.l; - coords[1].x = 1; coords[1].y = -f.b; coords[1].z = -f.l; - coords[2].x = 1; coords[2].y = -f.b; coords[2].z = -f.r; - coords[3].x = 1; coords[3].y = -f.t; coords[3].z = -f.r; - break; - - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - cube_coords_float(&rect, This->pow2Width, This->pow2Height, &f); - coords[0].x = -1; coords[0].y = -f.t; coords[0].z = f.l; - coords[1].x = -1; coords[1].y = -f.b; coords[1].z = f.l; - coords[2].x = -1; coords[2].y = -f.b; coords[2].z = f.r; - coords[3].x = -1; coords[3].y = -f.t; coords[3].z = f.r; - break; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - cube_coords_float(&rect, This->pow2Width, This->pow2Height, &f); - coords[0].x = f.l; coords[0].y = 1; coords[0].z = f.t; - coords[1].x = f.l; coords[1].y = 1; coords[1].z = f.b; - coords[2].x = f.r; coords[2].y = 1; coords[2].z = f.b; - coords[3].x = f.r; coords[3].y = 1; coords[3].z = f.t; - break; - - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - cube_coords_float(&rect, This->pow2Width, This->pow2Height, &f); - coords[0].x = f.l; coords[0].y = -1; coords[0].z = -f.t; - coords[1].x = f.l; coords[1].y = -1; coords[1].z = -f.b; - coords[2].x = f.r; coords[2].y = -1; coords[2].z = -f.b; - coords[3].x = f.r; coords[3].y = -1; coords[3].z = -f.t; - break; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - cube_coords_float(&rect, This->pow2Width, This->pow2Height, &f); - coords[0].x = f.l; coords[0].y = -f.t; coords[0].z = 1; - coords[1].x = f.l; coords[1].y = -f.b; coords[1].z = 1; - coords[2].x = f.r; coords[2].y = -f.b; coords[2].z = 1; - coords[3].x = f.r; coords[3].y = -f.t; coords[3].z = 1; - break; - - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - bind_target = GL_TEXTURE_CUBE_MAP_ARB; - cube_coords_float(&rect, This->pow2Width, This->pow2Height, &f); - coords[0].x = -f.l; coords[0].y = -f.t; coords[0].z = -1; - coords[1].x = -f.l; coords[1].y = -f.b; coords[1].z = -1; - coords[2].x = -f.r; coords[2].y = -f.b; coords[2].z = -1; - coords[3].x = -f.r; coords[3].y = -f.t; coords[3].z = -1; - break; - - default: - ERR("Unexpected texture target %#x\n", This->texture_target); - return; + src_rect.left = 0; + src_rect.top = 0; + src_rect.right = This->currentDesc.Width; + src_rect.bottom = This->currentDesc.Height; } context = context_acquire(device, (IWineD3DSurface*)This, CTXUSAGE_BLIT); - - ENTER_GL(); - - glEnable(bind_target); - checkGLcall("glEnable(bind_target)"); - glBindTexture(bind_target, This->texture_name); - checkGLcall("glBindTexture(bind_target, This->texture_name)"); - glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - if (context->render_offscreen) { - LONG tmp = rect.top; - rect.top = rect.bottom; - rect.bottom = tmp; + dst_rect.left = src_rect.left; + dst_rect.right = src_rect.right; + dst_rect.top = src_rect.bottom; + dst_rect.bottom = src_rect.top; + } + else + { + dst_rect = src_rect; } - glBegin(GL_QUADS); - glTexCoord3fv(&coords[0].x); - glVertex2i(rect.left, rect.top); - - glTexCoord3fv(&coords[1].x); - glVertex2i(rect.left, rect.bottom); - - glTexCoord3fv(&coords[2].x); - glVertex2i(rect.right, rect.bottom); - - glTexCoord3fv(&coords[3].x); - glVertex2i(rect.right, rect.top); - glEnd(); - checkGLcall("glEnd"); - - glDisable(bind_target); - checkGLcall("glDisable(bind_target)"); - + ENTER_GL(); + draw_textured_quad(This, &src_rect, &dst_rect, WINED3DTEXF_POINT); LEAVE_GL(); wglFlush(); /* Flush to ensure ordering across contexts. */ - /* We changed the filtering settings on the texture. Inform the - * container about this to get the filters reset properly next draw. */ - if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)This, &IID_IWineD3DBaseTexture, (void **)&texture))) - { - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture); - } - context_release(context); } @@ -4901,7 +4845,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D if (!device->isInDraw) context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); surface_bind_and_dirtify(This, !(This->Flags & SFLAG_INTEXTURE)); - surface_download_data(This); + surface_download_data(This, gl_info); if (context) context_release(context); } @@ -4939,7 +4883,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D TRACE("Removing the pbo attached to surface %p\n", This); if (!device->isInDraw) context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); - surface_remove_pbo(This); + surface_remove_pbo(This, gl_info); if (context) context_release(context); } @@ -5004,7 +4948,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D if (!device->isInDraw) context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); - surface_prepare_texture(This, srgb); + surface_prepare_texture(This, gl_info, srgb); surface_bind_and_dirtify(This, srgb); if(This->CKeyFlags & WINEDDSD_CKSRCBLT) { @@ -5021,7 +4965,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D * but it isn't set (yet) in all cases it is getting called. */ if((convert != NO_CONVERSION) && (This->Flags & SFLAG_PBO)) { TRACE("Removing the pbo attached to surface %p\n", This); - surface_remove_pbo(This); + surface_remove_pbo(This, gl_info); } if((convert != NO_CONVERSION) && This->resource.allocatedMemory) { @@ -5040,9 +4984,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D d3dfmt_convert_surface(This->resource.allocatedMemory, mem, pitch, width, height, outpitch, convert, This); } else if (This->resource.format_desc->format == WINED3DFMT_P8_UINT - && (gl_info->supported[EXT_PALETTED_TEXTURE] || device->blitter->color_fixup_supported(This->resource.format_desc->color_fixup))) + && (device->blitter->color_fixup_supported(gl_info, This->resource.format_desc->color_fixup))) { - d3dfmt_p8_upload_palette(iface, convert); + d3dfmt_p8_upload_palette(iface, gl_info, convert); mem = This->resource.allocatedMemory; } else { mem = This->resource.allocatedMemory; @@ -5053,17 +4997,21 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D glPixelStorei(GL_UNPACK_ROW_LENGTH, width); LEAVE_GL(); - if ((This->Flags & SFLAG_NONPOW2) && !(This->Flags & SFLAG_OVERSIZE)) { + if (This->Flags & SFLAG_NONPOW2) { TRACE("non power of two support\n"); - if (mem || (This->Flags & SFLAG_PBO)) { - surface_upload_data(This, internal, This->currentDesc.Width, This->currentDesc.Height, format, type, mem); + if (mem || (This->Flags & SFLAG_PBO)) + { + surface_upload_data(This, gl_info, internal, + This->currentDesc.Width, This->currentDesc.Height, format, type, mem); } } else { /* When making the realloc conditional, keep in mind that GL_APPLE_client_storage may be in use, and This->resource.allocatedMemory * changed. So also keep track of memory changes. In this case the texture has to be reallocated */ - if (mem || (This->Flags & SFLAG_PBO)) { - surface_upload_data(This, internal, This->glRect.right - This->glRect.left, This->glRect.bottom - This->glRect.top, format, type, mem); + if (mem || (This->Flags & SFLAG_PBO)) + { + surface_upload_data(This, gl_info, internal, This->glRect.right - This->glRect.left, + This->glRect.bottom - This->glRect.top, format, type, mem); } } @@ -5107,7 +5055,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, I } else if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) { switch(wined3d_settings.offscreen_rendering_mode) { case ORM_FBO: This->get_drawable_size = get_drawable_size_fbo; break; - case ORM_PBUFFER: This->get_drawable_size = get_drawable_size_pbuffer; break; case ORM_BACKBUFFER: This->get_drawable_size = get_drawable_size_backbuffer; break; } } @@ -5212,15 +5159,13 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = IWineD3DSurfaceImpl_GetImplType, IWineD3DSurfaceImpl_DrawOverlay }; -#undef GLINFO_LOCATION -#define GLINFO_LOCATION device->adapter->gl_info static HRESULT ffp_blit_alloc(IWineD3DDevice *iface) { return WINED3D_OK; } /* Context activation is done by the caller. */ static void ffp_blit_free(IWineD3DDevice *iface) { } /* Context activation is done by the caller. */ -static HRESULT ffp_blit_set(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc, +static HRESULT ffp_blit_set(IWineD3DDevice *iface, const struct wined3d_format_desc *format_desc, GLenum textype, UINT width, UINT height) { ENTER_GL(); @@ -5252,8 +5197,10 @@ static void ffp_blit_unset(IWineD3DDevice *iface) LEAVE_GL(); } -static BOOL ffp_blit_color_fixup_supported(struct color_fixup_desc fixup) +static BOOL ffp_blit_color_fixup_supported(const struct wined3d_gl_info *gl_info, struct color_fixup_desc fixup) { + enum complex_fixup complex_fixup; + if (TRACE_ON(d3d_surface) && TRACE_ON(d3d)) { TRACE("Checking support for fixup:\n"); @@ -5267,6 +5214,13 @@ static BOOL ffp_blit_color_fixup_supported(struct color_fixup_desc fixup) return TRUE; } + complex_fixup = get_complex_fixup(fixup); + if(complex_fixup == COMPLEX_FIXUP_P8 && gl_info->supported[EXT_PALETTED_TEXTURE]) + { + TRACE("P8 fixup supported\n"); + return TRUE; + } + TRACE("[FAILED]\n"); return FALSE; } diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 33e3d3ed885..44c008aeeac 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -326,7 +326,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; + const struct wined3d_format_desc *format_desc = This->resource.format_desc; DWORD ret; TRACE("(%p)\n", This); @@ -502,7 +502,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWin HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, &This->resource.device->adapter->gl_info); if (This->resource.format_desc->format != WINED3DFMT_UNKNOWN) @@ -527,7 +527,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3D HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; + const struct wined3d_format_desc *format_desc = This->resource.format_desc; int extraline = 0; SYSTEM_INFO sysInfo; BITMAPINFO* b_info; @@ -742,6 +742,55 @@ static void convert_a8r8g8b8_x8r8g8b8(const BYTE *src, BYTE *dst, } } +static inline BYTE cliptobyte(int x) +{ + return (BYTE) ((x < 0) ? 0 : ((x > 255) ? 255 : x)); +} + +static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst, + DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) +{ + unsigned int x, y; + int c2, d, e, r2 = 0, g2 = 0, b2 = 0; + + TRACE("Converting %ux%u pixels, pitches %u %u\n", w, h, pitch_in, pitch_out); + + for (y = 0; y < h; ++y) + { + const BYTE *src_line = src + y * pitch_in; + DWORD *dst_line = (DWORD *)(dst + y * pitch_out); + for (x = 0; x < w; ++x) + { + /* YUV to RGB conversion formulas from http://en.wikipedia.org/wiki/YUV: + * C = Y - 16; D = U - 128; E = V - 128; + * R = cliptobyte((298 * C + 409 * E + 128) >> 8); + * G = cliptobyte((298 * C - 100 * D - 208 * E + 128) >> 8); + * B = cliptobyte((298 * C + 516 * D + 128) >> 8); + * Two adjacent YUY2 pixels are stored as four bytes: Y0 U Y1 V . + * U and V are shared between the pixels. + */ + if (!(x & 1)) /* for every even pixel, read new U and V */ + { + d = (int) src_line[1] - 128; + e = (int) src_line[3] - 128; + r2 = 409 * e + 128; + g2 = - 100 * d - 208 * e + 128; + b2 = 516 * d + 128; + } + c2 = 298 * ((int) src_line[0] - 16); + dst_line[x] = 0xff000000 + | cliptobyte((c2 + r2) >> 8) << 16 /* red */ + | cliptobyte((c2 + g2) >> 8) << 8 /* green */ + | cliptobyte((c2 + b2) >> 8); /* blue */ + /* Scale RGB values to 0..255 range, + * then clip them if still not in range (may be negative), + * then shift them within DWORD if necessary. + */ + src_line += 2; + } + } +} + struct d3dfmt_convertor_desc { WINED3DFORMAT from, to; void (*convert)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h); @@ -752,6 +801,7 @@ static const struct d3dfmt_convertor_desc convertors[] = {WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float}, {WINED3DFMT_B5G6R5_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_r5g6b5_x8r8g8b8}, {WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_a8r8g8b8_x8r8g8b8}, + {WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8}, }; static inline const struct d3dfmt_convertor_desc *find_convertor(WINED3DFORMAT from, WINED3DFORMAT to) @@ -909,7 +959,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D HRESULT ret = WINED3D_OK; WINED3DLOCKED_RECT dlock, slock; int bpp, srcheight, srcwidth, dstheight, dstwidth, width; - const struct GlPixelFormatDesc *sEntry, *dEntry; + const struct wined3d_format_desc *sEntry, *dEntry; int x, y; const BYTE *sbuf; BYTE *dbuf; @@ -1552,7 +1602,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst RECT lock_src, lock_dst, lock_union; const BYTE *sbuf; BYTE *dbuf; - const struct GlPixelFormatDesc *sEntry, *dEntry; + const struct wined3d_format_desc *sEntry, *dEntry; if (TRACE_ON(d3d_surface)) { @@ -1833,7 +1883,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DL } else { - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; + const struct wined3d_format_desc *format_desc = This->resource.format_desc; TRACE("Lock Rect (%p) = l %d, t %d, r %d, b %d\n", pRect, pRect->left, pRect->top, pRect->right, pRect->bottom); diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 3f09dc3c130..6062a1a5209 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -296,9 +296,9 @@ const char* filename) FILE* f = NULL; UINT y = 0, x = 0; IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; + const struct wined3d_format_desc *format_desc = This->resource.format_desc; static char *output = NULL; static UINT size = 0; - const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; if (This->pow2Width > size) { output = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->pow2Width * 3); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index cbdb961f705..bd44b03f636 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -114,7 +114,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * else gl_filter = GL_LINEAR; - if (gl_info->fbo_ops.glBlitFramebuffer) + if (gl_info->fbo_ops.glBlitFramebuffer && is_identity_fixup(backbuffer->resource.format_desc->color_fixup)) { ENTER_GL(); context_bind_fbo(context, GL_READ_FRAMEBUFFER, &context->src_fbo); @@ -152,6 +152,9 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * tex_bottom /= src_h; } + if (is_complex_fixup(backbuffer->resource.format_desc->color_fixup)) + gl_filter = GL_NEAREST; + ENTER_GL(); context_bind_fbo(context2, GL_DRAW_FRAMEBUFFER, NULL); @@ -161,8 +164,8 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * device->blitter->set_shader((IWineD3DDevice *) device, backbuffer->resource.format_desc, backbuffer->texture_target, backbuffer->pow2Width, backbuffer->pow2Height); - glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, gl_filter); + glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, gl_filter); context_set_draw_buffer(context, GL_BACK); @@ -220,6 +223,12 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO IWineD3DSwapChain_SetDestWindowOverride(iface, hDestWindowOverride); context = context_acquire(This->device, This->backBuffer[0], CTXUSAGE_RESOURCELOAD); + if (!context->valid) + { + context_release(context); + WARN("Invalid context, skipping present.\n"); + return WINED3D_OK; + } /* Render the cursor onto the back buffer, using our nifty directdraw blitting code :-) */ if (This->device->bCursorVisible && This->device->cursorTexture) @@ -514,47 +523,16 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO return WINED3D_OK; } -static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapChain *iface, HWND window) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - WINED3DLOCKED_RECT r; - BYTE *mem; - - if (!window || window == This->win_handle) return WINED3D_OK; - - TRACE("Performing dest override of swapchain %p from window %p to %p\n", This, This->win_handle, window); - if (This->context[0] == This->device->contexts[0]) - { - /* The primary context 'owns' all the opengl resources. Destroying and recreating that context requires downloading - * all opengl resources, deleting the gl resources, destroying all other contexts, then recreating all other contexts - * and reload the resources - */ - delete_opengl_contexts((IWineD3DDevice *)This->device, iface); - This->win_handle = window; - create_primary_opengl_context((IWineD3DDevice *)This->device, iface); - } - else - { - This->win_handle = window; +static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapChain *iface, HWND window) +{ + IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)iface; - /* The old back buffer has to be copied over to the new back buffer. A lockrect - switchcontext - unlockrect - * would suffice in theory, but it is rather nasty and may cause troubles with future changes of the locking code - * So lock read only, copy the surface out, then lock with the discard flag and write back - */ - IWineD3DSurface_LockRect(This->backBuffer[0], &r, NULL, WINED3DLOCK_READONLY); - mem = HeapAlloc(GetProcessHeap(), 0, r.Pitch * ((IWineD3DSurfaceImpl *) This->backBuffer[0])->currentDesc.Height); - memcpy(mem, r.pBits, r.Pitch * ((IWineD3DSurfaceImpl *) This->backBuffer[0])->currentDesc.Height); - IWineD3DSurface_UnlockRect(This->backBuffer[0]); + if (!window) window = swapchain->device_window; + if (window == swapchain->win_handle) return WINED3D_OK; - context_destroy(This->device, This->context[0]); - This->context[0] = context_create(This->device, (IWineD3DSurfaceImpl *)This->frontBuffer, - This->win_handle, FALSE /* pbuffer */, &This->presentParms); - context_release(This->context[0]); + TRACE("Setting swapchain %p window from %p to %p\n", swapchain, swapchain->win_handle, window); + swapchain->win_handle = window; - IWineD3DSurface_LockRect(This->backBuffer[0], &r, NULL, WINED3DLOCK_DISCARD); - memcpy(r.pBits, mem, r.Pitch * ((IWineD3DSurfaceImpl *) This->backBuffer[0])->currentDesc.Height); - HeapFree(GetProcessHeap(), 0, mem); - IWineD3DSurface_UnlockRect(This->backBuffer[0]); - } return WINED3D_OK; } @@ -599,7 +577,7 @@ static LONG fullscreen_exstyle(LONG exstyle) void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w, UINT h) { IWineD3DDeviceImpl *device = swapchain->device; - HWND window = swapchain->win_handle; + HWND window = swapchain->device_window; BOOL filter_messages; LONG style, exstyle; @@ -633,7 +611,7 @@ void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w, void swapchain_restore_fullscreen_window(IWineD3DSwapChainImpl *swapchain) { IWineD3DDeviceImpl *device = swapchain->device; - HWND window = swapchain->win_handle; + HWND window = swapchain->device_window; BOOL filter_messages; LONG style, exstyle; @@ -671,7 +649,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface IWineD3DDeviceImpl *device, WINED3DPRESENT_PARAMETERS *present_parameters, IUnknown *parent) { const struct wined3d_adapter *adapter = device->adapter; - const struct GlPixelFormatDesc *format_desc; + const struct wined3d_format_desc *format_desc; BOOL displaymode_set = FALSE; WINED3DDISPLAYMODE mode; RECT client_rect; @@ -713,6 +691,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface swapchain->parent = parent; swapchain->ref = 1; swapchain->win_handle = window; + swapchain->device_window = window; if (!present_parameters->Windowed && window) { @@ -816,9 +795,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface if (surface_type == SURFACE_OPENGL) { - swapchain->context[0] = context_create(device, (IWineD3DSurfaceImpl *)swapchain->frontBuffer, - window, FALSE /* pbuffer */, present_parameters); - if (!swapchain->context[0]) + if (!(swapchain->context[0] = context_create(swapchain, (IWineD3DSurfaceImpl *)swapchain->frontBuffer))) { WARN("Failed to create context.\n"); hr = WINED3DERR_NOTAVAILABLE; @@ -935,9 +912,7 @@ struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *i TRACE("Creating a new context for swapchain %p, thread %d\n", This, GetCurrentThreadId()); - ctx = context_create(This->device, (IWineD3DSurfaceImpl *)This->frontBuffer, - This->context[0]->win_handle, FALSE /* pbuffer */, &This->presentParms); - if (!ctx) + if (!(ctx = context_create(This, (IWineD3DSurfaceImpl *)This->frontBuffer))) { ERR("Failed to create a new context for the swapchain\n"); return NULL; diff --git a/dlls/wined3d/swapchain_base.c b/dlls/wined3d/swapchain_base.c index 4c0590e4691..f1fde3e6fe5 100644 --- a/dlls/wined3d/swapchain_base.c +++ b/dlls/wined3d/swapchain_base.c @@ -171,9 +171,9 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; HDC hDC; TRACE("(%p) : pRamp@%p flags(%d)\n", This, pRamp, Flags); - hDC = GetDC(This->win_handle); + hDC = GetDC(This->device_window); SetDeviceGammaRamp(hDC, (LPVOID)pRamp); - ReleaseDC(This->win_handle, hDC); + ReleaseDC(This->device_window, hDC); return WINED3D_OK; } @@ -183,9 +183,9 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; HDC hDC; TRACE("(%p) : pRamp@%p\n", This, pRamp); - hDC = GetDC(This->win_handle); + hDC = GetDC(This->device_window); GetDeviceGammaRamp(hDC, pRamp); - ReleaseDC(This->win_handle, hDC); + ReleaseDC(This->device_window, hDC); return WINED3D_OK; } diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 1e272144a8a..bebf7e19745 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -434,7 +434,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, gl_info); UINT pow2_width, pow2_height; UINT tmp_w, tmp_h; unsigned int i; @@ -570,7 +570,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT /* Use the callback to create the texture surface. */ hr = IWineD3DDeviceParent_CreateSurface(device->device_parent, parent, tmp_w, tmp_h, format_desc->format, usage, pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &texture->surfaces[i]); - if (FAILED(hr) || ((IWineD3DSurfaceImpl *)texture->surfaces[i])->Flags & SFLAG_OVERSIZE) + if (FAILED(hr)) { FIXME("Failed to create surface %p, hr %#x\n", texture, hr); texture->surfaces[i] = NULL; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 2ff16752c33..5c8747b9af9 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -183,7 +183,7 @@ static const struct wined3d_format_compression_info format_compression_info[] = {WINED3DFMT_DXT3, 4, 4, 16}, {WINED3DFMT_DXT4, 4, 4, 16}, {WINED3DFMT_DXT5, 4, 4, 16}, - {WINED3DFMT_ATI2N, 4, 4, 16}, + {WINED3DFMT_ATI2N, 1, 1, 1}, }; struct wined3d_format_vertex_info @@ -218,20 +218,20 @@ static const struct wined3d_format_vertex_info format_vertex_info[] = {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)} }; -typedef struct { - WINED3DFORMAT fmt; - GLint glInternal, glGammaInternal, rtInternal, glFormat, glType; - unsigned int Flags; +struct wined3d_format_texture_info +{ + WINED3DFORMAT format; + GLint gl_internal; + GLint gl_srgb_internal; + GLint gl_rt_internal; + GLint gl_format; + GLint gl_type; + unsigned int flags; GL_SupportedExt extension; -} GlPixelFormatDescTemplate; +}; -/***************************************************************************** - * OpenGL format template. Contains unexciting formats which do not need - * extension checks. The order in this table is independent of the order in - * the table StaticPixelFormatDesc above. Not all formats have to be in this - * table. - */ -static const GlPixelFormatDescTemplate gl_formats_template[] = { +static const struct wined3d_format_texture_info format_texture_info[] = +{ /* WINED3DFORMAT internal srgbInternal rtInternal format type flags @@ -560,7 +560,7 @@ static BOOL init_format_base_info(struct wined3d_gl_info *gl_info) for (i = 0; i < format_count; ++i) { - struct GlPixelFormatDesc *desc = &gl_info->gl_formats[i]; + struct wined3d_format_desc *desc = &gl_info->gl_formats[i]; desc->format = formats[i].format; desc->red_mask = formats[i].redMask; desc->green_mask = formats[i].greenMask; @@ -595,7 +595,7 @@ static BOOL init_format_compression_info(struct wined3d_gl_info *gl_info) for (i = 0; i < (sizeof(format_compression_info) / sizeof(*format_compression_info)); ++i) { - struct GlPixelFormatDesc *format_desc; + struct wined3d_format_desc *format_desc; int fmt_idx = getFmtIdx(format_compression_info[i].format); if (fmt_idx == -1) @@ -616,7 +616,7 @@ static BOOL init_format_compression_info(struct wined3d_gl_info *gl_info) } /* Context activation is done by the caller. */ -static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct GlPixelFormatDesc *format_desc) +static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined3d_format_desc *format_desc) { /* Check if the default internal format is supported as a frame buffer * target, otherwise fall back to the render target internal. @@ -755,7 +755,7 @@ static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info) for (i = 0; i < sizeof(formats) / sizeof(*formats); ++i) { - struct GlPixelFormatDesc *desc = &gl_info->gl_formats[i]; + struct wined3d_format_desc *desc = &gl_info->gl_formats[i]; if (!desc->glInternal) continue; @@ -798,28 +798,28 @@ static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info) { unsigned int i; - for (i = 0; i < sizeof(gl_formats_template) / sizeof(gl_formats_template[0]); ++i) + for (i = 0; i < sizeof(format_texture_info) / sizeof(*format_texture_info); ++i) { - int fmt_idx = getFmtIdx(gl_formats_template[i].fmt); - struct GlPixelFormatDesc *desc; + int fmt_idx = getFmtIdx(format_texture_info[i].format); + struct wined3d_format_desc *desc; if (fmt_idx == -1) { ERR("Format %s (%#x) not found.\n", - debug_d3dformat(gl_formats_template[i].fmt), gl_formats_template[i].fmt); + debug_d3dformat(format_texture_info[i].format), format_texture_info[i].format); return FALSE; } - if (!gl_info->supported[gl_formats_template[i].extension]) continue; + if (!gl_info->supported[format_texture_info[i].extension]) continue; desc = &gl_info->gl_formats[fmt_idx]; - desc->glInternal = gl_formats_template[i].glInternal; - desc->glGammaInternal = gl_formats_template[i].glGammaInternal; - desc->rtInternal = gl_formats_template[i].rtInternal; - desc->glFormat = gl_formats_template[i].glFormat; - desc->glType = gl_formats_template[i].glType; + desc->glInternal = format_texture_info[i].gl_internal; + desc->glGammaInternal = format_texture_info[i].gl_srgb_internal; + desc->rtInternal = format_texture_info[i].gl_rt_internal; + desc->glFormat = format_texture_info[i].gl_format; + desc->glType = format_texture_info[i].gl_type; desc->color_fixup = COLOR_FIXUP_IDENTITY; - desc->Flags |= gl_formats_template[i].Flags; + desc->Flags |= format_texture_info[i].flags; desc->heightscale = 1.0f; } @@ -938,6 +938,7 @@ static BOOL check_filter(const struct wined3d_gl_info *gl_info, GLenum internal) static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) { + struct wined3d_format_desc *desc; unsigned int fmt_idx, i; WINED3DFORMAT fmts16[] = { WINED3DFMT_R16_FLOAT, @@ -945,7 +946,6 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3 WINED3DFMT_R16G16B16A16_FLOAT, }; BOOL filtered; - struct GlPixelFormatDesc *desc; if(wined3d_settings.offscreen_rendering_mode != ORM_FBO) { @@ -1098,8 +1098,11 @@ static void apply_format_fixups(struct wined3d_gl_info *gl_info) gl_info->gl_formats[idx].heightscale = 1.5f; gl_info->gl_formats[idx].color_fixup = create_complex_fixup_desc(COMPLEX_FIXUP_YV12); - idx = getFmtIdx(WINED3DFMT_P8_UINT); - gl_info->gl_formats[idx].color_fixup = create_complex_fixup_desc(COMPLEX_FIXUP_P8); + if (gl_info->supported[EXT_PALETTED_TEXTURE] || gl_info->supported[ARB_FRAGMENT_PROGRAM]) + { + idx = getFmtIdx(WINED3DFMT_P8_UINT); + gl_info->gl_formats[idx].color_fixup = create_complex_fixup_desc(COMPLEX_FIXUP_P8); + } if (gl_info->supported[ARB_VERTEX_ARRAY_BGRA]) { @@ -1125,7 +1128,7 @@ static BOOL init_format_vertex_info(struct wined3d_gl_info *gl_info) for (i = 0; i < (sizeof(format_vertex_info) / sizeof(*format_vertex_info)); ++i) { - struct GlPixelFormatDesc *format_desc; + struct wined3d_format_desc *format_desc; int fmt_idx = getFmtIdx(format_vertex_info[i].format); if (fmt_idx == -1) @@ -1182,7 +1185,7 @@ fail: return FALSE; } -const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info) +const struct wined3d_format_desc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info) { int idx = getFmtIdx(fmt); @@ -2125,7 +2128,7 @@ unsigned int count_bits(unsigned int mask) /* Helper function for retrieving color info for ChoosePixelFormat and wglChoosePixelFormatARB. * The later function requires individual color components. */ -BOOL getColorBits(const struct GlPixelFormatDesc *format_desc, +BOOL getColorBits(const struct wined3d_format_desc *format_desc, short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) { TRACE("fmt: %s\n", debug_d3dformat(format_desc->format)); @@ -2162,7 +2165,7 @@ BOOL getColorBits(const struct GlPixelFormatDesc *format_desc, } /* Helper function for retrieving depth/stencil info for ChoosePixelFormat and wglChoosePixelFormatARB */ -BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, short *depthSize, short *stencilSize) +BOOL getDepthStencilBits(const struct wined3d_format_desc *format_desc, short *depthSize, short *stencilSize) { TRACE("fmt: %s\n", debug_d3dformat(format_desc->format)); switch(format_desc->format) @@ -2258,147 +2261,6 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) { return size; } -/*********************************************************************** - * CalculateTexRect - * - * Calculates the dimensions of the opengl texture used for blits. - * Handled oversized opengl textures and updates the source rectangle - * accordingly - * - * Params: - * This: Surface to operate on - * Rect: Requested rectangle - * - * Returns: - * TRUE if the texture part can be loaded, - * FALSE otherwise - * - *********************************************************************/ -BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) -{ - const struct wined3d_gl_info *gl_info = &This->resource.device->adapter->gl_info; - int x1 = Rect->left, x2 = Rect->right; - int y1 = Rect->top, y2 = Rect->bottom; - GLint maxSize = gl_info->limits.texture_size; - - TRACE("(%p)->(%d,%d)-(%d,%d)\n", This, - Rect->left, Rect->top, Rect->right, Rect->bottom); - - /* The sizes might be reversed */ - if(Rect->left > Rect->right) { - x1 = Rect->right; - x2 = Rect->left; - } - if(Rect->top > Rect->bottom) { - y1 = Rect->bottom; - y2 = Rect->top; - } - - /* No oversized texture? This is easy */ - if(!(This->Flags & SFLAG_OVERSIZE)) { - /* Which rect from the texture do I need? */ - if (This->texture_target == GL_TEXTURE_RECTANGLE_ARB) - { - glTexCoord[0] = (float) Rect->left; - glTexCoord[2] = (float) Rect->top; - glTexCoord[1] = (float) Rect->right; - glTexCoord[3] = (float) Rect->bottom; - } else { - glTexCoord[0] = (float) Rect->left / (float) This->pow2Width; - glTexCoord[2] = (float) Rect->top / (float) This->pow2Height; - glTexCoord[1] = (float) Rect->right / (float) This->pow2Width; - glTexCoord[3] = (float) Rect->bottom / (float) This->pow2Height; - } - - return TRUE; - } else { - /* Check if we can succeed at all */ - if( (x2 - x1) > maxSize || - (y2 - y1) > maxSize ) { - TRACE("Requested rectangle is too large for gl\n"); - return FALSE; - } - - /* A part of the texture has to be picked. First, check if - * some texture part is loaded already, if yes try to re-use it. - * If the texture is dirty, or the part can't be used, - * re-position the part to load - */ - if(This->Flags & SFLAG_INTEXTURE) { - if(This->glRect.left <= x1 && This->glRect.right >= x2 && - This->glRect.top <= y1 && This->glRect.bottom >= x2 ) { - /* Ok, the rectangle is ok, re-use it */ - TRACE("Using existing gl Texture\n"); - } else { - /* Rectangle is not ok, dirtify the texture to reload it */ - TRACE("Dirtifying texture to force reload\n"); - This->Flags &= ~SFLAG_INTEXTURE; - } - } - - /* Now if we are dirty(no else if!) */ - if(!(This->Flags & SFLAG_INTEXTURE)) { - /* Set the new rectangle. Use the following strategy: - * 1) Use as big textures as possible. - * 2) Place the texture part in the way that the requested - * part is in the middle of the texture(well, almost) - * 3) If the texture is moved over the edges of the - * surface, replace it nicely - * 4) If the coord is not limiting the texture size, - * use the whole size - */ - if((This->pow2Width) > maxSize) { - This->glRect.left = x1 - maxSize / 2; - if(This->glRect.left < 0) { - This->glRect.left = 0; - } - This->glRect.right = This->glRect.left + maxSize; - if(This->glRect.right > This->currentDesc.Width) { - This->glRect.right = This->currentDesc.Width; - This->glRect.left = This->glRect.right - maxSize; - } - } else { - This->glRect.left = 0; - This->glRect.right = This->pow2Width; - } - - if (This->pow2Height > maxSize) - { - This->glRect.top = x1 - gl_info->limits.texture_size / 2; - if(This->glRect.top < 0) This->glRect.top = 0; - This->glRect.bottom = This->glRect.left + maxSize; - if(This->glRect.bottom > This->currentDesc.Height) { - This->glRect.bottom = This->currentDesc.Height; - This->glRect.top = This->glRect.bottom - maxSize; - } - } else { - This->glRect.top = 0; - This->glRect.bottom = This->pow2Height; - } - TRACE("(%p): Using rect (%d,%d)-(%d,%d)\n", This, - This->glRect.left, This->glRect.top, This->glRect.right, This->glRect.bottom); - } - - /* Re-calculate the rect to draw */ - Rect->left -= This->glRect.left; - Rect->right -= This->glRect.left; - Rect->top -= This->glRect.top; - Rect->bottom -= This->glRect.top; - - /* Get the gl coordinates. The gl rectangle is a power of 2, eigher the max size, - * or the pow2Width / pow2Height of the surface. - * - * Can never be GL_TEXTURE_RECTANGLE_ARB because oversized surfaces are always set up - * as regular GL_TEXTURE_2D. - */ - glTexCoord[0] = (float) Rect->left / (float) (This->glRect.right - This->glRect.left); - glTexCoord[2] = (float) Rect->top / (float) (This->glRect.bottom - This->glRect.top); - glTexCoord[1] = (float) Rect->right / (float) (This->glRect.right - This->glRect.left); - glTexCoord[3] = (float) Rect->bottom / (float) (This->glRect.bottom - This->glRect.top); - } - return TRUE; -} - void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings, BOOL ignore_textype) { #define ARG1 0x01 #define ARG2 0x02 diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 8e19ee9c763..b53f4d3ad04 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -315,7 +315,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWi /* Context activation is done by the caller. */ static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, int gl_level, BOOL srgb_mode) { IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - const struct GlPixelFormatDesc *glDesc = This->resource.format_desc; + const struct wined3d_format_desc *glDesc = This->resource.format_desc; TRACE("(%p) : level %u, format %s (0x%08x)\n", This, gl_level, debug_d3dformat(glDesc->format), glDesc->format); @@ -386,7 +386,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, gl_info); HRESULT hr; if (!gl_info->supported[EXT_TEXTURE3D]) diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 14ca72fcd49..088c3735a2d 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -355,7 +355,7 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); + const struct wined3d_format_desc *format_desc = getFormatDescEntry(format, gl_info); UINT tmp_w, tmp_h, tmp_d; unsigned int i; HRESULT hr; diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index f8097d65cb9..9b46dd79367 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1829,7 +1829,6 @@ typedef enum wined3d_gl_extension SGIS_GENERATE_MIPMAP, SGI_VIDEO_SYNC, /* WGL extensions */ - WGL_ARB_PBUFFER, WGL_ARB_PIXEL_FORMAT, WGL_WINE_PIXEL_FORMAT_PASSTHROUGH, /* Internally used */ @@ -3680,26 +3679,6 @@ typedef const char *(WINAPI *WINED3D_PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); #define WGL_SAMPLES_ARB 0x2042 #endif -/* WGL_ARB_pbuffer */ -#ifndef WGL_ARB_pbuffer -#define WGL_ARB_pbuffer 1 -#define WGL_DRAW_TO_PBUFFER_ARB 0x202d -#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202e -#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202f -#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 -#define WGL_PBUFFER_LARGEST_ARB 0x2033 -#define WGL_PBUFFER_WIDTH_ARB 0x2034 -#define WGL_PBUFFER_HEIGHT_ARB 0x2035 -#define WGL_PBUFFER_LOST_ARB 0x2036 -#endif -DECLARE_HANDLE(HPBUFFERARB); -typedef HPBUFFERARB (WINAPI *WINED3D_PFNWGLCREATEPBUFFERARBPROC)(HDC hDC, int iPixelFormat, - int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI *WINED3D_PFNWGLGETPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer); -typedef int (WINAPI *WINED3D_PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer, HDC hDC); -typedef BOOL (WINAPI *WINED3D_PFNWGLDESTROYPBUFFERARBPROC)(HPBUFFERARB hPbuffer); -typedef BOOL (WINAPI *WINED3D_PFNWGLQUERYPBUFFERARBPROC)(HPBUFFERARB hPbuffer, int iAttribute, int *piValue); - /* WGL_ARB_pixel_format */ #ifndef WGL_ARB_pixel_format #define WGL_ARB_pixel_format 1 @@ -4489,11 +4468,6 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma USE_GL_FUNC(WINED3D_PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB, 0, NULL) \ USE_GL_FUNC(WINED3D_PFNWGLGETPIXELFORMATATTRIBFVARBPROC, wglGetPixelFormatAttribfvARB, 0, NULL) \ USE_GL_FUNC(WINED3D_PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB, 0, NULL) \ - USE_GL_FUNC(WINED3D_PFNWGLCREATEPBUFFERARBPROC, wglCreatePbufferARB, 0, NULL) \ - USE_GL_FUNC(WINED3D_PFNWGLGETPBUFFERDCARBPROC, wglGetPbufferDCARB, 0, NULL) \ - USE_GL_FUNC(WINED3D_PFNWGLRELEASEPBUFFERDCARBPROC, wglReleasePbufferDCARB, 0, NULL) \ - USE_GL_FUNC(WINED3D_PFNWGLDESTROYPBUFFERARBPROC, wglDestroyPbufferARB, 0, NULL) \ - USE_GL_FUNC(WINED3D_PFNWGLQUERYPBUFFERARBPROC, wglQueryPbufferARB, 0, NULL) \ USE_GL_FUNC(WINED3D_PFNWGLSETPIXELFORMATWINE, wglSetPixelFormatWINE, 0, NULL) #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 39416e1f875..e2267490dba 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -236,11 +236,6 @@ static BOOL wined3d_init(HINSTANCE hInstDLL) TRACE("Using the backbuffer for offscreen rendering\n"); wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER; } - else if (!strcmp(buffer,"pbuffer")) - { - TRACE("Using PBuffers for offscreen rendering\n"); - wined3d_settings.offscreen_rendering_mode = ORM_PBUFFER; - } else if (!strcmp(buffer,"fbo")) { TRACE("Using FBOs for offscreen rendering\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1d5cd974645..9cd58ca97e8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -50,6 +50,7 @@ #define WINED3D_QUIRK_GLSL_CLIP_VARYING 0x00000004 #define WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA 0x00000008 #define WINED3D_QUIRK_NV_CLIP_BROKEN 0x00000010 +#define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020 /* Texture format fixups */ @@ -67,10 +68,11 @@ enum fixup_channel_source enum complex_fixup { - COMPLEX_FIXUP_YUY2 = 0, - COMPLEX_FIXUP_UYVY = 1, - COMPLEX_FIXUP_YV12 = 2, - COMPLEX_FIXUP_P8 = 3, + COMPLEX_FIXUP_NONE = 0, + COMPLEX_FIXUP_YUY2 = 1, + COMPLEX_FIXUP_UYVY = 2, + COMPLEX_FIXUP_YV12 = 3, + COMPLEX_FIXUP_P8 = 4, }; #include @@ -234,8 +236,7 @@ static inline float float_24_to_32(DWORD in) #define VBO_HW 1 #define ORM_BACKBUFFER 0 -#define ORM_PBUFFER 1 -#define ORM_FBO 2 +#define ORM_FBO 1 #define SHADER_ARB 1 #define SHADER_GLSL 2 @@ -830,13 +831,6 @@ extern const float identity[16] DECLSPEC_HIDDEN; * Compilable extra diagnostics */ -/* Trace information per-vertex: (extremely high amount of trace) */ -#if 0 /* NOTE: Must be 0 in cvs */ -# define VTRACE(A) TRACE A -#else -# define VTRACE(A) -#endif - /* TODO: Confirm each of these works when wined3d move completed */ #if 0 /* NOTE: Must be 0 in cvs */ /* To avoid having to get gigabytes of trace, the following can be compiled in, and at the start @@ -910,7 +904,7 @@ enum wined3d_ffp_emit_idx struct wined3d_stream_info_element { - const struct GlPixelFormatDesc *format_desc; + const struct wined3d_format_desc *format_desc; GLsizei stride; const BYTE *data; UINT stream_idx; @@ -1052,7 +1046,7 @@ struct wined3d_context DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ - IWineD3DSurface *surface; + IWineD3DSwapChainImpl *swapchain; IWineD3DSurface *current_rt; DWORD tid; /* Thread ID which owns this context at the moment */ @@ -1089,7 +1083,7 @@ struct wined3d_context HGLRC glCtx; HWND win_handle; HDC hdc; - HPBUFFERARB pbuffer; + int pixel_format; GLint aux_buffers; /* FBOs */ @@ -1101,6 +1095,7 @@ struct wined3d_context GLuint dst_fbo; GLuint fbo_read_binding; GLuint fbo_draw_binding; + BOOL rebind_fbo; /* Queries */ GLuint *free_occlusion_queries; @@ -1172,10 +1167,10 @@ struct blit_shader { HRESULT (*alloc_private)(IWineD3DDevice *iface); void (*free_private)(IWineD3DDevice *iface); - HRESULT (*set_shader)(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc, + HRESULT (*set_shader)(IWineD3DDevice *iface, const struct wined3d_format_desc *format_desc, GLenum textype, UINT width, UINT height); void (*unset_shader)(IWineD3DDevice *iface); - BOOL (*color_fixup_supported)(struct color_fixup_desc fixup); + BOOL (*color_fixup_supported)(const struct wined3d_gl_info *gl_info, struct color_fixup_desc fixup); }; extern const struct blit_shader ffp_blit DECLSPEC_HIDDEN; @@ -1201,8 +1196,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context, GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer) DECLSPEC_HIDDEN; void context_attach_surface_fbo(const struct wined3d_context *context, GLenum fbo_target, DWORD idx, IWineD3DSurface *surface) DECLSPEC_HIDDEN; -struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, HWND win, - BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN; +struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, IWineD3DSurfaceImpl *target) DECLSPEC_HIDDEN; void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN; void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; @@ -1212,6 +1206,7 @@ void context_release(struct wined3d_context *context) DECLSPEC_HIDDEN; BOOL context_set_current(struct wined3d_context *ctx) DECLSPEC_HIDDEN; void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) DECLSPEC_HIDDEN; void context_set_tls_idx(DWORD idx) DECLSPEC_HIDDEN; +void context_surface_update(struct wined3d_context *context, IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN; void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN; HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN; @@ -1251,7 +1246,6 @@ typedef struct WineD3D_PixelFormat int redSize, greenSize, blueSize, alphaSize, colorSize; int depthSize, stencilSize; BOOL windowDrawable; - BOOL pbufferDrawable; BOOL doubleBuffer; int auxBuffers; int numSamples; @@ -1433,7 +1427,7 @@ struct wined3d_gl_info WGL_EXT_FUNCS_GEN #undef USE_GL_FUNC - struct GlPixelFormatDesc *gl_formats; + struct wined3d_format_desc *gl_formats; }; struct wined3d_driver_info @@ -1705,8 +1699,6 @@ struct IWineD3DDeviceImpl /* Context management */ struct wined3d_context **contexts; UINT numContexts; - struct wined3d_context *pbufferContext; /* The context that has a pbuffer as drawable */ - DWORD pbufferWidth, pbufferHeight; /* Size of the buffer drawable */ /* High level patch management */ #define PATCHMAP_SIZE 43 @@ -1715,6 +1707,8 @@ struct IWineD3DDeviceImpl struct WineD3DRectPatch *currentPatch; }; +BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; +void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, IUnknown *parent, IWineD3DDeviceParent *device_parent) DECLSPEC_HIDDEN; @@ -1770,7 +1764,7 @@ typedef struct IWineD3DResourceClass WINED3DPOOL pool; UINT size; DWORD usage; - const struct GlPixelFormatDesc *format_desc; + const struct wined3d_format_desc *format_desc; DWORD priority; BYTE *allocatedMemory; /* Pointer to the real data location */ BYTE *heapMemory; /* Pointer to the HeapAlloced block of memory */ @@ -1793,7 +1787,7 @@ DWORD resource_get_priority(IWineD3DResource *iface) DECLSPEC_HIDDEN; HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid, void *data, DWORD *data_size) DECLSPEC_HIDDEN; HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type, - IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc, + IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format_desc *format_desc, WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN; DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority) DECLSPEC_HIDDEN; @@ -1801,7 +1795,7 @@ HRESULT resource_set_private_data(IWineD3DResource *iface, REFGUID guid, const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN; /* Tests show that the start address of resources is 32 byte aligned */ -#define RESOURCE_ALIGNMENT 32 +#define RESOURCE_ALIGNMENT 16 /***************************************************************************** * IWineD3DBaseTexture D3D- > openGL state map lookups @@ -1861,7 +1855,8 @@ typedef struct IWineD3DBaseTextureClass void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; BOOL surface_init_sysmem(IWineD3DSurface *iface) DECLSPEC_HIDDEN; BOOL surface_is_offscreen(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -void surface_prepare_texture(IWineD3DSurfaceImpl *surface, BOOL srgb) DECLSPEC_HIDDEN; +void surface_prepare_texture(IWineD3DSurfaceImpl *surface, + const struct wined3d_gl_info *gl_info, BOOL srgb) DECLSPEC_HIDDEN; typedef struct IWineD3DBaseTextureImpl { @@ -1884,7 +1879,7 @@ BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; DWORD basetexture_get_lod(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DRESOURCETYPE resource_type, - IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc, + IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format_desc *format_desc, WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN; @@ -2097,7 +2092,7 @@ struct IWineD3DSurfaceImpl extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl DECLSPEC_HIDDEN; extern const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl DECLSPEC_HIDDEN; -UINT surface_calculate_size(const struct GlPixelFormatDesc *format_desc, +UINT surface_calculate_size(const struct wined3d_format_desc *format_desc, UINT alignment, UINT width, UINT height) DECLSPEC_HIDDEN; void surface_gdi_cleanup(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN; HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, @@ -2153,13 +2148,11 @@ const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) DECLS void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; -void get_drawable_size_pbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPEC_HIDDEN; /* Surface flags: */ -#define SFLAG_OVERSIZE 0x00000001 /* Surface is bigger than gl size, blts only */ #define SFLAG_CONVERTED 0x00000002 /* Converted for color keying or Palettized */ #define SFLAG_DIBSECTION 0x00000004 /* Has a DIB section attached for GetDC */ #define SFLAG_LOCKABLE 0x00000008 /* Surface can be locked */ @@ -2186,7 +2179,6 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPE #define SFLAG_SWAPCHAIN 0x01000000 /* The surface is part of a swapchain */ /* In some conditions the surface memory must not be freed: - * SFLAG_OVERSIZE: Not all data can be kept in GL * SFLAG_CONVERTED: Converting the data back would take too long * SFLAG_DIBSECTION: The dib code manages the memory * SFLAG_LOCKED: The app requires access to the surface data @@ -2194,8 +2186,7 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPE * SFLAG_PBO: PBOs don't use 'normal' memory. It is either allocated by the driver or must be NULL. * SFLAG_CLIENT: OpenGL uses our memory as backup */ -#define SFLAG_DONOTFREE (SFLAG_OVERSIZE | \ - SFLAG_CONVERTED | \ +#define SFLAG_DONOTFREE (SFLAG_CONVERTED | \ SFLAG_DIBSECTION | \ SFLAG_LOCKED | \ SFLAG_DYNLOCK | \ @@ -2212,8 +2203,6 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPE SFLAG_DS_OFFSCREEN) #define SFLAG_DS_DISCARDED SFLAG_DS_LOCATIONS -BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) DECLSPEC_HIDDEN; - typedef enum { NO_CONVERSION, CONVERT_PALETTED, @@ -2253,7 +2242,7 @@ BOOL palette9_changed(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN; struct wined3d_vertex_declaration_element { - const struct GlPixelFormatDesc *format_desc; + const struct wined3d_format_desc *format_desc; BOOL ffp_valid; WORD input_slot; WORD offset; @@ -2485,6 +2474,8 @@ struct wined3d_map_range #define WINED3D_BUFFER_CREATEBO 0x04 /* Attempt to create a buffer object next PreLoad */ #define WINED3D_BUFFER_DOUBLEBUFFER 0x08 /* Use a vbo and local allocated memory */ #define WINED3D_BUFFER_FLUSH 0x10 /* Manual unmap flushing */ +#define WINED3D_BUFFER_DISCARD 0x20 /* A DISCARD lock has occured since the last PreLoad */ +#define WINED3D_BUFFER_NOSYNC 0x40 /* All locks since the last PreLoad had NOOVERWRITE set */ struct wined3d_buffer { @@ -2561,6 +2552,7 @@ struct IWineD3DSwapChainImpl unsigned int num_contexts; HWND win_handle; + HWND device_window; }; const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl DECLSPEC_HIDDEN; @@ -2659,9 +2651,9 @@ void surface_set_compatible_renderbuffer(IWineD3DSurface *iface, void surface_set_texture_name(IWineD3DSurface *iface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN; void surface_set_texture_target(IWineD3DSurface *iface, GLenum target) DECLSPEC_HIDDEN; -BOOL getColorBits(const struct GlPixelFormatDesc *format_desc, +BOOL getColorBits(const struct wined3d_format_desc *format_desc, short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) DECLSPEC_HIDDEN; -BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, +BOOL getDepthStencilBits(const struct wined3d_format_desc *format_desc, short *depthSize, short *stencilSize) DECLSPEC_HIDDEN; /* Math utils */ @@ -2962,7 +2954,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN; #define WINED3DFMT_FLAG_COMPRESSED 0x80 #define WINED3DFMT_FLAG_GETDC 0x100 -struct GlPixelFormatDesc +struct wined3d_format_desc { WINED3DFORMAT format; DWORD red_mask; @@ -2994,7 +2986,7 @@ struct GlPixelFormatDesc struct color_fixup_desc color_fixup; }; -const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, +const struct wined3d_format_desc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock) diff --git a/dlls/wineesd.drv/Makefile.in b/dlls/wineesd.drv/Makefile.in index e42d04c2844..ac4f1a92f35 100644 --- a/dlls/wineesd.drv/Makefile.in +++ b/dlls/wineesd.drv/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ esound.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winejack.drv/Makefile.in b/dlls/winejack.drv/Makefile.in index 46e14430c49..f6b65a5c58d 100644 --- a/dlls/winejack.drv/Makefile.in +++ b/dlls/winejack.drv/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ jack.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winejoystick.drv/Makefile.in b/dlls/winejoystick.drv/Makefile.in index be8d9e0896c..c52a6d78869 100644 --- a/dlls/winejoystick.drv/Makefile.in +++ b/dlls/winejoystick.drv/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ joystick.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winemapi/Makefile.in b/dlls/winemapi/Makefile.in index 7cde1ff8dbb..f3d1a844845 100644 --- a/dlls/winemapi/Makefile.in +++ b/dlls/winemapi/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ sendmail.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winemp3.acm/Makefile.in b/dlls/winemp3.acm/Makefile.in index 46ad44c4695..bed3e0251e4 100644 --- a/dlls/winemp3.acm/Makefile.in +++ b/dlls/winemp3.acm/Makefile.in @@ -4,11 +4,9 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winemp3.acm IMPORTS = winmm user32 kernel32 -EXTRALIBS = @LIBMPG123@ +EXTRALIBS = @LIBMPG123@ @COREAUDIO@ C_SRCS = \ mpegl3.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winemp3.acm/mpegl3.c b/dlls/winemp3.acm/mpegl3.c index 01697a7b333..607450119b4 100644 --- a/dlls/winemp3.acm/mpegl3.c +++ b/dlls/winemp3.acm/mpegl3.c @@ -1,8 +1,8 @@ /* * MPEG Layer 3 handling * - * Copyright (C) 2002 Eric Pouech - * Copyright (C) 2009 CodeWeavers, Aric Stewart + * Copyright (C) 2002 Eric Pouech + * Copyright (C) 2009 CodeWeavers, Aric Stewart * * * This library is free software; you can redistribute it and/or @@ -26,6 +26,25 @@ #include #include #include + +#ifdef HAVE_MPG123_H +# include +#else +# ifdef HAVE_COREAUDIO_COREAUDIO_H +# include +# include +# endif +# ifdef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H +# include +# endif +# ifdef HAVE_AUDIOTOOLBOX_AUDIOFILE_H +# include +# endif +# ifdef HAVE_AUDIOTOOLBOX_AUDIOFILESTREAM_H +# include +# endif +#endif + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -35,40 +54,10 @@ #include "mmreg.h" #include "msacm.h" #include "msacmdrv.h" - -#ifdef HAVE_MPG123_H -#include -#endif - #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(mpeg3); -/*********************************************************************** - * MPEG3_drvOpen - */ -static LRESULT MPEG3_drvOpen(LPCSTR str) -{ - mpg123_init(); - return 1; -} - -/*********************************************************************** - * MPEG3_drvClose - */ -static LRESULT MPEG3_drvClose(DWORD_PTR dwDevID) -{ - mpg123_exit(); - return 1; -} - -typedef struct tagAcmMpeg3Data -{ - void (*convert)(PACMDRVSTREAMINSTANCE adsi, - const unsigned char*, LPDWORD, unsigned char*, LPDWORD); - mpg123_handle *mh; -} AcmMpeg3Data; - /* table to list all supported formats... those are the basic ones. this * also helps given a unique index to each of the supported formats */ @@ -141,6 +130,34 @@ static DWORD MPEG3_GetFormatIndex(LPWAVEFORMATEX wfx) return 0xFFFFFFFF; } +#ifdef HAVE_MPG123_H + +typedef struct tagAcmMpeg3Data +{ + void (*convert)(PACMDRVSTREAMINSTANCE adsi, + const unsigned char*, LPDWORD, unsigned char*, LPDWORD); + mpg123_handle *mh; +} AcmMpeg3Data; + +/*********************************************************************** + * MPEG3_drvOpen + */ +static LRESULT MPEG3_drvOpen(LPCSTR str) +{ + mpg123_init(); + return 1; +} + +/*********************************************************************** + * MPEG3_drvClose + */ +static LRESULT MPEG3_drvClose(DWORD_PTR dwDevID) +{ + mpg123_exit(); + return 1; +} + + static void mp3_horse(PACMDRVSTREAMINSTANCE adsi, const unsigned char* src, LPDWORD nsrc, unsigned char* dst, LPDWORD ndst) @@ -186,6 +203,314 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi, } /*********************************************************************** + * MPEG3_Reset + * + */ +static void MPEG3_Reset(PACMDRVSTREAMINSTANCE adsi, AcmMpeg3Data* aad) +{ + mpg123_feedseek(aad->mh, 0, SEEK_SET, NULL); + mpg123_close(aad->mh); + mpg123_open_feed(aad->mh); +} + +/*********************************************************************** + * MPEG3_StreamOpen + * + */ +static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi) +{ + AcmMpeg3Data* aad; + int err; + + assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC)); + + if (MPEG3_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF || + MPEG3_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF) + return ACMERR_NOTPOSSIBLE; + + aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmMpeg3Data)); + if (aad == 0) return MMSYSERR_NOMEM; + + adsi->dwDriver = (DWORD_PTR)aad; + + if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && + adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) + { + goto theEnd; + } + else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 && + adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) + { + /* resampling or mono <=> stereo not available + * MPEG3 algo only define 16 bit per sample output + */ + if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec || + adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels || + adsi->pwfxDst->wBitsPerSample != 16) + goto theEnd; + aad->convert = mp3_horse; + aad->mh = mpg123_new(NULL,&err); + mpg123_open_feed(aad->mh); + } + /* no encoding yet + else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && + adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3) + */ + else goto theEnd; + MPEG3_Reset(adsi, aad); + + return MMSYSERR_NOERROR; + + theEnd: + HeapFree(GetProcessHeap(), 0, aad); + adsi->dwDriver = 0L; + return MMSYSERR_NOTSUPPORTED; +} + +/*********************************************************************** + * MPEG3_StreamClose + * + */ +static LRESULT MPEG3_StreamClose(PACMDRVSTREAMINSTANCE adsi) +{ + mpg123_close(((AcmMpeg3Data*)adsi->dwDriver)->mh); + mpg123_delete(((AcmMpeg3Data*)adsi->dwDriver)->mh); + HeapFree(GetProcessHeap(), 0, (void*)adsi->dwDriver); + return MMSYSERR_NOERROR; +} + +#elif defined(HAVE_AUDIOFILESTREAMOPEN) + +typedef struct tagAcmMpeg3Data +{ + LRESULT (*convert)(PACMDRVSTREAMINSTANCE adsi, + const unsigned char*, LPDWORD, unsigned char*, LPDWORD); + AudioConverterRef acr; + AudioStreamBasicDescription in,out; + AudioFileStreamID afs; + + AudioBufferList outBuffer; + AudioBuffer inBuffer; + + UInt32 NumberPackets; + AudioStreamPacketDescription *PacketDescriptions; + + OSStatus lastError; +} AcmMpeg3Data; + +static inline const char* wine_dbgstr_fourcc(unsigned long fourcc) +{ + char buf[4] = { (char) (fourcc >> 24), (char) (fourcc >> 16), + (char) (fourcc >> 8), (char) fourcc }; + return wine_dbgstr_an(buf, sizeof(buf)); +} + +/*********************************************************************** + * MPEG3_drvOpen + */ +static LRESULT MPEG3_drvOpen(LPCSTR str) +{ + return 1; +} + +/*********************************************************************** + * MPEG3_drvClose + */ +static LRESULT MPEG3_drvClose(DWORD_PTR dwDevID) +{ + return 1; +} + + +static OSStatus Mp3AudioConverterComplexInputDataProc ( + AudioConverterRef inAudioConverter, + UInt32 *ioNumberDataPackets, + AudioBufferList *ioData, + AudioStreamPacketDescription **outDataPacketDescription, + void *inUserData +) +{ + AcmMpeg3Data *amd = (AcmMpeg3Data*)inUserData; + + if (amd->inBuffer.mDataByteSize > 0) + { + *ioNumberDataPackets = amd->NumberPackets; + ioData->mNumberBuffers = 1; + ioData->mBuffers[0].mDataByteSize = amd->inBuffer.mDataByteSize; + ioData->mBuffers[0].mData = amd->inBuffer.mData; + ioData->mBuffers[0].mNumberChannels = amd->inBuffer.mNumberChannels; + amd->inBuffer.mDataByteSize = 0; + if (outDataPacketDescription) + *outDataPacketDescription = amd->PacketDescriptions; + } + else + *ioNumberDataPackets = 0; + return noErr; +} + +static LRESULT mp3_leopard_horse(PACMDRVSTREAMINSTANCE adsi, + const unsigned char* src, LPDWORD nsrc, + unsigned char* dst, LPDWORD ndst) +{ + AcmMpeg3Data* amd = (AcmMpeg3Data*)adsi->dwDriver; + OSStatus ret; + + TRACE("ndst %u %p <- %u %p\n",*ndst,dst,*nsrc, src); + amd->outBuffer.mNumberBuffers = 1; + amd->outBuffer.mBuffers[0].mDataByteSize = *ndst; + amd->outBuffer.mBuffers[0].mData = dst; + amd->outBuffer.mBuffers[0].mNumberChannels = amd->out.mChannelsPerFrame; + + memset(dst,0xff,*ndst); + ret = AudioFileStreamParseBytes( amd->afs, *nsrc, src, 0 ); + + if (ret != noErr) + { + *nsrc = 0; + ERR("Feed Error %s\n", wine_dbgstr_fourcc(ret)); + return MMSYSERR_ERROR; + } + else if (amd->lastError != noErr) + { + *nsrc = 0; + ERR("Error during feed %s\n", wine_dbgstr_fourcc(ret)); + return MMSYSERR_ERROR; + } + + *ndst = amd->outBuffer.mBuffers[0].mDataByteSize; + *nsrc = amd->inBuffer.mDataByteSize; + + return MMSYSERR_NOERROR; +} + +/*********************************************************************** + * MPEG3_Reset + * + */ +static void MPEG3_Reset(PACMDRVSTREAMINSTANCE adsi, AcmMpeg3Data* aad) +{ + SInt64 offset; + AudioConverterReset(aad->acr); + AudioFileStreamSeek(aad->afs, 0, &offset, 0); +} + +static void Mp3PropertyListenerProc ( void *inClientData, + AudioFileStreamID inAudioFileStream, UInt32 inPropertyID, UInt32 *ioFlags) +{ + /* No operation at this time */ +} + +static void Mp3PacketsProc ( void *inClientData, UInt32 inNumberBytes, + UInt32 inNumberPackets, const void *inInputData, + AudioStreamPacketDescription *inPacketDescriptions) +{ + AcmMpeg3Data *amd = (AcmMpeg3Data*)inClientData; + UInt32 size; + + amd->inBuffer.mDataByteSize = inNumberBytes; + amd->inBuffer.mData = (void*)inInputData; + amd->inBuffer.mNumberChannels = amd->in.mChannelsPerFrame; + + amd->NumberPackets = inNumberPackets; + amd->PacketDescriptions = inPacketDescriptions; + + size = amd->outBuffer.mBuffers[0].mDataByteSize / amd->out.mBytesPerPacket; + amd->lastError = AudioConverterFillComplexBuffer(amd->acr, Mp3AudioConverterComplexInputDataProc, inClientData, &size, &amd->outBuffer, NULL); +} + +/*********************************************************************** + * MPEG3_StreamOpen + * + */ +static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi) +{ + AcmMpeg3Data* aad; + + assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC)); + + if (MPEG3_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF || + MPEG3_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF) + return ACMERR_NOTPOSSIBLE; + + aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmMpeg3Data)); + if (aad == 0) return MMSYSERR_NOMEM; + + adsi->dwDriver = (DWORD_PTR)aad; + + if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && + adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) + { + goto theEnd; + } + else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 && + adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) + { + OSStatus err; + + aad->in.mSampleRate = adsi->pwfxSrc->nSamplesPerSec; + aad->out.mSampleRate = adsi->pwfxDst->nSamplesPerSec; + aad->in.mBitsPerChannel = adsi->pwfxSrc->wBitsPerSample; + aad->out.mBitsPerChannel = adsi->pwfxDst->wBitsPerSample; + aad->in.mFormatID = kAudioFormatMPEGLayer3; + aad->out.mFormatID = kAudioFormatLinearPCM; + aad->in.mChannelsPerFrame = adsi->pwfxSrc->nChannels; + aad->out.mChannelsPerFrame = adsi->pwfxDst->nChannels; + aad->in.mFormatFlags = 0; + aad->out.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger; + aad->in.mBytesPerFrame = 0; + + aad->out.mBytesPerFrame = (aad->out.mBitsPerChannel * aad->out.mChannelsPerFrame) / 8; + aad->in.mBytesPerPacket = 0; + aad->out.mBytesPerPacket = aad->out.mBytesPerFrame; + aad->in.mFramesPerPacket = 0; + aad->out.mFramesPerPacket = 1; + aad->in.mReserved = aad->out.mReserved = 0; + + aad->acr = NULL; + + err = AudioConverterNew(&aad->in, &aad->out ,&aad->acr); + if (err != noErr) + { + ERR("Create failed: %s\n", wine_dbgstr_fourcc(err)); + goto theEnd; + } + else + { + aad->convert = mp3_leopard_horse; + err = AudioFileStreamOpen(aad, Mp3PropertyListenerProc, Mp3PacketsProc, kAudioFormatMPEGLayer3, &aad->afs); + if (err != noErr) + { + ERR("Stream Open failed: %s\n", wine_dbgstr_fourcc(err)); + goto theEnd; + } + } + } + else goto theEnd; + MPEG3_Reset(adsi, aad); + + return MMSYSERR_NOERROR; + + theEnd: + HeapFree(GetProcessHeap(), 0, aad); + adsi->dwDriver = 0L; + return MMSYSERR_NOTSUPPORTED; +} + +/*********************************************************************** + * MPEG3_StreamClose + * + */ +static LRESULT MPEG3_StreamClose(PACMDRVSTREAMINSTANCE adsi) +{ + AudioConverterDispose(((AcmMpeg3Data*)adsi->dwDriver)->acr); + AudioFileStreamClose(((AcmMpeg3Data*)adsi->dwDriver)->afs); + HeapFree(GetProcessHeap(), 0, (void*)adsi->dwDriver); + return MMSYSERR_NOERROR; +} + +#endif + +/*********************************************************************** * MPEG3_DriverDetails * */ @@ -391,83 +716,6 @@ static LRESULT MPEG3_FormatSuggest(PACMDRVFORMATSUGGEST adfs) } /*********************************************************************** - * MPEG3_Reset - * - */ -static void MPEG3_Reset(PACMDRVSTREAMINSTANCE adsi, AcmMpeg3Data* aad) -{ - mpg123_feedseek(aad->mh, 0, SEEK_SET, NULL); - mpg123_close(aad->mh); - mpg123_open_feed(aad->mh); -} - -/*********************************************************************** - * MPEG3_StreamOpen - * - */ -static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi) -{ - AcmMpeg3Data* aad; - int err; - - assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC)); - - if (MPEG3_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF || - MPEG3_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF) - return ACMERR_NOTPOSSIBLE; - - aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmMpeg3Data)); - if (aad == 0) return MMSYSERR_NOMEM; - - adsi->dwDriver = (DWORD_PTR)aad; - - if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && - adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) - { - goto theEnd; - } - else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 && - adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) - { - /* resampling or mono <=> stereo not available - * MPEG3 algo only define 16 bit per sample output - */ - if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec || - adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels || - adsi->pwfxDst->wBitsPerSample != 16) - goto theEnd; - aad->convert = mp3_horse; - aad->mh = mpg123_new(NULL,&err); - mpg123_open_feed(aad->mh); - } - /* no encoding yet - else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && - adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3) - */ - else goto theEnd; - MPEG3_Reset(adsi, aad); - - return MMSYSERR_NOERROR; - - theEnd: - HeapFree(GetProcessHeap(), 0, aad); - adsi->dwDriver = 0L; - return MMSYSERR_NOTSUPPORTED; -} - -/*********************************************************************** - * MPEG3_StreamClose - * - */ -static LRESULT MPEG3_StreamClose(PACMDRVSTREAMINSTANCE adsi) -{ - mpg123_close(((AcmMpeg3Data*)adsi->dwDriver)->mh); - mpg123_delete(((AcmMpeg3Data*)adsi->dwDriver)->mh); - HeapFree(GetProcessHeap(), 0, (void*)adsi->dwDriver); - return MMSYSERR_NOERROR; -} - -/*********************************************************************** * MPEG3_StreamSize * */ diff --git a/dlls/winenas.drv/Makefile.in b/dlls/winenas.drv/Makefile.in index 94bbb2e21ec..45d0f21d133 100644 --- a/dlls/winenas.drv/Makefile.in +++ b/dlls/winenas.drv/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ nas.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wineoss.drv/Makefile.in b/dlls/wineoss.drv/Makefile.in index beb2ba72e1b..a2c5466fbc5 100644 --- a/dlls/wineoss.drv/Makefile.in +++ b/dlls/wineoss.drv/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ oss.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wineps.drv/Makefile.in b/dlls/wineps.drv/Makefile.in index 34d3473d5a2..a3951c91baf 100644 --- a/dlls/wineps.drv/Makefile.in +++ b/dlls/wineps.drv/Makefile.in @@ -105,5 +105,3 @@ install-ppd:: $(DESTDIR)$(datadir)/wine dummy uninstall:: $(RM) $(DESTDIR)$(datadir)/wine/generic.ppd - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index ef5d9d82340..685a56a3171 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -305,27 +305,22 @@ BOOL CDECL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWST { PSDRV_PDEVICE *physDev; PRINTERINFO *pi; - char *deviceA; /* If no device name was specified, retrieve the device name - * from the DEVMODE structure from the DC's physDev. + * from the PRINTERINFO structure from the DC's physDev. * (See CreateCompatibleDC) */ if ( !device && *pdev ) { - physDev = *pdev; - deviceA = HeapAlloc(GetProcessHeap(), 0, CCHDEVICENAME); - lstrcpynA(deviceA, (LPCSTR)physDev->Devmode->dmPublic.dmDeviceName, CCHDEVICENAME); + pi = PSDRV_FindPrinterInfo((*pdev)->pi->FriendlyName); } else { DWORD len = WideCharToMultiByte(CP_ACP, 0, device, -1, NULL, 0, NULL, NULL); - deviceA = HeapAlloc(GetProcessHeap(), 0, len); + char *deviceA = HeapAlloc(GetProcessHeap(), 0, len); WideCharToMultiByte(CP_ACP, 0, device, -1, deviceA, len, NULL, NULL); + pi = PSDRV_FindPrinterInfo(deviceA); + HeapFree(GetProcessHeap(), 0, deviceA); } - pi = PSDRV_FindPrinterInfo(deviceA); - - HeapFree(GetProcessHeap(), 0, deviceA); - deviceA = NULL; TRACE("(%s %s %s %p)\n", debugstr_w(driver), debugstr_w(device), debugstr_w(output), initData); diff --git a/dlls/wineps16.drv16/Makefile.in b/dlls/wineps16.drv16/Makefile.in index ceeb97c28c6..023409df215 100644 --- a/dlls/wineps16.drv16/Makefile.in +++ b/dlls/wineps16.drv16/Makefile.in @@ -10,5 +10,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = driver.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winequartz.drv/Makefile.in b/dlls/winequartz.drv/Makefile.in index b2214b699e3..8e8421fbb03 100644 --- a/dlls/winequartz.drv/Makefile.in +++ b/dlls/winequartz.drv/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ quartzdrv_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winex11.drv/Makefile.in b/dlls/winex11.drv/Makefile.in index 0bafb33853c..6e16e38d920 100644 --- a/dlls/winex11.drv/Makefile.in +++ b/dlls/winex11.drv/Makefile.in @@ -47,5 +47,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index f4e49e20e15..4d4306e39a9 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -2199,7 +2199,10 @@ static BOOL X11DRV_CLIPBOARD_ReadSelectionData(Display *display, LPWINE_CLIPDATA HANDLE hData = lpData->lpFormat->lpDrvImportFunc(display, xe.xselection.requestor, xe.xselection.property); - bRet = X11DRV_CLIPBOARD_InsertClipboardData(lpData->wFormatID, hData, 0, lpData->lpFormat, TRUE); + if (hData) + bRet = X11DRV_CLIPBOARD_InsertClipboardData(lpData->wFormatID, hData, 0, lpData->lpFormat, TRUE); + else + TRACE("Import function failed\n"); } else { diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index e7848444fe2..859cf94c2f9 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -375,6 +375,21 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void) if(!getsockname(fd, (struct sockaddr *)&uaddr, &uaddrlen) && uaddr.sun_family == AF_UNIX) ERR_(winediag)("Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly\n"); } + else + { + /* In general you would expect that if direct rendering is returned, that you receive hardware + * accelerated OpenGL rendering. The definition of direct rendering is that rendering is performed + * client side without sending all GL commands to X using the GLX protocol. When Mesa falls back to + * software rendering, it shows direct rendering. + * + * Depending on the cause of software rendering a different rendering string is shown. In case Mesa fails + * to load a DRI module 'Software Rasterizer' is returned. When Mesa is compiled as a OpenGL reference driver + * it shows 'Mesa X11'. + */ + const char *gl_renderer = (const char *)pglGetString(GL_RENDERER); + if(!strcmp(gl_renderer, "Software Rasterizer") || !strcmp(gl_renderer, "Mesa X11")) + ERR_(winediag)("The Mesa OpenGL driver is using software rendering, most likely your OpenGL drivers haven't been installed correctly\n"); + } if(vis) XFree(vis); if(ctx) { diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 47f7245d2d0..46f677b1a8e 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2089,20 +2089,24 @@ void CDECL X11DRV_SetFocus( HWND hwnd ) Display *display = thread_display(); struct x11drv_win_data *data; XWindowChanges changes; + DWORD timestamp; if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return; if (!(data = X11DRV_get_win_data( hwnd ))) return; if (data->managed || !data->whole_window) return; + if (EVENT_x11_time_to_win32_time(0)) + /* ICCCM says don't use CurrentTime, so try to use last message time if possible */ + /* FIXME: this is not entirely correct */ + timestamp = GetMessageTime() - EVENT_x11_time_to_win32_time(0); + else + timestamp = CurrentTime; + /* Set X focus and install colormap */ wine_tsx11_lock(); changes.stack_mode = Above; XConfigureWindow( display, data->whole_window, CWStackMode, &changes ); - /* we must not use CurrentTime (ICCCM), so try to use last message time instead */ - /* FIXME: this is not entirely correct */ - XSetInputFocus( display, data->whole_window, RevertToParent, - /* CurrentTime */ - GetMessageTime() - EVENT_x11_time_to_win32_time(0)); + XSetInputFocus( display, data->whole_window, RevertToParent, timestamp ); wine_tsx11_unlock(); } diff --git a/dlls/wing.dll16/Makefile.in b/dlls/wing.dll16/Makefile.in index 2d814d778d7..23f14cd445a 100644 --- a/dlls/wing.dll16/Makefile.in +++ b/dlls/wing.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16 C_SRCS = wing.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wing32/Makefile.in b/dlls/wing32/Makefile.in index f72a48fc613..a27e6832ac7 100644 --- a/dlls/wing32/Makefile.in +++ b/dlls/wing32/Makefile.in @@ -8,5 +8,3 @@ IMPORTS = user32 gdi32 kernel32 C_SRCS = wing32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winhttp/Makefile.in b/dlls/winhttp/Makefile.in index 7a61dc92f86..b563ce1badd 100644 --- a/dlls/winhttp/Makefile.in +++ b/dlls/winhttp/Makefile.in @@ -21,5 +21,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winhttp/tests/Makefile.in b/dlls/winhttp/tests/Makefile.in index 226e73f96fa..2cbc9cd5416 100644 --- a/dlls/winhttp/tests/Makefile.in +++ b/dlls/winhttp/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ winhttp.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winhttp/tests/url.c b/dlls/winhttp/tests/url.c index c1930bec7d0..e75335129d2 100644 --- a/dlls/winhttp/tests/url.c +++ b/dlls/winhttp/tests/url.c @@ -65,6 +65,8 @@ static const WCHAR url10[] = static const WCHAR url11[] = {'h','t','t','p','s',':','/','/','u','s','e','r','n','a','m','e',':','p','a','s','s','w','o','r','d', '@','w','w','w','.','w','i','n','e','h','q','.','o','r','g',':','4','4','3','/','s','i','t','e','/','a','b','o','u','t','?','q','u','e','r','y',0}; +static const WCHAR url12[] = + {'h','t','t','p',':','/','/','e','x','a','m','p','l','e','.','n','e','t','/','p','a','t','h','?','v','a','r','1','=','e','x','a','m','p','l','e','@','e','x','a','m','p','l','e','.','c','o','m','&','v','a','r','2','=','x','&','v','a','r','3','=','y', 0}; @@ -565,6 +567,23 @@ static void WinHttpCrackUrl_test( void ) error = GetLastError(); ok( !ret, "WinHttpCrackUrl succeeded\n" ); ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error ); + + reset_url_components( &uc ); + ret = WinHttpCrackUrl( url12, 0, 0, &uc); + + ok( ret, "WinHttpCrackUrl failed\n" ); + ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" ); + ok( uc.lpszScheme == url12,"unexpected scheme\n" ); + ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" ); + ok( uc.lpszUserName == NULL, "unexpected username\n" ); + ok( uc.lpszPassword == NULL, "unexpected password\n" ); + ok( uc.lpszHostName == url12 + 7, "unexpected hostname\n" ); + ok( uc.dwHostNameLength == 11, "unexpected hostname length\n" ); + ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort ); + ok( uc.lpszUrlPath == url12 + 18, "unexpected path\n" ); + ok( uc.dwUrlPathLength == 5, "unexpected path length\n" ); + ok( uc.lpszExtraInfo == url12 + 23, "unexpected extra info\n" ); + ok( uc.dwExtraInfoLength == 39, "unexpected extra info length\n" ); } START_TEST(url) diff --git a/dlls/winhttp/url.c b/dlls/winhttp/url.c index 49ffc4fe1ab..09835b43c91 100644 --- a/dlls/winhttp/url.c +++ b/dlls/winhttp/url.c @@ -133,7 +133,7 @@ BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONEN p += 2; if (!p[0]) goto exit; - if ((q = memchrW( p, '@', len - (p - url) ))) + if ((q = memchrW( p, '@', len - (p - url) )) && !(memchrW( p, '/', q - p ))) { if ((r = memchrW( p, ':', q - p ))) { diff --git a/dlls/wininet/Makefile.in b/dlls/wininet/Makefile.in index 9872b754c5b..1b24566409c 100644 --- a/dlls/wininet/Makefile.in +++ b/dlls/wininet/Makefile.in @@ -50,5 +50,3 @@ RC_SRCS = \ wininet_Zh.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index ab7e1da6add..f72cf3be717 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1343,9 +1343,12 @@ static WCHAR *HTTP_BuildProxyRequestUrl(http_request_t *req) static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *lpwhs, http_request_t *lpwhr) { WCHAR buf[MAXHOSTNAME]; + WCHAR protoProxy[MAXHOSTNAME + 15]; + DWORD protoProxyLen = sizeof(protoProxy) / sizeof(protoProxy[0]); WCHAR proxy[MAXHOSTNAME + 15]; /* 15 == "http://" + sizeof(port#) + ":/\0" */ static WCHAR szNul[] = { 0 }; URL_COMPONENTSW UrlComponents; + static const WCHAR protoHttp[] = { 'h','t','t','p',0 }; static const WCHAR szHttp[] = { 'h','t','t','p',':','/','/',0 }; static const WCHAR szFormat[] = { 'h','t','t','p',':','/','/','%','s',0 }; @@ -1354,11 +1357,13 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *lpwhs, http_reque UrlComponents.lpszHostName = buf; UrlComponents.dwHostNameLength = MAXHOSTNAME; + if (!INTERNET_FindProxyForProtocol(hIC->lpszProxy, protoHttp, protoProxy, &protoProxyLen)) + return FALSE; if( CSTR_EQUAL != CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, - hIC->lpszProxy,strlenW(szHttp),szHttp,strlenW(szHttp)) ) - sprintfW(proxy, szFormat, hIC->lpszProxy); + protoProxy,strlenW(szHttp),szHttp,strlenW(szHttp)) ) + sprintfW(proxy, szFormat, protoProxy); else - strcpyW(proxy, hIC->lpszProxy); + strcpyW(proxy, protoProxy); if( !InternetCrackUrlW(proxy, 0, 0, &UrlComponents) ) return FALSE; if( UrlComponents.dwHostNameLength == 0 ) @@ -4251,8 +4256,6 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, } if(hIC->lpszProxy && hIC->dwAccessType == INTERNET_OPEN_TYPE_PROXY) { - if(strchrW(hIC->lpszProxy, ' ')) - FIXME("Several proxies not implemented.\n"); if(hIC->lpszProxyBypass) FIXME("Proxy bypass is ignored.\n"); } diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index d03d1b366b4..683a605b8dd 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -363,6 +363,98 @@ static LONG INTERNET_SaveProxySettings( proxyinfo_t *lpwpi ) } /*********************************************************************** + * INTERNET_FindProxyForProtocol + * + * Searches the proxy string for a proxy of the given protocol. + * Returns the found proxy, or the default proxy if none of the given + * protocol is found. + * + * PARAMETERS + * szProxy [In] proxy string to search + * proto [In] protocol to search for, e.g. "http" + * foundProxy [Out] found proxy + * foundProxyLen [In/Out] length of foundProxy buffer, in WCHARs + * + * RETURNS + * TRUE if a proxy is found, FALSE if not. If foundProxy is too short, + * *foundProxyLen is set to the required size in WCHARs, including the + * NULL terminator, and the last error is set to ERROR_INSUFFICIENT_BUFFER. + */ +BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundProxy, DWORD *foundProxyLen) +{ + LPCWSTR ptr; + BOOL ret = FALSE; + + TRACE("(%s, %s)\n", debugstr_w(szProxy), debugstr_w(proto)); + + /* First, look for the specified protocol (proto=scheme://host:port) */ + for (ptr = szProxy; !ret && ptr && *ptr; ) + { + LPCWSTR end, equal; + + if (!(end = strchrW(ptr, ' '))) + end = ptr + strlenW(ptr); + if ((equal = strchrW(ptr, '=')) && equal < end && + equal - ptr == strlenW(proto) && + !strncmpiW(proto, ptr, strlenW(proto))) + { + if (end - equal > *foundProxyLen) + { + WARN("buffer too short for %s\n", + debugstr_wn(equal + 1, end - equal - 1)); + *foundProxyLen = end - equal; + SetLastError(ERROR_INSUFFICIENT_BUFFER); + } + else + { + memcpy(foundProxy, equal + 1, (end - equal) * sizeof(WCHAR)); + foundProxy[end - equal] = 0; + ret = TRUE; + } + } + if (*end == ' ') + ptr = end + 1; + else + ptr = end; + } + if (!ret) + { + /* It wasn't found: look for no protocol */ + for (ptr = szProxy; !ret && ptr && *ptr; ) + { + LPCWSTR end, equal; + + if (!(end = strchrW(ptr, ' '))) + end = ptr + strlenW(ptr); + if (!(equal = strchrW(ptr, '='))) + { + if (end - ptr + 1 > *foundProxyLen) + { + WARN("buffer too short for %s\n", + debugstr_wn(ptr, end - ptr)); + *foundProxyLen = end - ptr + 1; + SetLastError(ERROR_INSUFFICIENT_BUFFER); + } + else + { + memcpy(foundProxy, ptr, (end - ptr) * sizeof(WCHAR)); + foundProxy[end - ptr] = 0; + ret = TRUE; + } + } + if (*end == ' ') + ptr = end + 1; + else + ptr = end; + } + } + if (ret) + TRACE("found proxy for %s: %s\n", debugstr_w(proto), + debugstr_w(foundProxy)); + return ret; +} + +/*********************************************************************** * InternetInitializeAutoProxyDll (WININET.@) * * Setup the internal proxy diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index cb6933cbfcf..6fdb5dca0e7 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -418,6 +418,7 @@ VOID SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext, VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwStatusInfoLength); +BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundProxy, DWORD *foundProxyLen); BOOL NETCON_connected(WININET_NETCONNECTION *connection); DWORD NETCON_init(WININET_NETCONNECTION *connnection, BOOL useSSL); diff --git a/dlls/wininet/tests/Makefile.in b/dlls/wininet/tests/Makefile.in index e3eba7a3440..65f36e1c8a8 100644 --- a/dlls/wininet/tests/Makefile.in +++ b/dlls/wininet/tests/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ urlcache.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winmm/Makefile.in b/dlls/winmm/Makefile.in index 0848ca59726..288f95d4960 100644 --- a/dlls/winmm/Makefile.in +++ b/dlls/winmm/Makefile.in @@ -39,5 +39,3 @@ RC_SRCS = \ winmm_res.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 54db68f0f8e..7b6c946b25c 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -200,6 +200,7 @@ static BOOL PlaySound_IsString(DWORD fdwSound, const void* psz) case SND_MEMORY: return FALSE; case SND_ALIAS: case SND_FILENAME: + case SND_ALIAS|SND_FILENAME: case 0: return TRUE; default: FIXME("WTF\n"); return FALSE; } @@ -308,7 +309,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) TRACE("Memory sound %p\n", data); hmmio = mmioOpenW(NULL, &mminfo, MMIO_READ); } - else if (wps->fdwSound & SND_ALIAS) + if (!hmmio && wps->fdwSound & SND_ALIAS) { if ((wps->fdwSound & SND_ALIAS_ID) == SND_ALIAS_ID) { @@ -342,11 +343,11 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) } hmmio = get_mmioFromProfile(wps->fdwSound, wps->pszSound); } - else if (wps->fdwSound & SND_FILENAME) + if (!hmmio && wps->fdwSound & SND_FILENAME) { hmmio = get_mmioFromFile(wps->pszSound); } - else + if (!(wps->fdwSound & (SND_FILENAME|SND_ALIAS|SND_MEMORY))) { if ((hmmio = get_mmioFromProfile(wps->fdwSound | SND_NODEFAULT, wps->pszSound)) == 0) { diff --git a/dlls/winmm/tests/Makefile.in b/dlls/winmm/tests/Makefile.in index 22a61af1235..986b6e4c60e 100644 --- a/dlls/winmm/tests/Makefile.in +++ b/dlls/winmm/tests/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ wave.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c index 7ce402db5b5..e531d04e0a2 100644 --- a/dlls/winmm/tests/midi.c +++ b/dlls/winmm/tests/midi.c @@ -230,6 +230,11 @@ static void test_midiOut_device(UINT udev, HWND hwnd) * real devices with the volume GUI SW-synth settings. */ if (!rc) trace("Current volume %x on device %d\n", ovolume, udev); + /* The W95 ESFM Synthesis device reports NOTENABLED although + * GetVolume by handle works and music plays. */ + rc = midiOutGetVolume((HMIDIOUT)udev, &ovolume); + ok((capsA.dwSupport & MIDICAPS_VOLUME) ? rc==MMSYSERR_NOERROR || broken(rc==MMSYSERR_NOTENABLED) : rc==MMSYSERR_NOTSUPPORTED, "midiOutGetVolume(dev=%d) rc=%s\n", udev, mmsys_error(rc)); + /* Tests with midiOutSetvolume show that the midi mapper forwards * the value to the real device, but Get initially always reports * FFFFFFFF. Therefore, a Get+SetVolume pair with the mapper is diff --git a/dlls/winnls.dll16/Makefile.in b/dlls/winnls.dll16/Makefile.in index 4e67a6dce2a..66db14b3556 100644 --- a/dlls/winnls.dll16/Makefile.in +++ b/dlls/winnls.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,winnls32.dll C_SRCS = winnls.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winnls32/Makefile.in b/dlls/winnls32/Makefile.in index ecdfc1c94c3..e84c61e1d78 100644 --- a/dlls/winnls32/Makefile.in +++ b/dlls/winnls32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ winnls.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winscard/Makefile.in b/dlls/winscard/Makefile.in index 339907112e1..e806b83eda2 100644 --- a/dlls/winscard/Makefile.in +++ b/dlls/winscard/Makefile.in @@ -13,5 +13,3 @@ RC_SRCS = \ rsrc.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winsock.dll16/Makefile.in b/dlls/winsock.dll16/Makefile.in index 243342d9c5c..e095355aeda 100644 --- a/dlls/winsock.dll16/Makefile.in +++ b/dlls/winsock.dll16/Makefile.in @@ -10,5 +10,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ws2_32.dll C_SRCS = socket.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winspool.drv/Makefile.in b/dlls/winspool.drv/Makefile.in index 1d80880a93e..0cb94688de8 100644 --- a/dlls/winspool.drv/Makefile.in +++ b/dlls/winspool.drv/Makefile.in @@ -37,5 +37,3 @@ RC_SRCS = \ winspool.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winspool.drv/tests/Makefile.in b/dlls/winspool.drv/tests/Makefile.in index f22841b31bd..f1896fc272c 100644 --- a/dlls/winspool.drv/tests/Makefile.in +++ b/dlls/winspool.drv/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ info.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wintab.dll16/Makefile.in b/dlls/wintab.dll16/Makefile.in index 7e742476e91..b8c8433f367 100644 --- a/dlls/wintab.dll16/Makefile.in +++ b/dlls/wintab.dll16/Makefile.in @@ -9,5 +9,3 @@ EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,wintab32.dll C_SRCS = wintab.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wintab32/Makefile.in b/dlls/wintab32/Makefile.in index b150914c852..9b9319dfc44 100644 --- a/dlls/wintab32/Makefile.in +++ b/dlls/wintab32/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ wintab32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wintab32/tests/Makefile.in b/dlls/wintab32/tests/Makefile.in index 70b55260158..fd3e9aec189 100644 --- a/dlls/wintab32/tests/Makefile.in +++ b/dlls/wintab32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ context.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wintrust/Makefile.in b/dlls/wintrust/Makefile.in index 6f2f4061b3c..abfd12a515d 100644 --- a/dlls/wintrust/Makefile.in +++ b/dlls/wintrust/Makefile.in @@ -18,5 +18,3 @@ RC_SRCS = \ version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wintrust/tests/Makefile.in b/dlls/wintrust/tests/Makefile.in index 75e57e06c46..7228481db6b 100644 --- a/dlls/wintrust/tests/Makefile.in +++ b/dlls/wintrust/tests/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ softpub.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wldap32/Makefile.in b/dlls/wldap32/Makefile.in index 59f421421c6..5942be1730b 100644 --- a/dlls/wldap32/Makefile.in +++ b/dlls/wldap32/Makefile.in @@ -47,5 +47,3 @@ RC_SRCS = \ wldap32_Uk.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wldap32/tests/Makefile.in b/dlls/wldap32/tests/Makefile.in index d6a1de7ed0e..e29f8313fb4 100644 --- a/dlls/wldap32/tests/Makefile.in +++ b/dlls/wldap32/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ parse.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wmi/Makefile.in b/dlls/wmi/Makefile.in index 29bacb01c27..d482cf0ef18 100644 --- a/dlls/wmi/Makefile.in +++ b/dlls/wmi/Makefile.in @@ -6,5 +6,3 @@ MODULE = wmi.dll IMPORTS = advapi32 kernel32 @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wmiutils/Makefile.in b/dlls/wmiutils/Makefile.in index 084be5fc185..27a040bdc05 100644 --- a/dlls/wmiutils/Makefile.in +++ b/dlls/wmiutils/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ statuscode.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wnaspi32/Makefile.in b/dlls/wnaspi32/Makefile.in index 36cbf72229e..61269bdd873 100644 --- a/dlls/wnaspi32/Makefile.in +++ b/dlls/wnaspi32/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ winaspi32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wow32/Makefile.in b/dlls/wow32/Makefile.in index c8aaddd719e..bd28ccfb065 100644 --- a/dlls/wow32/Makefile.in +++ b/dlls/wow32/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 kernel C_SRCS = wow_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ws2_32/Makefile.in b/dlls/ws2_32/Makefile.in index d858ba5386b..69a171cfa1d 100644 --- a/dlls/ws2_32/Makefile.in +++ b/dlls/ws2_32/Makefile.in @@ -17,5 +17,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/ws2_32/tests/Makefile.in b/dlls/ws2_32/tests/Makefile.in index a8ca6be1a31..8e2cff96b49 100644 --- a/dlls/ws2_32/tests/Makefile.in +++ b/dlls/ws2_32/tests/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ sock.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wsock32/Makefile.in b/dlls/wsock32/Makefile.in index f0ef87a2f4c..e07ed2f5e28 100644 --- a/dlls/wsock32/Makefile.in +++ b/dlls/wsock32/Makefile.in @@ -14,5 +14,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wtsapi32/Makefile.in b/dlls/wtsapi32/Makefile.in index 9f695bb54aa..56b002e9b89 100644 --- a/dlls/wtsapi32/Makefile.in +++ b/dlls/wtsapi32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ wtsapi32.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wuapi/Makefile.in b/dlls/wuapi/Makefile.in index 5aefd199535..15d24c08b9c 100644 --- a/dlls/wuapi/Makefile.in +++ b/dlls/wuapi/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ updates.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/wuaueng/Makefile.in b/dlls/wuaueng/Makefile.in index e4cd65573bb..9933fdee781 100644 --- a/dlls/wuaueng/Makefile.in +++ b/dlls/wuaueng/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in index 04670f585c2..fcd064c9e85 100644 --- a/dlls/xinput1_1/Makefile.in +++ b/dlls/xinput1_1/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in index f8934f47d5f..d5e31ac1352 100644 --- a/dlls/xinput1_2/Makefile.in +++ b/dlls/xinput1_2/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in index 7e8f5715743..e1500b80e56 100644 --- a/dlls/xinput1_3/Makefile.in +++ b/dlls/xinput1_3/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xinput1_3/tests/Makefile.in b/dlls/xinput1_3/tests/Makefile.in index ac71ea88e91..dd0ee26b436 100644 --- a/dlls/xinput1_3/tests/Makefile.in +++ b/dlls/xinput1_3/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ xinput.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in index f63d2c1054d..2a6f2ee1b8e 100644 --- a/dlls/xinput9_1_0/Makefile.in +++ b/dlls/xinput9_1_0/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xmllite/Makefile.in b/dlls/xmllite/Makefile.in index 9268f7d6dd1..b43b272e1e3 100644 --- a/dlls/xmllite/Makefile.in +++ b/dlls/xmllite/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ xmllite_main.c @MAKE_DLL_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xmllite/tests/Makefile.in b/dlls/xmllite/tests/Makefile.in index 95120dd6126..883a66e8e96 100644 --- a/dlls/xmllite/tests/Makefile.in +++ b/dlls/xmllite/tests/Makefile.in @@ -9,5 +9,3 @@ C_SRCS = \ reader.c @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/documentation/README.de b/documentation/README.de index 310f6a51f0b..9aa272b262c 100644 --- a/documentation/README.de +++ b/documentation/README.de @@ -68,8 +68,7 @@ Mac OS X Info: Sie benötigen mindestens Xcode 2.4 um richtig unter x86 kompilieren zu können. Unterstützte Dateisysteme: - Wine sollte auf den meisten Dateisystemen laufen. Jedoch wird Wine nicht - starten, wenn umsdos für das Verzeichnis /tmp benutzt wird. Ein paar + Wine sollte auf den meisten Dateisystemen laufen. Ein paar Kompatibilitäts-Probleme wurden auch gemeldet beim Dateizugriff über Samba. Ausserdem können wir, da NTFS derzeit nur sicher für Lesezugriffe genutzt werden kann, den Einsatz von NTFS nicht empfehlen; Windows-Programme @@ -159,20 +158,9 @@ Hinweis: Der Pfad zur Datei wird auch zum Pfad hinzugefügt, wenn ein vollständ Dateiname auf der Kommandozeile angegeben wird. Die Entwicklung von Wine ist noch nicht abgeschlossen, daher können einige -Programme abstürzen. Vorausgesetzt, dass Sie winedbg korrekt entsprechend -documentation/debugger.sgml einrichten, werden Sie dann in einem Debugger landen, -um das Problem untersuchen und beheben zu können. -Weitere Informationen zu diesem Thema entnehmen Sie bitte der Datei -documentation/debugging.sgml. - -Sie sollten Backups von allen wichtigen Dateien machen, auf die Sie Wine -Zugriff gewähren, oder spezielle Kopien für Wine anlegen, da Benutzer einige -Fälle gemeldet haben, in denen Dateien zerstört wurden. Führen Sie zum Beispiel -NICHT den Explorer aus, wenn Sie kein geeignetes Backup haben, da er manchmal -Verzeichnise verstümmelt / umbenennnt. Selbst andere MS-Applikationen wie z.B -der Messenger sind nicht sicher, da sie unter Umständen den Explorer aufrufen. -Diese spezielle Beschädigung (!$!$!$!$.pfr) kann zumindest teilweise durch -http://home.nexgo.de/andi.mohr/download/decorrupt_explorer behoben werden. +Programme abstürzen. In diesem Fall startet der Debugger, so dass Sie das Problem +untersuchen und beheben können. Weitere Informationen zu diesem Thema entnehmen Sie +bitte dem Kapitel Debugging aus dem Wine Developer's Guide. 7. WEITERFÜHRENDE INFORMATIONEN @@ -198,7 +186,7 @@ Git: Der aktuelle Wine-Entwicklungs-Zweig ist über Git verfügbar. Besuchen Sie http://www.winehq.org/site/git für weitere Informationen. Mailing-Listen: - Es gibt mehrere Mailing-Listen für die Wine-Entwickler; Schauen Sie + Es gibt mehrere Mailing-Listen für die Wine-User und -Entwickler; Schauen Sie sich bitte dazu http://www.winehq.org/forums an. Wiki: Das Wine-Wiki finden Sie unter http://wiki.winehq.org diff --git a/include/Makefile.in b/include/Makefile.in index f809a870758..ce35804e43a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -167,6 +167,7 @@ SRCDIR_INCLUDES = \ d3dvec.inl \ d3dx9.h \ d3dx9core.h \ + d3dx9effect.h \ d3dx9math.h \ d3dx9math.inl \ d3dx9mesh.h \ @@ -571,5 +572,3 @@ uninstall:: *) $(RM) $(DESTDIR)$(includedir)/windows/$$f ;; \ esac; done -rmdir $(INSTALLDIRS) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/include/config.h.in b/include/config.h.in index 7c34980ad92..7feab81c657 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -32,6 +32,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASM_TYPES_H +/* Define to 1 if you have the `AudioFileStreamOpen' function. */ +#undef HAVE_AUDIOFILESTREAMOPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H + +/* Define to 1 if you have the header file. + */ +#undef HAVE_AUDIOTOOLBOX_AUDIOFILESTREAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_AUDIOTOOLBOX_AUDIOFILE_H + /* Define to 1 if you have the header file. */ #undef HAVE_AUDIOUNIT_AUDIOUNIT_H @@ -255,6 +268,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IEEEFP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_IFADDRS_H + /* Define to 1 if you have the header file. */ #undef HAVE_INET_MIB2_H @@ -777,6 +793,9 @@ /* Define to 1 if `icps_outhist' is a member of `struct icmpstat'. */ #undef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST +/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_HWADDR + /* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */ #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS diff --git a/include/d3dx9.h b/include/d3dx9.h index 47d283095af..ccf731ebfeb 100644 --- a/include/d3dx9.h +++ b/include/d3dx9.h @@ -32,6 +32,7 @@ #include "d3dx9core.h" #include "d3dx9mesh.h" #include "d3dx9shader.h" +#include "d3dx9effect.h" #include "d3dx9tex.h" #define _FACDD 0x876 diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h new file mode 100644 index 00000000000..b372c259515 --- /dev/null +++ b/include/d3dx9effect.h @@ -0,0 +1,295 @@ +/* + * Copyright 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#ifndef __D3DX9EFFECT_H__ +#define __D3DX9EFFECT_H__ + +typedef struct _D3DXEFFECT_DESC { + LPCSTR Creator; + UINT Parameters; + UINT Techniques; + UINT Functions; +} D3DXEFFECT_DESC; + +typedef struct _D3DXPARAMETER_DESC { + LPCSTR Name; + LPCSTR Semantic; + D3DXPARAMETER_CLASS Class; + D3DXPARAMETER_TYPE Type; + UINT Rows; + UINT Columns; + UINT Elements; + UINT Annotations; + UINT StructMembers; + DWORD Flags; + UINT Bytes; +} D3DXPARAMETER_DESC; + +typedef struct _D3DXTECHNIQUE_DESC { + LPCSTR Name; + UINT Passes; + UINT Annotations; +} D3DXTECHNIQUE_DESC; + +typedef struct _D3DXPASS_DESC { + LPCSTR Name; + UINT Annotations; + CONST DWORD *pVertexShaderFunction; + CONST DWORD *pPixelShaderFunction; +} D3DXPASS_DESC; + +typedef struct _D3DXFUNCTION_DESC { + LPCSTR Name; + UINT Annotations; +} D3DXFUNCTION_DESC; + +typedef struct ID3DXEffectPool *LPD3DXEFFECTPOOL; + +DEFINE_GUID(IID_ID3DXEffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33); + +#undef INTERFACE +#define INTERFACE ID3DXEffectPool + +DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; +}; + +typedef struct ID3DXBaseEffect *LPD3DXBASEEFFECT; + +DEFINE_GUID(IID_ID3DXBaseEffect, 0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe); + +#undef INTERFACE +#define INTERFACE ID3DXBaseEffect + +DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + /*** ID3DXBaseEffect methods ***/ + STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE; + STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE; + STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE; + STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE; + STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE; + STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index); + STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name); + STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE; + STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE; + STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE; + STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE; + STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE; + STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, CONST BOOL* b, UINT count) PURE; + STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE; + STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE; + STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE; + STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, CONST INT* n, UINT count) PURE; + STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE; + STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE; + STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE; + STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, CONST FLOAT* f, UINT count) PURE; + STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE; + STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector) PURE; + STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE; + STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector, UINT count) PURE; + STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE; + STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE; + STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; + STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE; + STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; + STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE; + STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE; + STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9 texture) PURE; + STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9* texture) PURE; + STDMETHOD(SetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9 pshader) PURE; + STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9* pshader) PURE; + STDMETHOD(SetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9 vshader) PURE; + STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9* vshader) PURE; + STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE; +}; + +typedef struct ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER; + +DEFINE_GUID(IID_ID3DXEffectStateManager, 0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce); + +#undef INTERFACE +#define INTERFACE ID3DXEffectStateManager + +DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + /*** ID3DXEffectStateManager methods ***/ + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, CONST D3DMATRIX* matrix) PURE; + STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9* material) PURE; + STDMETHOD(SetLight)(THIS_ DWORD index, CONST D3DLIGHT9* light) PURE; + STDMETHOD(LightEnable)(THIS_ DWORD index, BOOL enable) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE state, DWORD value) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD stage, LPDIRECT3DBASETEXTURE9 texture) PURE; + STDMETHOD(SetTextureStageState)(THIS_ DWORD stage, D3DTEXTURESTAGESTATETYPE type, DWORD value) PURE; + STDMETHOD(SetSamplerState)(THIS_ DWORD sampler, D3DSAMPLERSTATETYPE type, DWORD value) PURE; + STDMETHOD(SetNPatchMode)(THIS_ FLOAT num_segments) PURE; + STDMETHOD(SetFVF)(THIS_ DWORD format) PURE; + STDMETHOD(SetVertexShader)(THIS_ LPDIRECT3DVERTEXSHADER9 shader) PURE; + STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT register_index, CONST FLOAT* constant_data, UINT register_count) PURE; + STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT register_index, CONST INT* constant_data, UINT register_count) PURE; + STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT register_index, CONST BOOL* constant_data, UINT register_count) PURE; + STDMETHOD(SetPixelShader)(THIS_ LPDIRECT3DPIXELSHADER9 shader) PURE; + STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT register_index, CONST FLOAT* constant_data, UINT register_count) PURE; + STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT register_index, CONST INT * constant_data, UINT register_count) PURE; + STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT register_index, CONST BOOL* constant_data, UINT register_count) PURE; +}; + +typedef struct ID3DXEffect *LPD3DXEFFECT; + +DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5); + +#undef INTERFACE +#define INTERFACE ID3DXEffect + +DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + /*** ID3DXBaseEffect methods ***/ + STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE; + STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE; + STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE; + STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE; + STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE; + STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index); + STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name); + STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE; + STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE; + STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE; + STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE; + STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE; + STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, CONST BOOL* b, UINT count) PURE; + STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE; + STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE; + STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE; + STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, CONST INT* n, UINT count) PURE; + STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE; + STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE; + STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE; + STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, CONST FLOAT* f, UINT count) PURE; + STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE; + STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector) PURE; + STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE; + STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector, UINT count) PURE; + STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE; + STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE; + STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; + STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE; + STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; + STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE; + STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE; + STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9 texture) PURE; + STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9* texture) PURE; + STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9* pshader) PURE; + STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9* vshader) PURE; + STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE; + /*** ID3DXEffect methods ***/ + STDMETHOD(GetPool)(THIS_ LPD3DXEFFECTPOOL* pool) PURE; + STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE technique) PURE; + STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE; + STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE technique) PURE; + STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE technique, D3DXHANDLE* next_technique) PURE; + STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE parameter, D3DXHANDLE technique) PURE; + STDMETHOD(Begin)(THIS_ UINT *passes, DWORD flags) PURE; + STDMETHOD(BeginPass)(THIS_ UINT pass) PURE; + STDMETHOD(CommitChanges)(THIS) PURE; + STDMETHOD(EndPass)(THIS) PURE; + STDMETHOD(End)(THIS) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE; + STDMETHOD(OnLostDevice)(THIS) PURE; + STDMETHOD(OnResetDevice)(THIS) PURE; + STDMETHOD(SetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER manager) PURE; + STDMETHOD(GetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER* manager) PURE; + STDMETHOD(BeginParameterBlock)(THIS) PURE; + STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE; + STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE; + STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE; + STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE9 device, LPD3DXEFFECT* effect) PURE; + STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT byte_offset, UINT bytes) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + DWORD flags, + LPD3DXEFFECTPOOL pool, + LPD3DXEFFECT* effect, + LPD3DXBUFFER* compilation_errors); + +#ifdef __cplusplus +} +#endif + +#endif /* __D3DX9EFFECT_H__ */ diff --git a/include/d3dx9shader.h b/include/d3dx9shader.h index 766d4ca1089..c8380bc5137 100644 --- a/include/d3dx9shader.h +++ b/include/d3dx9shader.h @@ -129,6 +129,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer) /*** ID3DXConstantTable methods ***/ STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE; STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE; + STDMETHOD_(UINT, GetSamplerIndex)(THIS_ D3DXHANDLE hConstant) PURE; STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE; STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, LPCSTR pName) PURE; STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE; @@ -161,6 +162,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer) /*** ID3DXConstantTable methods ***/ #define ID3DXConstantTable_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->lpVtbl->GetConstantDesc(p,a,b,c) +#define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->lpVtbl->GetSamplerIndex(p,a) #define ID3DXConstantTable_GetConstant(p,a,b) (p)->lpVtbl->GetConstant(p,a,b) #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->lpVtbl->GetConstantByName(p,a,b) #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->lpVtbl->GetConstantElement(p,a,b) @@ -191,6 +193,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer) /*** ID3DXConstantTable methods ***/ #define ID3DXConstantTable_GetDesc(p,a) (p)->GetDesc(a) #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->GetConstantDesc(a,b,c) +#define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->GetConstantDesc(a) #define ID3DXConstantTable_GetConstant(p,a,b) (p)->GetConstant(a,b) #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->GetConstantByName(a,b) #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->GetConstantElement(a,b) @@ -207,7 +210,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer) #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->SetMatrix(a,b,c) #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->SetMatrixArray(a,b,c,d) #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->SetMatrixPointerArray(a,b,c,d) -#define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->>SetMatrixTranspose(a,b,c) +#define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->SetMatrixTranspose(a,b,c) #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->SetMatrixTransposeArray(a,b,c,d) #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->SetMatrixTransposePointerArray(a,b,c,d) #endif @@ -219,6 +222,11 @@ typedef struct _D3DXMACRO { LPCSTR Definition; } D3DXMACRO, *LPD3DXMACRO; +typedef struct _D3DXSEMANTIC { + UINT Usage; + UINT UsageIndex; +} D3DXSEMANTIC, *LPD3DXSEMANTIC; + typedef enum _D3DXINCLUDE_TYPE { D3DXINC_LOCAL, @@ -299,4 +307,43 @@ HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code, } #endif +typedef struct _D3DXSHADER_CONSTANTTABLE +{ + DWORD Size; + DWORD Creator; + DWORD Version; + DWORD Constants; + DWORD ConstantInfo; + DWORD Flags; + DWORD Target; +} D3DXSHADER_CONSTANTTABLE, *LPD3DXSHADER_CONSTANTTABLE; + +typedef struct _D3DXSHADER_CONSTANTINFO +{ + DWORD Name; + WORD RegisterSet; + WORD RegisterIndex; + WORD RegisterCount; + WORD Reserved; + DWORD TypeInfo; + DWORD DefaultValue; +} D3DXSHADER_CONSTANTINFO, *LPD3DXSHADER_CONSTANTINFO; + +typedef struct _D3DXSHADER_TYPEINFO +{ + WORD Class; + WORD Type; + WORD Rows; + WORD Columns; + WORD Elements; + WORD StructMembers; + DWORD StructMemberInfo; +} D3DXSHADER_TYPEINFO, *LPD3DXSHADER_TYPEINFO; + +typedef struct _D3DXSHADER_STRUCTMEMBERINFO +{ + DWORD Name; + DWORD TypeInfo; +} D3DXSHADER_STRUCTMEMBERINFO, *LPD3DXSHADER_STRUCTMEMBERINFO; + #endif /* __D3DX9SHADER_H__ */ diff --git a/include/ddk/usbdlib.h b/include/ddk/usbdlib.h index c0adc46cac0..ce3cc862d10 100644 --- a/include/ddk/usbdlib.h +++ b/include/ddk/usbdlib.h @@ -25,4 +25,8 @@ typedef struct _USBD_INTERFACE_LIST_ENTRY { } USBD_INTERFACE_LIST_ENTRY; typedef struct _USBD_INTERFACE_LIST_ENTRY *PUSBD_INTERFACE_LIST_ENTRY; +PUSB_INTERFACE_DESCRIPTOR WINAPI USBD_ParseConfigurationDescriptorEx(PUSB_CONFIGURATION_DESCRIPTOR,PVOID,LONG,LONG,LONG,LONG,LONG); +ULONG WINAPI USBD_GetInterfaceLength(PUSB_INTERFACE_DESCRIPTOR,PUCHAR); +PUSB_COMMON_DESCRIPTOR WINAPI USBD_ParseDescriptors(PVOID,ULONG,PVOID,LONG); + #endif diff --git a/include/msctf.idl b/include/msctf.idl index fcb568e0a49..2ed3866b7bb 100644 --- a/include/msctf.idl +++ b/include/msctf.idl @@ -44,7 +44,7 @@ cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;") cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;") cpp_quote("EXTERN_C const CLSID CLSID_TF_LangBarMgr;") cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;") -cpp_quote("DEFINE_GUID(CLSID_TF_DisplayAttributeMgr,0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53);") +cpp_quote("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;") /* GUIDs for Compartments */ cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;") diff --git a/include/urlmon.idl b/include/urlmon.idl index d16a3b5d7ec..2ab3b2b021d 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -24,6 +24,7 @@ import "msxml.idl"; cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") cpp_quote("#undef GetUserName") +cpp_quote("#undef SetPort") cpp_quote("#endif") interface IInternetProtocolSink; @@ -1717,6 +1718,105 @@ interface IUriContainer : IUnknown } /***************************************************************************** + * IUriBuilder interface + */ +[ + local, + object, + uuid(4221b2e1-8955-46c0-bd5b-de9897565de7), + pointer_default(unique) +] +interface IUriBuilder: IUnknown +{ + HRESULT CreateUriSimple( + [in] DWORD dwAllowEncodingPropertyMask, + [in] DWORD_PTR dwReserved, + [out] IUri **ppIUri); + + HRESULT CreateUri( + [in] DWORD dwCreateFlags, + [in] DWORD dwAllowEncodingPropertyMask, + [in] DWORD_PTR dwReserved, + [out] IUri **ppIUri); + + HRESULT CreateUriWithFlags( + [in] DWORD dwCreateFlags, + [in] DWORD dwUriBuilderFlags, + [in] DWORD dwAllowEncodingPropertyMask, + [in] DWORD_PTR dwReserved, + [out] IUri **ppIUri); + + HRESULT GetIUri( + [out] IUri **ppIUri); + + HRESULT SetIUri( + [in, unique] IUri *pIUri); + + HRESULT GetFragment( + [out] DWORD *pcchFragment, + [out] LPCWSTR *ppwzFragment); + + HRESULT GetHost( + [out] DWORD *pcchHost, + [out] LPCWSTR *ppwzHost); + + HRESULT GetPassword( + [out] DWORD *pcchPassword, + [out] LPCWSTR *ppwzPassword); + + HRESULT GetPath( + [out] DWORD *pcchPath, + [out] LPCWSTR *ppwzPath); + + HRESULT GetPort( + [out] BOOL *pfHasPort, + [out] DWORD *pdwPort); + + HRESULT GetQuery( + [out] DWORD *pcchQuery, + [out] LPCWSTR *ppwzQuery); + + HRESULT GetSchemeName( + [out] DWORD *pcchSchemeName, + [out] LPCWSTR *ppwzSchemeName); + + HRESULT GetUserName( + [out] DWORD *pcchUserName, + [out] LPCWSTR *ppwzUserName); + + HRESULT SetFragment( + [in] LPCWSTR pwzNewValue); + + HRESULT SetHost( + [in] LPCWSTR pwzNewValue); + + HRESULT SetPassword( + [in] LPCWSTR pwzNewValue); + + HRESULT SetPath( + [in] LPCWSTR pwzNewValue); + + HRESULT SetPort( + [in] BOOL fHasPort, + [in] DWORD dwNewValue); + + HRESULT SetQuery( + [in] LPCWSTR pwzNewValue); + + HRESULT SetSchemeName( + [in] LPCWSTR pwzNewValue); + + HRESULT SetUserName( + [in] LPCWSTR pwzNewValue); + + HRESULT RemoveProperties( + [in] DWORD dwPropertyMask); + + HRESULT HasBeenModified( + [out] BOOL *pfModified); +}; + +/***************************************************************************** * IInternetProtocolEx interface */ [ diff --git a/include/wincodec.idl b/include/wincodec.idl index 8e8dfe60475..1bcb2cd1bad 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -72,6 +72,14 @@ typedef enum WICBitmapEncoderCacheOption { WICBITMAPENCODERCACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD } WICBitmapEncoderCacheOption; +typedef enum WICBitmapInterpolationMode { + WICBitmapInterpolationModeNearestNeighbor = 0x00000000, + WICBitmapInterpolationModeLinear = 0x00000001, + WICBitmapInterpolationModeCubic = 0x00000002, + WICBitmapInterpolationModeFaint = 0x00000003, + WICBITMAPINTERPOLATIONMODE_FORCE_DWORD = CODEC_FORCE_DWORD +} WICBitmapInterpolationMode; + typedef enum WICBitmapPaletteType { WICBitmapPaletteTypeCustom = 0x00000000, WICBitmapPaletteTypeMedianCut = 0x00000001, @@ -169,9 +177,7 @@ cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80") cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81") cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c") -interface IWICBitmap; interface IWICPalette; -interface IWICBitmapScaler; interface IWICBitmapClipper; interface IWICBitmapFlipRotator; interface IWICColorContext; @@ -209,6 +215,46 @@ interface IWICBitmapSource : IUnknown [ object, + uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94) +] +interface IWICBitmapLock : IUnknown +{ + HRESULT GetSize( + [out] UINT *pWidth, + [out] UINT *pHeight); + + HRESULT GetStride( + [out] UINT *pcbStride); + + HRESULT GetDataPointer( + [out] UINT *pcbBufferSize, + [out, size_is(,*pcbBufferSize)] BYTE **ppbData); + + HRESULT GetPixelFormat( + [out] WICPixelFormatGUID *pPixelFormat); +} + +[ + object, + uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94) +] +interface IWICBitmap : IWICBitmapSource +{ + HRESULT Lock( + [in] const WICRect *prcLock, + [in] DWORD flags, + [out] IWICBitmapLock **ppILock); + + HRESULT SetPalette( + [in] IWICPalette *pIPalette); + + HRESULT SetResolution( + [in] double dpiX, + [in] double dpiY); +} + +[ + object, uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94) ] interface IWICPalette : IUnknown @@ -586,6 +632,19 @@ interface IWICStream : IStream [in] ULARGE_INTEGER ulMaxSize); } +[ + object, + uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94) +] +interface IWICBitmapScaler : IWICBitmapSource +{ + HRESULT Initialize( + [in] IWICBitmapSource *pISource, + [in] UINT uiWidth, + [in] UINT uiHeight, + [in] WICBitmapInterpolationMode mode); +} + cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);") [ diff --git a/include/wincrypt.h b/include/wincrypt.h index ad51e096687..e536213a771 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -2782,6 +2782,9 @@ typedef struct _CTL_FIND_SUBJECT_PARA #define szOID_RSA_MD5RSA "1.2.840.113549.1.1.4" #define szOID_RSA_SHA1RSA "1.2.840.113549.1.1.5" #define szOID_RSA_SET0AEP_RSA "1.2.840.113549.1.1.6" +#define szOID_RSA_SHA256RSA "1.2.840.113549.1.1.11" +#define szOID_RSA_SHA384RSA "1.2.840.113549.1.1.12" +#define szOID_RSA_SHA512RSA "1.2.840.113549.1.1.13" #define szOID_RSA_DH "1.2.840.113549.1.3.1" #define szOID_RSA_data "1.2.840.113549.1.7.1" #define szOID_RSA_signedData "1.2.840.113549.1.7.2" diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 47c032e728e..0c3155ddf9e 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -725,7 +725,7 @@ struct get_process_info_reply int exit_code; int priority; cpu_type_t cpu; - char __pad_60[4]; + int debugger_present; }; @@ -5397,6 +5397,6 @@ union generic_reply struct free_user_handle_reply free_user_handle_reply; }; -#define SERVER_PROTOCOL_VERSION 395 +#define SERVER_PROTOCOL_VERSION 396 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index ac4ee89f63b..dc1853da4f4 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -3456,6 +3456,15 @@ interface IWineD3DDevice : IWineD3DBase [in] D3DCB_ENUMRESOURCES callback, [in] void *data ); + HRESULT GetSurfaceFromDC( + [in] HDC dc, + [out] IWineD3DSurface **surface + ); + HRESULT AcquireFocusWindow( + [in] HWND window + ); + void ReleaseFocusWindow( + ); } IWineD3D *WineDirect3DCreate(UINT dxVersion, IUnknown *parent); diff --git a/include/winerror.h b/include/winerror.h index 0bab88244cd..6a56f746892 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -1550,6 +1550,85 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x) #define DNS_STATUS_CONTINUE_NEEDED 9801 #define DNS_ERROR_NO_TCPIP 9851 #define DNS_ERROR_NO_DNS_SERVERS 9852 + +/* + * Also defined in winsock.h. + * + * All Windows Sockets error constants are biased by WSABASEERR from + * the "normal" + */ +#define WSABASEERR 10000 +/* + * Windows Sockets definitions of regular Microsoft C error constants + */ +#define WSAEINTR (WSABASEERR+4) +#define WSAEBADF (WSABASEERR+9) +#define WSAEACCES (WSABASEERR+13) +#define WSAEFAULT (WSABASEERR+14) +#define WSAEINVAL (WSABASEERR+22) +#define WSAEMFILE (WSABASEERR+24) + +/* + * Windows Sockets definitions of regular Berkeley error constants + */ +#define WSAEWOULDBLOCK (WSABASEERR+35) +#define WSAEINPROGRESS (WSABASEERR+36) +#define WSAEALREADY (WSABASEERR+37) +#define WSAENOTSOCK (WSABASEERR+38) +#define WSAEDESTADDRREQ (WSABASEERR+39) +#define WSAEMSGSIZE (WSABASEERR+40) +#define WSAEPROTOTYPE (WSABASEERR+41) +#define WSAENOPROTOOPT (WSABASEERR+42) +#define WSAEPROTONOSUPPORT (WSABASEERR+43) +#define WSAESOCKTNOSUPPORT (WSABASEERR+44) +#define WSAEOPNOTSUPP (WSABASEERR+45) +#define WSAEPFNOSUPPORT (WSABASEERR+46) +#define WSAEAFNOSUPPORT (WSABASEERR+47) +#define WSAEADDRINUSE (WSABASEERR+48) +#define WSAEADDRNOTAVAIL (WSABASEERR+49) +#define WSAENETDOWN (WSABASEERR+50) +#define WSAENETUNREACH (WSABASEERR+51) +#define WSAENETRESET (WSABASEERR+52) +#define WSAECONNABORTED (WSABASEERR+53) +#define WSAECONNRESET (WSABASEERR+54) +#define WSAENOBUFS (WSABASEERR+55) +#define WSAEISCONN (WSABASEERR+56) +#define WSAENOTCONN (WSABASEERR+57) +#define WSAESHUTDOWN (WSABASEERR+58) +#define WSAETOOMANYREFS (WSABASEERR+59) +#define WSAETIMEDOUT (WSABASEERR+60) +#define WSAECONNREFUSED (WSABASEERR+61) +#define WSAELOOP (WSABASEERR+62) +#define WSAENAMETOOLONG (WSABASEERR+63) +#define WSAEHOSTDOWN (WSABASEERR+64) +#define WSAEHOSTUNREACH (WSABASEERR+65) +#define WSAENOTEMPTY (WSABASEERR+66) +#define WSAEPROCLIM (WSABASEERR+67) +#define WSAEUSERS (WSABASEERR+68) +#define WSAEDQUOT (WSABASEERR+69) +#define WSAESTALE (WSABASEERR+70) +#define WSAEREMOTE (WSABASEERR+71) + +/* + * Extended Windows Sockets error constant definitions + */ +#define WSASYSNOTREADY (WSABASEERR+91) +#define WSAVERNOTSUPPORTED (WSABASEERR+92) +#define WSANOTINITIALISED (WSABASEERR+93) +#define WSAEDISCON (WSABASEERR+101) +#define WSAENOMORE (WSABASEERR+102) +#define WSAECANCELLED (WSABASEERR+103) +#define WSAEINVALIDPROCTABLE (WSABASEERR+104) +#define WSAEINVALIDPROVIDER (WSABASEERR+105) +#define WSAEPROVIDERFAILEDINIT (WSABASEERR+106) +#define WSASYSCALLFAILURE (WSABASEERR+107) +#define WSASERVICE_NOT_FOUND (WSABASEERR+108) +#define WSATYPE_NOT_FOUND (WSABASEERR+109) +#define WSA_E_NO_MORE (WSABASEERR+110) +#define WSA_E_CANCELLED (WSABASEERR+111) +#define WSAEREFUSED (WSABASEERR+112) + + #define ERROR_SXS_SECTION_NOT_FOUND 14000 #define ERROR_SXS_CANT_GEN_ACTCTX 14001 #define ERROR_SXS_INVALID_ACTCTXDATA_FORMAT 14002 diff --git a/include/winsock.h b/include/winsock.h index 69819d5fa59..95b4a5159dd 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -853,7 +853,7 @@ typedef struct WS(WSAData) /* * All Windows Sockets error constants are biased by WSABASEERR from - * the "normal" + * the "normal". They are also defined in winerror.h. */ #define WSABASEERR 10000 /* diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index c4c0127fe5f..83bbfa940a1 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -41,5 +41,3 @@ $(MODULE): $(OBJS) Makefile.in $(RM) $@ $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 4be83019530..68ea6111fb8 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -183,5 +183,3 @@ clean:: $(RELPATH): @cd $(TOOLSDIR)/tools && $(MAKE) relpath$(TOOLSEXT) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/libs/wpp/Makefile.in b/libs/wpp/Makefile.in index 48869a7d2d3..950712f3e1d 100644 --- a/libs/wpp/Makefile.in +++ b/libs/wpp/Makefile.in @@ -19,7 +19,3 @@ $(MODULE): $(OBJS) $(RM) $@ $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ - -ppy.tab.c: ppy.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/loader/Makefile.in b/loader/Makefile.in index 59111592e3b..c314c9b626f 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -63,5 +63,3 @@ uninstall:: $(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winepath/Makefile.in b/programs/attrib/Makefile.in similarity index 61% copy from programs/winepath/Makefile.in copy to programs/attrib/Makefile.in index 1ced54e9e86..3696b934340 100644 --- a/programs/winepath/Makefile.in +++ b/programs/attrib/Makefile.in @@ -3,12 +3,10 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = winepath.exe +MODULE = attrib.exe APPMODE = -mconsole -municode IMPORTS = kernel32 -C_SRCS = winepath.c +C_SRCS = attrib.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/mmdevapi/mmdevapi.h b/programs/attrib/attrib.c similarity index 67% copy from dlls/mmdevapi/mmdevapi.h copy to programs/attrib/attrib.c index b1a3de2ddc2..9cb9d9fa5ad 100644 --- a/dlls/mmdevapi/mmdevapi.h +++ b/programs/attrib/attrib.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Maarten Lankhorst + * Copyright 2010 Christian Costa * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,17 +16,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv); -extern void MMDevEnum_Free(void); +#include "wine/debug.h" -typedef struct MMDevice { - const IMMDeviceVtbl *lpVtbl; - LONG ref; +WINE_DEFAULT_DEBUG_CHANNEL(attrib); - CRITICAL_SECTION crst; +int wmain(int argc, WCHAR *argv[]) +{ + int i; - EDataFlow flow; - DWORD state; - GUID devguid; - WCHAR *alname; -} MMDevice; + WINE_FIXME("attrib.exe is currently only a stub command\n"); + WINE_FIXME("cmdline:"); + for (i = 0; i < argc; i++) + WINE_FIXME(" %s", wine_dbgstr_w(argv[i])); + WINE_FIXME("\n"); + + return 0; +} diff --git a/programs/cacls/Makefile.in b/programs/cacls/Makefile.in index 33eee029274..ecb6f156690 100644 --- a/programs/cacls/Makefile.in +++ b/programs/cacls/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ cacls_main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/clock/Makefile.in b/programs/clock/Makefile.in index 1a239a555a6..0b76717c2e4 100644 --- a/programs/clock/Makefile.in +++ b/programs/clock/Makefile.in @@ -40,5 +40,3 @@ RC_SRCS = \ Zh.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/cmd/Makefile.in b/programs/cmd/Makefile.in index 7f13b527014..a7d085355ea 100644 --- a/programs/cmd/Makefile.in +++ b/programs/cmd/Makefile.in @@ -36,5 +36,3 @@ RC_SRCS = \ SVG_SRCS = wcmd.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/cmd/tests/Makefile.in b/programs/cmd/tests/Makefile.in index eb64fa36299..7bce73908ef 100644 --- a/programs/cmd/tests/Makefile.in +++ b/programs/cmd/tests/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ RC_SRCS = rsrc.rc @MAKE_TEST_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c index ca40ada362e..e31fdc0d244 100644 --- a/programs/cmd/tests/batch.c +++ b/programs/cmd/tests/batch.c @@ -101,9 +101,11 @@ static const char *compare_line(const char *out_line, const char *out_end, const const char *exp_end) { const char *out_ptr = out_line, *exp_ptr = exp_line; + const char *err = NULL; static const char pwd_cmd[] = {'@','p','w','d','@'}; static const char todo_space_cmd[] = {'@','t','o','d','o','_','s','p','a','c','e','@'}; + static const char or_broken_cmd[] = {'@','o','r','_','b','r','o','k','e','n','@'}; while(exp_ptr < exp_end) { if(*exp_ptr == '@') { @@ -111,11 +113,13 @@ static const char *compare_line(const char *out_line, const char *out_end, const && !memcmp(exp_ptr, pwd_cmd, sizeof(pwd_cmd))) { exp_ptr += sizeof(pwd_cmd); if(out_end-out_ptr < workdir_len - || (CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, out_ptr, workdir_len, - workdir, workdir_len) != CSTR_EQUAL)) - return out_ptr; - out_ptr += workdir_len; - continue; + || (CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, out_ptr, workdir_len, + workdir, workdir_len) != CSTR_EQUAL)) { + err = out_ptr; + }else { + out_ptr += workdir_len; + continue; + } }else if(exp_ptr+sizeof(todo_space_cmd) <= exp_end && !memcmp(exp_ptr, todo_space_cmd, sizeof(todo_space_cmd))) { exp_ptr += sizeof(todo_space_cmd); @@ -123,10 +127,31 @@ static const char *compare_line(const char *out_line, const char *out_end, const if(out_ptr < out_end && *out_ptr == ' ') out_ptr++; continue; + }else if(exp_ptr+sizeof(or_broken_cmd) <= exp_end + && !memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) { + exp_ptr = exp_end; + continue; } + }else if(out_ptr == out_end || *out_ptr != *exp_ptr) { + err = out_ptr; } - if(out_ptr == out_end || *out_ptr != *exp_ptr++) - return out_ptr; + + if(err) { + if(!broken(1)) + return err; + + while(exp_ptr+sizeof(or_broken_cmd) <= exp_end && memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) + exp_ptr++; + if(!exp_ptr) + return err; + + exp_ptr += sizeof(or_broken_cmd); + out_ptr = out_line; + err = NULL; + continue; + } + + exp_ptr++; out_ptr++; } diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index ed2b75bdc88..bae19b854c6 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -23,6 +23,22 @@ cd dummydir echo %~dp0 cd .. rmdir dummydir +echo CD value %CD% +echo %% +echo P% +echo %P +echo %UNKNOWN%S +echo P%UNKNOWN% +echo P%UNKNOWN%S +echo %ERRORLEVEL +echo %ERRORLEVEL% +echo %ERRORLEVEL%%ERRORLEVEL% +echo %ERRORLEVEL%ERRORLEVEL% +echo %ERRORLEVEL%% +echo %ERRORLEVEL%%% +echo P%ERRORLEVEL% +echo %ERRORLEVEL%S +echo P%ERRORLEVEL%S echo ------------ Testing if/else -------------- echo if/else should work with blocks diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 2c0e9803d30..ad503588df0 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -16,6 +16,22 @@ bar ~dp0 should be directory containing batch file @pwd@\ @pwd@\ +CD value @pwd@@or_broken@CD value +% +P +P +S +P +PS +ERRORLEVEL +0 +00 +0ERRORLEVEL +0 +0% +P0 +0S +P0S ------------ Testing if/else -------------- if/else should work with blocks if seems to work diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index b2243e390e4..b86801c310d 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1636,6 +1636,8 @@ static void WCMD_addCommand(WCHAR *command, int *commandLen, } else { thisEntry->command = NULL; + thisEntry->redirects = NULL; + thisEntry->pipeFile[0] = 0x00; } /* Fill in other fields */ diff --git a/programs/cmdlgtst/Makefile.in b/programs/cmdlgtst/Makefile.in index 1c6fdce9ef1..0f99d34249e 100644 --- a/programs/cmdlgtst/Makefile.in +++ b/programs/cmdlgtst/Makefile.in @@ -31,5 +31,3 @@ RC_SRCS = \ cmdlgr.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/control/Makefile.in b/programs/control/Makefile.in index dff63bb1110..f3b859b1a7a 100644 --- a/programs/control/Makefile.in +++ b/programs/control/Makefile.in @@ -10,5 +10,3 @@ IMPORTS = shell32 user32 kernel32 C_SRCS = control.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/dxdiag/Makefile.in b/programs/dxdiag/Makefile.in index a8dd0d98950..9fac9ae3c9e 100644 --- a/programs/dxdiag/Makefile.in +++ b/programs/dxdiag/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/eject/Makefile.in b/programs/eject/Makefile.in index 505e23b5280..7f7c117dca4 100644 --- a/programs/eject/Makefile.in +++ b/programs/eject/Makefile.in @@ -10,5 +10,3 @@ IMPORTS = kernel32 C_SRCS = eject.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/expand/Makefile.in b/programs/expand/Makefile.in index f3b817ffa5f..be456fbf917 100644 --- a/programs/expand/Makefile.in +++ b/programs/expand/Makefile.in @@ -10,5 +10,3 @@ IMPORTS = setupapi kernel32 C_SRCS = expand.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/explorer/Makefile.in b/programs/explorer/Makefile.in index ceb80a9ad58..b53191c02c0 100644 --- a/programs/explorer/Makefile.in +++ b/programs/explorer/Makefile.in @@ -15,5 +15,3 @@ C_SRCS = \ systray.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/extrac32/Makefile.in b/programs/extrac32/Makefile.in index 3ee70a99921..7505e39a35e 100644 --- a/programs/extrac32/Makefile.in +++ b/programs/extrac32/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ extrac32.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/hh/Makefile.in b/programs/hh/Makefile.in index 0f230e34cfd..7c06bc5af9c 100644 --- a/programs/hh/Makefile.in +++ b/programs/hh/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/icinfo/Makefile.in b/programs/icinfo/Makefile.in index a1da6e492ea..64a7785c9d8 100644 --- a/programs/icinfo/Makefile.in +++ b/programs/icinfo/Makefile.in @@ -10,5 +10,3 @@ IMPORTS = msvfw32 kernel32 C_SRCS = icinfo.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/iexplore/Makefile.in b/programs/iexplore/Makefile.in index 522af7d5d60..9f2b6532b44 100644 --- a/programs/iexplore/Makefile.in +++ b/programs/iexplore/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = version.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/lodctr/Makefile.in b/programs/lodctr/Makefile.in index 572b99a1a1f..eb8242aac64 100644 --- a/programs/lodctr/Makefile.in +++ b/programs/lodctr/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = loadperf kernel32 C_SRCS = lodctr_main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/mshta/Makefile.in b/programs/mshta/Makefile.in index 2e5ee5472aa..662406ca3c2 100644 --- a/programs/mshta/Makefile.in +++ b/programs/mshta/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/msiexec/Makefile.in b/programs/msiexec/Makefile.in index f9cb570eebd..ab7bd1c4f2d 100644 --- a/programs/msiexec/Makefile.in +++ b/programs/msiexec/Makefile.in @@ -16,5 +16,3 @@ RC_SRCS = rsrc.rc SVG_SRCS = msiexec.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/net/Makefile.in b/programs/net/Makefile.in index 8a67b135c12..5c06bb8a138 100644 --- a/programs/net/Makefile.in +++ b/programs/net/Makefile.in @@ -25,5 +25,3 @@ RC_SRCS = \ Si.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/notepad/Makefile.in b/programs/notepad/Makefile.in index c48acf7350e..7e89a98a794 100644 --- a/programs/notepad/Makefile.in +++ b/programs/notepad/Makefile.in @@ -45,5 +45,3 @@ RC_SRCS = \ SVG_SRCS = notepad.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c index 45d0c75c104..e19e4d64897 100644 --- a/programs/notepad/dialog.c +++ b/programs/notepad/dialog.c @@ -297,7 +297,9 @@ BOOL DoCloseFile(void) int nResult; static const WCHAR empty_strW[] = { 0 }; - if (SendMessageW(Globals.hEdit, EM_GETMODIFY, 0, 0)) + nResult=GetWindowTextLengthW(Globals.hEdit); + if (SendMessageW(Globals.hEdit, EM_GETMODIFY, 0, 0) && + (nResult || Globals.szFileName[0])) { /* prompt user to save changes */ nResult = AlertFileNotSaved(Globals.szFileName); diff --git a/programs/oleview/Makefile.in b/programs/oleview/Makefile.in index d1dad43f51a..18dac96ff6d 100644 --- a/programs/oleview/Makefile.in +++ b/programs/oleview/Makefile.in @@ -33,5 +33,3 @@ RC_SRCS = \ rsrc.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/secedit/Makefile.in b/programs/ping/Makefile.in similarity index 64% copy from programs/secedit/Makefile.in copy to programs/ping/Makefile.in index 0b356d84edb..b67e318f92f 100644 --- a/programs/secedit/Makefile.in +++ b/programs/ping/Makefile.in @@ -3,13 +3,11 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = secedit.exe +MODULE = ping.exe APPMODE = -mconsole IMPORTS = kernel32 C_SRCS = \ - main.c + ping_main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/ping/ping_main.c b/programs/ping/ping_main.c new file mode 100644 index 00000000000..70db17f48cf --- /dev/null +++ b/programs/ping/ping_main.c @@ -0,0 +1,61 @@ +/* + * ping stub + * Copyright (C) 2010 Trey Hunner + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ping); + +static void usage(void) +{ + WINE_MESSAGE( "Usage: ping [-n count] [-w timeout] target_name\n\n" ); + WINE_MESSAGE( "Options:\n" ); + WINE_MESSAGE( " -n Number of echo requests to send.\n" ); + WINE_MESSAGE( " -w Timeout in milliseconds to wait for each reply.\n" ); +} + +int main(int argc, char** argv) +{ + int n = 0; + int optc; + + WINE_FIXME( "this command currently just sleeps based on -n parameter\n" ); + + while ((optc = getopt( argc, argv, "n:w:tal:fi:v:r:s:j:k:" )) != -1) + { + switch(optc) + { + case 'n': + n = atoi( optarg ); + break; + case '?': + usage(); + exit(1); + default: + usage(); + WINE_FIXME( "this command currently only supports the -n parameter\n" ); + exit(1); + } + } + + Sleep(n * 1000); + return 0; +} diff --git a/programs/progman/Makefile.in b/programs/progman/Makefile.in index 921f9a81c0b..66489951754 100644 --- a/programs/progman/Makefile.in +++ b/programs/progman/Makefile.in @@ -37,5 +37,3 @@ RC_SRCS = \ accel.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/reg/Makefile.in b/programs/reg/Makefile.in index 485f2e329c8..c746d0f86a1 100644 --- a/programs/reg/Makefile.in +++ b/programs/reg/Makefile.in @@ -28,5 +28,3 @@ RC_SRCS = \ Uk.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/regedit/Makefile.in b/programs/regedit/Makefile.in index b0fba494465..99d0300e91f 100644 --- a/programs/regedit/Makefile.in +++ b/programs/regedit/Makefile.in @@ -49,5 +49,3 @@ RC_SRCS = \ SVG_SRCS = regedit.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/regsvr32/Makefile.in b/programs/regsvr32/Makefile.in index 8b8dce415d7..958fad4fb12 100644 --- a/programs/regsvr32/Makefile.in +++ b/programs/regsvr32/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = regsvr32.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/rpcss/Makefile.in b/programs/rpcss/Makefile.in index a2929c4c50e..3edd4bd7610 100644 --- a/programs/rpcss/Makefile.in +++ b/programs/rpcss/Makefile.in @@ -17,5 +17,3 @@ IDL_S_SRCS = \ irot.idl @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/rundll32/Makefile.in b/programs/rundll32/Makefile.in index 7bb09b0286b..c7798a39c18 100644 --- a/programs/rundll32/Makefile.in +++ b/programs/rundll32/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ rundll32.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/secedit/Makefile.in b/programs/secedit/Makefile.in index 0b356d84edb..fb6c420a97f 100644 --- a/programs/secedit/Makefile.in +++ b/programs/secedit/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/services/Makefile.in b/programs/services/Makefile.in index 257489bd55f..b2d62678c00 100644 --- a/programs/services/Makefile.in +++ b/programs/services/Makefile.in @@ -16,5 +16,3 @@ C_SRCS = \ IDL_S_SRCS = svcctl.idl @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/spoolsv/Makefile.in b/programs/spoolsv/Makefile.in index 4e4b169e743..a08e5ec320e 100644 --- a/programs/spoolsv/Makefile.in +++ b/programs/spoolsv/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/start/Makefile.in b/programs/start/Makefile.in index 66a05e8dc77..7fe99cc5e5c 100644 --- a/programs/start/Makefile.in +++ b/programs/start/Makefile.in @@ -28,5 +28,3 @@ RC_SRCS = \ Tr.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/svchost/Makefile.in b/programs/svchost/Makefile.in index 5cf61742a2f..a05a8b0a8fa 100644 --- a/programs/svchost/Makefile.in +++ b/programs/svchost/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ svchost.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/taskmgr/Makefile.in b/programs/taskmgr/Makefile.in index 2f2b40ada0c..6e6a761f90c 100644 --- a/programs/taskmgr/Makefile.in +++ b/programs/taskmgr/Makefile.in @@ -49,5 +49,3 @@ RC_SRCS = \ taskmgr.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/termsv/Makefile.in b/programs/termsv/Makefile.in index 559a72e27b2..ad118562d6e 100644 --- a/programs/termsv/Makefile.in +++ b/programs/termsv/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/uninstaller/Makefile.in b/programs/uninstaller/Makefile.in index adba2cc8096..0e53e9292c6 100644 --- a/programs/uninstaller/Makefile.in +++ b/programs/uninstaller/Makefile.in @@ -38,5 +38,3 @@ RC_SRCS = \ Zh.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/unlodctr/Makefile.in b/programs/unlodctr/Makefile.in index b67ce79c486..553df2e2aba 100644 --- a/programs/unlodctr/Makefile.in +++ b/programs/unlodctr/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = loadperf kernel32 C_SRCS = unlodctr_main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/view/Makefile.in b/programs/view/Makefile.in index ff345323f34..0a8067cfbfa 100644 --- a/programs/view/Makefile.in +++ b/programs/view/Makefile.in @@ -35,5 +35,3 @@ RC_SRCS = \ Zh.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in index 42c9ee2c5af..0b8ec86b5d7 100644 --- a/programs/wineboot/Makefile.in +++ b/programs/wineboot/Makefile.in @@ -33,5 +33,3 @@ RC_SRCS = \ wineboot_Zh.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winebrowser/Makefile.in b/programs/winebrowser/Makefile.in index 4b2b69e5c75..514a8a670e7 100644 --- a/programs/winebrowser/Makefile.in +++ b/programs/winebrowser/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ main.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winecfg/Makefile.in b/programs/winecfg/Makefile.in index 787615ba80e..267c4e3ee57 100644 --- a/programs/winecfg/Makefile.in +++ b/programs/winecfg/Makefile.in @@ -45,5 +45,3 @@ RC_SRCS = \ winecfg.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/wineconsole/Makefile.in b/programs/wineconsole/Makefile.in index 6ef22f7fa24..f35767ce9a7 100644 --- a/programs/wineconsole/Makefile.in +++ b/programs/wineconsole/Makefile.in @@ -37,6 +37,3 @@ RC_SRCS = \ wineconsole_Zh.rc @MAKE_PROG_RULES@ - - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winedbg/Makefile.in b/programs/winedbg/Makefile.in index f3aef2cd06d..ad9350f164e 100644 --- a/programs/winedbg/Makefile.in +++ b/programs/winedbg/Makefile.in @@ -60,7 +60,3 @@ install install-lib:: $(MANPAGES) $(DESTDIR)$(mandir)/man$(prog_manext) uninstall:: $(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/winedbg.$(prog_manext) - -dbg.tab.c: dbg.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winedevice/Makefile.in b/programs/winedevice/Makefile.in index c644b7a8609..abecb85f14f 100644 --- a/programs/winedevice/Makefile.in +++ b/programs/winedevice/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ device.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winefile/Makefile.in b/programs/winefile/Makefile.in index 962cb77ba4c..55e7692eb1f 100644 --- a/programs/winefile/Makefile.in +++ b/programs/winefile/Makefile.in @@ -38,5 +38,3 @@ RC_SRCS = \ SVG_SRCS = winefile.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winemenubuilder/Makefile.in b/programs/winemenubuilder/Makefile.in index 092405ea35c..f6142ef5bc0 100644 --- a/programs/winemenubuilder/Makefile.in +++ b/programs/winemenubuilder/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = \ winemenubuilder.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winemine/Makefile.in b/programs/winemine/Makefile.in index 7146d922233..33e7890f5fa 100644 --- a/programs/winemine/Makefile.in +++ b/programs/winemine/Makefile.in @@ -38,5 +38,3 @@ RC_SRCS = \ SVG_SRCS = winemine.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winepath/Makefile.in b/programs/winepath/Makefile.in index 1ced54e9e86..f487c069393 100644 --- a/programs/winepath/Makefile.in +++ b/programs/winepath/Makefile.in @@ -10,5 +10,3 @@ IMPORTS = kernel32 C_SRCS = winepath.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index a03197777ca..699113cf054 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -43,5 +43,3 @@ winetest-dist.exe winetest-dist.exe.so: $(OBJS) dist.res Makefile.in -upx -9 -qqq $@ dist.res: build.nfo - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winevdm/Makefile.in b/programs/winevdm/Makefile.in index 5bbcad220d9..38c66e4057a 100644 --- a/programs/winevdm/Makefile.in +++ b/programs/winevdm/Makefile.in @@ -11,5 +11,3 @@ C_SRCS = \ winevdm.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winhelp.exe16/Makefile.in b/programs/winhelp.exe16/Makefile.in index f0e56e2d1ac..999188a4335 100644 --- a/programs/winhelp.exe16/Makefile.in +++ b/programs/winhelp.exe16/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 kernel C_SRCS = winhelp.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winhlp32/Makefile.in b/programs/winhlp32/Makefile.in index 6af4bfaf8da..039c065542a 100644 --- a/programs/winhlp32/Makefile.in +++ b/programs/winhlp32/Makefile.in @@ -51,5 +51,3 @@ RC_SRCS = \ SVG_SRCS = winhelp.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winoldap.mod16/Makefile.in b/programs/winoldap.mod16/Makefile.in index dc519c52b00..c80c89c316e 100644 --- a/programs/winoldap.mod16/Makefile.in +++ b/programs/winoldap.mod16/Makefile.in @@ -9,5 +9,3 @@ IMPORTS = kernel32 kernel ntdll C_SRCS = winoldap.c @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/winver/Makefile.in b/programs/winver/Makefile.in index 41572a0316a..ab276df2714 100644 --- a/programs/winver/Makefile.in +++ b/programs/winver/Makefile.in @@ -12,5 +12,3 @@ C_SRCS = winver.c RC_SRCS = version.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/wordpad/Makefile.in b/programs/wordpad/Makefile.in index 54bd9662441..8daea72cd46 100644 --- a/programs/wordpad/Makefile.in +++ b/programs/wordpad/Makefile.in @@ -39,5 +39,3 @@ RC_SRCS = \ SVG_SRCS = wordpad.svg @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/write/Makefile.in b/programs/write/Makefile.in index df025cb30d3..e0ffa98631f 100644 --- a/programs/write/Makefile.in +++ b/programs/write/Makefile.in @@ -28,5 +28,3 @@ RC_SRCS = \ Uk.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/xcopy/Makefile.in b/programs/xcopy/Makefile.in index dce825963f0..ea98ebac352 100644 --- a/programs/xcopy/Makefile.in +++ b/programs/xcopy/Makefile.in @@ -30,5 +30,3 @@ RC_SRCS = \ Uk.rc @MAKE_PROG_RULES@ - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/server/Makefile.in b/server/Makefile.in index 828d7b0b50c..cee5c39fd38 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -77,5 +77,3 @@ install install-lib:: wineserver-installed $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/wineserver $(DESTDIR)$(mandir)/man$(prog_manext)/wineserver.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wineserver.$(prog_manext) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/server/debugger.c b/server/debugger.c index 727f3be6182..533347cb951 100644 --- a/server/debugger.c +++ b/server/debugger.c @@ -421,6 +421,7 @@ void generate_debug_event( struct thread *thread, int code, const void *arg ) static int debugger_attach( struct process *process, struct thread *debugger ) { if (process->debugger) goto error; /* already being debugged */ + if (debugger->process == process) goto error; if (!is_process_init_done( process )) goto error; /* still starting up */ if (list_empty( &process->thread_list )) goto error; /* no thread running in the process */ diff --git a/server/process.c b/server/process.c index e4dca68cb5b..36e462ab2c0 100644 --- a/server/process.c +++ b/server/process.c @@ -1091,6 +1091,7 @@ DECL_HANDLER(get_process_info) reply->start_time = process->start_time; reply->end_time = process->end_time; reply->cpu = process->cpu; + reply->debugger_present = !!process->debugger; release_object( process ); } } diff --git a/server/protocol.def b/server/protocol.def index 04f6e2ba891..e9c5cba1809 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -692,6 +692,7 @@ typedef union int exit_code; /* process exit code */ int priority; /* priority class */ cpu_type_t cpu; /* CPU that this process is running on */ + int debugger_present; /* process is being debugged */ @END diff --git a/server/request.h b/server/request.h index 41c64091eb8..11382d8f7f0 100644 --- a/server/request.h +++ b/server/request.h @@ -697,6 +697,7 @@ C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, end_time) == 40 ); C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, exit_code) == 48 ); C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, priority) == 52 ); C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, cpu) == 56 ); +C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, debugger_present) == 60 ); C_ASSERT( sizeof(struct get_process_info_reply) == 64 ); C_ASSERT( FIELD_OFFSET(struct set_process_info_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct set_process_info_request, mask) == 16 ); diff --git a/server/sock.c b/server/sock.c index ed89ca2a5f5..5eaed6b79da 100644 --- a/server/sock.c +++ b/server/sock.c @@ -51,6 +51,7 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" +#include "winerror.h" #include "process.h" #include "file.h" @@ -59,11 +60,34 @@ #include "request.h" #include "user.h" -/* To avoid conflicts with the Unix socket headers. Plus we only need a few - * macros anyway. +/* From winsock.h */ +#define FD_MAX_EVENTS 10 +#define FD_READ_BIT 0 +#define FD_WRITE_BIT 1 +#define FD_OOB_BIT 2 +#define FD_ACCEPT_BIT 3 +#define FD_CONNECT_BIT 4 +#define FD_CLOSE_BIT 5 + +/* + * Define flags to be used with the WSAAsyncSelect() call. */ -#define USE_WS_PREFIX -#include "winsock2.h" +#define FD_READ 0x00000001 +#define FD_WRITE 0x00000002 +#define FD_OOB 0x00000004 +#define FD_ACCEPT 0x00000008 +#define FD_CONNECT 0x00000010 +#define FD_CLOSE 0x00000020 + +/* internal per-socket flags */ +#define FD_WINE_LISTENING 0x10000000 +#define FD_WINE_NONBLOCKING 0x20000000 +#define FD_WINE_CONNECTED 0x40000000 +#define FD_WINE_RAW 0x80000000 +#define FD_WINE_INTERNAL 0xFFFF0000 + +/* Constants for WSAIoctl() */ +#define WSA_FLAG_OVERLAPPED 0x01 struct sock { diff --git a/server/trace.c b/server/trace.c index a250a2e866a..4b13ed57a84 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1118,6 +1118,7 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re fprintf( stderr, ", exit_code=%d", req->exit_code ); fprintf( stderr, ", priority=%d", req->priority ); dump_cpu_type( ", cpu=", &req->cpu ); + fprintf( stderr, ", debugger_present=%d", req->debugger_present ); } static void dump_set_process_info_request( const struct set_process_info_request *req ) diff --git a/tools/Makefile.in b/tools/Makefile.in index 1f48cbca828..2dd6f8a5f2d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -84,5 +84,3 @@ uninstall:: -$(UPDATE_DESKTOP_DATABASE) depend: makedep$(EXEEXT) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/makedep.c b/tools/makedep.c index 60278a94c51..9ce5befba3a 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -262,6 +262,18 @@ static INCL_FILE *find_src_file( const char *name ) } /******************************************************************* + * find_include_file + */ +static INCL_FILE *find_include_file( const char *name ) +{ + INCL_FILE *file; + + LIST_FOR_EACH_ENTRY( file, &includes, INCL_FILE, entry ) + if (!strcmp( name, file->name )) return file; + return NULL; +} + +/******************************************************************* * add_include * * Add an include file if it doesn't already exists. @@ -829,6 +841,10 @@ static int output_src( FILE *file, INCL_FILE *pFile, int *column ) *ext++ = 0; if (!strcmp( ext, "y" )) /* yacc file */ { + /* add source file dependency for parallel makes */ + char *header = strmake( "%s.tab.h", obj ); + if (find_include_file( header )) fprintf( file, "%s.tab.c: %s\n", obj, header ); + free( header ); *column += fprintf( file, "%s.tab.o: %s.tab.c", obj, obj ); } else if (!strcmp( ext, "l" )) /* lex file */ @@ -929,15 +945,17 @@ static void output_dependencies(void) { char buffer[1024]; FILE *tmp_file = create_temp_file( &tmp_name ); + int found = 0; - while (fgets( buffer, sizeof(buffer), file )) + while (fgets( buffer, sizeof(buffer), file ) && !found) { if (fwrite( buffer, 1, strlen(buffer), tmp_file ) != strlen(buffer)) fatal_error( "error writing to %s\n", tmp_name ); - if (!strncmp( buffer, Separator, strlen(Separator) )) break; + found = !strncmp( buffer, Separator, strlen(Separator) ); } fclose( file ); file = tmp_file; + if (!found && list_head(&sources)) fprintf( file, "\n%s\n", Separator ); } else { diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in index 21b844346c7..893678283c7 100644 --- a/tools/widl/Makefile.in +++ b/tools/widl/Makefile.in @@ -41,7 +41,3 @@ install install-dev:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/widl$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/widl.$(prog_manext) - -parser.tab.c: parser.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/widl/client.c b/tools/widl/client.c index b683a14b315..569a18b434d 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -126,8 +126,6 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset) print_client( " struct __frame_%s%s *__frame )\n{\n", prefix_client, get_name(func) ); indent++; - /* FIXME: emit client finally code */ - if (has_full_pointer) write_full_pointer_free(client, indent, func); diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 71b7ed69142..8a23a828026 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2261,7 +2261,6 @@ static int is_allowed_conf_type(const type_t *type) case TYPE_BASIC_HYPER: case TYPE_BASIC_BYTE: case TYPE_BASIC_WCHAR: - case TYPE_BASIC_ERROR_STATUS_T: return TRUE; default: return FALSE; diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index c35020c90ad..ca0faf1b737 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -59,6 +59,14 @@ struct expr_eval_routine const expr_t *expr; }; +enum type_context +{ + TYPE_CONTEXT_TOPLEVELPARAM, + TYPE_CONTEXT_PARAM, + TYPE_CONTEXT_CONTAINER, + TYPE_CONTEXT_CONTAINER_NO_POINTERS, +}; + static unsigned int field_memsize(const type_t *type, unsigned int *offset); static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align); static unsigned int write_struct_tfs(FILE *file, type_t *type, const char *name, unsigned int *tfsoff); @@ -202,6 +210,30 @@ static unsigned char get_enum_fc(const type_t *type) return RPC_FC_ENUM16; } +static type_t *get_user_type(const type_t *t, const char **pname) +{ + for (;;) + { + type_t *ut = get_attrp(t->attrs, ATTR_WIREMARSHAL); + if (ut) + { + if (pname) + *pname = t->name; + return ut; + } + + if (type_is_alias(t)) + t = type_alias_get_aliasee(t); + else + return NULL; + } +} + +static int is_user_type(const type_t *t) +{ + return get_user_type(t, NULL) != NULL; +} + enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *attrs, unsigned int flags) { if (is_user_type(type)) @@ -252,6 +284,29 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att return TGT_INVALID; } +static int get_padding(const var_list_t *fields) +{ + unsigned short offset = 0; + unsigned int salign = 1; + const var_t *f; + + if (!fields) + return 0; + + LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) + { + type_t *ft = f->type; + unsigned int align = 0; + unsigned int size = type_memsize(ft, &align); + align = clamp_align(align); + if (align > salign) salign = align; + offset = ROUND_SIZE(offset, align); + offset += size; + } + + return ROUNDING(offset, salign); +} + unsigned char get_struct_fc(const type_t *type) { int has_pointer = 0; @@ -472,22 +527,6 @@ static unsigned char get_array_fc(const type_t *type) return fc; } -int is_struct(unsigned char type) -{ - switch (type) - { - case RPC_FC_STRUCT: - case RPC_FC_PSTRUCT: - case RPC_FC_CSTRUCT: - case RPC_FC_CPSTRUCT: - case RPC_FC_CVSTRUCT: - case RPC_FC_BOGUS_STRUCT: - return 1; - default: - return 0; - } -} - static int is_non_complex_struct(const type_t *type) { return (type_get_type(type) == TYPE_STRUCT && @@ -626,30 +665,6 @@ static void guard_rec(type_t *type) type->typestring_offset = 1; } -static type_t *get_user_type(const type_t *t, const char **pname) -{ - for (;;) - { - type_t *ut = get_attrp(t->attrs, ATTR_WIREMARSHAL); - if (ut) - { - if (pname) - *pname = t->name; - return ut; - } - - if (type_is_alias(t)) - t = type_alias_get_aliasee(t); - else - return NULL; - } -} - -int is_user_type(const type_t *t) -{ - return get_user_type(t, NULL) != NULL; -} - static int is_embedded_complex(const type_t *type) { switch (typegen_detect_type(type, NULL, TDT_ALL_TYPES)) @@ -1075,6 +1090,13 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure, else param_type = RPC_FC_SHORT; } + else if (type_get_type(correlation_variable) == TYPE_POINTER) + { + if (pointer_size == 8) + param_type = RPC_FC_HYPER; + else + param_type = RPC_FC_LONG; + } else { error("write_conf_or_var_desc: non-arithmetic type used as correlation variable %s\n", @@ -1096,8 +1118,10 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure, LIST_FOR_EACH_ENTRY(eval, &expr_eval_routines, struct expr_eval_routine, entry) { - if (!strcmp (eval->structure->name, structure->name) - && !compare_expr (eval->expr, expr)) + if (eval->structure == structure || + (eval->structure->name && structure->name && + !strcmp(eval->structure->name, structure->name) && + !compare_expr(eval->expr, expr))) { found = 1; break; @@ -1177,29 +1201,6 @@ static unsigned int union_memsize(const var_list_t *fields, unsigned int *pmaxa) return maxs; } -int get_padding(const var_list_t *fields) -{ - unsigned short offset = 0; - unsigned int salign = 1; - const var_t *f; - - if (!fields) - return 0; - - LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) - { - type_t *ft = f->type; - unsigned int align = 0; - unsigned int size = type_memsize(ft, &align); - align = clamp_align(align); - if (align > salign) salign = align; - offset = ROUND_SIZE(offset, align); - offset += size; - } - - return ROUNDING(offset, salign); -} - unsigned int type_memsize(const type_t *t, unsigned int *align) { unsigned int size = 0; @@ -1355,7 +1356,7 @@ static unsigned int write_nonsimple_pointer(FILE *file, const attr_list_t *attrs if (out_attr && !in_attr && pointer_type == RPC_FC_RP) flags |= RPC_FC_P_ONSTACK; - if (is_ptr(type) && !last_ptr(type)) + if (is_ptr(type) && is_declptr(type_pointer_get_ref(type))) flags |= RPC_FC_P_DEREF; print_file(file, 2, "0x%x, 0x%x,\t\t/* %s", @@ -1382,6 +1383,9 @@ static unsigned int write_simple_pointer(FILE *file, const attr_list_t *attrs, c unsigned char fc; unsigned char pointer_fc; const type_t *ref; + int in_attr = is_attr(attrs, ATTR_IN); + int out_attr = is_attr(attrs, ATTR_OUT); + unsigned char flags = RPC_FC_P_SIMPLEPOINTER; /* for historical reasons, write_simple_pointer also handled string types, * but no longer does. catch bad uses of the function with this check */ @@ -1396,8 +1400,12 @@ static unsigned int write_simple_pointer(FILE *file, const attr_list_t *attrs, c else fc = get_basic_fc(ref); - print_file(file, 2, "0x%02x, 0x%x,\t/* %s [simple_pointer] */\n", - pointer_fc, RPC_FC_P_SIMPLEPOINTER, string_of_type(pointer_fc)); + if (out_attr && !in_attr) + flags |= RPC_FC_P_ONSTACK; + + print_file(file, 2, "0x%02x, 0x%x,\t/* %s %s[simple_pointer] */\n", + pointer_fc, flags, string_of_type(pointer_fc), + flags & RPC_FC_P_ONSTACK ? "[allocated_on_stack] " : ""); print_file(file, 2, "0x%02x,\t/* %s */\n", fc, string_of_type(fc)); print_file(file, 2, "0x5c,\t/* FC_PAD */\n"); return 4; @@ -1411,7 +1419,8 @@ static void print_start_tfs_comment(FILE *file, type_t *t, unsigned int tfsoff) } static unsigned int write_pointer_tfs(FILE *file, const attr_list_t *attrs, - type_t *type, int toplevel_param, + type_t *type, unsigned int ref_offset, + int toplevel_param, unsigned int *typestring_offset) { unsigned int offset = *typestring_offset; @@ -1420,15 +1429,21 @@ static unsigned int write_pointer_tfs(FILE *file, const attr_list_t *attrs, print_start_tfs_comment(file, type, offset); update_tfsoff(type, offset, file); - if (ref->typestring_offset) - write_nonsimple_pointer(file, attrs, type, - toplevel_param, - type_pointer_get_ref(type)->typestring_offset, - typestring_offset); - else if (type_get_type(ref) == TYPE_BASIC || - type_get_type(ref) == TYPE_ENUM) + switch (typegen_detect_type(ref, attrs, TDT_ALL_TYPES)) + { + case TGT_BASIC: + case TGT_ENUM: *typestring_offset += write_simple_pointer(file, attrs, type, toplevel_param); + break; + default: + if (ref_offset) + write_nonsimple_pointer(file, attrs, type, + toplevel_param, + ref_offset, + typestring_offset); + break; + } return offset; } @@ -1540,8 +1555,10 @@ static void write_member_type(FILE *file, const type_t *cont, reloff = absoff - (*tfsoff + 2); print_file(file, 2, "0x4c,\t/* FC_EMBEDDED_COMPLEX */\n"); - /* FIXME: actually compute necessary padding */ - print_file(file, 2, "0x0,\t/* FIXME: padding */\n"); + /* padding is represented using FC_STRUCTPAD* types, so presumably + * this is left over in the format for historical purposes in MIDL + * or rpcrt4. */ + print_file(file, 2, "0x0,\n"); print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff); *tfsoff += 4; @@ -1636,8 +1653,11 @@ static int write_pointer_description_offsets( { unsigned int memsize; - /* pointer instance */ - /* FIXME: sometimes from end of structure, sometimes from beginning */ + /* pointer instance + * + * note that MSDN states that for pointer layouts in structures, + * this is a negative offset from the end of the structure, but + * this statement is incorrect. all offsets are positive */ print_file(file, 2, "NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", *offset_in_memory, *offset_in_memory); print_file(file, 2, "NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", *offset_in_buffer, *offset_in_buffer); @@ -2139,7 +2159,6 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t unsigned int size; unsigned int start_offset; unsigned char fc; - int has_pointer; int pointer_type = get_attrv(attrs, ATTR_POINTERTYPE); unsigned int baseoff = !type_array_is_decl_as_ptr(type) && current_structure @@ -2149,10 +2168,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t if (!pointer_type) pointer_type = RPC_FC_RP; - if (write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset)) - has_pointer = TRUE; - else - has_pointer = type_has_pointers(type_array_get_element(type)); + write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset); align = 0; size = type_memsize((is_conformant_array(type) ? type_array_get_element(type) : type), &align); @@ -2210,7 +2226,8 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t += write_conf_or_var_desc(file, current_structure, baseoff, type, length_is); - if (has_pointer && (type_array_is_decl_as_ptr(type) || !current_structure)) + if (type_has_pointers(type_array_get_element(type)) && + (type_array_is_decl_as_ptr(type) || !current_structure)) { print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); @@ -2330,7 +2347,6 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, const var_t *array; unsigned int start_offset; unsigned int array_offset; - int has_pointers = 0; unsigned int align = 0; unsigned int corroff; var_t *f; @@ -2346,9 +2362,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, name, USHRT_MAX, total_size - USHRT_MAX); if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry) - has_pointers |= write_embedded_types(file, f->attrs, f->type, f->name, - FALSE, tfsoff); - if (!has_pointers) has_pointers = type_has_pointers(type); + write_embedded_types(file, f->attrs, f->type, f->name, FALSE, tfsoff); array = find_array_or_string_in_struct(type); if (array && !processed(array->type)) @@ -2396,7 +2410,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, } else if ((fc == RPC_FC_PSTRUCT) || (fc == RPC_FC_CPSTRUCT) || - (fc == RPC_FC_CVSTRUCT && has_pointers)) + (fc == RPC_FC_CVSTRUCT && type_has_pointers(type))) { print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); @@ -2417,25 +2431,33 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, if (fields) LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) { type_t *ft = f->type; - if (is_ptr(ft)) + switch (typegen_detect_type(ft, f->attrs, TDT_IGNORE_STRINGS)) { + case TGT_POINTER: if (is_string_type(f->attrs, ft)) write_string_tfs(file, f->attrs, ft, FALSE, f->name, tfsoff); else - write_pointer_tfs(file, f->attrs, ft, FALSE, tfsoff); - } - else if (type_get_type(ft) == TYPE_ARRAY && type_array_is_decl_as_ptr(ft)) - { - unsigned int offset; + write_pointer_tfs(file, f->attrs, ft, + type_pointer_get_ref(ft)->typestring_offset, + FALSE, tfsoff); + break; + case TGT_ARRAY: + if (type_array_is_decl_as_ptr(ft)) + { + unsigned int offset; - print_file(file, 0, "/* %d */\n", *tfsoff); + print_file(file, 0, "/* %d */\n", *tfsoff); - offset = ft->typestring_offset; - /* skip over the pointer that is written for strings, since a - * pointer has to be written in-place here */ - if (is_string_type(f->attrs, ft)) - offset += 4; - write_nonsimple_pointer(file, f->attrs, ft, FALSE, offset, tfsoff); + offset = ft->typestring_offset; + /* skip over the pointer that is written for strings, since a + * pointer has to be written in-place here */ + if (is_string_type(f->attrs, ft)) + offset += 4; + write_nonsimple_pointer(file, f->attrs, ft, FALSE, offset, tfsoff); + } + break; + default: + break; } } if (type->ptrdesc == *tfsoff) @@ -2639,12 +2661,14 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t unsigned int start_offset = *typeformat_offset; expr_t *iid = get_attrp(attrs, ATTR_IIDIS); + print_start_tfs_comment(file, type, start_offset); + if (iid) { print_file(file, 2, "0x2f, /* FC_IP */\n"); print_file(file, 2, "0x5c, /* FC_PAD */\n"); *typeformat_offset - += write_conf_or_var_desc(file, NULL, 0, type, iid) + 2; + += write_conf_or_var_desc(file, current_structure, 0, type, iid) + 2; } else { @@ -2655,7 +2679,6 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t error("%s: interface %s missing UUID\n", __FUNCTION__, base->name); update_tfsoff(type, start_offset, file); - print_start_tfs_comment(file, type, start_offset); print_file(file, 2, "0x2f,\t/* FC_IP */\n"); print_file(file, 2, "0x5a,\t/* FC_CONSTANT_IID */\n"); print_file(file, 2, "NdrFcLong(0x%08x),\n", uuid->Data1); @@ -2672,8 +2695,9 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t return start_offset; } -static unsigned int write_contexthandle_tfs(FILE *file, const type_t *type, - const var_t *var, +static unsigned int write_contexthandle_tfs(FILE *file, + const attr_list_t *attrs, + const type_t *type, unsigned int *typeformat_offset) { unsigned int start_offset = *typeformat_offset; @@ -2684,13 +2708,13 @@ static unsigned int write_contexthandle_tfs(FILE *file, const type_t *type, if (is_ptr(type)) flags |= 0x80; - if (is_attr(var->attrs, ATTR_IN)) + if (is_attr(attrs, ATTR_IN)) { flags |= 0x40; - if (!is_attr(var->attrs, ATTR_OUT)) + if (!is_attr(attrs, ATTR_OUT)) flags |= NDR_CONTEXT_HANDLE_CANNOT_BE_NULL; } - if (is_attr(var->attrs, ATTR_OUT)) + if (is_attr(attrs, ATTR_OUT)) flags |= 0x20; WRITE_FCTYPE(file, FC_BIND_CONTEXT, *typeformat_offset); @@ -2747,46 +2771,60 @@ static unsigned int write_range_tfs(FILE *file, const attr_list_t *attrs, return start_offset; } -static unsigned int write_typeformatstring_var(FILE *file, int indent, const var_t *func, - type_t *type, const var_t *var, - int toplevel_param, - unsigned int *typeformat_offset) +static unsigned int write_type_tfs(FILE *file, int indent, + const attr_list_t *attrs, type_t *type, + const char *name, + enum type_context context, + unsigned int *typeformat_offset) { unsigned int offset; - switch (typegen_detect_type(type, var->attrs, TDT_ALL_TYPES)) + switch (typegen_detect_type(type, attrs, TDT_ALL_TYPES)) { case TGT_CTXT_HANDLE: case TGT_CTXT_HANDLE_POINTER: - return write_contexthandle_tfs(file, type, var, typeformat_offset); + return write_contexthandle_tfs(file, attrs, type, typeformat_offset); case TGT_USER_TYPE: write_user_tfs(file, type, typeformat_offset); return type->typestring_offset; case TGT_STRING: - return write_string_tfs(file, var->attrs, type, toplevel_param, var->name, typeformat_offset); + return write_string_tfs(file, attrs, type, + context == TYPE_CONTEXT_TOPLEVELPARAM, + name, typeformat_offset); case TGT_ARRAY: { - int ptr_type; unsigned int off; - off = write_array_tfs(file, var->attrs, type, var->name, typeformat_offset); - ptr_type = get_pointer_fc(type, var->attrs, toplevel_param); - if (ptr_type != RPC_FC_RP) + /* conformant and pointer arrays are handled specially */ + if ((context != TYPE_CONTEXT_CONTAINER && + context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) || + !is_conformant_array(type) || type_array_is_decl_as_ptr(type)) + off = write_array_tfs(file, attrs, type, name, typeformat_offset); + else + off = 0; + if (context != TYPE_CONTEXT_CONTAINER && + context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) { - unsigned int absoff = type->typestring_offset; - short reloff = absoff - (*typeformat_offset + 2); - off = *typeformat_offset; - print_file(file, 0, "/* %d */\n", off); - print_file(file, 2, "0x%x, 0x0,\t/* %s */\n", ptr_type, - string_of_type(ptr_type)); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", - reloff, reloff, absoff); - *typeformat_offset += 4; + int ptr_type; + ptr_type = get_pointer_fc(type, attrs, + context == TYPE_CONTEXT_TOPLEVELPARAM); + if (ptr_type != RPC_FC_RP) + { + unsigned int absoff = type->typestring_offset; + short reloff = absoff - (*typeformat_offset + 2); + off = *typeformat_offset; + print_file(file, 0, "/* %d */\n", off); + print_file(file, 2, "0x%x, 0x0,\t/* %s */\n", ptr_type, + string_of_type(ptr_type)); + print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", + reloff, reloff, absoff); + *typeformat_offset += 4; + } } return off; } case TGT_STRUCT: if (processed(type)) return type->typestring_offset; - return write_struct_tfs(file, type, var->name, typeformat_offset); + return write_struct_tfs(file, type, name, typeformat_offset); case TGT_UNION: if (processed(type)) return type->typestring_offset; return write_union_tfs(file, type, typeformat_offset); @@ -2796,131 +2834,46 @@ static unsigned int write_typeformatstring_var(FILE *file, int indent, const var return 0; case TGT_RANGE: { - expr_list_t *range_list = get_attrp(var->attrs, ATTR_RANGE); + expr_list_t *range_list = get_attrp(attrs, ATTR_RANGE); if (!range_list) range_list = get_aliaschain_attrp(type, ATTR_RANGE); - return write_range_tfs(file, var->attrs, type, range_list, typeformat_offset); + return write_range_tfs(file, attrs, type, range_list, typeformat_offset); } case TGT_IFACE_POINTER: - return write_ip_tfs(file, var->attrs, type, typeformat_offset); + return write_ip_tfs(file, attrs, type, typeformat_offset); case TGT_POINTER: - if (last_ptr(type)) + if (processed(type_pointer_get_ref(type))) + offset = type_pointer_get_ref(type)->typestring_offset; + else { - size_t start_offset = *typeformat_offset; - int in_attr = is_attr(var->attrs, ATTR_IN); - int out_attr = is_attr(var->attrs, ATTR_OUT); - const type_t *ref = type_pointer_get_ref(type); - - switch (typegen_detect_type(ref, NULL, TDT_ALL_TYPES)) - { - /* special case for pointers to base types */ - case TGT_BASIC: - case TGT_ENUM: - { - unsigned char fc; - - if (type_get_type(ref) == TYPE_ENUM) - fc = get_enum_fc(ref); - else - fc = get_basic_fc(ref); - - print_file(file, indent, "0x%x, 0x%x, /* %s %s[simple_pointer] */\n", - get_pointer_fc(type, var->attrs, toplevel_param), - (!in_attr && out_attr) ? 0x0C : 0x08, - string_of_type(get_pointer_fc(type, var->attrs, toplevel_param)), - (!in_attr && out_attr) ? "[allocated_on_stack] " : ""); - print_file(file, indent, "0x%02x, /* %s */\n", - fc, string_of_type(fc)); - print_file(file, indent, "0x5c, /* FC_PAD */\n"); - *typeformat_offset += 4; - return start_offset; - } - default: - break; - } + enum type_context ref_context; + if (context == TYPE_CONTEXT_TOPLEVELPARAM) + ref_context = TYPE_CONTEXT_PARAM; + else if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) + ref_context = TYPE_CONTEXT_CONTAINER; + else + ref_context = context; + offset = write_type_tfs( + file, indent, attrs, type_pointer_get_ref(type), name, + ref_context, typeformat_offset); } - - offset = write_typeformatstring_var(file, indent, func, - type_pointer_get_ref(type), var, - FALSE, typeformat_offset); - if (file) - fprintf(file, "/* %2u */\n", *typeformat_offset); - return write_nonsimple_pointer(file, var->attrs, type, - toplevel_param, - offset, typeformat_offset); + if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) + return 0; + else + return write_pointer_tfs(file, attrs, type, offset, + context == TYPE_CONTEXT_TOPLEVELPARAM, + typeformat_offset); case TGT_INVALID: break; } - error("invalid type %s for var %s\n", type->name, var->name); + error("invalid type %s for var %s\n", type->name, name); return 0; } static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, const char *name, int write_ptr, unsigned int *tfsoff) { - int retmask = 0; - - switch (typegen_detect_type(type, attrs, TDT_ALL_TYPES)) - { - case TGT_USER_TYPE: - write_user_tfs(file, type, tfsoff); - break; - case TGT_STRING: - write_string_tfs(file, attrs, type, FALSE, name, tfsoff); - break; - case TGT_IFACE_POINTER: - write_ip_tfs(file, attrs, type, tfsoff); - break; - case TGT_POINTER: - { - type_t *ref = type_pointer_get_ref(type); - - if (!processed(ref) && type_get_type(ref) != TYPE_BASIC) - retmask |= write_embedded_types(file, NULL, ref, name, TRUE, tfsoff); - - if (write_ptr) - write_pointer_tfs(file, attrs, type, FALSE, tfsoff); - - retmask |= 1; - break; - } - case TGT_ARRAY: - /* conformant arrays and strings are handled specially */ - if (!is_conformant_array(type) || type_array_is_decl_as_ptr(type) ) - { - write_array_tfs(file, attrs, type, name, tfsoff); - if (is_conformant_array(type)) - retmask |= 1; - } - break; - case TGT_STRUCT: - if (!processed(type)) - write_struct_tfs(file, type, name, tfsoff); - break; - case TGT_UNION: - if (!processed(type)) - write_union_tfs(file, type, tfsoff); - break; - case TGT_ENUM: - case TGT_BASIC: - /* nothing to do */ - break; - case TGT_RANGE: - { - expr_list_t *range_list = get_attrp(attrs, ATTR_RANGE); - if (!range_list) - range_list = get_aliaschain_attrp(type, ATTR_RANGE); - write_range_tfs(file, attrs, type, range_list, tfsoff); - break; - } - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - case TGT_INVALID: - error("invalid type %s for var %s\n", type->name, name); - break; - } - - return retmask; + return write_type_tfs(file, 2, attrs, type, name, write_ptr ? TYPE_CONTEXT_CONTAINER : TYPE_CONTEXT_CONTAINER_NO_POINTERS, tfsoff); } static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts, @@ -2954,13 +2907,12 @@ static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts, if (!is_void(type_function_get_rettype(func->type))) { - var_t v = *func; - v.type = type_function_get_rettype(func->type); update_tfsoff(type_function_get_rettype(func->type), - write_typeformatstring_var( - file, 2, NULL, + write_type_tfs( + file, 2, func->attrs, type_function_get_rettype(func->type), - &v, FALSE, typeformat_offset), + func->name, TYPE_CONTEXT_PARAM, + typeformat_offset), file); } @@ -2969,9 +2921,10 @@ static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts, LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) update_tfsoff( var->type, - write_typeformatstring_var( - file, 2, func, var->type, var, - TRUE, typeformat_offset), + write_type_tfs( + file, 2, var->attrs, var->type, var->name, + TYPE_CONTEXT_TOPLEVELPARAM, + typeformat_offset), file); } } @@ -3371,15 +3324,10 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char /* get fundamental type for the argument */ for (;;) { - if (is_attr(type->attrs, ATTR_WIREMARSHAL)) - break; - else if (is_attr(type->attrs, ATTR_CONTEXTHANDLE)) - break; - else if (type_is_alias(type)) - type = type_alias_get_aliasee(type); - else if (is_array(type)) + switch (typegen_detect_type(type, var->attrs, TDT_IGNORE_STRINGS|TDT_IGNORE_RANGES)) { - if (is_conformance_needed_for_phase(phase) && is_array(type)) + case TGT_ARRAY: + if (is_conformance_needed_for_phase(phase)) { if (type_array_has_conformance(type)) { @@ -3396,18 +3344,16 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char } } break; - } - else if (type_get_type(type) == TYPE_UNION) - { - if (is_conformance_needed_for_phase(phase)) + case TGT_UNION: + if (type_get_type(type) == TYPE_UNION && + is_conformance_needed_for_phase(phase)) { print_file(file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR)"); write_expr(file, get_attrp(var->attrs, ATTR_SWITCHIS), 1, 1, NULL, NULL, local_var_prefix); fprintf(file, ";\n\n"); } break; - } - else if (type_get_type(type) == TYPE_INTERFACE || is_void(type)) + case TGT_IFACE_POINTER: { expr_t *iid; @@ -3419,10 +3365,21 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char } break; } - else if (is_ptr(type)) + case TGT_POINTER: type = type_pointer_get_ref(type); - else + continue; + case TGT_INVALID: + case TGT_USER_TYPE: + case TGT_CTXT_HANDLE: + case TGT_CTXT_HANDLE_POINTER: + case TGT_STRING: + case TGT_BASIC: + case TGT_ENUM: + case TGT_STRUCT: + case TGT_RANGE: break; + } + break; } } @@ -3547,7 +3504,7 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const case TGT_ARRAY: { unsigned char tc = get_array_fc(type); - const char *array_type = "FixedArray"; + const char *array_type = NULL; /* We already have the size_is expression since it's at the top level, but do checks for multidimensional conformant @@ -3556,19 +3513,25 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const the return value. */ get_size_is_expr(type, var->name); - if (tc == RPC_FC_SMVARRAY || tc == RPC_FC_LGVARRAY) + switch (tc) { + case RPC_FC_SMFARRAY: + case RPC_FC_LGFARRAY: + array_type = "FixedArray"; + break; + case RPC_FC_SMVARRAY: + case RPC_FC_LGVARRAY: array_type = "VaryingArray"; - } - else if (tc == RPC_FC_CARRAY) - { + break; + case RPC_FC_CARRAY: array_type = "ConformantArray"; - } - else if (tc == RPC_FC_CVARRAY || tc == RPC_FC_BOGUS_ARRAY) - { - array_type = (tc == RPC_FC_BOGUS_ARRAY - ? "ComplexArray" - : "ConformantVaryingArray"); + break; + case RPC_FC_CVARRAY: + array_type = "ConformantVaryingArray"; + break; + case RPC_FC_BOGUS_ARRAY: + array_type = "ComplexArray"; + break; } if (pointer_type != RPC_FC_RP) array_type = "Pointer"; @@ -4011,8 +3974,11 @@ int write_expr_eval_routines(FILE *file, const char *iface) print_file(file, 0, "static void __RPC_USER %s_%sExprEval_%04u(PMIDL_STUB_MESSAGE pStubMsg)\n", iface, name, callback_offset); print_file(file, 0, "{\n"); - print_file (file, 1, "%s *%s = (%s *)(pStubMsg->StackTop - %u);\n", - name, var_name, name, eval->baseoff); + print_file(file, 1, "%s", ""); + write_type_left(file, (type_t *)eval->structure, TRUE); + fprintf(file, " *%s = (", var_name); + write_type_left(file, (type_t *)eval->structure, TRUE); + fprintf(file, " *)(pStubMsg->StackTop - %u);\n", eval->baseoff); print_file(file, 1, "pStubMsg->Offset = 0;\n"); /* FIXME */ print_file(file, 1, "pStubMsg->MaxCount = (ULONG_PTR)"); write_expr(file, eval->expr, 1, 1, var_name_expr, eval->structure, ""); diff --git a/tools/widl/typegen.h b/tools/widl/typegen.h index 2b2e65dacfc..242b40d4e43 100644 --- a/tools/widl/typegen.h +++ b/tools/widl/typegen.h @@ -84,8 +84,6 @@ unsigned int type_memsize(const type_t *t, unsigned int *align); int decl_indirect(const type_t *t); void write_parameters_init(FILE *file, int indent, const var_t *func, const char *local_var_prefix); void print(FILE *file, int indent, const char *format, va_list ap); -int get_padding(const var_list_t *fields); -int is_user_type(const type_t *t); expr_t *get_size_is_expr(const type_t *t, const char *name); int is_full_pointer_function(const var_t *func); void write_full_pointer_init(FILE *file, int indent, const var_t *func, int is_server); diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index a44e02aab7f..18f601c2e2c 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -35,15 +35,10 @@ typedef GUID UUID; #define TRUE 1 #define FALSE 0 -#define RPC_FC_MODULE 0xfc -#define RPC_FC_COCLASS 0xfd -#define RPC_FC_FUNCTION 0xfe - typedef struct _loc_info_t loc_info_t; typedef struct _attr_t attr_t; typedef struct _expr_t expr_t; typedef struct _type_t type_t; -typedef struct _typeref_t typeref_t; typedef struct _var_t var_t; typedef struct _declarator_t declarator_t; typedef struct _func_t func_t; @@ -520,8 +515,6 @@ int is_ptr(const type_t *t); int is_array(const type_t *t); int is_var_ptr(const var_t *v); int cant_be_null(const var_t *v); -int is_struct(unsigned char tc); -int is_union(unsigned char tc); #define tsENUM 1 #define tsSTRUCT 2 diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 1dc6632c7c4..7476df7dbd2 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -111,6 +111,11 @@ AddService=MountMgr,0x800,MountMgrService AddService=Spooler,0,SpoolerService AddService=TermService,0,TerminalServices +[DefaultInstall.ntamd64.Services] +AddService=MountMgr,0x800,MountMgrService +AddService=Spooler,0,SpoolerService +AddService=TermService,0,TerminalServices + [Strings] MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions" Mci32Str="Software\Microsoft\Windows NT\CurrentVersion\MCI32" @@ -423,6 +428,7 @@ HKLM,%CurrentVersion%\PreviewHandlers,,16 HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r" HKLM,%CurrentVersion%\Setup,"BootDir",,"%30%" HKLM,%CurrentVersion%\Setup,"SharedDir",,"%25%" +HKLM,%CurrentVersion%\Shell Extensions\Approved,,16 HKLM,%CurrentVersion%\Uninstall,,16 HKLM,%CurrentVersionNT%,"RegisteredOrganization",2,"" HKLM,%CurrentVersionNT%,"RegisteredOwner",2,"" @@ -615,6 +621,7 @@ HKLM,Software\Microsoft\TermServLicensing,,16 HKLM,Software\Microsoft\Transaction Server,,16 HKLM,Software\Policies,,16 HKLM,Software\Registered Applications,,16 +HKLM,System\CurrentControlSet\Control\Lsa,,16 HKLM,System\CurrentControlSet\Control\VMM32Files,,16 HKCU,AppEvents\Schemes\Apps\Explorer\Navigating\.Current,,,"" HKCU,Software\Microsoft\Protected Storage System Provider,,16 diff --git a/tools/winebuild/Makefile.in b/tools/winebuild/Makefile.in index c4ae029efe8..7270508e9b0 100644 --- a/tools/winebuild/Makefile.in +++ b/tools/winebuild/Makefile.in @@ -35,5 +35,3 @@ install install-dev:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/winebuild$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/winebuild.$(prog_manext) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/winedump/Makefile.in b/tools/winedump/Makefile.in index bee2fcc175b..fb705faa04e 100644 --- a/tools/winedump/Makefile.in +++ b/tools/winedump/Makefile.in @@ -46,5 +46,3 @@ install install-dev:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/function_grep.pl $(DESTDIR)$(bindir)/winedump$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/winedump.$(prog_manext) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/winegcc/Makefile.in b/tools/winegcc/Makefile.in index 366c6bc459b..986d17bcb60 100644 --- a/tools/winegcc/Makefile.in +++ b/tools/winegcc/Makefile.in @@ -49,5 +49,3 @@ install install-dev:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/winegcc$(EXEEXT) $(DESTDIR)$(bindir)/wineg++$(EXEEXT) $(DESTDIR)$(bindir)/winecpp$(EXEEXT) \ $(DESTDIR)$(mandir)/man$(prog_manext)/winegcc.$(prog_manext) $(DESTDIR)$(mandir)/man$(prog_manext)/wineg++.$(prog_manext) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 852f1052140..396bcc80a9e 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -704,7 +704,6 @@ static void build(struct options* opts) { strarray_addall(link_args, get_translator(opts)); strarray_add(link_args, opts->gui_app ? "-mwindows" : "-mconsole"); - if (opts->use_msvcrt) strarray_add(link_args, "-mno-cygwin"); if (opts->nodefaultlibs) strarray_add(link_args, "-nodefaultlibs"); } @@ -777,6 +776,7 @@ static void build(struct options* opts) break; } } + if (!opts->shared && (opts->use_msvcrt || opts->unicode_app)) strarray_add(link_args, "-lmsvcrt"); if (res_o_name) compile_resources_to_object( opts, resources, res_o_name ); diff --git a/tools/wmc/Makefile.in b/tools/wmc/Makefile.in index 05f7e90fab2..add09e158ee 100644 --- a/tools/wmc/Makefile.in +++ b/tools/wmc/Makefile.in @@ -36,7 +36,3 @@ install install-dev:: wmc-installed $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/wmc$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/wmc.$(prog_manext) - -mcy.tab.c: mcy.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/tools/wrc/Makefile.in b/tools/wrc/Makefile.in index 3aa86470f93..77eeecb06fd 100644 --- a/tools/wrc/Makefile.in +++ b/tools/wrc/Makefile.in @@ -41,7 +41,3 @@ install install-dev:: wrc-installed $(MANPAGES) $(INSTALLDIRS) uninstall:: $(RM) $(DESTDIR)$(bindir)/wrc$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/wrc.$(prog_manext) - -parser.tab.c: parser.tab.h # for parallel makes - -@DEPENDENCIES@ # everything below this line is overwritten by make depend -- 2.11.4.GIT