Last Comment Bug 668663 - OFNHookProc callback in the file picker code should return a UINT_PTR
: OFNHookProc callback in the file picker code should return a UINT_PTR
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla7
Assigned To: Makoto Kato [:m_kato]
: Jim Mathies [:jimm]
Depends on:
Blocks: 660833
  Show dependency treegraph
Reported: 2011-06-30 15:56 PDT by Jim Mathies [:jimm]
Modified: 2011-07-02 02:39 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix (920 bytes, patch)
2011-07-01 00:53 PDT, Makoto Kato [:m_kato]
neil: review+
Details | Diff | Splinter Review

Comment 1 Makoto Kato [:m_kato] 2011-07-01 00:52:15 PDT
Bug 660833 causes bustage on Win64

d:/mozilla-build/python/python2.6.exe -O e:/builds/moz2_slave/cen-w64-dbg/build/build/ cl -FonsFilePicker.obj -c -D_HAS_EXCEPTIONS=0 -I../../../dist/stl_wrappers  -D_IMPL_NS_WIDGET -DMOZ_UNICODE  -DMOZ_ENABLE_D3D9_LAYER -DMOZ_ENABLE_D3D10_LAYER -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"WINNT6.1\" -DOSARCH=WINNT -DEXCLUDE_SKIA_DEPENDENCIES -DCHROMIUM_MOZILLA_BUILD  -DUNICODE -D_UNICODE -DNOMINMAX -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DOS_WIN=1 -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN  -DCOMPILER_MSVC -I. -I/e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows/../xpwidgets -I/e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows -I/e/builds/moz2_slave/cen-w64-dbg/build/toolkit/xre -I/e/builds/moz2_slave/cen-w64-dbg/build/xpcom/base  -I/e/builds/moz2_slave/cen-w64-dbg/build/ipc/chromium/src -I/e/builds/moz2_slave/cen-w64-dbg/build/ipc/glue -I../../../ipc/ipdl/_ipdlheaders  -I/e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows -I. -I../../../dist/include -I../../../dist/include/nsprpub  -Ie:/builds/moz2_slave/cen-w64-dbg/build/obj-firefox/dist/include/nspr -Ie:/builds/moz2_slave/cen-w64-dbg/build/obj-firefox/dist/include/nss         -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4800 -we4553  -DDEBUG -D_DEBUG -DTRACING -Zi -Ie:/builds/moz2_slave/cen-w64-dbg/build/obj-firefox/dist/include/cairo -MDd           -FI ../../../dist/include/mozilla-config.h -DMOZILLA_CLIENT /e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows/nsFilePicker.cpp

e:/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows/nsFilePicker.cpp(311) : error C2440: '=' : cannot convert from 'unsigned int (__cdecl *)(HWND,UINT,WPARAM,LPARAM)' to 'LPOFNHOOKPROC'

        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Comment 2 Makoto Kato [:m_kato] 2011-07-01 00:53:43 PDT
Created attachment 543369 [details] [diff] [review]

fix for bustage on Win64
Comment 3 2011-07-01 02:02:24 PDT
Comment on attachment 543369 [details] [diff] [review]

>-static unsigned int CALLBACK FilePickerHook(HWND hwnd, UINT msg,
>+static UINT_PTR CALLBACK FilePickerHook(HWND hwnd, UINT msg,
>                                             WPARAM wParam, LPARAM lParam)
Nit: Ideally you would realign WPARAM with HWND again.
Comment 4 Makoto Kato [:m_kato] 2011-07-01 02:38:02 PDT
fix white space issue too.
Comment 5 Marco Bonardo [::mak] 2011-07-02 02:39:14 PDT

Note You need to log in before you can comment on or make changes to this bug.