|
I have no idea how the code relates to the steps to
reproduce the crash.
I do see a potential problem with unicode builds though:
OpenFileName.nMaxFile = sizeof(szFile)-1;
should be
OpenFileName.nMaxFile = sizeof(szFile) / sizeof(TCHAR) - 1;
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Please see my post above too. This is a small part of it:
Note that my code is running perfectly in any folder and it fails ONLY
on the Desktop! I suspect that this is a bug of the shell, since there
is no obvious problem with my code.
I use MSVS 6 C++ and I have SP2 installed.
I do not use unicode libraries.
Thanks.
kostas KEL
|
|
|
|
|
If you wish you can download my app from here:
http://rapidshare.com/files/64329713/PlotLibDemo.rar.html[^]
I had no serious problems after the crash, but it's better to save
your work before you do the trick. There is a "open file" icon on
one of the windows you'll see.
Thanks.
kostas KEL
|
|
|
|
|
OK. Someone helped me out! This is the answer :
======================================================
The problem is that the shell is caching column handlers.
When the file dialog exits, it calls CoUninitialize, which
unloads all the handlers even if there are references
outstanding. The next time the file dialog is opened,
the shell tries to access a column handler that isn't
there any more. Boom! If you manage COM initialisation
yourself, you shouldn't run into this problem.
--
Jim Barry, MVP (Windows SDK)
=======================================================
BUT, why does this happen ONLY on the Desktop?
Normally the shell should do the same thing, no matter
which folder you are in, shouldn't it ?
=======================================================
It's because the desktop folder is cached.
Other folders will be released (thus releasing
their column handler caches) before the file
dialog exits, but the shell caches the desktop
folder and so it outlives the file dialog.
--
Jim Barry, MVP (Windows SDK)
kostas KEL
|
|
|
|
|
Hi, did any of you ever encountered with problem when trying to open a Clipboard for the second time?
It happens to me!
I select some text from Notepad (ctrl + c)and get text data from it, here all my actions with clipboard (1.OpenClipboard(), 2.GetClipboardData(CF_TEXT), 3. EmptyClipboard(), and 5. CloseClipboard() is successful). Than again I try the same thing but now my OpenClipboard() fails (I even try to hold for a while with Sleep() function)???
If anyone had similar experience please let me know!
P.S.
I solved this by commenting out EmptyClipboard() function!?
|
|
|
|
|
I think i have written my guestion hasty. My new application works normal in my laptop. And have installed here Visual Studio 2005. But when i'm copying this application to another one (computer)there appears this message "The Application has faild to start because the Application configuration is incorrect. Reinstalling the application may fix this problem."
and now i have find some info from code project. But i cann't do this. There must instal Windows installer 3.0 and ....
My guestion : How can i use my application in another computer. What am i install additionally ?
May be *.dll files, or *.msi files. ????????? Thanks !
-- modified at 13:10 Friday 19th October, 2007
|
|
|
|
|
so what?
what exactly do you want to ask here.
please delete the repeated post.
|
|
|
|
|
thanks my friends. I have found. And now application is working very good . Bye
- - - - - - - - - - - - - - - - - - - -- - -
I think i have written my guestion hasty. My new application works normal in my laptop. And have installed here Visual Studio 2005. But when i'm copying this application to another one (computer)there appears this message "The Application has faild to start because the Application configuration is incorrect. Reinstalling the application may fix this problem."
and now i have find some info from code project. But i cann't do this. There must instal Windows installer 3.0 and ....
My guestion : How can i use my application in another computer. What am i install additionally ?
May be *.dll files, or *.msi files. ????????? Thanks !
Avazov
|
|
|
|
|
;Pkindly observe,
now he has modified his post, and now, it seems something relevant.
i think, by the time you saw it, he has modified it.
thats why u mis took me.
|
|
|
|
|
Then I take back all I said!
And I'm apologizing if I offended you!
|
|
|
|
|
For both...
Original post is below... still repeated :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
|
thanks,
modify your post or better delete it.
lets have a good working atmosphere at code project .com.
|
|
|
|
|
It's so because on another's computer the workarounds of yours application is different then on yours PC.
When compiling, application is compiled with other files (like .dll's for example) and it can be linked with yours application as static or shared... What I'm trying to tell you is that yours application is missing some file on another's computer to work!
Try to find out which one, or post more details here!
|
|
|
|
|
First thing you have to do is distribute the release version of your program.
Then, with your application, you need to distribute vcredist_x86.exe and execute it on the target machine. This can be found here[^]. This will install the C run-time library and the MFC libraries.
If that still doesn't work, then your application depends on other dll's that are not found. Use dependency walker to check which dll's are required to be distributed with your app.
|
|
|
|
|
I have checked my program in a computer without visual studio, with debug version crashed because how missing dlls, but release worked good. But now, with your answer.
The question is... Should the release version of a normal MFC-Win32 program work in all computers (supposing no dll is used at all)? Or better include this vcredist_x86 in all applications?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Which Compiler are you using.. since in Visual Studio 2005, you required to deploy Manifest file needed to run VC++ application !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
VC++ 6.0
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek wrote: VC++ 6.0
In that case, things are even more simple: you just need to distribute your executable and the dll on which it depends. If you statically link to all the dlls, you can just distribute your exe.
|
|
|
|
|
Nelek wrote: The question is... Should the release version of a normal MFC-Win32 program work in all computers (supposing no dll is used at all)? Or better include this vcredist_x86 in all applications?
The debug version will never work, even if you run vcredist_x86.exe on the target computer (it only install the release versions of the libraries). Now, you could avoid to distribute this executable if you statically link to the C run-time library and to the MFC dll's (but I'm not 100% sure because I never tested it).
|
|
|
|
|
Cedric Moonen wrote: Now, you could avoid to distribute this executable if you statically link to the C run-time library and to the MFC dll's (but I'm not 100% sure because I never tested it).
I statically link all the time and you are correct - you do not need vcredist_x86.exe if you statically link.
Judy
|
|
|
|
|
Can you more explain some detaily of your program?
|
|
|
|
|
But a third party dll, all are things from MFC, list, objects, views... nothing really special
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
I want copy my new application to another computer. I have copied but there was an error when i'm clicking application. "the Application has faild to start because the Application configuration is incorrect. Reinstalling the application may fix this problem."
|
|
|
|
|
may be the program isn't compatible with the OS you are using. So i suggest to try to run the application with "run with compatibility with Win95,98,nt,..." may be it will work.
|
|
|
|