Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating thread in DllMain() in Shell extension dll.

9 views
Skip to first unread message

nexolite

unread,
Nov 21, 2009, 4:07:01 AM11/21/09
to
Hi,

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.

David Lowndes

unread,
Nov 21, 2009, 4:55:23 AM11/21/09
to
>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

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

0 new messages