개발
[Windows/WinAPI] Polymorphic 자료형
jmob_blog
2013. 10. 3. 15:10
728x90
반응형
Polymorphic 자료형은 MS에서 64bit 기반으로 넘어가면서 새롭게 정의한 자료형이다. 형태는 아래와 같다.
#if defined(_WIN64)
typedef _int64 LONG_PTR;
typedef unsigned _int64 ULONG_PTR;
typedef _int64 INT_PTR;
typedef unsigned _int64 UNIT_PTR;
#else
typedef long LONG_PTR;
typedef unsigned long ULONG_PTR;
typedef int INT_PTR;
typedef unsigned int UNIT_PTR;
#endif
이러한 형태로 되어있기 때문에 OS가 64bit이든 32bit이든 상관없이 잘 돌아간다. 다시 말하면 자료형이 맞춰서 변한다고 보면 된다.
728x90
반응형