Click here to Skip to main content
15,884,821 members
Articles / Desktop Programming / MFC

CAMEL - CPU Identifier Class

Rate me:
Please Sign up or sign in to vote.
4.93/5 (40 votes)
14 Jan 2003CPOL2 min read 293.5K   9.6K   96  
A class to detect ALL the features of the CPU / CPUs in the local system. Now at version 1.2
// Camel - CPU Identifying Tool
// Copyright (C) 2002, Iain Chesworth
// 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#ifndef _COMMON_H_
#define _COMMON_H_

#pragma once

// Include the defines before anything else.
#include "defines.h"

// Included header files for Windows version.
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
#include <shellapi.h>
#include <msi.h>

// Included header files for Linux version.
#include <iostream.h>

// Included generic C / C++ header files.
#include <memory.h>
#include <stdlib.h>
#include <stdio.h>

// Included local header files.
#include "structs.h"
#include "exceptionhandler.h"
#include "resource.h"

// Function prototypes.
LRESULT CALLBACK EMail_MouseProc (int, WPARAM, LPARAM);

LRESULT CALLBACK TabControl_WndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK EMailControl_WndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK WarningControl_WndProc (HWND, UINT, WPARAM, LPARAM);

BOOL CALLBACK CPUDialog_DialogProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK AboutDialog_DialogProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK CPUTabDialog_DialogProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK PCITabDialog_DialogProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK BenchTabDialog_DialogProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK ExportDetails_DialogProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK ExpireDialog_DialogProc (HWND, UINT, WPARAM, LPARAM);

DWORD WINAPI UpdateCPU_ThreadProc (LPVOID);
DWORD WINAPI DisplayCPU_ThreadProc (LPVOID);
DWORD WINAPI DeviceTree_ThreadProc (LPVOID);
DWORD WINAPI DisplayBenchmarks_ThreadProc (LPVOID);
DWORD WINAPI BenchmarkCPU_ThreadProc (LPVOID);

bool CreateCPUUpdateThreads (HWND, int);
bool CreateCPUInterrogationThreads (HWND);
bool ValidateSerialNumber (char *);
bool InitialiseMSIInstaller ();
char * OSDetection () ;
void DisplayMessage (int, UINT);
void DisplayGenericErrorMessage ();
bool VerifyExpiryData (int, int);

#endif // _COMMON_H_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Researcher
Germany Germany
Iain Chesworth graduated from Heriot-Watt University in June of 2002 in Computer Science and Physics. He now works as a C++ programmer and plays with code in his spare time. He is also a keen cyclist and swimmer.

Comments and Discussions