c# 中调用advapi32.dll中的 RegQueryStringValue 如何定义,不知那错了
给个c#实例,谢了我是这样定义的,可就是取不出值,
[DllImport("advapi32.dll", EntryPoint = "RegQueryValueExA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern int RegQueryStringValue(int hKey, string lpValueName, int lpReserved, ref int lpType,string lpData, ref int lpcbData);
string regData = "";
regDataLength = 255;
success = RegQueryStringValue(hKey, value, 0, ref regType, regData, ref regDataLength);
if (success == 0)
functionReturnValue = regData;
帮看那错了 --------------------编程问答-------------------- string lpData这个得用StringBuilder吧
补充:.NET技术 , C#