funeralcrasher: (Default)
I'm using Visual Studio 6.0 and need to read a value from the registry and assign to a variable. My first step is learning which headers and namespaces allow access to Microsoft's registry functions.

So, this is what I have so far:

#include "stdafx.h"	// won't work without this
#include 	// used for cout
#include 	//file stream 
#include 	// used for string
#include 
[Error: Irreparable invalid markup ('<direct.h>') in entry. Owner must fix manually. Raw contents below.]

I'm using Visual Studio 6.0 and need to read a value from the registry and assign to a variable. My first step is learning which headers and namespaces allow access to Microsoft's registry functions.

So, this is what I have so far:

<pre>#include "stdafx.h" // won't work without this
#include <iostream> // used for cout
#include <fstream> //file stream
#include <string> // used for string
#include <direct.h> // used for _getcwd
#include <stdlib.h> // used for system()

using namespace std;
using namespace Microsoft::Win32;</pre>

Compiling results in two errors:

<pre>test.cpp(20) : error C2653: 'Microsoft' : is not a class or namespace name
test.cpp(20) : error C2871: 'Win32' : does not exist or is not a namespace</pre>

Have I started down the wrong path?

Date: 2006-06-12 05:01 pm (UTC)From: [identity profile] bedivere.livejournal.com
If you're talking about the functions like RegCreateKeyEx, RegOpenKeyEx.. etc.. those are in winreg.h, so you'll want to include that.

Profile

funeralcrasher: (Default)
funeralcrasher

June 2020

S M T W T F S
 123456
78910111213
141516 1718 1920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 25th, 2025 04:37 pm
Powered by Dreamwidth Studios