bug in windows getsavefilename api? - Programmer

This is a discussion on bug in windows getsavefilename api? - Programmer ; hi,
when i try to compile the following code and execute the program as follows,
it crashes. i tried the mingw compiler as well as ms vs .net 2003. but first
the code:
#define STRICT
#include
int WINAPI WinMain(HINSTANCE hInstance, ...

1. create an arbitrary file (text or binary; content doesn't matter) and name
it 'name.dat'. two things are important here: give it the .dat extension and
save it on your desktop!

2. start the compiled program

3. now browse to your desktop when the first save file dialog appears

4. point your mousepointer over the created .dat file in the save file dialog,

so that it fades in an info box with information about type, last change and
size of that file.

5. now do what ever you want, to bring up the second dialog. at best click
cancel.

6. repeat step 3 and 4. when the info box is about to fade in again the
program crashes.

that's it. i know it sounds strange, but it crashes on my computer. i use
windows xp pro sp2. is there something wrong with my code? if it doesn't crash

on your computer, what os do you use?

thanks in advance
fred

Re: bug in windows getsavefilename api?

In article , Lucian Wischik wrote:
>RemoveThis_fredgillioz@web.de (Frederic Gillioz) wrote:
>>when i try to compile the following code and execute the program as follows,
>>it crashes. i tried the mingw compiler as well as ms vs .net 2003. but first
>>the code:
>
>Just to report, I too get a crash with vs.net 2005.
>"Unhandled exception at 0x7ca514ae in fnb.exe: 0xC0000005: Access
>violation reading location 0x00f24590."
>
>I think .dat files are registered with Windows Media Player. I wonder
>if, when you hover the cursor over, the shell asks the registered DLL
>to provide information that will go in the tooltip? so it might be a
>bug in wmp rather than the shell?
>

i tried the same thing for .raw or whatever you want and it's always the same.
but thanks for trying.

fred

Re: bug in windows getsavefilename api?

hello,
> Lucian Wischik schrieb:
> ...
> I think .dat files are registered with Windows Media Player. I wonder
> if, when you hover the cursor over, the shell asks the registered DLL
> to provide information that will go in the tooltip? so it might be a
> bug in wmp rather than the shell?
> ...

by now i thought it would only happen with PDFs, but
it seems mining the desktop 'works' with several filetypes
and a lot of applications, just try notepads file-dialog
or whatever you find...

fred, try to call either CoInitialize() or OleInitialize()
and their opponent-functions at start and end of your program
to avoid theAT desktop-tooltip-issue.

Re: bug in windows getsavefilename api?

In article <1130919409.908194.33820@g44g2000cwa.googlegroups.c om>, "Carsten Neubauer" wrote:
>hello,
>
>> Lucian Wischik schrieb:
>> ...
>> I think .dat files are registered with Windows Media Player. I wonder
>> if, when you hover the cursor over, the shell asks the registered DLL
>> to provide information that will go in the tooltip? so it might be a
>> bug in wmp rather than the shell?
>> ...
>
>by now i thought it would only happen with PDFs, but
>it seems mining the desktop 'works' with several filetypes
>and a lot of applications, just try notepads file-dialog
>or whatever you find...
>

yes, i tried it with notepad and it crashes too.
>
>fred, try to call either CoInitialize() or OleInitialize()
>and their opponent-functions at start and end of your program
>to avoid theAT desktop-tooltip-issue.
>