Any Help with RegGetValueA function ??

Hello I'm working on a project and I want to use the RegGetValueA function which is suppose to be in the winreg.h, which is included by windows.h. I just open the both headers and I found that this function doesn't exist. I use win 7 32-bit and IDE Code::Blocks.
My question: Is there other function that is the equivalent of the RegGetValueA function, that retrieves the type and data for the specified registry value, or do I have to do some update,... maybe downloading the winreg.h ?
Thank you..
Try calling RegGetValue
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-reggetvaluea

The A or W suffix is selected automagically depending on whether you're compiling ANSI or UNICODE.
The default for the past decade or so has been UNICODE.
.. Thank you
salem c
.. I already read the documentation from MSDN .. I just don't have it defined in my header. because it's says Undefined reference to RegGetValueA, but I think I found something similar with that and should probably work, and that will be the RegQueryValueExA function which is doing quite the same thing, I need to read that a bit more , because it has less arguments but some are even different from the other function:

RegGetValueA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
RegGetValueA function (winreg.h)
09/24/2020
5 minutes to read
Retrieves the type and data for the specified registry value.

Syntax
C++

Copy
LSTATUS RegGetValueA(
  HKEY    hkey,
  LPCSTR  lpSubKey,
  LPCSTR  lpValue,
  DWORD   dwFlags,
  LPDWORD pdwType,
  PVOID   pvData,
  LPDWORD pcbData
);


..and the other one:

RegQueryValueExA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Retrieves the type and data for the specified value name associated with an open registry key.

To ensure that any string values (REG_SZ, REG_MULTI_SZ, and REG_EXPAND_SZ) returned are null-terminated, use the RegGetValue function.

Syntax
C++

Copy
LSTATUS RegQueryValueExA(
  HKEY    hKey,
  LPCSTR  lpValueName,
  LPDWORD lpReserved,
  LPDWORD lpType,
  LPBYTE  lpData,
  LPDWORD lpcbData
);
Last edited on
From the documentation:

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later

Already did.. doesn't seems to work.. :\

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/** Main.c File **/

#define _WIN32_WINNT 0x0600
#include <stdio.h>

#include <windows.h>
#include <psapi.h>
#include <stdint.h>
#include <inttypes.h>
#include "Main.h"

HWND gameWindow;
BOOL IsRunning;
GAMEBITMAP BackBuffer;
GAMEBITMAP g6x7Font;
GAMEPERFDATA PerformanceData;
HANDLE Mutex;
HERO Player;
BOOL WindowsHasFocus;
REGISTRYPARAMS RegistryParams;
....
...
..
etc.


thanks for the Tips.. seeplus
Well.. here is how I wrote it in my code..:
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
DWORD LoadRegistryParameters(void)
{
    DWORD Result = ERROR_SUCCESS;

    HKEY RegKey = NULL;
    DWORD RegDisposition = 0;
    DWORD RegBytesRead = sizeof(DWORD);

    Result = RegCreateKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\" GAME_NAME, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &RegKey, &RegDisposition);

    if(Result != ERROR_SUCCESS)
    {
        LogMessageA(LOG_LEVEL_ERROR, "[%s] RegCreateKey failed with error code 0x%08lx !", __FUNCTION__, Result);
        goto Exit;
    }

    if(RegDisposition == REG_CREATED_NEW_KEY)
    {
        LogMessageA(LOG_LEVEL_INFO, "[%s] Registry Key does not exist. Create new HKCU\\SOFTWARE\\%s.", __FUNCTION__, GAME_NAME);
    }
    else
    {
        LogMessageA(LOG_LEVEL_INFO, "[%s] Opened existing registry key HKCU\\SOFTWARE\\%s.", __FUNCTION__, GAME_NAME);
    }

    Result = RegQueryValueExA(RegKey, "LogLevel", NULL, NULL, (BYTE*)&RegistryParams.LogLevel, &RegBytesRead);
    //Result = RegGetValueA(RegKey, NULL, "LogLevel", RRF_RT_DWORD, NULL, (BYTE*)&RegistryParams.LogLevel, &RegBytesRead);
    // which is I suppose to use... and nor the RRF_RT_DWORD flag is found

    if(Result != ERROR_SUCCESS)
    {
        if(Result == ERROR_FILE_NOT_FOUND)
        {
            Result = ERROR_SUCCESS;
        }
    }

Exit:

    return(Result);
}

