123
Senior Member
I'm started writing a native Premise driver for the USB-UIRT and I've made a tiny bit of progress. Please let me know if you use Premise and own a USB-UIRT ... I may call upon you to test the driver.
I've never written a native driver. My less than stellar knowledge of C++ in the context of the Win32PI and ATL COM isn't making it a slam dunk. However, the SDK's documentation, and six-step tutorial for building a driver, have helped me get to the stage where I can detect the presence of the UIRT via its DLL, reads the firmware version, and transmit an IR code.
If you're a C++/Win32API/ATL COM guru:
At the moment, I'm stuck on the UIRT'S callback function.
Whenever the UIRT receives an IR transmission, it invokes its IR Received callback function and it's my driver's responsibility to handle it. I followed the convention used in the UIRT's C++ example but it doesn't work in the driver.
I'm guessing that there may be another way to declare callbacks for ATL (the supplied example shows how to do it for a simple Windows console app) or, and this a wild guess, I'm passing the function's parameters in the wrong order. The UIRT's callback uses the Pascal convention and, even though all the UIRT's functions are explicitly declared that way, it could be that I need to do something else ... something I know nothing about. I got this idea after reading about C++ function pointers and noticed that the UIRT's functions are declared Pascal format.
PS
I'm asking this technical question here because the UIRT's support forum is full of questions and few answers ... similar experience with the support email address.
I've never written a native driver. My less than stellar knowledge of C++ in the context of the Win32PI and ATL COM isn't making it a slam dunk. However, the SDK's documentation, and six-step tutorial for building a driver, have helped me get to the stage where I can detect the presence of the UIRT via its DLL, reads the firmware version, and transmit an IR code.
If you're a C++/Win32API/ATL COM guru:
At the moment, I'm stuck on the UIRT'S callback function.
Whenever the UIRT receives an IR transmission, it invokes its IR Received callback function and it's my driver's responsibility to handle it. I followed the convention used in the UIRT's C++ example but it doesn't work in the driver.
I'm guessing that there may be another way to declare callbacks for ATL (the supplied example shows how to do it for a simple Windows console app) or, and this a wild guess, I'm passing the function's parameters in the wrong order. The UIRT's callback uses the Pascal convention and, even though all the UIRT's functions are explicitly declared that way, it could be that I need to do something else ... something I know nothing about. I got this idea after reading about C++ function pointers and noticed that the UIRT's functions are declared Pascal format.
PS
I'm asking this technical question here because the UIRT's support forum is full of questions and few answers ... similar experience with the support email address.