Sending to specified IR blaster using OpenEx to get handle..

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Sending to specified IR blaster using OpenEx to get handle..

Postby avalanche333 » Fri Feb 15, 2008 2:01 pm

I have adding in the following:

http://65.36.202.170/phpBB2/viewtopic.p ... db47a17532

I obviously used the c++ code posted there.

I have renamed one of my IR blasted to USB-UIRT-2 and the other is the default USB-UIRT name. I can confirm this in device manager.

I am now using the OpenEx function to get a handle to a specified UIRT blaster then I transmitIR to it. Problem is that transmitIR is still sending out to all IR blasters, not just the specified one. Here is code, can anyone see what is wrong? Has anyone been able to use OpenEx succefully?

Thanks,

Code: Select all
JNIEXPORT jboolean JNICALL Java_com_tvworks_tools_PersonalKeyserver_IR_USBUIRTCommunicator_transmitIREx( JNIEnv *env, jobject obj, jstring irCode, jstring deviceName )
{
   jboolean      retVal= JNI_FALSE;
   if (hinstLib != NULL)
   {
      /* Convert to a usable C string */
      char *pIRCode = (char*) (*env).GetStringUTFChars( irCode, 0 );
      char *pDeviceName = (char*) (*env).GetStringUTFChars( deviceName, 0 );
      if( pIRCode != NULL ) {
         HUUHANDLE handle = fnUUIRTOpenEx(pDeviceName, 0, NULL, NULL);
         BOOL bTransmitOK = fn_UUIRTTransmitIR(handle, pIRCode, UUIRTDRV_IRFMT_PRONTO, 1, 0, NULL, NULL, NULL);
         if (bTransmitOK) {
            retVal = JNI_TRUE;                                                 
         }
         fnUUIRTClose(handle);
      }                                                                           

      /* Free as a bird.... */                                               
      (*env).ReleaseStringUTFChars( irCode, pIRCode );
      (*env).ReleaseStringUTFChars( deviceName, pDeviceName);
   }                                                                             
   return retVal;                                                               
}
[/code]
avalanche333
 
Posts: 8
Joined: Tue Feb 12, 2008 7:21 pm

Return to Developers

Who is online

Users browsing this forum: Google [Bot] and 14 guests

cron