작성중

[mfc] 함수 이름 출력

심량 2019. 7. 25. 16:59

개인 기록용으로 남깁니다.

if (1) { 
  CString strDebug; 
  strDebug.Format("__FUNCTION__:%s, __FUNCDNAME__:%s, __FUNCSIG__:%s", __FUNCTION__, __FUNCDNAME__, __FUNCSIG__); 
  AfxMessageBox(strDebug); 
}

결과는 다음과 같습니다.

__FUNCTION__:CMainFrame::CreateSharedMemory,

__FUNCDNAME__:?CreateSharedMemory@CMainFrame@@IAEHXZ,

__FUNCSIG__:int __thiscall CMainFrame::CreateSharedMemory(void)