char buf[1000]; 
 
GetTempPath(1000, buf); 
 
char buf1[1000]; 
 
GetLongPathName(buf, buf1, 1000);  
 
===================================================================

Output: 
 
C:\Documents and Settings\IP\Local Settings\Temp\ 
AND


컴파일 옵션에 /MTd , /MDd /Od를 넣어주면 컴파일 오류 사라짐

물론 편법이긴 하지만 ... ㅋㅋㅋ
AND


코드 프로젝트에 올려져 있는 ASN.1 Parser 툴 (기능이 괜찮고 편함)
소스는 C#으로 되어 있음

AND


#ifdef WIN32
class Thread
{
public:
    Thread ( DWORD (WINAPI * pFun) (void* arg), void* pArg)
    {
        _handle = CreateThread (
            0, // Security attributes
            0, // Stack size
            pFun,
            pArg,
            CREATE_SUSPENDED,
            &_tid);
    }
    ~Thread () { CloseHandle (_handle); }
    void Resume () { ResumeThread (_handle); }
    void WaitForDeath (int nTimeOut)
    {
  if (nTimeOut==INFINITE) WaitForSingleObject (_handle,INFINITE);
        else WaitForSingleObject (_handle, nTimeOut*1000);
    }
 int nTimeOut;
private:
    HANDLE _handle;
    DWORD  _tid;     // thread id
 
};
#endif


사용방법

thread_func_args pthread_args(tcp_proc,socket_array[nConnection_Count-1]);

Thread thr(&CTCPComm::ValidateData_Client,&pthread_args);
thr.nTimeOut=3;
thr.Resume();
thr.WaitForDeath();

윈도우즈에서 Thread Hang이 사라짐..퍼포먼스 그런대로 괜찮음...

AND


실소스에 적용해보니 아주조금 퍼포먼스는 좋긴하나..그냥 그렇게 월등해보이진 않음...
참고용으로만 사용..

AND