@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm @SystemRuntimeInteropServicesHandleRef=http://msdn2.microsoft.com/library/System.Runtime.InteropServices.HandleRef.aspx @SystemGCKeepAlive=http://msdn2.microsoft.com/library/System.GC.KeepAlive.aspx Summary: Writes all the attributes of the specified open registry key into the registry. !!!!C# Signature: [DllImport("coredll.dll")] public static extern int RegFlushKey(IntPtr hKey); !!!!VB Signature: Declare Function RegFlushKey Lib "CoreDll.dll" (ByVal hkey As IntPtr) As UInt32 !!!!VB Demo Code: Declare Function RegFlushKey Lib "coredll" (ByVal hkey As IntPtr) As UInt32 Const HKEY_CLASSES_ROOT = &H80000000 Const HKEY_CURRENT_USER = &H80000001 Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_USERS = &H80000003 RegFlushKey(HKEY_CLASSES_ROOT) RegFlushKey(HKEY_CURRENT_USER) RegFlushKey(HKEY_LOCAL_MACHINE) RegFlushKey(HKEY_USERS) !!!!User-Defined Types: None. !!!!Notes: The .NET Compact Framework does not contain a HandleRef@SystemRuntimeInteropServicesHandleRef type, so it may be necessary to call GC.KeepAlive@SystemGCKeepAlive after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. !!!!Tips & Tricks: None. !!!!Alternative Managed API: RegistryKey.Flush() Documentation: RegFlushKey@msdn on MSDN
Edit coredll.regflushkey
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.