摘要:
《1》template<typename T>class TSafeSingleton{private: typedef T SingletonObj;public: class TSafeCreator{public:TSafeCreator(){ TSafeSingleton<SingletonObj>::Instance();}inline void Do(){} };static TSafeCreator s_oCreator;public:static SingletonObj* Instance(){ static SingletonObj s_oT; s_ 阅读全文
摘要:
BOOLResourceToFile(constTCHAR*szResType,constTCHAR*szResName,constTCHAR*szFileName){ HRSRC hRes; HANDLE hGlobal,hFile; DWORD dwSize,wSize; PVOID pMemory; BOOL fResult=false; HINSTANCEhInst=::GetModuleHandle(NULL); hRes=FindResource(hInst,szResName,szResType); if(hRes==0) { inti=GetLastError(); retur 阅读全文