📄 c++ builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0045)http://www.17xie.com/read.php?bid=303&seq=101 -->
<HTML xmlns:st1 = "urn:schemas-microsoft-com:office:smarttags" xmlns:o =
"urn:schemas-microsoft-com:office:office"><HEAD><TITLE>C++ Builder 程序设计实用教程 - 9.3.2 进程应用方法 - 张晋 - 17xie</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK
href="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/17xie.css"
type=text/css rel=stylesheet><LINK
href="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/read.css"
type=text/css rel=stylesheet>
<SCRIPT src="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/core.js"
type=text/javascript></SCRIPT>
<SCRIPT src="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/iframe.js"
type=text/javascript></SCRIPT>
<SCRIPT src="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/dialog.js"
type=text/javascript></SCRIPT>
<SCRIPT src="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/ajax.js"
type=text/javascript></SCRIPT>
<SCRIPT src="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/cookie.js"
type=text/javascript></SCRIPT>
<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY>
<DIV id=m-body>
<DIV id=read-top>
<DIV style="FLOAT: left"><A href="http://www.17xie.com/" target=_blank><IMG
src="C++ Builder 程序设计实用教程 - 9_3_2 进程应用方法 - 张晋 - 17xie.files/booklogo.gif"></A></DIV>
<DIV id=read-menu><NOBR><A
onclick="APIframe.open('快速登录','/m/user/poplogin.php',400,160)"
href="javascript:void(0)">登录</A> <A
onclick="APIframe.open('17xie-快速注册','/m/user/reg.php',480,460)"
href="javascript:void(0)">注册</A> | <A href="http://www.17xie.com/"
target=_blank>首页</A> <A href="http://www.17xie.com/bbs/index.php?ishow=y"
target=_blank>论坛</A> <A href="http://www.17xie.com/user.php"
target=_blank>会员中心</A> <A href="http://www.17xie.com/help/"
target=_blank>帮助</A></NOBR></DIV></DIV>
<DIV id=read-title>
<DIV
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><A
href="http://www.17xie.com/" target=_blank>17xie</A> > <A
href="http://www.17xie.com/book.php?bid=303">C++ Builder 程序设计实用教程</A> > 9.3.2
进程应用方法</DIV>
<DIV
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: right; PADDING-BOTTOM: 0px; PADDING-TOP: 4px"><INPUT class=button-red8 onclick="window.location.href='/m/book/write.php?pid=13928'" type=button value=点击编辑本页></DIV></DIV>
<DIV id=read-mpage>
<DIV
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">背景:
<SPAN class=chcolor style="BACKGROUND-COLOR: #eeeeff"
onclick="chcolor('#eeeeff')"> </SPAN> <SPAN class=chcolor
style="BACKGROUND-COLOR: #ffeeee"
onclick="chcolor('#ffeeee')"> </SPAN> <SPAN class=chcolor
style="BACKGROUND-COLOR: #eeffee"
onclick="chcolor('#eeffee')"> </SPAN> <SPAN class=chcolor
style="BACKGROUND-COLOR: #ffffee"
onclick="chcolor('#ffffee')"> </SPAN> <SPAN class=chcolor
style="BACKGROUND-COLOR: #eeeeee"
onclick="chcolor('#eeeeee')"> </SPAN> <SPAN class=chcolor
style="BACKGROUND-COLOR: #ffffff"
onclick="chcolor('#ffffff')"> </SPAN> </DIV>
<DIV
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: right; PADDING-BOTTOM: 0px; PADDING-TOP: 3px">
<TABLE>
<TBODY>
<TR>
<TD><NOBR><SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=1'">|<</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=100'">上一页</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=98'">98</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=99'">99</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=100'">100</SPAN>
<SPAN class=page-here
onclick="window.location.href='/read.php?bid=303&seq=101'">101</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=102'">102</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=103'">103</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=104'">104</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=102'">下一页</SPAN>
<SPAN class=page-nor
onclick="window.location.href='/read.php?bid=303&seq=105'">>|</SPAN></NOBR>.</TD>
<TD><INPUT class=input-text
onkeydown='if(window.event.keyCode==13)window.location.href="/read.php?bid=303&seq="+this.value'
style="WIDTH: 25px"></TD>
<TD style="PADDING-TOP: 2px">[共105页]</TD></TR></TBODY></TABLE></DIV></DIV>
<DIV id=read-conts style="BACKGROUND-COLOR: #ffffff"><SPAN
style="FONT-SIZE: 12px">本页字数:2904 最后更新:<NOBR>5天以前</NOBR>
<NOBR>[12-08 09:47]</NOBR> 由 <A onclick='$showu(1271,"张晋")'
href="javascript:void(0)">张晋</A> 编辑 <A class=aline
style="COLOR: red" href="http://www.17xie.com/m/user/inviter_reg.php"
target=_blank>注册17xie 一起来写书 实现您的出书梦想!</A></SPAN>
<HR>
<CENTER>
<DIV style="WIDTH: 547px; TEXT-ALIGN: left">
<H3 style="MARGIN: 15pt 0cm 0pt"><A name=_Toc502915485></A><FONT size=3><FONT
face="Times New Roman"><st1:chsdate w:st="on" IsROCDate="False"
IsLunarDate="False" Day="30" Month="12" Year="1899"><SPAN
style="mso-bookmark: _Toc502915485"><SPAN
lang=EN-US>9.3.2</SPAN></SPAN></st1:chsdate><SPAN
style="mso-bookmark: _Toc502915485"><SPAN lang=EN-US> <SPAN
style="mso-spacerun: yes"> </SPAN></SPAN></SPAN></FONT><SPAN
style="mso-bookmark: _Toc502915485"><SPAN
style="FONT-FAMILY: 黑体; mso-ascii-font-family: 'Times New Roman'">进程应用方法</SPAN></SPAN></FONT></H3>
<P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT
face="Times New Roman">CBuilder 5</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">VCL</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">Visual Component
Library</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)和</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">RTL</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">Run-Time Library</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)库把几乎全部的</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">Windows API</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函数封装起来,而且在其基础上增加了一些安全措施。在实际运用时,程序员几乎没有必要直接调用</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">Windows API</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函</SPAN><FONT
face="Times New Roman"> </FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数,利用各单元所提供的函数库或例程库就可</SPAN><FONT
face="Times New Roman"> </FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接对系统底层进行操作。</SPAN></P>
<P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么如何在</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">CBuilder 5</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中利用进程呢?其基本思想就是直接调用</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">WindowsAPI</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">CreateThread</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函数来创建一个进程。那么,利用</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">CBuilder 5</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自身所定义的丰富的标准例程库和数量更多、内容更广泛的(非)可视类库进行处理,以取代直接调用</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">Windows API</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函数可否实现呢?回答是肯定的,而且更有效、更保险:</SPAN></P>
<H4 style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT
face="Times New Roman">1</FONT></SPAN><SPAN
style="FONT-FAMILY: 楷体_GB2312; mso-ascii-font-family: 'Times New Roman'">.使用进程函数</SPAN></H4>
<P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">利用</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">RTL</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">库的</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">System</FONT></SPAN><SPAN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -