Dangerous Prototypes

Dangerous Prototypes => USB Infrared Toy => Topic started by: liyin on July 31, 2010, 06:00:52 am

Title: Running WinLIRC From Script Issue
Post by: liyin on July 31, 2010, 06:00:52 am
When WinLIRC is run from a script, it expects WinLIRC.ini & IRToy.dll in the same folder as the script (script's startup folder), instead of WinLIRC's folder. It doesn't matter what you set in WinLIRC.ini.

I copied the files to WinLIRC's folder and set the plugin's path in WinLIRC.ini, but it didn't work (Plugin & RemotePlugin). Only the RemoteConfig path seems to work.

Code: [Select]
[IRToyPlugin]
ComPort=6
[WinLIRC]
RemoteConfig=C:Program FilesWinLIRCRC5.txt          <=== This path works!
Plugin=IRToy.dll                                       <=== This path does nothing!
DisableKeyRepeats=0
DisableFirstKeyRepeats=0
Title: Re: Running WinLIRC From Script Issue
Post by: ian on July 31, 2010, 11:06:17 am
Dukey is the current active developer of the WinLIRC project, I'd recommend you PM him here:
http://dangerousprototypes.com/forum/in ... file;u=872 (http://dangerousprototypes.com/forum/index.php?action=profile;u=872)
Title: Re: Running WinLIRC From Script Issue
Post by: dukey on July 31, 2010, 11:36:16 am
When you say you are running things from a script, what kind of script ?
In WinLIRC i had to change the current directory to this
SetCurrentDirectory(_T(".\plugins\"));

So plugins think they are running from the plugins folder, instead of .exe folderplugins I had to make this change because some plugins are statically linked with other dll's. And because they are statically linked would mean they would either have to be copied to the system folder, or copied to the local directory of the program, which would have lead to a mess of files.

It's possible that the script, or whatever you are using somehow violate the programs current directory.
Title: Re: Running WinLIRC From Script Issue
Post by: liyin on August 01, 2010, 04:13:09 am
Solved the problem by specifying the application's folder, but could have also started WinLIRC independently.   :)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00892049112session_write_close ( )...(null):0
20.00922180688ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00922181464Database_MySQL->query( ).../DatabaseHandler.php:119
40.05462320184Database_MySQL->error( ).../Db-mysql.class.php:273