From: Xiaofan C. <xia...@gm...> - 2021-09-15 01:55:34
|
I believe this is not possible based on the current codes. What you can try is to create the first application as a Windows service, and then the second application uses that Windows service. Best regards, Xiaofan On Sun, Sep 12, 2021 at 8:43 PM G. Foersler <gfo...@gm...> wrote: > > Hello everyone, > > I am using LibUSB-Win32 in order to communicate with a USB device. At first, the device is searched for, then it is opened and some settings for the device are transferred using control messages. This is done using a small application written in c++, which is called from a main application (written in another language) via cmd.exe. > Another small application is used to transfer data over a bulk endpoint, which may be running in the background after it is started, and a third small application shall be used for further control messages if needed. > Is it possible to store the device handle obtained in the first application and share it with the other applications? Like having the first app give the handle to the calling main app, which then shares the handle with the other apps so they can access the USB device without having to search for and open the device by themselves every time they are called. > If this is possible, how can the handle be transferred or stored? > > Thanks! |