DiCreateDeviceInfo
RETERR DiCreateDeviceInfo(LPLPDEVICE_INFO lplpdi, LPCSTR lpszDescription, DWORD dnDevnode, HKEY hkey, LPCSTR lpszRegsubkey, LPCSTR lpszClassName, HWND hwndParent)
 
Creates a DEVICE_INFO struct and initializes it with specified information. 
	- Returns OK if successful, otherwise an ERR_DI_xxx error code will be returned. 
- lplpdi 
- Pointer to a pointer to a DEVICE_INFO struct. This pointer receives the pointer to the allocated DEVICE_INFO struct created by this function. 
- lpszDescription 
- If non-null, the description of the device. 
- dnDevnode 
- If non-zero, the the value of the devnode of the device. 
- hkey 
- The registry HKEY which the lpszRegsubkey is located in. This is usually HKEY_LOCAL_MACHINE. 
- lpszRegsubkey 
- If non-null, the registry subkey string where the hardware information of the device is stored. This subkey is relative to the hkey described previously. 
- lpszClassName 
- If non-null, the class name of the device. 
- hwndParent 
- If non-null, the window handle of the top level window use for any U/I related to installing the device. 
The DEVICE_INFO struct is allocated zero-init in SETUPX's private heap, and so must be destroyed using DiDestroyDeviceInfoList 
See also DiDestroyDeviceInfoList