?? devclass_5q99.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML DIR="LTR"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso8859-1">
</HEAD>
<TITLE>comm/datamodem</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="comm/datamodem">
<META NAME="MS-HAID" CONTENT="_tapi2_comm_datamodem">
</HEAD>
<BODY TOPMARGIN="0">
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<!--SYNC_START-->
<script language="JavaScript" src='/library/synch.js'></script>
<!--SYNC_END-->
<H1><A NAME="_tapi2_comm_datamodem"></A>comm/datamodem</H1>
<P>The comm/datamodem device class consists of datamodem devices. You access these devices by using the Win32 file and communications functions. Devices in this class are associated with line devices that support the LINEMEDIAMODE_DATAMODEM media type, which is specified in the <B>dwMediaModes</B> member of the <A HREF="struc2_67aq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_67aq.htm"><B>LINEDEVCAPS</B></A> structure for the line device. </P>
<P>The <A HREF="func1_2gf8.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2gf8.htm"><B>lineGetID</B></A> function fills a <A HREF="struc2_8vle.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_8vle.htm"><B>VARSTRING</B></A> structure, setting <B>dwStringFormat</B> to the STRINGFORMAT_BINARY value and appending these additional members: </P>
<PRE>HANDLE hComm; // Win32 file handle to data modem
CHAR szDeviceName[1]; // name of data modem
</PRE>
<P>The <B>hComm</B> member is the handle of the open communications port. This member is NULL if the port is not yet open or if the <I>dwSelect</I> parameter of <A HREF="func1_2gf8.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2gf8.htm"><B>lineGetID</B></A> is not the LINECALLSELECT_CALL value. If a call is active, the service provider typically opens the port itself to get direct control of the communications hardware, but is only required to return a valid handle if the line is <I>connected</I>. The service provider opens the port using the FILE_FLAG_OVERLAPPED value and then configures the port using the settings specified by the <A HREF="func2_0l5z.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_0l5z.htm"><B>lineSetDevConfig</B></A> function. You can set additional configuration options for the device by using Win32 functions with the returned handle. </P>
<P>The <B>szDeviceName</B> member is a null-terminated string that specifies the name of the communications port associated with the line, address, or call. </P>
<P>If <B>hComm</B> is a valid handle, you can use it in subsequent calls to Win32 file functions, such as <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/filesio_39id.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/filesio_39id.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/filesio_39id.htm"><B>ReadFile</B></A> and <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/filesio_3kkl.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/filesio_3kkl.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/filesio_3kkl.htm"><B>WriteFile</B></A>, to send and receive data on the call. When you are finished using the communications port and preferably before you use the <A HREF="func1_3wto.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_3wto.htm"><B>lineDeallocateCall</B></A> function to deallocate the call, you must close the port by using the <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/handobj_289x.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/handobj_289x.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/handobj_289x.htm"><B>CloseHandle</B></A> function. </P>
<P>When using the <A HREF="func1_078n.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_078n.htm"><B>lineGetDevConfig</B></A> and <A HREF="func2_0l5z.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_0l5z.htm"><B>lineSetDevConfig</B></A> functions, some service providers require that the configuration data for this device class have the following format: </P>
<PRE class=syntax>typedef struct tagDEVCFG {
DEVCFGHDR dfgHdr;
COMMCONFIG commconfig;
} DEVCFG, *PDEVCFG, FAR* LPDEVCFG;
// Device setting information
typedef struct tagDEVCFGDR {
DWORD dwSize;
DWORD dwVersion;
WORD fwOptions;
WORD wWaitBong;
} DEVCFGHDR;
</PRE>
<P>The following is device configuration information for use with the <A HREF="func1_078n.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_078n.htm"><B>lineGetDevConfig</B></A> and <A HREF="func2_0l5z.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_0l5z.htm"><B>lineSetDevConfig</B></A> functions.
<DL>
<DT><B>dwSize</B> </DT>
<DD>Sum of the size of the <B>DEVCFGHDR</B> structure and the actual size of the <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/commun_57qq.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/commun_57qq.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/commun_57qq.htm"><B>COMMCONFIG</B></A> structure. </DD>
<DT><B>dwVersion</B> </DT>
<DD>Version number of the Unimodem <B>DevConfig</B> structure. This member can be MDMCFG_VERSION (0x00010003). </DD>
<DT><B>fwOptions</B> </DT>
<DD>Option flags that appear on the Unimodem Option page. This member can be a combination of these values:
<DL>
<DT>TERMINAL_PRE (1) </DT>
<DD>Displays the pre-terminal screen. </DD>
<DT>TERMINAL_POST (2) </DT>
<DD>Displays the post-terminal screen. </DD>
<DT>MANUAL_DIAL (4) </DT>
<DD>Dials the phone manually, if capable of doing so. </DD>
<DT>LAUNCH_LIGHTS (8) </DT>
<DD>Displays the modem icon in the status area of the taskbar.
<P>Only the LAUNCH_LIGHTS value is set by default
</DD>
</DL>
</DD>
<DT><B>wWaitBong</B> </DT>
<DD>Number of seconds (in two seconds granularity) to replace the wait for credit tone ($). </DD>
<DT><B>Commconfig</B> </DT>
<DD><A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/commun_57qq.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/commun_57qq.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/commun_57qq.htm"><B>COMMCONFIG</B></A> structure that can be used with the Win32 communications and modem configuration functions.
</DD>
</DL>
<DIV CLASS="footer">Built on Monday, August 14, 2000</DIV>
<!--FOOTER_START-->
<DIV CLASS="footer" STYLE="color:#000000;font-size:90%;">
<A HREF="mailto:sdkfdbk@microsoft.com">Send feedback</A> to the Platform SDK.</P>
<P><A HREF="javascript:if(confirm('http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm'" tppabs="http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top">© 1999 Microsoft Corporation. All rights reserved. Terms of use.</A></P>
</DIV>
<!--FOOTER_END-->
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -