Click here to Skip to main content
15,886,066 members
Articles / Programming Languages / C++

Searching for a Reliable Hardware ID

Rate me:
Please Sign up or sign in to vote.
4.93/5 (106 votes)
26 Mar 2020CPOL3 min read 285.3K   17.7K   212  
How a computer can be identified in order to generate a unique ID
Many desktop application developers need to uniquely identify the computer on which their software is running. This article will show you how it can be done.
// GetMacAddress_by_Michael_HaephratiDlg.h : header file
//

#pragma once


// CGetMacAddress_by_Michael_HaephratiDlg dialog
class CGetMacAddress_by_Michael_HaephratiDlg : public CDialogEx
{
// Construction
public:
	CGetMacAddress_by_Michael_HaephratiDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_GETMACADDRESS_BY_MICHAEL_HAEPHRATI_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	void ShowMACAddress();
};

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
CEO Secured Globe, Inc.
United States United States
Michael Haephrati is a music composer, an inventor and an expert specializes in software development and information security, who has built a unique perspective which combines technology and the end user experience. He is the author of a the book Learning C++ , which teaches C++ 20, and was published in August 2022.

He is the CEO of Secured Globe, Inc., and also active at Stack Overflow.

Read our Corporate blog or read my Personal blog.





Comments and Discussions