📄 anir.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>AnirOCX v1.0.1</title>
</head>
<body bgcolor="#FFFFFF">
<p align="left"><font face="Arial"><img src="anir.gif" width="32" height="32"
alt="anir.gif (287 bytes)"><strong><font color="#000000" size="6">AnirOCX v1.0.1</font></strong></font></p>
<p><font color="#000000" size="3" face="Arial">Welcome to AnirOCX v1.0.1, An ActiveX
control which can be used to develop apps which use the <a href="http://www.animax.no">Animax</a>
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 <a href="http://www.animax.no">Animax</a>
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 <a href="http://www.animax.no">Animax</a>
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.</font></p>
<p><font face="Arial" size="3"><font color="#000000">The complete source code to the OCX is
included in AnirOCX. As part of the source code a reusable C++ class called </font>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.</font></p>
<p><font face="Arial" size="3">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>.</font></p>
<p> </p>
<p> </p>
<table border="0">
<tr>
<td><strong><font size="3" face="Arial">Contents</font></strong></td>
</tr>
<tr>
<td><a href="#History"><font face="Arial">History</font></a></td>
</tr>
<tr>
<td><a href="#Installation"><font face="Arial">Installation / Distribution</font></a></td>
</tr>
<tr>
<td><a href="#Usage"><font face="Arial">Usage</font></a></td>
</tr>
<tr>
<td><a href="#API"><font face="Arial">API</font></a></td>
</tr>
<tr>
<td><a href="#Shareware"><font face="Arial">Shareware Notice</font></a></td>
</tr>
<tr>
<td><a href="#Contact"><font face="Arial">Contacting the Author</font></a></td>
</tr>
</table>
<p> </p>
<p> </p>
<p><font face="Arial" size="3"><a name="History"></a><font color="#000000"><strong>HISTORY:</strong></font></font></p>
<p><strong><font color="#000000" size="3" face="Arial">V1.0 (19 March 1998)</font></strong>
<ul>
<li><font color="#000000" size="3" face="Arial">Initial public release.</font></li>
</ul>
<p> </p>
<p><strong><font color="#000000" size="3" face="Arial">V1.0.1 (24 March 1998)</font></strong>
<ul>
<li><font face="Arial" size="3">Now using PostMessage instead of SendMessage. This prevents
possible deadlock problems when calling the Stop method.</font></li>
<li><font face="Arial" size="3">Removed some incorrect comments from the code base</font></li>
<li><font face="Arial" size="3">Code now compiles cleanly when built for UNICODE</font></li>
<li><font face="Arial" size="3">Updated documentation to include info on registering ocx.</font></li>
</ul>
<p> </p>
<p> </p>
<p><font face="Arial" size="3"><a name="Installation"></a><font color="#000000"><strong>INSTALLATION
REQUIREMENTS / DISTRIBUTION:</strong></font></font>
<ul>
<li><font color="#000000" size="3" face="Arial">The product is for Win32 development only
and has been tested on Windows 95 (Original, OSR-1 & OSR-2), Windows 98 and Windows NT
4.</font></li>
<li><font color="#000000" size="3" face="Arial">The OCX has been developed using with MFC.
This means that you will need to distribute the MFC 4.2 dlls to your end users. If you do
not have these installed then go to the authors page at <a href="http://www.naughter.com">http://www.naughter.com</a>
for instructions on downloading.</font></li>
</ul>
<p> </p>
<p> </p>
<p><font face="Arial" size="3"><a name="Usage"></a><font color="#000000"><strong>USAGE:</strong></font></font>
<ul>
<li><font face="Arial" size="3">The OCX can be used in any environment which supports the
ActiveX technology. This includes VB 4 or later, VC 4.0 or later, all the MS Office
products, VBScript, JScript and Active Server Pages.</font></li>
<li><font face="Arial" size="3">You will need to register the Anir OCX before it can be used
by your development environment. Some development environments provide a register OCX
method inside their environment, alternatively you can use the SDK utility regsvr32.exe
which should have been provided with your development tools.</font></li>
<li><font color="#000000" size="3" face="Arial">A very simple VB 5 program called AnirTest
is included to show you how to use the OCX.</font></li>
<li><font color="#000000" size="3" face="Arial">The OCX itself has built in code to
support the remote control so you do not need the Animax drivers installed. This has the
added advantage that the OCX will work on NT aswell as 95.</font></li>
<li><font color="#000000" size="3" face="Arial">A compiled version of the ocx (Ascii
release) is included in the bin directory and is called anir.ocx. Upon registration this
is the file you are entitled to redistribute with your applications. </font></li>
<li><font color="#000000" size="3" face="Arial">If the test program
fails with a message box,
please make sure that no other programs have the comms port open.</font></li>
<li><font face="Arial" color="#000000" size="3">The remote control support in AnirOCX
requires a high spec machine to operate correctly. This is an unfortunate consequence of
the real-time nature of IR communications and the vagaries of multitasking operating
systems such as Windows NT and 95. A Pentium 150 is an absolute minimum and your mileage
may vary from machine to machine.</font></li>
</ul>
<p> </p>
<p> </p>
<p><font face="Arial" size="3"><a name="API"></a><font color="#000000"><strong>API:</strong></font></font></p>
<p><font face="Arial" color="#000000" size="3">The OCX provides a very simple API which
consists of 4 methods and 1 event. </font></p>
<p> </p>
<p><em><strong><font color="#000000" face="Arial" size="3">Methods</font></strong></em></p>
<p><strong><font face="Arial" color="#000000" size="3">BOOL GetIsStarted();</font></strong></p>
<p><font face="Arial" color="#000000" size="3">This returns TRUE if the remote control
is currently being monitored else FALSE is returned.</font></p>
<p> </p>
<p><strong><font face="Arial" color="#000000" size="3">short GetPort();</font></strong></p>
<p><font face="Arial" color="#000000" size="3">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.</font></p>
<p> </p>
<p><strong><font face="Arial" color="#000000" size="3">BOOL Start(short nPort);</font></strong></p>
<p><font face="Arial" color="#000000" size="3">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.</font></p>
<p> </p>
<p><strong><font face="Arial" color="#000000" size="3">BOOL Stop();</font></strong></p>
<p><font face="Arial" color="#000000" size="3">This stops monitoring of the remote
control device. Return value is TRUE if the monitoring was stopped successfully otherwise
FALSE is returned.</font></p>
<p> </p>
<p><strong><em><font color="#000000" face="Arial" size="3">Events</font></em></strong></p>
<p><strong><font face="Arial" size="3">void ProcessReceivedData(short nData, BOOL
bRepeat);</font></strong></p>
<p><font face="Arial" size="3">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.</font></p>
<p> </p>
<p> </p>
<p><font face="Arial" size="3"><a name="Shareware"></a><font color="#000000"><strong>SHAREWARE
NOTICE:</strong></font></font></p>
<p><font face="Arial" color="#000000" size="3">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:</font></p>
<address>
<font face="Arial" color="#000000" size="3">PJ Naughter,<br>
Cahore,<br>
Ballygarrett,<br>
Gorey,<br>
Co. Wexford.<br>
</font>
</address>
<p> </p>
<p><font face="Arial" size="3"><a name="Contact"></a><font color="#000000"><strong>CONTACTING
THE AUTHOR</strong></font></font></p>
<p><font face="Arial" color="#000000" size="3">PJ Naughter<br>
Email: <a href="mailto:pjna@naughter.com">pjna@naughter.com</a><br>
Web: <a href="http://www.naughter.com">http://www.naughter.com</a><br>
12th April 2000</font></p>
<p> </p>
<p><font face="Arial" size="3"><font color="#000000">P.S. Thanks go out to the tech support personnel and developers at <a href="http://www.animax.no">Animax</a>
and in particular </font>Torsten Erik
Gabrielsen without whom this product would not exist.</font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -