1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<TITLE>HIO2Open</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">HIO2Open</H1> 12<H2>C Specification</H2> 13<P><STRONG>Target:</STRONG></P> 14<DL> 15 <DD> 16<PRE><CODE>#include <revolution/hio2.h></CODE></PRE> 17 <DD> 18<PRE><CODE>HIO2Handle HIO2Open( HIO2DeviceType type, HIO2ReceiveCallback callback, 19HIO2DisconnectCallback disconnect );</CODE></PRE> 20</DL> 21<P><STRONG>Host:</STRONG></P> 22<DL> 23 <DD> 24<PRE><CODE>#include <revolution/hio2.h></CODE></PRE> 25 <DD> 26<PRE><CODE>HIO2Handle HIO2Open( HIO2DevicePath pathName, HIO2ReceiveCallback callback, 27HIO2NotifyCallback <EM>notify</EM>, void *<EM>param</EM> );</CODE></PRE> 28</DL> 29<H2>Arguments</H2> 30<P><STRONG>Target:</STRONG></P> 31<TABLE border="1" cellpadding="3" cellspacing="0.1"> 32 <TBODY> 33 <TR> 34<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>type</CODE></STRONG></EM> </TD> 35<TD width="520">EXI device type.</TD> 36 </TR> 37 <TR> 38<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>callback</CODE></STRONG></EM> </TD> 39<TD width="520">Callback function called when a send notification (mailbox write) from another connected partner is detected.</TD> 40 </TR> 41 <TR> 42<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>disconnect</CODE></STRONG></EM> </TD> 43<TD width="520">Callback function called when the device is disconnected.</TD> 44 </TR> 45 </TBODY> 46</TABLE> 47<P><STRONG>Host:</STRONG></P> 48<TABLE border="1" cellpadding="3" cellspacing="0.1"> 49 <TBODY> 50 <TR> 51<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>pathName</CODE></STRONG></EM> </TD> 52<TD width="520">Device path name.</TD> 53 </TR> 54 <TR> 55<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>callback</CODE></STRONG></EM> </TD> 56<TD width="520">Callback function called when a send notification (mailbox write) from another connected partner is detected.</TD> 57 </TR> 58 <TR> 59<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>notify</CODE></STRONG></EM> </TD> 60<TD width="520">Callback function that is called if the <CODE>HIO2Open</CODE> function is called for a device that another process is using.</TD> 61 </TR> 62 <TR> 63<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>param</CODE></STRONG></EM> </TD> 64<TD width="520">Parameter used with the callback function notify.</TD> 65 </TR> 66 </TBODY> 67</TABLE> 68<H2>Return Values</H2> 69<P>If handle retrieval fails, this function returns <CODE>HIO2_INVALID_HANDLE_VALUE</CODE>; if successful, another value is returned.</P> 70<H2>Description</H2> 71<P><STRONG>Target:</STRONG> The <CODE>HIO2Open</CODE> function opens the specified EXI device.</P> 72<P>If the callback function <EM><STRONG><CODE>callback</CODE></STRONG></EM> has been specified, this callback function is called when a send notification (mailbox write) from a connected partner is detected while the <CODE>HI02</CODE> function does internal processing. </P> 73<P>To detect that a device was disconnected, you must specify the callback function <EM><STRONG><CODE>disconnect</CODE></STRONG></EM>.</P> 74<P><STRONG>Host:</STRONG> The <CODE>HIO2Open</CODE> function opens the specified device path. 75<P>If the callback function <CODE><STRONG><EM>callback</CODE></STRONG></EM> has been specified, this callback function is called when a send notification (mailbox write) from a connected partner is detected while the <CODE>HI02</CODE> function does internal processing. 76<P>The following dialog box is displayed if another process is using the specified device path. 77<P><img src="HIO2OpenCaution.gif" border="0"></P> 78<P>PID represents the process ID and Module represents the process file name.</P> 79<P>If [Stop] is selected, the <CODE>HIO2Open</CODE> function results in an error; if [Retry] is selected, initialization is reattempted. 80<P>If [Retry] is selected after the corresponding process terminates, the <CODE>HIO2Open</CODE> function succeeds. 81<P>If [Ignore] is selected, the <CODE>HIO2Init</CODE> function sends a request to issue the <CODE>HIO2Exit</CODE> function to the corresponding process. (The library automatically receives the request internally and executes <CODE>HIO2Exit</CODE>.)�j 82<P>The callback function <EM><STRONG><CODE>notify</CODE></STRONG></EM> must be specified to detect that another process has called the<CODE>HIO2Open</CODE> function. 83<H2>See Also</H2> 84<P><CODE><A href="HIO2Init.html">HIO2Init</A></CODE><BR> <CODE><A href="HIO2EnumDevices.html">HIO2EnumDevices</A></CODE><BR> <CODE><A href="HIO2Handle.html">HIO2Handle</A></CODE><BR> <CODE><A href="HIO2Exit.html">HIO2Exit</A></CODE><BR> <CODE><A href="HIO2ReceiveCallback.html">HIO2ReceiveCallback</A></CODE><BR> <CODE><A href="HIO2DisconnectCallback.html">HIO2DisconnectCallback</A></CODE><BR> 85</P> 86<H2>Revision History</H2> 87<P>07/26/2006 Corrected mistake in the type of the function HIO2Open on the host side.</P> 88<P>05/29/2006 Added links to HIO2ReceiveCallback and HIO2DisconnectCallback</P> 89<P>03/01/2006 Initial version.</P> 90<hr> 91<P>CONFIDENTIAL</p> 92</BODY> 93</HTML>