使用Microsoft.Win32.RegistryKey (或任何相关类),如何查询注册表项的上次写入时间?
发布于 2013-03-26 01:28:53
您将需要使用P/Invoke来调用Win32接口:
MSDN: RegQueryInfoKey function
来自pinvoke.net的签名
[DllImport("advapi32.dll", EntryPoint="RegQueryInfoKey", CallingConvention=CallingConvention.Winapi, SetLastError=true)]
extern private static int RegQueryInfoKey(
UIntPtr hkey,
out StringBuilder lpClass,
ref uint lpcbClass,
IntPtr lpReserved,
out uint lpcSubKeys,
out uint lpcbMaxSubKeyLen,
out uint lpcbMaxClassLen,
out uint lpcValues,
out uint lpcbMaxValueNameLen,
out uint lpcbMaxValueLen,
out uint lpcbSecurityDescriptor,
IntPtr lpftLastWriteTime);https://stackoverflow.com/questions/15621053
复制相似问题