Is there someone who can help me learn how to modify the win.ini file by adding a new section.

I know I need to use
WriteProfileString and ReadProfileString but I can't find any code examples.

Later, I'll work on writing it to the registry.

Thanks.
Posted on 2006-03-05 07:55:05 by skywalker
Hi skywalker,

I left one on the other board for you. To use the registry you should just use the SHLWAPI functions..

.data
szKey DB "Software\MyCompany\MyApp\Params",0
szValue DB "count",0
NumOfRuns DD 0

.data?
dwType DD ?
cbData DD ?

.code
mov cbData, 4
invoke SHGetValue,HKEY_CURRENT_USER,offset szKey,offset szValue,offset dwType,offset NumOfRuns,offset cbData
inc NumOfRuns
invoke SHSetValue,HKEY_CURRENT_USER,offset szKey,offset szValue,REG_DWORD,offset NumOfRuns,4
Posted on 2006-03-05 11:55:01 by donkey