Hi i am checking the GUID of SqlClass which is in my Test.dll But it does not give success it failed with value... Whatis wrong in this code.
#include <windows.h>
#include <iostream>
using namespace std;
int main() {
HKEY hk;
long n = RegOpenKeyEx(HKEY_CLASSES_ROOT,TEXT("\\CLSID\\SqlClass"),
0,KEY_QUERY_VALUE, &hk );"
if ( n == ERROR_SUCCESS ) {
cout << "OK" << endl;
}
else {
cout << "Failed with value " << n << endl;
}
}
I tried like this also RegOpenKeyEx(HKEY_CLASSES_ROOT,TEXT("\CLSID\46A951AC-C2D9-48e0-97BE-91F3C9E7B065"), 0,KEY_QUERY_VALUE, &hk )
THIS CODE WORKS FINE
#include < windows.h >
# include < iostream >
using namespace std;
int main() {
HKEY hk;
long n = RegOpenKeyEx(HKEY_CLASSES_ROOT,
TEXT("\\CLSID\\{46A951AC-C2D9-48e0-97BE-91F3C9E7B065}"),
0,KEY_QUERY_VALUE, &hk );"
if ( n == ERROR_SUCCESS ) {
cout << "OK" << endl;
}
else {
cout << "Failed with value " << n << endl;
}
}