Transcript
![Page 1: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/1.jpg)
DLL 지옥과 존재하지 않는OS 함수들에 대한 방어 전략
GPG 2. Section 1. General Programming
DevRookie Study, 2011. 7. 9. 박민근
![Page 2: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/2.jpg)
DLL 지옥DLL Hell
![Page 3: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/3.jpg)
![Page 4: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/4.jpg)
DLL 에 의존하는 것은 많은 문제를일으킬 수 있다
DLL 이 존재하는가 ?DLL 이 유효한 것인가 ?
DLL 버전은 맞는 것인가 ?
![Page 5: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/5.jpg)
암묵적 링크 vs 명시적 링크
![Page 6: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/6.jpg)
암묵적 링크
DLL 의 Lib 파일을 프로젝트 설정에 포함DLL 프로젝트를 솔류션에 포함
#pragma comment(lib “lib 이름” )
![Page 7: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/7.jpg)
명시적 링크
LIB 파일을 사용하지 않는다 .LoadLibrary()
GetProcAddress()FreeLibrary()
![Page 8: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/8.jpg)
DLL 이 없거나 잘못된 DLL 을찾아낼 수 있다 .
대신 코드가 좀더 복잡해 진다 .
![Page 9: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/9.jpg)
DirectX 의 DLL 방어하기
![Page 10: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/10.jpg)
![Page 11: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/11.jpg)
![Page 12: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/12.jpg)
존재하지 않는 OS 함수
![Page 13: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/13.jpg)
![Page 14: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/14.jpg)
게임 엔진 DLL 에서 응용
![Page 15: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/15.jpg)
DX 의 버전 DLL 이 다른 경우(ex. DirectX9, DirectX11)
OpenGL & DirectX
![Page 16: [Gpg2권 박민근] 1.4 dll 지옥과 존재하지 않는 os 함수들에 대한 방어 전략](https://reader033.vdocuments.pub/reader033/viewer/2022051016/558fca201a28ab0e398b456a/html5/thumbnails/16.jpg)
게임 메인 실행 파일에서 , 자신의 DLL 을 명시적으로 로드하고 ,그 DLL 들은 해당 라이브러리를암묵적 (Lib) 으로 링크하는 테크닉