MobileDeveloper.ListOfAKUs
(1)
Windows Mobile 5.0
(1)
WinCE
(1)
Windows Embedded
(1)
GetOpenFileNameEx
(1)
GetOpenFileName
(1)
Report
(1)
LpstrInitialDir
(1)

GetOpenFileName bug on WM 6.1 Standard (Smartphone)

Asked By The PocketTV Team
17-Apr-08 09:43 PM
it's a good thing that now GetOpenFileName works on Smartphones (it was
completely broken on Smartphone until WM 6.1).

however there is an ennoying bug: when lpstrInitialDir is specified in the
OPENFILENAME structure, GetOpenFileName should open the specified folder.

on WM 6.1 Smartphones, it seems to open always the "\My Documents" folder,
even when lpstrInitialDir is set to "\Storage Card", for example.

this is particularly ennoying when the files to open are located on a
Storage Card.  it requires navication by the user, i.e. Menu, select

Microsoft people (or MVP), please log a bug report on this. we hope this one
will be fixed so that the Smartphone version works as well as the Pocket PC
(WM Professional) version.

thanks!

GetOpenFileName bug on WM 6.1 Standard (Smartphone)

Asked By Fabien
21-Apr-08 09:45 PM
Hi,

It is not a bug, chack out this for a workaround :
http://tillanosoft.com/ce/tgfsdk.html

BR

Fabien Decret (Device Application Development MVP)
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/





ne
C

I believe that is for backwards compatibility (this is how GetOpenFileName

Asked By Peter Foot
21-Apr-08 06:37 AM
I believe that is for backwards compatibility (this is how GetOpenFileName
works on Pocket PC/Professional edition). If you use GetOpenFileNameEx
directly you can specify an initial directory.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

what do you mean, Peter?

Asked By The PocketTV Team
21-Apr-08 11:29 PM
what do you mean, Peter?

on Pocket PC/Professional edition, GetOpenFileName will take the initial
directory into account.


but does it take it into account? because with GetOpenFileName, we can also
specify an initial directory, and we do that, but it ignores it!

i didn't know that GetOpenFileNameEx had a different behavior, we'll look
into it.  but since lpstrInitialDir can be passed to GetOpenFileName, it
would seem logical that it takes it into account, just like it does on
Pocket PC/Professional edition. ideally, also, the file name specified
should be selected if it exists in the folder specified, must that's
probably asking for too much :)

backwards compatibility of GetOpenFileName on Smartphone makes little sense,
since GetOpenFileName was seriously broken (causing application to freeze or
crash) on Smartphones prior to Windows Mobile 6.1. we tried to use it on WM5
and WM6 Smartphones, since we need it, but it was not working, so we had to
use the tGetFile replacement dll instead.

--
thanks, we have known about this "workaround" for 5 years.
Asked By The PocketTV Team
21-Apr-08 11:32 PM
thanks, we have known about this "workaround" for 5 years.

but it is a bug (or a bad feature, if you prefer). GetOpenFileName is
supposed to be now fixed on WM6.1 Smartphones and work just the same as on
Pocket PC.

the problem using tGetFile is that you need to localize it for all the
languages that your application support. GetOpenFileName is of course
already localized by Microsoft.

that's why we prefer using the standard library GetOpenFileName.

--

Hi,

It is not a bug, chack out this for a workaround :
http://tillanosoft.com/ce/tgfsdk.html

BR

Fabien Decret (Device Application Development MVP)
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/
GetOpenFileName on Pocket PC/Professional does not fully support
Asked By Peter Foot
22-Apr-08 04:45 AM
GetOpenFileName on Pocket PC/Professional does not fully support
InitialDirectory. It does not accept paths outside of My Documents, and you
can only specify subfolders of My Documents (or I believe first level
folders of a storage card) for example "My Pictures" rather than "\\My
Documents\\My Pictures".

GetOpenFileNameEx on both Smartphone/Standard and Pocket PC/Professional
fully supports any path for the initial directory.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility
GetOpenFileName bug on WM 6.1 Standard (Smartphone)
Asked By The PocketTV Team
23-Apr-08 04:42 AM
well, yes, it accepts only folders that can be browsed with the
GetOpenFileName dialog, i.e. My Documents or first level of storage card.
and in that case, it does open the right folder upon dialog start-up.

i was just expecting the Smartphone version to do the same :)


ok, good to know, thanks for the explanation and clarification!

do you know in what version of Windows Mobile this GetOpenFileNameEx
appeared, and more importantly, in what version of Windows Mobile Standard
this GetOpenFileNameEx works?

i.e. we know that GetOpenFileName is completely broken on Windows Mobile
Standard before 6.1, but is it the same for GetOpenFileNameEx?

-tristan
GetOpenFileNameEx is implemented in all editions of Windows Mobile 5.
Asked By Peter Foot
23-Apr-08 11:30 AM
GetOpenFileNameEx is implemented in all editions of Windows Mobile 5.0 and
upwards. Prior to 5.0 AKU 2.0 though the details view does not correctly
size the columns and so it is essentially unusable.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility
GetOpenFileName bug on WM 6.1 Standard (Smartphone)
Asked By Rick C
23-Apr-08 04:57 PM
http://msdn2.microsoft.com/en-us/library/ms854142.aspx says
GetOpenFileNameEx is supported as of WinMo 5 for both PPC and Smartphone.
thanks!
Asked By The PocketTV Team
23-Apr-08 10:28 PM
thanks!

by any chance, does anyone know the WinCE version and build number that
corresponds to 5.0 AKU 2.0?

-t
GetOpenFileName bug on WM 6.1 Standard (Smartphone)
Asked By Christopher Fairbairn
24-Apr-08 08:02 AM
Hi,


You can find a list of AKUs and related build numbers on the Channel 9
Windows Mobile Developer wiki at
http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.ListOfAKUs

Hope this helps,
Christopher Fairbairn
oh, very useful, thanks!
Asked By The PocketTV Team
29-Apr-08 06:29 AM
oh, very useful, thanks!
Post Question To EggHeadCafe