?? duplicatehandle.htm
字號:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style><!--
body,table {font-family:"宋體"; font-size: 9pt; line-height:11pt;}
a {text-decoration:none} a:hover {color:red;text-decoration:underline}
--></style>
<title>DuplicateHandle</title>
</head>
<body link="#FF0000" vlink="#FF0000" alink="#FF0000" bgcolor=#E2DEE9>
<div align="center"><center>
<table border="0" width="100%" height="22" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="16">DuplicateHandle</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
<tr>
<td width="100%" colspan="2">VB聲明</td>
</tr>
<tr>
<td width="100%" colspan="2">Declare Function DuplicateHandle Lib "kernel32"
Alias "DuplicateHandle" (ByVal hSourceProcessHandle As Long, ByVal hSourceHandle
As Long, ByVal hTargetProcessHandle As Long, lpTargetHandle As Long, ByVal dwDesiredAccess
As Long, ByVal bInheritHandle As Long, ByVal dwOptions As Long) As Long</td>
</tr>
<tr>
<td width="100%" colspan="2">說明</td>
</tr>
<tr>
<td width="100%" colspan="2">
在指出一個現有系統對象當前句柄的情況下,為那個對象創建一個新句柄。當前句柄可能為于一個不同的進程</td>
</tr>
<tr>
<td width="100%" colspan="2">返回值</td>
</tr>
<tr>
<td width="100%" colspan="2">Long,非零表示成功,零表示失敗。會設置<a
href="GetLastError.htm" tppabs="http://www.gxbcts.com/airfly/api/papi/GetLastError.htm">GetLastError</a></td>
</tr>
<tr>
<td width="100%" colspan="2">參數表</td>
</tr>
<tr>
<td width="25%">參數</td>
<td width="75%">類型及說明</td>
</tr>
<tr>
<td width="25%">hSourceProcessHandle</td>
<td width="75%">Long,擁有源句柄的那個進程的句柄。</td>
</tr>
<tr>
<td width="25%">hSourceHandle</td>
<td width="75%">Long,指定對象的現有句柄。</td>
</tr>
<tr>
<td width="25%">hTargetProcessHandle</td>
<td width="75%">Long,即將擁有新句柄的一個進程句柄。</td>
</tr>
<tr>
<td width="25%">lpTargetHandle</td>
<td width="75%">Long,指定用于裝載新句柄的一個長整型變量</td>
</tr>
<tr>
<td width="25%">dwDesiredAccess</td>
<td width="75%">Long,新句柄要求的安全訪問級別。</td>
</tr>
<tr>
<td width="25%">bInheritHandle</td>
<td width="75%">Long,如新句柄可由hSourceProcessHandle的子進程繼承,則為TRUE</td>
</tr>
<tr>
<td width="25%" rowspan="3">dwOptions</td>
<td width="75%">Long,下列常數的一個或兩個:</td>
</tr>
<tr>
<td width="75%">DUPLICATE_SAME_ACCESS:新句柄擁有與原始句柄相同的安全訪問特征</td>
</tr>
<tr>
<td width="75%">DUPLICATE_CLOSE_SOURCE:原始句柄已經關閉。即使發生錯誤。它也要關閉
</td>
</tr>
<tr>
<td width="100%" colspan="2">注解</td>
</tr>
<tr>
<td width="100%" colspan="2"><p align="left">
在一個進程中,這個函數可根據位于不同進程內的現有句柄創建一個新句柄。可以從這兩個進程中發出對這個函數的調用。進程必須提供PROCESS_DUP_HANDLE訪問權限,否則函數執行不能成功。</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="right">Top</td>
</tr>
</table>
</center></div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -