Hi all,
i want to find the last write time of a registry key but i am not able to find a function for it in C# (like the function regqueryinfokey() in c++) so can any one tell me how to find last write time of registry key in C#

Recommended Answers

All 2 Replies

You could

[DllImport("advapi32.dll", EntryPoint="RegEnumKeyEx")] public static extern int RegEnumKeyExA(int hKey, int dwIndex, string lpName, ref int lpcbName, int lpReserved, string lpClass, ref int lpcbClass, ref FILETIME lpftLastWriteTime)

LizR means that you have to use the COM interoperability
So don't forget to include the

System.Runtime.Interop; to your project else you will not be able to use the ddlImportattribute

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.