Programming/C Win32 MFC2008. 12. 30. 00:48
open이 있으면 close가 있는 법. 레지스트리 역시 open / create를 했으면 close를 해주어야 한다.
hKey [in]

A handle to the open key to be closed. The handle must have been opened by the RegCreateKeyEx, RegCreateKeyTransacted, RegOpenKeyEx, RegOpenKeyTransacted, or RegConnectRegistry function.


Remarks

The handle for a specified key should not be used after it has been closed, because it will no longer be valid. Key handles should not be left open any longer than necessary.

The RegCloseKey function does not necessarily write information to the registry before returning; it can take as much as several seconds for the cache to be flushed to the hard disk. If an application must explicitly write registry information to the hard disk, it can use the RegFlushKey function. RegFlushKey, however, uses many system resources and should be called only when necessary.


[RegOpenKey : http://msdn.microsoft.com/en-us/library/ms724895(VS.85).aspx]
[RegCloseKey : http://msdn.microsoft.com/en-us/library/ms724837(VS.85).aspx]
[RegCreateKey : http://msdn.microsoft.com/en-us/library/ms724842(VS.85).aspx]
[RegDeleteKey : http://msdn.microsoft.com/en-us/library/ms724845(VS.85).aspx]
Posted by 구차니