what's the error msg?
解决方案 »
- 录的wav文件声音很小,希望用PlaySound或DirectSound播放时将声音放大?
- C# 局域网通信程序_防火墙
- c# gdi+绘图的问题,用线程拼图,急!在线等解决办法!大哥大姐们帮忙!!
- 求一个思路
- script +<%#%> 的调用问题,哪位会
- 请问各位大哥 公司开发用VS.NET 2005 还是VS.NET 2003?
- 请问怎样用一个WinForm打开另一个WinForm后,两个Form之间可以互相设置控件的值?
- 求Rational XDE Developer Plus for VS.NET 2003的license文件
- 哪儿有net2005下载
- 请教 DDE
- 求救:请问如何用c#制作压缩软件,c#中有没有像Java中的ZipEntry、ZipInputStream的东东
- c#中怎么樣判斷一個字符串是數值型的???
在MSDN中,GetPrivateProfileString函数的原型如下:
DWORD GetPrivateProfileString(
LPCTSTR lpAppName, // section name
LPCTSTR lpKeyName, // key name
LPCTSTR lpDefault, // default string
LPTSTR lpReturnedString, // destination buffer
DWORD nSize, // size of destination buffer
LPCTSTR lpFileName // initialization file name
);
其中返回值及参数nSize的类型都为DWORD,为32位的无符号整数。而在C#中,long表示64位符号整数,uint表示32位无符号整数。因此在您的程序中的long都必须改为uint,程序才会运行正常。如下所示:[DllImport("kernel32.dll")]
public static extern uint GetPrivateProfileString(
string lpAppName, // section name
string lpKeyName, // key name
string lpDefault, // default string
StringBuilder lpReturnedString, // destination buffer
uint nSize, // size of destination buffer
string lpFileName // initialization file name
);
- 微软全球技术中心 VC技术支持
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款
(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查
(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。