anir.gif (287 bytes)AnirOCX v1.0.1

Welcome to AnirOCX v1.0.1, An ActiveX control which can be used to develop apps which use the Animax Anir remote control unit. This hardware product is a hand help remote control unit which can be connected to your PC via a serial port. Please note that I am an independent software developer who is not in anyway connected to Animax who are the developers of the hardware. If you have any problems with the hardware as opposed to AnirOCX (or its usage) then please contact Animax and not me. I purchased one a number of months ago and was pleasantly surprised by how well it worked. Unfortunately it uses a VXD driver which means that it cannot be used on NT. This was one of the main reasons behind the development of AnirOCX. This OCX gives the developer the support to use the remote control with their apps in whatever way they want. For example if you were developing a presentation product you could use AnirOCX to provide hands free remote control of your product from across the hall. For the more ambitious you could develop an app which provides general remote support for the Windows shell.

The complete source code to the OCX is included in AnirOCX. As part of the source code a reusable C++ class called CAnirRemoteControl (anir32.cpp/h) is included which the MFC/C++ developers among you may prefer to use instead of the OCX model. Using this class directly instead of the OCX also means that you have the option of statically including both MFC and the remote control code rather than having to redistribute the anir.ocx plus its MFC support dlls.

For the hard core developers out there, the source code is also a good example of using overlapped IO, synchronisation techniques, mutithreading, low level serial comms, IR signal decoding and high precision timing techniques. And you get all of that in a 30k binary <g>.

 

 

Contents
History
Installation / Distribution
Usage
API
Shareware Notice
Contacting the Author

 

 

HISTORY:

V1.0 (19 March 1998)

 

V1.0.1 (24 March 1998)

 

 

INSTALLATION REQUIREMENTS / DISTRIBUTION:

 

 

USAGE:

 

 

API:

The OCX provides a very simple API which consists of 4 methods and 1 event.

 

Methods

BOOL GetIsStarted();

This returns TRUE if the remote control is currently being monitored else FALSE is returned.

 

short GetPort();

This returns the comms ports which the code is currently monitoring for the remote control signal. if the OCX is currently not monitoring a serial port, then 0 is returned.

 

BOOL Start(short nPort);

This starts the actual monitoring of the remote control device. nPort is the specified comms port to open. TRUE is returned if the call was successful otherwise FALSE is returned. The usual reason for the failure is if some other application already has the comms port open.

 

BOOL Stop();

This stops monitoring of the remote control device. Return value is TRUE if the monitoring was stopped successfully otherwise FALSE is returned.

 

Events

void ProcessReceivedData(short nData, BOOL bRepeat);

This function is called every time a remote control event (keypress) occurs. nData is the keycode which was pressed. To determine which key was pressed you can run the test VB program to determine which key corresponds to each code. Another point to bear in mind is a keydown event is a different code to a keyup event. A keydown event is an even number while the corresponding keyup event is the keyup event code + 1. The bRepeat is used by some keys to indicate the key was kept held  down. This feature is used by the channel up/down and volume up/down keys.

 

 

SHAREWARE NOTICE:

AnirOCX is shareware and this trial version is fully functional and does not include any NAG screens. This means that you are free to evaluate it for up to 30 days. After this period if you are still using AnirOCX and/or want to use it in a program of yours, then you must register AnirOCX with the author. The cost is $20 US dollars. Payment should be made by cheque and be made out to:

PJ Naughter,
Cahore,
Ballygarrett,
Gorey,
Co. Wexford.

 

CONTACTING THE AUTHOR

PJ Naughter
Email: pjn@indigo..ie
Web: http://indigo.ie/~pjn
24th March 1998

 

P.S. Thanks go out to the tech support personnel and developers at Animax and in particular Torsten Erik Gabrielsen without whom this product would not exist.