Read INI-File

Ben Hutchings ben.hutchings at roundpoint.com
Wed Feb 28 19:00:07 EST 2001


"Marc Vollmer" <marc.vollmer at mahr.de> writes:

> Thanks,
> 
> but no solution, perhaps my computer don't understand me.
> 
> So, I test it with the system.ini in the c:\winnt\.
> 
> Please test it, too. Perhaps it is a windows 2k problem? I don't know, what
> I still could do.
<snip>

The documentation for GetPrivateProfileString() (the underlying Win32
function) says that under Windows NT/2000 this will refer to a ini-
to-registry mapping defined under HKLM\Software\Microsoft\Windows NT\
CurrentVersion\IniFileMapping.  This Windows 2000 system has the
registry setting

    ...\IniFileMapping\system.ini\drivers=
        "#SYS:Microsoft\Windows NT\CurrentVersion\drivers"

The # specifies something to do with the initial setting and SYS:
means HKLM\Software.  So this leads us to HKLM\Software\Microsoft\
Windows NT\CurrentVersion\drivers\timer.  Here that's set to
"timer.drv".

However, since win32ui is based on MFC, I suspect that the functions
you are using go through MFC's profile functions, and MFC has another
way of mapping these to the registry (SetRegistryKey).  Is it possible
that you're calling that somewhere, or that PythonWin is doing this?
As far as I can see, there is no way of switching back once this has
been done.

-- 
Any opinions expressed are my own and not necessarily those of Roundpoint.



More information about the Python-list mailing list