mirror of
https://github.com/MichaelGrafnetter/DSInternals
synced 2024-12-13 09:57:29 +00:00
19 lines
505 B
C#
19 lines
505 B
C#
using DSInternals.Common.Interop;
|
|
using Microsoft.Win32;
|
|
using System;
|
|
|
|
namespace DSInternals.Common
|
|
{
|
|
public static class RegistryKeyExtensions
|
|
{
|
|
public static string GetClass(this RegistryKey key)
|
|
{
|
|
string keyClass;
|
|
DateTime lastWrite;
|
|
Win32ErrorCode result = NativeMethods.RegQueryInfoKey(key.Handle, out keyClass, out lastWrite);
|
|
Validator.AssertSuccess(result);
|
|
return keyClass;
|
|
}
|
|
}
|
|
}
|