Terminate PROCESS of Explorer.exe !!


I want to apply restrictions without restarting Windows 95/98.
So the solution was to Kill the Explorer and restart it.

It works But there's a memory leak of 500 Ko each Time !!!!!!!!

How can I do this without memory leak ?

I program with Visual C++ 6 SP3

Thanks a lot for your answer
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try this:

PostThreadMessage(GetWindowThreadProcessID(FindWindow('Progman', 'Program Manager'), NULL), WM_QUIT, 0, 0);

Does it work better?

Regards, Madshi.
Why would you do this?  EXPLORER.EXE can be the user's shell.  Why would you want to cause your users to lose work and suffer in stability?

..B ekiM
Hi gulliver.

My light solution is a line of code
SendMessage( HWND_BROADCAST, WM_SETTINGCHANGE, 0, NULL ); //Usando PChar com a chave alterada o efeito +/-

T++, Radler.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Are those what you are looking for?

HOWTO: Restart the Windows Shell Programmatically

HOWTO: Programmatically Force Windows 95 and Windows 98 to Log Off
gulliverAuthor Commented:
Thanks a lot

You're the best Radler !!!!

What a relief!  I was afraid you'd be zapping application instances right out of under the fingertips of users!

..B ekiM
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.