[Develog] 메모장프로그래밍 7 - 오디날345 오류해결

이성훈·2021년 12월 28일
0

DEVELOG

목록 보기
7/14

앞서 포스팅에서 COMCTL32.dll을 로드해야한다고 해서 작성된 코드를 실행하면 아래와같은 오류가 뜬다.

이에대해 몇일동안 찾아본결과는

  1. VS에서 빌드한 실행파일(exe)가 COMCTL32.dll을 가져올때 최신버전이아닌 옛버전을 가져옴으로, TaskDialogIndirect함수가 포함되있지 않아서 생긴다.
  2. 실행파일의 manifest리소스를 수정하면 해결이 된다고 하여 ResEdit등프로그램을 사용해보았으나 이번엔 실행자체가안된다.
  3. #if defined _M_IX86
    #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #elif defined _M_IA64
    #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #elif defined _M_X64
    #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #else
    #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #endif
이 코드를 삽입하여 해결한다.. manifest종속성을 코드로써 
지정한것같은데 자세한 동작원리는 모르겠다..

수정후 프로그램을 실행시켜보았다.




정상적으로 동작하는 모습이다.

이제 메모장프로그램의 초본이 완성되었다. 다음으로는 프로그램아이콘과 편집, 서식기능등을 추가하도록 하겠다.

profile
I will be a socially developer

0개의 댓글