void LogMessageA(DWORD LogLevel, char* Message, ...)
{
    size_t MessageLength = strlen(Message);
    SYSTEMTIME Time = {0};
    HANDLE LogFileHandle = INVALID_HANDLE_VALUE;
    DWORD EndOfFile = 0;
    DWORD NumberOfBytesWritten = 0;
    char DateTimeString[96] = {0};
    char SeverityString[8] = {0};
    char FormattedString[4096] = {0};
    int Error = 0;

    if(RegistryParams.LogLevel < LogLevel)
    {
        return;
    }

    if(MessageLength < 1 || MessageLength > 4096)
    {
        return;
    }

    switch(LogLevel)
    {
    case LOG_LEVEL_NONE:
        {
            return;
        }break;

    case LOG_LEVEL_INFO:
        {
            strcpy(SeverityString, "[INFO] ");
        }break;

    case LOG_LEVEL_WARN:
        {
            strcpy(SeverityString, "[WARN] ");
        }break;

    case LOG_LEVEL_ERROR:
        {
            strcpy(SeverityString, "[ERROR]");
        }break;

    case LOG_LEVEL_DEBUG:
        {
            strcpy(SeverityString, "[DEBUG]");
        }break;

    default:
        {
            // Assert.
        }
    }

    GetLocalTime(&Time);

    va_list ArgPointer = NULL;
    va_start(ArgPointer, Message);

    vsnprintf(FormattedString, sizeof(FormattedString), Message, ArgPointer);

    va_end(ArgPointer);

    Error = _snprintf(DateTimeString, sizeof(DateTimeString), "\r\n[%02u/%02u/%u %02u:%02u:%02u.%03u]",\
                      Time.wMonth, Time.wDay, Time.wYear, Time.wHour, Time.wMinute, Time.wSecond, Time.wMilliseconds);

    if((LogFileHandle = CreateFileA(LOG_FILE_NAME, FILE_APPEND_DATA, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE)
    {
       // Assert.
        return;
    }

    EndOfFile = SetFilePointer(LogFileHandle, 0, NULL, FILE_END);
    WriteFile(LogFileHandle, DateTimeString, (DWORD)strlen(DateTimeString), &NumberOfBytesWritten, NULL);
    WriteFile(LogFileHandle, SeverityString, (DWORD)strlen(SeverityString), &NumberOfBytesWritten, NULL);
    WriteFile(LogFileHandle, FormattedString, (DWORD)strlen(FormattedString), &NumberOfBytesWritten, NULL);

    if(LogFileHandle != INVALID_HANDLE_VALUE)
    {
        CloseHandle(LogFileHandle);
    }
}
Last edited on
Non of them function RegGetValueA or RRF_RT_DWORD flag are located in my winreg.h file..
What version of the Windows SDK have you installed?

On my system, RegGetValueA() is defined in winreg.h starting at line 1266:

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
WINADVAPI
LSTATUS
APIENTRY
RegGetValueA(
    _In_ HKEY hkey,
    _In_opt_ LPCSTR lpSubKey,
    _In_opt_ LPCSTR lpValue,
    _In_ DWORD dwFlags,
    _Out_opt_ LPDWORD pdwType,
    _When_((dwFlags & 0x7F) == RRF_RT_REG_SZ ||
               (dwFlags & 0x7F) == RRF_RT_REG_EXPAND_SZ ||
               (dwFlags & 0x7F) == (RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ) ||
               *pdwType == REG_SZ ||
               *pdwType == REG_EXPAND_SZ, _Post_z_)
        _When_((dwFlags & 0x7F) == RRF_RT_REG_MULTI_SZ ||
               *pdwType == REG_MULTI_SZ, _Post_ _NullNull_terminated_)
    _Out_writes_bytes_to_opt_(*pcbData,*pcbData) PVOID pvData,
    _Inout_opt_ LPDWORD pcbData
    );

WINADVAPI
LSTATUS
APIENTRY
RegGetValueW(
    _In_ HKEY hkey,
    _In_opt_ LPCWSTR lpSubKey,
    _In_opt_ LPCWSTR lpValue,
    _In_ DWORD dwFlags,
    _Out_opt_ LPDWORD pdwType,
    _When_((dwFlags & 0x7F) == RRF_RT_REG_SZ ||
               (dwFlags & 0x7F) == RRF_RT_REG_EXPAND_SZ ||
               (dwFlags & 0x7F) == (RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ) ||
               *pdwType == REG_SZ ||
               *pdwType == REG_EXPAND_SZ, _Post_z_)
        _When_((dwFlags & 0x7F) == RRF_RT_REG_MULTI_SZ ||
               *pdwType == REG_MULTI_SZ, _Post_ _NullNull_terminated_)
    _Out_writes_bytes_to_opt_(*pcbData,*pcbData) PVOID pvData,
    _Inout_opt_ LPDWORD pcbData
    );

#ifdef UNICODE
#define RegGetValue  RegGetValueW
#else
#define RegGetValue  RegGetValueA
#endif // !UNICODE 

Ohh Sorry seeplus was doing other things.. and forgot about it. I decided to make it work with RegQueryValueExA function. SO it works.
Ahh.. about my windows SDK version.. I think is V.10.0A. Still in my winreg.h what you show me ... I DON'T HAVE.. i type it to search ... and doesn't exist. My winreg.h is so small I think it doesn't reach 200 lines .

winreg.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#ifndef _WINREG_H
#define _WINREG_H
#if __GNUC__ >= 3
#pragma GCC system_header
#endif

#ifndef WINADVAPI
#define WINADVAPI
#endif

#ifdef __cplusplus
extern "C" {
#endif
#define HKEY_CLASSES_ROOT	((HKEY)0x80000000)
#define HKEY_CURRENT_USER	((HKEY)0x80000001)
#define HKEY_LOCAL_MACHINE	((HKEY)0x80000002)
#define HKEY_USERS	((HKEY)0x80000003)
#define HKEY_PERFORMANCE_DATA	((HKEY)0x80000004)
#define HKEY_CURRENT_CONFIG	((HKEY)0x80000005)
#define HKEY_DYN_DATA	((HKEY)0x80000006)
#define REG_OPTION_VOLATILE 1
#define REG_OPTION_NON_VOLATILE 0
#define REG_CREATED_NEW_KEY 1
#define REG_OPENED_EXISTING_KEY 2
#define REG_NONE 0
#define REG_SZ 1
#define REG_EXPAND_SZ 2
#define REG_BINARY 3
#define REG_DWORD_LITTLE_ENDIAN 4
#define REG_DWORD 4
#define REG_DWORD_BIG_ENDIAN 5
#define REG_LINK 6
#define REG_MULTI_SZ 7
#define REG_RESOURCE_LIST 8
#define REG_FULL_RESOURCE_DESCRIPTOR 9
#define REG_RESOURCE_REQUIREMENTS_LIST 10
#define REG_QWORD_LITTLE_ENDIAN 11
#define REG_QWORD 11
#define REG_NOTIFY_CHANGE_NAME 1
#define REG_NOTIFY_CHANGE_ATTRIBUTES 2
#define REG_NOTIFY_CHANGE_LAST_SET 4
#define REG_NOTIFY_CHANGE_SECURITY 8

#ifndef RC_INVOKED
typedef ACCESS_MASK REGSAM;
typedef struct value_entA {
	LPSTR ve_valuename;
	DWORD ve_valuelen;
	DWORD ve_valueptr;
	DWORD ve_type;
} VALENTA,*PVALENTA;
typedef struct value_entW {
	LPWSTR ve_valuename;
	DWORD ve_valuelen;
	DWORD ve_valueptr;
	DWORD ve_type;
} VALENTW,*PVALENTW;
WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPCSTR);
WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
WINADVAPI LONG WINAPI RegCloseKey(HKEY);
WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
WINADVAPI LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
#if (WINVER >= 0x0502)
WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
#endif
WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
WINADVAPI LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
WINADVAPI LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
WINADVAPI LONG WINAPI RegFlushKey(HKEY);
WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
WINADVAPI LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
WINADVAPI LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
WINADVAPI LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
WINADVAPI LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
WINADVAPI LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
WINADVAPI LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
WINADVAPI LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
WINADVAPI LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
WINADVAPI LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);

#ifdef UNICODE
typedef VALENTW VALENT,*PVALENT;
#define AbortSystemShutdown AbortSystemShutdownW
#define InitiateSystemShutdown InitiateSystemShutdownW
#define RegConnectRegistry RegConnectRegistryW
#define RegCreateKey RegCreateKeyW
#define RegCreateKeyEx RegCreateKeyExW
#define RegDeleteKey RegDeleteKeyW
#if (WINVER >= 0x0502)
#define RegDeleteKeyEx RegDeleteKeyExW
#endif
#define RegDeleteValue RegDeleteValueW
#define RegEnumKey RegEnumKeyW
#define RegEnumKeyEx RegEnumKeyExW
#define RegEnumValue RegEnumValueW
#define RegLoadKey RegLoadKeyW
#define RegOpenKey RegOpenKeyW
#define RegOpenKeyEx RegOpenKeyExW
#define RegQueryInfoKey RegQueryInfoKeyW
#define RegQueryMultipleValues RegQueryMultipleValuesW
#define RegQueryValue RegQueryValueW
#define RegQueryValueEx RegQueryValueExW
#define RegReplaceKey RegReplaceKeyW
#define RegRestoreKey RegRestoreKeyW
#define RegSaveKey RegSaveKeyW
#define RegSetValue RegSetValueW
#define RegSetValueEx RegSetValueExW
#define RegUnLoadKey RegUnLoadKeyW
#else
typedef VALENTA VALENT,*PVALENT;
#define AbortSystemShutdown AbortSystemShutdownA
#define InitiateSystemShutdown InitiateSystemShutdownA
#define RegConnectRegistry RegConnectRegistryA
#define RegCreateKey RegCreateKeyA
#define RegCreateKeyEx RegCreateKeyExA
#define RegDeleteKey RegDeleteKeyA
#if (WINVER >= 0x0502)
#define RegDeleteKeyEx RegDeleteKeyExA
#endif
#define RegDeleteValue RegDeleteValueA
#define RegEnumKey RegEnumKeyA
#define RegEnumKeyEx RegEnumKeyExA
#define RegEnumValue RegEnumValueA
#define RegLoadKey RegLoadKeyA
#define RegOpenKey RegOpenKeyA
#define RegOpenKeyEx RegOpenKeyExA
#define RegQueryInfoKey RegQueryInfoKeyA
#define RegQueryMultipleValues RegQueryMultipleValuesA
#define RegQueryValue RegQueryValueA
#define RegQueryValueEx RegQueryValueExA
#define RegReplaceKey RegReplaceKeyA
#define RegRestoreKey RegRestoreKeyA
#define RegSaveKey RegSaveKeyA
#define RegSetValue RegSetValueA
#define RegSetValueEx RegSetValueExA
#define RegUnLoadKey RegUnLoadKeyA
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
Well I think is very old.. so my question how do I update it .. ?
Last edited on
How one updates the Windows SDK depends in large part on the compiler used. Visual Studio 2015/2017/2019/2022 has an installer that lets an end user modify what is installed.
Outside of VS, you can download the latest version from https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
I don't think it's an SDK version issue as they pretty much have always had both A/W versions, switched by _UNICODE.
I use win 7 32-bit and IDE Code::Blocks.

Using the MS version of the Windows SDK won't work, unless C::B is set up to use a MS compiler. Using the bundled compiler available with C::B, MinGW, does have the Windows SDK. The library files are modified to a different file format.

Why not try actually including <winreg.h> instead of relying on a possible inclusion from another header?

I have noticed that MinGW/GCC implicit includes differ from what MS includes sometimes.

10.0a is not old at all, it is for Windows 10, it just isn't the latest Windows 10 SDK available. IF that is what MinGW/GCC used for their Windows SDK version in the bundle. I honestly don't have a clue.

Upgrading/updating the compiler (and the headers) in C::B is different from VS. Download a newer compiler, install (preferably in a different location other than the C::B location) and modify the toolchain executable location(s) in the global compiler settings to the new folder location(s).
Well yahh.. just installed the V.S. finally and it works.. I mean I don't have any problems with not finding functions from libraries anymore.. but man the V.S. is slowing hell down my PC .. Code::Blocks is way faster.. Don't know what to say and which to use.... OR maybe buy another 10x faster Pc will solve lot's of things. :|
Okay ty guys again and Cheers.. :)
Windows 7 reached end of life over 18 months ago, Windows 11 has been announced. So getting a newer PC with Win10 preinstalled -- and is hefty enough for Win 11 specs -- might not be a bad idea. MS so far has hinted Win 11 will have a free upgrade policy from earlier versions. Much the same as they had when Win 10 was released.

Visual Studio 2019 is a resource hog, it is continually doing a lot of background tasks even as the IDE appears to be doing nothing other than waiting for user interaction.

I use VS as my main editor/compiler, debugger, though I have several compilers installed to use so any code I write is as C++ standard agnostic as I can make it.

When creating Windows apps it never hurts to use VS, it has the best support for the Windows SDK.

That support does come at a cost, though. Hefty resource usage is one of those costs.

MS is trying to discourage people from developing Windows Desktop apps in favor of Universal Windows apps. Apps that can run on any device that runs some form of Windows.
FuzzyGuy reached his end of life about 45 years ago - that being the time he wrote his first (and last) line of code. The rest is a sad saga of life in a trailer park or in a cardboard box with the unemployable Zapshe_No _Soup_For_Him
Topic archived. No new replies allowed.