MMC Console Handle
Posted on 2004-04-05
I wrote a MMC Extentin snapin. It launches a worker thread which checks periodically the existance of a file. When the file is deleted some nodes from the result pane have to be removed.
So, I call SelectScopeItem(...) to set the focus to an item which will not be deleted and then I call DeleteItem(...) to remove the nodes.
This works fine under Win2K (MMC1.20) but not under XP (MMC2.0) where SelectScopeItem fails.
I assume, that the ConsoleHandle(IConsole) I use is not longer valid when using from a worker thread.
Has anyone experiences with such a constellation ??
How can console handles be used from a thread ?
How can Messages be posted into Notify() as if the user has selected "Delete" from the context menue.
Does anyone know how to disable the "New Window from here" feature for a Snapin ??
THANX a lot