代码改变世界

Chapter03-验证一个句柄是否是继承的

2012-04-07 09:22  java20130722  阅读(173)  评论(0)    收藏  举报

关键是GetHandleInformation 函数

GetHandleInformation 函数原型:

BOOL GetHandleInformation(HANDLE hObject, PDWORD pdwFlags); 

This function returns the current flag settings for the specified handle in 

the DWORD pointed to by pdwFlags. To see if a handle is inheritable, 

do the following: 

	DWORD dwFlags; 
	GetHandleInformation(hObj, &dwFlags); 
	BOOL fHandleIsInheritable = (0 != (dwFlags & HANDLE_FLAG_INHERIT)); 

努力加载评论中...
点击右上角即可分享
微信分享提示