[DllImport ("advapi32.dll", CharSet=CharSet.Unicode, EntryPoint="RegEnumValue")]
private static extern int RegEnumValue(IntPtr hKey, int dwIndex,
StringBuilder lpValueName,
ref int lpcbValueName, IntPtr lpReserved,
ref RegistryValueKind lpType, IntPtr lpData, IntPtr lpcbData); while (RegEnumValue(lngKeyHandle, lngCurIdx, ValueName, ref ValueNameLen, IntPtr.Zero, ref typecode, aaa, IntPtr.Zero) == Win32ResultCode.Success)
{
//comboBox1.Items.Add(aaa.ToString());
lngCurIdx = lngCurIdx + 1;
ValueNameLen = 256;
ValueLen = new IntPtr(256);
};在VB中标红的地方有Any类型,调用RegEnumValue的时候是用Byval aaa,C#中如何取值啊?
private static extern int RegEnumValue(IntPtr hKey, int dwIndex,
StringBuilder lpValueName,
ref int lpcbValueName, IntPtr lpReserved,
ref RegistryValueKind lpType, IntPtr lpData, IntPtr lpcbData); while (RegEnumValue(lngKeyHandle, lngCurIdx, ValueName, ref ValueNameLen, IntPtr.Zero, ref typecode, aaa, IntPtr.Zero) == Win32ResultCode.Success)
{
//comboBox1.Items.Add(aaa.ToString());
lngCurIdx = lngCurIdx + 1;
ValueNameLen = 256;
ValueLen = new IntPtr(256);
};在VB中标红的地方有Any类型,调用RegEnumValue的时候是用Byval aaa,C#中如何取值啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货