ebac5fe596
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@45 119443c7-1b9e-41f8-b6fc-b9c35fce742c
55 lines
2.2 KiB
HTML
55 lines
2.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>EXPORT_SPEC int UpnpInit</TITLE>
|
|
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
|
|
<H2>EXPORT_SPEC int <A HREF="#DOC.DOCU">UpnpInit</A></H2><H2>( IN const char* HostIP,<BR> IN unsigned short DestPort )</H2><BLOCKQUOTE>Initializes the Linux SDK for UPnP Devices.</BLOCKQUOTE>
|
|
|
|
<A NAME="DOC.DOCU"></A>
|
|
<HR>
|
|
<H2>Documentation</H2>
|
|
<BLOCKQUOTE>Initializes the Linux SDK for UPnP Devices. This function must be called
|
|
before any other API function can be called. It should be called
|
|
only once. Subsequent calls to this API return a <TT>UPNP_E_INIT</TT>
|
|
error code.
|
|
|
|
<P>Optionally, the application can specify a host IP address (in the
|
|
case of a multi-homed configuration) and a port number to use for
|
|
all UPnP operations. Since a port number can be used only by one
|
|
process, multiple processes using the SDK must specify
|
|
different port numbers.
|
|
|
|
<P>If unspecified, the SDK will use the first adapter's IP address
|
|
and an arbitrary port.
|
|
|
|
<P>This call is synchronous.
|
|
|
|
<P></BLOCKQUOTE>
|
|
<DL><DT><DT><B>Parameters:</B><DD><B>HostIP</B> - The host IP address to use, in
|
|
string format, for example "192.168.0.1",
|
|
or <TT>NULL</TT> to use the first adapter's
|
|
IP address.
|
|
<BR><B>DestPort</B> - The destination port number to use. 0
|
|
will pick an arbitrary free port. <BR><DT><B>Returns:</B><DD> [int] An integer representing one of the following:
|
|
<UL>
|
|
<LI> <TT>UPNP_E_SUCCESS</TT>: The operation completed successfully.
|
|
<LI> <TT>UPNP_E_OUTOF_MEMORY</TT>: Insufficient resources exist
|
|
to initialize the SDK.
|
|
<LI> <TT>UPNP_E_INIT</TT>: The SDK is already initialized.
|
|
<LI> <TT>UPNP_E_INIT_FAILED</TT>: The SDK initialization
|
|
failed for an unknown reason.
|
|
<LI> <TT>UPNP_E_SOCKET_BIND</TT>: An error occurred binding a socket.
|
|
<LI> <TT>UPNP_E_LISTEN</TT>: An error occurred listening to a socket.
|
|
<LI> <TT>UPNP_E_OUTOF_SOCKET</TT>: An error ocurred creating a socket.
|
|
<LI> <TT>UPNP_E_INTERNAL_ERROR</TT>: An internal error ocurred.
|
|
</UL>
|
|
<BR><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I></P><HR>
|
|
<BR>
|
|
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
|
|
</BODY>
|
|
</HTML>
|