I use ubuntu 9.04;
I have a function called "isLogEnabled" in my project on windows, I wanna port it to linux.
I know that I should have a "config.h" file in linux to get log from a specific Shared object and ..., but because I'm new to linux,
I don't know how this should be done, this is my function:
Code: Select all
//This function return True if log policy is set in registry and False otherwise
int isLogEnabled()
{
HKEY hKey;
LONG lRes;
DWORD dwType, dwSize = 0;
int retVal = 0;
if((RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyCorp", 0, KEY_ALL_ACCESS, &hKey)) == ERROR_SUCCESS)
{
lRes = RegQueryValueEx(hKey, "SpecialMode", 0, &dwType, NULL, &dwSize );
if(lRes == ERROR_SUCCESS)
retVal = 1;
RegCloseKey(hKey);
}
return retVal;
}
with linux;
Could you help me with this please?!
TIA.