I have designed a vc++ dll for a controller. I want to add usb plug and play feature inside the dll. I searched on line and came to know:

"If the project is an unmanaged C++ DLL project, then I can only create windows in an unmanaged way, i.e. the usual Win32 API way, such as adding a new dialog box as a resource, or simply using RegisterClassEx() and CreateWindowEx() to create the window yourself, then pump messages for those windows using GetMessage(), TranslateMessage() and DispatchMessage()."

I have no idea how to use this concept.

I have created a separate application (in delphi 2007) that load this Dll. But I want to add this Plug and Play feature inside me dll.

Kindly help me in this regard.