 |
DuplicateHandle ..msdn Add comment W32 Constants Translate this page |
 |
 |
The DuplicateHandle function duplicates an object handle.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL DuplicateHandle(
HANDLE hSourceProcessHandle,
HANDLE hSourceHandle,
HANDLE hTargetProcessHandle,
LPHANDLE lpTargetHandle,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwOptions
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER DuplicateHandle IN kernel32;
INTEGER hSourceProcessHandle,;
INTEGER hSourceHandle,;
INTEGER hTargetProcessHandle,;
INTEGER @ lpTargetHandle,;
INTEGER dwDesiredAccess,;
INTEGER bInheritHandle,;
INTEGER dwOptions
|
 |
 |
 |
| Parameters: |
 |
hSourceProcessHandle
[in] Handle to the process with the handle to duplicate.
hSourceHandle
[in] Handle to duplicate. This is an open object handle that is valid in the context of the source process.
hTargetProcessHandle
[in] Handle to the process that is to receive the duplicated handle.
lpTargetHandle
[out] Pointer to a variable that receives the duplicate handle. This handle value is valid in the context of the target process.
dwDesiredAccess
[in] Access requested for the new handle.
bInheritHandle
[in] Indicates whether the handle is inheritable.
dwOptions
[in] Optional actions. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
| The duplicate handle refers to the same object as the original handle. Therefore, any changes to the object are reflected through both handles. For example, the current file mark for a file handle is always the same for both handles. |
 |
 |
| Word Index links for the DuplicateHandle : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-12-18 09:27:34 | | Modified: | 2004-12-18 09:30:40 | Visited in last 7 days: 24 |