Screensaver Issues - Kernel32.DLL Error
My Screensaver can be installed (by Install option when right-clicked on the file with Explorer) and run correctly for the first time while being in Display Properties Window. I can run it here (Dialog and Preview working) as many times as I want. But when I click Apply and return back to Display Properties, it crashes under WinME with Kernel32.DLL error. It doesn`t even start my application because very first line of WinMain is creation of LOG.TXT and it if would crash inside my application, the error message would state that it`s inside. Just to be sure, I put try-catch handler into WinMain but it doesn`t even get to WinMain.
What`s even more weird is, that the screensaver runs itself after specified time (alwyas in XP, less often in WinME where it crashes).
However, WinXP doesn`t show this Kernel32.DLL error when being for second time in Display Properties. It just does nothing (but at leat it won`t craash under XP).
Any ideas ?
VladR
www.avenger.sk
could be a problem with the path the screensaver is located. If you right click and select install, windows will use the *.scr file from where you 'installed' it. Maybe you got something in the pathname that windows doesnt like. Other than that i cant think of anything that could stop your screensaver from running... or it is a problem with your logging code? try to disable it...
T2k
T2k
Well, I install it after copying into Windows\System folder, so it`s all there. Logging surely can`t create crashes itself. I really don`t know.
Quote:Original post by Anonymous Poster
Screensavers don't use WinMain(). They use ScreenSaverProc().
They use exported ScreenSaverProc only when you use the "scrnsave.lib" as a basis for your screensaver.
Since I don`t use "scrnsave.lib", my code (after constructors of all classes that work OK) starts with WinMain. It just doesn`t get there at all (because first line creates LOG.TXT).
Still thanks for the idea though.
Any other ideas ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement