using a class (MFC) in Console application

hello
how i can use a exiting class that include header file and cpp and just use it
the orginal code was here :http://www.codeproject.com/Articles/319181/Haephrati-Searching-for-a-reliable-Hardware-ID
and i attached the source of hole project :
http://www.freeuploadsite.com/do.php?id=76894]http://www.freeuploadsite.com/do.php?id=76894

i want use a method in the class so i added .h file + stdfax.h + .cpp file that include class
my code looks like this :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
#include "HardDriveSerialNumer.h"
#include <iostream>

#include <tchar.h>
#include <string.h>
#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <vector>
#include "stdafx.h"
using namespace std;

//using namespace MasterHardDiskSerial;
int main(int argc, char * argv[])
{

	//ReadPhysicalDriveInNTWithAdminRights();
	// Get Hard Drive Serial Number
	template vector<char> hwId;
	MasterHardDiskSeria diskSerial;
	diskSerial.GetSerialNo(hwId);
	if (hwId.empty())
	{
		throw std::runtime_error("Can't retrieve hardware serial number");
	}

	wchar_t *w_hwId = GetWText(hwId);
	system("pause");
	return 0;

but i have some error that they are not in orginal source code ,is this becuse that's an MFC project and i'm tring to use it as seperad project?
any help will take me out of darkness.
Last edited on
i asked my question from author and he said me that it can use it, be done but i'm need help
on this

my question:
=========
can use it for Non-MFC

can use it for console application ?
for example just method
Hide Copy Code
diskSerial.GetSerialNo(hwId);
my friend said that it's MFC and you can not easily use it on any c++ project but i think my freind is wrong.

==========

Answer
Re: can use it for Non-MFC professional Michael N Haephrati (האפרתי) 55mins ago

Go to ParentYou probably can. Most of the MFC functions are part of ATL which is built in in Visual Studio executables.

- Michael Haephrati מיכאל האפרתי

can anyone help me on this?
Topic archived. No new replies allowed.