다음을 통해 공유


AfxGetInstanceHandle

This function allows you to retrieve the instance handle of the current application.

HINSTANCE AFXAPI AfxGetInstanceHandle( );

반환 값

An HINSTANCE to the current instance of the application. If called from within a DLL linked with the USRDLL version of MFC, an HINSTANCE to the DLL is returned.

설명

AfxGetInstanceHandle always returns the HINSTANCE of your executable file (.EXE) unless it is called from within a DLL linked with the USRDLL version of MFC. In this case, it returns an HINSTANCE to the DLL.

예제

// Print the application instance handle to the debugger output window.
TRACE(_T("Application instance handle is 0x%0X\n"), AfxGetInstanceHandle());

요구 사항

헤더: afxwin.h

참고 항목

참조

AfxGetResourceHandle

AfxSetResourceHandle

개념

MFC 매크로 및 전역