/*!
	YuhMacro.h

	Yuh が良く利用するマクロ集
*/
#pragma once

/*!
	安全なdelete
*/
#define	SAFE_DELETE(x)	if(x!=NULL) delete x; x = NULL;


/*!
	安全なCloseHandle
*/
#define	SAFE_CLOSE_HANDLE(x)	if(x!=NULL && x!=INVALID_HANDLE_VALUE) ::CloseHandle(x); x = NULL;


/*!
	OVERLAPPED構造体初期化
*/
#define	INIT_OVERLAPPED(ovrp, event)\
{\
	ZeroMemory(&ovrp, sizeof(ovrp));\
	::ResetEvent(event);\
	ovrp.hEvent = event;\
}
