BOOL CXInstall::IsWinsock2()
{
WORD wVersionRequested = MAKEWORd(2, 0);
WSADATA wsaData;
if(WSAStartup(wVersionRequested, &wsaData) != 0)
return FALSE;
if (LOBYTE(wsaData.wVersion) != 2)
{
WSACleanup();
return FALSE;
}
return TRUE;
}
BOOL CXInstall::IsInstalled(TCHAR *sPathName)
{
TCHAR tsPathName[MAX_PATH];
if( ReadReg(REG_INSTALL_PATH_ITEM,
(BYTE*)tsPathName,
MAX_PATH,
HKEY_LOCAL_MACHINE,
REG_INSTALL_KEY, REG_SZ
)
)
{
if(sPathName != NULL)
_tcscpy(sPathName, tsPathName);
return TRUE;
}
return FALSE;
}
在COMMON 还是bin?