I just found out there are 2 DuplicateHandle's . I must say, i was supriced the example would only work on NT. But fortunately you corrected me
Code:
NTSTATUS DuplicateHandle(
HANDLE SourceHandle,
PHANDLE DestinationHandle
);
Requirements
Client: Included in Windows XP, Windows 2000 Professional.
Server: Included in Windows Server 2003, Windows 2000 Server.
Header: Declared in Ntsecpkg.h.
Code:
BOOL DuplicateHandle(
HANDLE hSourceProcessHandle,
HANDLE hSourceHandle,
HANDLE hTargetProcessHandle,
LPHANDLE lpTargetHandle,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwOptions
);
Requirements
Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, and Windows 95.