> I'm experiencing a very odd crash occuring deep within the
> SHELL32 code during a call to IContextMenu::GetCommandString.
> I'm calling it during handling of
> ICommDlgBrowser::OnStateChange for CDBOSC_SELCHANGE. The IContextMenu
> is for the Desktop folder with My Computer selected and the call is
> GetCommandString("delete", GCS_HELPTEXT, 0, szHelp, _countof(szHelp)).
> Tracing into the call shows that lstrcmpiW is called with ("Manage",
> "delete"); then ("find", "delete"); then ("Manage",
> 0xffffffff) [boom!].

If I'm reading the docs correctly, the first param must be a numerical menu
identifier, not a string.  Also, if you're building a Unicode build, you seem
to need to case szHelp (which should be whcar_t*) to LPSTR to make the code
compile.

Can you show a vaster call context?

-------------
Ehsan Akhgari

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

It is dreadful to die of thirst in the sea. Do you have to salt your truth so
much that it can no longer even - quench thirst?
-Beyond Good And Evil, F. W. Nietzsche





Reply via email to