I have a shell extension dll (using ATL) which implements a IContextMenu,
IshellExtInit.
Now I want to monitor a folder using FindFirstChangeNotification.
so I have created a thread in DllMain() that does it.
But the thread seems to exit very quickly.
This is my observation, when I do regsvr32 simpleExt.dll it displays a
dialog "DllRegisterServer succedded" so till this dialog is opened the thread
works fine(reports changes in the folder) but as i click ok the the thread
doesnt seem to work anymore however the context menu item is still present
and works well.
please help me.
Thank you.
Because the regsvr32 process has closed - and so has your thread.
>however the context menu item is still present
>and works well.
In that case your DLL is presumably loaded inside the Explorer
process, so it ought to be working.
I think you need to debug it to find what's happening in more detail.
Dave