LPARAM value of the usb device
-
I do know that there is a way to get the LPARAM value of the usb device when the WndProc detects the usb device change (arrival or removal). The question is... is there a way to get the LPARAM value of the device when you turn on the software (with the usb device already plugged in and powered up)?
-
I do know that there is a way to get the LPARAM value of the usb device when the WndProc detects the usb device change (arrival or removal). The question is... is there a way to get the LPARAM value of the device when you turn on the software (with the usb device already plugged in and powered up)?
-
LPARAM
is a C/C++ type defined & used by Windows for passing values with messages, it has nothing to do with USB devices. Also, does you question relate in any way to C#?Use the best guess
yes. I'm overriding WndProc method to catch unplugging & plugging of the usb device. However is that the LParam is acquired in this WndProc process. When the software launches, the LParam for each device isn't acquired. Also I was thinking of the other way around to get that is by restarting the usb devices at startup to trigger "unplugging" and acquire LParam. Unsure of the way to do this either.
-
yes. I'm overriding WndProc method to catch unplugging & plugging of the usb device. However is that the LParam is acquired in this WndProc process. When the software launches, the LParam for each device isn't acquired. Also I was thinking of the other way around to get that is by restarting the usb devices at startup to trigger "unplugging" and acquire LParam. Unsure of the way to do this either.
-
I do know that there is a way to get the LPARAM value of the usb device when the WndProc detects the usb device change (arrival or removal). The question is... is there a way to get the LPARAM value of the device when you turn on the software (with the usb device already plugged in and powered up)?
I assume your software is watching for WM_DEVICECHANGE messages where WParam is either DBT_DEVICEARRIVAL or DBT_DEVICEREMOVECOMPLETE. LParam will then point to a device dependent structure, related to DEV_BROADCAST_HDR, containing device information. Windows Management Instrumentation can probably provide similar information for connected devices but without knowing their type and the information you need it's impossible say more. Alan.