- static const wxChar defunkt[] = _T("$$default");
-// TODO:
-/*
- if (file != "")
- {
- int n = GetPrivateProfileString((PCSZ)WXSTRINGCAST section, (PCSZ)WXSTRINGCAST entry, (PCSZ)defunkt,
- (PSZ)wxBuffer, 1000, (PCSZ)WXSTRINGCAST file);
- if (n == 0 || wxStrcmp(wxBuffer, defunkt) == 0)
- return FALSE;
- }
- else
- {
- int n = GetProfileString((PCSZ)WXSTRINGCAST section, (PCSZ)WXSTRINGCAST entry, (LPCTSTR)defunkt,
- (PSZ)wxBuffer, 1000);
- if (n == 0 || wxStrcmp(wxBuffer, defunkt) == 0)
- return FALSE;
- }
- if (*value) delete[] (*value);
- *value = copystring(wxBuffer);
- return TRUE;
-*/
- return FALSE;
+ HAB hab;
+ HINI hIni;
+ static const wxChar defunkt[] = _T("$$default");
+
+ if (file != "")
+ {
+ hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST file);
+ if (hIni != 0L)
+ {
+ ULONG n = ::PrfQueryProfileString( hIni
+ ,(PSZ)WXSTRINGCAST section
+ ,(PSZ)WXSTRINGCAST entry
+ ,(PSZ)defunkt
+ ,(void*)wxBuffer
+ ,1000
+ );
+ if (n == 0L || wxStrcmp(wxBuffer, defunkt) == 0)
+ return FALSE;
+ }
+ else
+ return FALSE;
+ }
+ else
+ {
+ ULONG n = ::PrfQueryProfileString( HINI_PROFILE
+ ,(PSZ)WXSTRINGCAST section
+ ,(PSZ)WXSTRINGCAST entry
+ ,(PSZ)defunkt
+ ,(void*)wxBuffer
+ ,1000
+ );
+ if (n == 0L || wxStrcmp(wxBuffer, defunkt) == 0)
+ return FALSE;
+ }
+ if (*value)
+ delete[] (*value);
+ *value = copystring(wxBuffer);
+ return TRUE;