정리

Delay Load 관련 내용

저장소/VC++
Delay Load 처리 방법은 다음과 같이 소스코드에 추가해주면 된다.

#pragma comment(linker, "/DELAYLOAD:파일이름.dll")

근데 Visual Studio 2008에서 빌드해보면

warning LNK4229: invalid directive '/DELAYLOAD:파일이름.dll' encountered; ignored

이와 같은 경고를 표시한다.
제대로 처리되지도 않는다.

MSDN에 다음과 같이 기술되어있다.
(http://msdn.microsoft.com/en-us/library/7f0aews7%28v=VS.90%29.aspx)

Only the following (comment-type) linker options are available to be passed to the linker identifier:

결국은 Property 설정에서 지정하라는 말인 것 같은데
Property->Linker->Input->Delay Loaded DLLs 에 필요한 모듈을 기술하고 빌드하면 경고 없이 잘 된다.
Delay Load의 Unload는 다음과 같이 설정할 수 있다.
Property->Linker->Advanced->Delay Loaded DLL을 Support Unload(/DELAY:UNLOAD)로 설정해주면 된다.

Delay Load에 대한 보다 자세한 사항은 책과 검색을 통해서 익히도록... 후후후...