Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to remove key from INI file?

54 views
Skip to first unread message

Graham Dicker

unread,
Nov 22, 2012, 10:54:38 AM11/22/12
to

According to the documentation, WritePrivateProfileString will remove a key
from an INI file if the third parameter (called lpString, normally used to
set the value of the key) is NULL.

I can't see how to get the KernelLibrary method

writePrivateProfileString: lpszSection lpszEntry: lpszEntry lpszString:
lpszString lpszFileName: lpszFileName

to accept a NULL for that parameter.

I also tried creating my own method in KernelLibrary and making that third
parameter be a dword instead of lpstr but it didn't work.

Can anyone point me in the right direction with this?

Thanks

Graham Dicker

Graham Dicker

unread,
Nov 23, 2012, 4:03:20 AM11/23/12
to
I solved it - using nil for the third parameter works fine.

0 new messages