On windows, the device arrival is via the window message DBT_DEVICEARRIVAL.
The Rift Plugin already has a message handler which gets informed by the libOVR SDK.
I got a G940 & G27 to play around with. So I will try grabbing this and testing it on that later this week.
PS: Can you put your source code on GitHub? Would make it easy to contribute.