Aug 27, 2009 Dream
그제 꿈에서 직립보행을 하는 아기 코끼리가 예지랑 노는 꿈을 꿨다.
꿈에서도 어떻게 코끼리가 두 발로 서서 걷는지 좀 신기해했는데
너무 자연스러워서 그냥 아 코끼리는 어렸을 땐 두 발로 걷는구나 하고 다시 딥슬립 했던 것 같다.
예지랑 동물원에 자주 가고 어린이 비디오를 너무 본 탓일까?
갑자기 꿈을 꿨던 게 기억이 나서 적어본다.
Jun 17, 2009 A workaround for a missing file, “dxtrans.h” in DirectX SDK
The ISampleGrabber interface of DirectShow enables an application to retrieve individual frames from various types of movie files. This interface is defined in “qedit.h” which used to be installed with DirectX SDK until DirecX SDK version 8. DirectShow (including “qedit.h”) is not a part of DirectX SDK any more and now is included in Microsoft Windows SDK (which has been called Platform SDK for a while). Windows SDK is installed as a part of Visual Studio 2008, so you don’t need to install it additionally to use DirectShow (unless you want the latest version of Windows SDK). You need to install DirectX SDK though because “qedit.h” is still dependent on “dxtrans.h” which is shipped with DirectX SDK.
You will see an error message, however, if you try to compile “qedit.h” with the latest version of DirectX SDK. (the current version is DirectX SDK – March 2009)
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\qedit.h(498) : fatal error C1083: Cannot open include file: ‘dxtrans.h’: No such file or directory
The reason is because “dxtrans.h” is not included in the latest version of DirectX SDK any more (from DirectX SDK – November 2007) although “qedit.h” is still dependent on it. (I know it’s absurd, but that’s what Microsoft does) I found an article posted by people who already were troubled with this problem. The point is that the part of “qedit.h” which depends on “dxtrans.h” is not necessary to use DirectShow, so you comment it out in “qedit.h” and the error will go away. (For the details, click HERE) The other solution which I like better is to define some keywords before including “qedit.h” to prevent the “dxtrans.h” dependent code from being compiled. In that way you don’t have to edit “qedit.h” itself.
#pragma include_alias( “dxtrans.h”, “qedit.h” )
#define __IDxtCompositor_INTERFACE_DEFINED__
#define __IDxtAlphaSetter_INTERFACE_DEFINED__
#define __IDxtJpeg_INTERFACE_DEFINED__
#define __IDxtKey_INTERFACE_DEFINED__
#include <qedit.h>
May 31, 2009 How to convert BSTR to LPCTSTR
In a project, I’ve had to deal with a pointer of a BSTR string returned to an event handler of an ActiveX control. I wanted to convert it to LPCTSTR, and a simple implicit type-casting worked seamlessly when I tried it in a test project.
void put_UseServer(LPCTSTR newValue);
void ServerChanged(BSTR* NewServer)
{
put_UseServer(*NewServer); // This conversion works only in Unicode Character Set
}
However, when I copied the same code into my actual project, it caused an error. The reason was that my project used the Multi-byte Character Set whereas I tested the code in the Unicode Character Set. The simplest solution I found which also works in the Multi-byte Character set is like the following.
void put_UseServer(LPCTSTR newValue);
void ServerChanged(BSTR* NewServer)
{
put_UseServer(COLE2CT(*NewServer)); // Use ATL String Conversion Class
}
More information about ATL and MFC String Conversion is on the MSDN website.
May 30, 2009 Some VS2005 and VS2008 wizards pop up script error after installing IE8
I experienced this trouble when I tried to add a variable with a wizard in Visual Studio 2008. I never suspected IE8, but MS disappointed me again. Anyway, here is a workaround posted in Visual C++ Team Blog and it seems to work. For the details, click HERE
Please follow the following steps:
- Open regedit (on a 64-bit OS, open the 32-bit regedit)
- Under “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones“, create a new key called 1000 (if it isn’t already there)
- Under 1000, create a DWORD entry with:
o Name = 1207
o Type = REG_DWORD
o Data = 0×000000
For the workaround to work on VS2005, however, the VS2005 SP1 (and VS2005 SP1 Update for Windows Vista) has to be installed.
May 22, 2009 노무현 전 대통령 서거
참으로 허망하다.
한국발 기사들을 보면서, 깨끗하겠다고 다짐한 대통령이었기에 측근의, 부인의, 아들딸의 수뢰설이 참으로 부담스러웠을 터이고 본인이 몰랐다고 하기에도 면목이 없으리라는 생각은 했지만
그보다 더 더러운 사람들도 뻔뻔히 살아가는데, 꿋꿋이 버텨내고 나는 바담 풍 했지만 너희는 바람 풍 해라 하실 줄 알았다.
선거 날 저녁 대학로 한 일식집에서 순희랑 전복죽 시켜놓고 기다리면서 여섯시 땡과 더불어 방송 3사가 내보내는 노무현 당선 자막을 보고 ‘그래! 대한민국 아직 죽지 않았어!’ 하던 때가 엊그제 같은데…
이제 근심일랑은 내려놓으시고 좋은 곳으로 가시길…



