블로그 보관함

2014년 3월 17일 월요일

rundll32.exe 와 regsvr32.exe의 DLL 로딩 방식의 차이

rundll32.exe 와 regsvr32.exe의 DLL 로딩 방식의 차이에 대해서 간략하게 정리하였습니다.

rundll32.exe
1. GetCommandLineW
Export 함수명을 파싱
2. LoadLibrary to load the DLL
GetProcAddress를 호출해서, Export 함수의 주소를 알아 낸 후,
3. Export 함수 호출
4. FreeLibrary

regsvr32.exe
1. OleInitialize
2. LoadLibrary to load the DLL
GetProcAddress를 호출해서, DllRegisterServer or DllUnregisterServer의 주소를 알아 낸 후,
3. DllRegisterServer or DllUnregisterServer 호출
4. FreeLibrary
5. OleUninitialize

댓글 없음:

댓글 쓰기