private static bool QueryValueStringA(HKey hKey, string lpValueName, IntPtr lpData, uint cbData) { AdvApi32.RegistryValueType type = AdvApi32.RegistryValueType.Sz; return(AdvApi32.RegQueryValueExA(hKey, lpValueName, 0, ref type, lpData, ref cbData) == 0); }
private static bool QueryValueLengthA(HKey hKey, string lpValueName, ref uint lpcbData) { AdvApi32.RegistryValueType type = AdvApi32.RegistryValueType.Binary; return(AdvApi32.RegQueryValueExA(hKey, lpValueName, 0, ref type, IntPtr.Zero, ref lpcbData) == 0); }