Re: Notifications to a DLL

From: Maxim S. Shatskih (maxim_at_storagecraft.com)
Date: 07/20/04


Date: Tue, 20 Jul 2004 20:44:16 +0400


> I can see that there is an SDK Platform function RegisterDeviceNotification
> that allows user code to register for a callback to a window or service. But
> I don't have either in my dll.

Create a thread in your DLL, then create a window in it and spin the message
loop. The notifications will be called by this thread.

> Can I use the IoRegisterPlugPlayNotification function and locate the
> callback function be in my (user mode) dll?

You cannot use Ioxxx functions in the user mode DLL.

-- 
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Relevant Pages

  • Re: Threading problem with Garbage Collector
    ... It itself controls calls to a DLL ... "A"), it loads the DLL, which in turn then creates a window (it needs to, ... Disposemethod it uses the label window to synchronize the FreeLibrary ... delegate void DelegateKillDLL(); ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Simulating Control-Alt-Delete?
    ... Winlogon.exe window or not. ... all desktops and all top level windows. ... the WinLogon window didn't show. ... > Write this part of your test suite as a DLL, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Custom model in gtkada?
    ... GUI takes over the single thread of control, ... the _spec_ for a callback is located in the same ... The window object is not the state of the program. ... I think you mean the event queue was more visible in JEWL. ...
    (comp.lang.ada)
  • Re: VB6 runtime is supported on Windows 7
    ... The settings window was fairly extensive ... DLL and the settings are organized into a UDT rather ...
    (microsoft.public.vb.general.discussion)
  • Re: Newbie question on MESSAGE_MAP
    ... What mechanism prevents two DLLs from sending the same message, ... You can "register" a callback any way you want to. ... the window belongs to the process. ... Or is there a way that I can register for callbacks from dlls directly? ...
    (microsoft.public.vc.mfc)