본문 바로가기

전체 글

%SystemRoot% 변환하기 DirectShow 필터의 CLSID를 가지고 실경로를 구할 때 얻어지는 상대 경로를 실경로로 변환 Video Mixing Renderer 9의 필터 정보를 알고자 할 때 해당 CLSID를 가지고 아래 레지스트리값을 참조하여 HKEY_CLASSES_ROOT\CLSID\{51B4ABF3-748F-4E3B-A276-C828330E926A}\InprocServer32 %SystemRoot%\system32\quartz.dll 다음과 같은 키값을 얻을 수 있다. 위 경로를 가지고 CreateFile을 할 경우 에러를 얻게 되는데 이런 경우 위와 같은 경로를DWORD WINAPI ExpandEnvironmentStrings( __in LPCTSTR lpSrc, __out LPTSTR lpDst, __in DWOR.. 더보기
ASF 포맷 WMDRM(Windows Media Digital Rights Management) DRM이 세계적인 Issue로 떠오르면서 Microsoft에서도 독자적인 DRM을 발표하였다. 이름하여, WMDRM. 초기버전 WMDRM은 ASF format 기반의 WMA, WMV파일을 시작하였으며, 차기 버전에서는 Image, Office 파일에 걸쳐 전반적인 데이터에도 적용할 것을 암시했다. 대체 이 WMDRM 이란 무엇이며, 어떻게 생겨먹은지를 알아보도록 하자. (이 내용에서는 ASF포맷 기반의 WMA, WMV만 보도록 한다.) 참고로, WMDRM에서 손뗀지 좀 오래되다 보니, 가물가물한 부분은 살짝 생략하거나, 대충(ㅡ.ㅡ?) 설명하겠다. 1. ASF Format WMDRM을 알기 위해서는 그 전에 ASF For.. 더보기
Windows Scripting Host * Windows Script Host Object Model * [WScript] ┃ ┣ ┃ ┃ ┃ ┠ WshShortcut ┃ ┃ ┃ ┠ WshUrlShortcut ┃ ┃ ┃ ┠ WshEnvironment ┃ ┃ ┃ ┠ WshSpecialFolders ┃ ┃ ┃ ┖ WshScriptExec ┃ ┃ ┣ ┃ ┃ ┃ ┠ WshNamed ┃ ┃ ┃ ┖ WshUnnamed ┃ ┃ ┣ ┃ ┃ ┃ ┠ WshRemote ┃ ┃ ┃ ┖ WshRemoteError ┃ ┃ ┗ * WSH Objects * WSH 관련 작업은 한마디로 개체(object)를 생성하여 그 개체에서 사용가능한 Method 와 Property를 이용하는 것이라고 할 수 있다. 따라서 작업을 하려면 먼저 개체를 생성해야 하고, 가장 상위의 4개 개.. 더보기
atlcom.h에서 ClassesAllowedInStream rgclsidAllowed; 에러가 나는 경우 1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlcom.h(431) : error C2146: syntax error : missing ';' before identifier 'rgclsidAllowed' 1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlcom.h(431) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlcom.. 더보기
프로세스 덤프 생성하기 Userdump.exe 도구를 사용하면 예외가 발생하며 종료되거나 더 이상 응답하지 않는 프로세스의 사용자 덤프를 생성할 수 있습니다. 예외가 발생하며 종료되는 프로세스에 대한 덤프 파일(.dmp) 만들기 1. 프로세서의 Setup.exe 프로그램을 실행합니다. 참고 o 기본적으로 이 Setup.exe 프로그램은 C:\kktools\userdump8.0 폴더의 Userdump.exe 도구에 포함되어 있습니다. o 이 Setup.exe 프로그램은 커널 모드 드라이버를 설치하고 Userdump.sys 파일을 설치하며 제어판에 Process Dump 아이콘을 만듭니다. o 특별히 필요하지 않으면 Setup.exe 프로그램을 실행할 때 "dump on process termination" 기능을 해제하십시오. .. 더보기
버전 비교 구조체 // 선언 struct Version { Version(); DWORD major; DWORD minor; bool operator major == ver.major) return this->minor major minor == ver.minor && this->major == ver.major; } bool Version::operator = (const tstring& ver) { return ConvertVersion(ver.c_str(), *this); } bool Version::empty() const.. 더보기
파일버전, 제품버전 가져오기 ////////////////////////////////////////////////////////////////////////// // 선언 enum FileInfo { Comments, InternalName, ProductName, CompanyName, LegalCopyright, ProductVersion, FileDescription, LegalTrademarks, PrivateBuild, FileVersion, OriginalFilename, SpecialBuild }; tstring GetFileInfo(__in const tstring& filename, __in FileInfo fi); tstring GetFileVersion(__in const tstring& filename); t.. 더보기
스레드에서 CoInitialize() 호출 시 주의 사항 스레드에서 CoInitialize(NULL); 를 호출 할 경우 CoUnInitialize()를 명시적으로 호출하지 않을 경우 메인 스레드가 블럭(로더 락)되는 경우가 발생할 수 있다. 블럭된 프로세스의 덤프를 가지고 WinDBG에서 스레드 콜 스택을 확인한 경우이다. * 메인 스레드 . 0 Id: d6c.c14 Suspend: 1 Teb: 7ffdf000 Unfrozen # ChildEBP RetAddr Args to Child 00 0013e4bc 7c93df3c 7c94b22b 00000098 00000000 ntdll!KiFastSystemCallRet (FPO: [0,0,0]) 01 0013e4c0 7c94b22b 00000098 00000000 00000000 ntdll!NtWaitForSin.. 더보기