问题描述
您好,
我正试图以显示友好的
格式从注册表中获取MUI字符串。从我读过的,字符串格式如下:
a ?? @ [path] \dllname,-strIDa ??是MUI字符串并通过RegLoadMUIString API调用接收特殊处理。
这就是我提出来的电话:
[DllImport(" advapi32.dll")]
内部静态extern long RegLoadMUIString(IntPtr hKey,string pszValue,
StringBuilder pszOutBuf,int cbOutBuf,out int pcbData,uint标志,字符串
pszDirectory);
我正在使用指向打开的注册表项的有效指针调用此函数,
传入适当的值键(pszValue),其中MUI格式为
字符串。当我检查输出缓冲区(pszOutBuf)时,它总是一个空的
字符串。
有没有人能够让这个电话工作?我在网上找不到任何例子
。
谢谢,
-bp
Hello,
I''m trying to get an MUI string out of the registry in display friendly
format. From what I''ve read, strings in the following format:
a??@[path]\dllname,-strIDa?? are MUI strings and receive special handling via
the RegLoadMUIString API call.
This is what I have come up with for the call:
[DllImport("advapi32.dll")]
internal static extern long RegLoadMUIString(IntPtr hKey, string pszValue,
StringBuilder pszOutBuf, int cbOutBuf, out int pcbData, uint Flags, string
pszDirectory);
I''m calling this function with a valid pointer to an open registry key,
passing in the appropriate value key (pszValue) which has the MUI formatted
string. When I check the output buffer (pszOutBuf) it''s always an empty
string.
Has anyone been able to get this call to work? I cannot find any examples
on the web.
thanks,
-bp
推荐答案
两个函数的返回类型应该是int,而不是long。
Mattias
-
Mattias Sj?gren [C#MVP] mattias @ mvps.org
|
请回复到新闻组。
The return type for both functions should be int, not long.
Mattias
--
Mattias Sj?gren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
两个函数的返回类型应为int,不长。
Mattias
-
Mattias Sj ?? gren [C#MVP] mattias @ mvps.org
|
请回复到新闻组。
The return type for both functions should be int, not long.
Mattias
--
Mattias Sj??gren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
这篇关于RegLoadMUIString Vista P-Invoke的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!