[Wine] Problem in "porting" a function on windows to linux?

jeremy28 wineforum-user at winehq.org
Sat Jun 26 02:56:49 CDT 2010


Hi all!

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:
//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;
  }



Since I think we don't have registry concept in linux and this function uses registry APIs, I'm confused to change it to be compatible
with linux;

Could you help me with this please?!

TIA.







More information about the wine-users mailing list