Exemplo n.º 1
0
// PCANLight VersionInfo function
// This function get the Version and copyright of the hardware as text
// (max. 255 characters)
//
// "strInfo" = String buffer to return the hardware information
// RETURN = A CANResult value - Error/status of the hardware after execute the function
//
CANResult PCANLight::VersionInfo(char *strInfo)
{
	// DLL for the current HardwareType is not loaded
	//
	if(!bWasLoaded)
		return ERR_NO_DLL;

	// Function CAN_VersionInfo/CAN2_VersionInfo is called
	//
	return (CANResult)pVersionInfo(strInfo);     
}
Exemplo n.º 2
0
void PrintBanner()
{
	TCHAR szModuleName[512];
	VERIFY(::GetModuleFileName(NULL, szModuleName, _countof(szModuleName)) > 0);

	DWORD dwVersionHandle = 0;
	DWORD dwVersionInfoSize = ::GetFileVersionInfoSize(szModuleName, &dwVersionHandle);
	ASSERT(dwVersionInfoSize > 0);
	
	AutoArray<BYTE> pVersionInfo(dwVersionInfoSize);

	VERIFY(::GetFileVersionInfo(szModuleName, dwVersionHandle, dwVersionInfoSize, pVersionInfo));

	VS_FIXEDFILEINFO* pFixedFileInfo = NULL;
	UINT nFixedFileInfoSize = 0;
	VERIFY(::VerQueryValue(pVersionInfo, _T("\\"), (void**) &pFixedFileInfo, &nFixedFileInfoSize));	

	_tprintf(_T("\nValidateIISxpress v%u.%u.%u.%u (c) Ripcord Software 2005-2009\n\n"), 
		pFixedFileInfo->dwProductVersionMS >> 16, 
		pFixedFileInfo->dwProductVersionMS & 0xffff,
		pFixedFileInfo->dwProductVersionLS >> 16, 
		pFixedFileInfo->dwProductVersionLS & 0xffff);
}