Click here to get back home

CommDlgExtendedError defined in commdlg.h but missing from library

 HomeNewsGroups | Search

microsoft.public.smartphone.developer - Developing software for MS Smartphone? This is your group! 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
CommDlgExtendedError defined in commdlg.h but missing from library The PocketTV Team 12-14-2006
Posted by The PocketTV Team on December 14, 2006, 2:33 am
Please log in for more thread options
This is a bug report. MSFT, please take note of it.

CommDlgExtendedError is defined in commdlg.h but missing from WM5 libraries.

this is a problem since the return value of some UI dialogs, e.g.
GetOpenFileName, can only be interpreted correctly by calling
CommDlgExtendedError.

see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxfunctions/getopenfilename.asp

a zero value returned by GetOpenFileName can be an error case, or it can
just mean that the user selected no file in the dialog or hit "Cancel".

currently there is no good way to test the error case when GetOpenFileName
returns 0, since GetOpenFileName does not clear the "GetLastError" code in
the case of no-error. In other terms, when GetOpenFileName returns 0,
GetLastError can return a non-zero value (like 6 = invalid handle"), while
in fact no error occured.

a dirty work-around is to clear the GetLastError error-code immediateky
before calling GetOpenFileName, and hope it will be set to a non-zero value
by GetOpenFileName only if a real error occurs in GetOpenFileName.



Posted by The PocketTV Team on December 14, 2006, 2:41 am
Please log in for more thread options
show/hide quoted text

actually this does not even work: GetOpenFileName sets GetLastError to 6
(Invalid Handle) on a WM5 Smartphone (Samsung Blackjack) when the dialog is
cancelled using the BACK key.

so it looks like there is no way to correctly detect the error case...



Similar ThreadsPosted
BT Serial Port Option Missing under Configuration.....File also missing in Windows directory, any ideas anyone or can someone send me the files to copy in please.... June 29, 2006, 7:51 am
Missing CompleteAuthToken in WM 6.0 December 29, 2008, 12:28 pm
Smart Device Template Missing December 2, 2006, 7:06 am
How to use a library from desktop pc December 8, 2008, 11:28 am
how can i find what dll is missing, causing an app to fail starting ? February 2, 2007, 8:17 pm
Reference from mainproject to library August 26, 2006, 4:29 am
Is there any FTP, SMTP, NTP component/library for c++ February 9, 2009, 3:07 am
Contact.WebPage URI returning null when missing http:// February 15, 2006, 3:57 pm
Treo 700w - Missing Micosoft.WindowsMiobile.Utilities May 9, 2006, 10:44 am
PT-Dev Graphics/Sound library beta now available October 19, 2005, 2:30 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy