关于读取INI文件的API问题
2017-01-19 10:56
246 查看
GetPrivateProfileString的返回值,我觉得设计的有问题,,
The return value is the number of characters copied to the buffer, not including the terminating null character.
If neither lpAppName nor lpKeyName is NULL and the supplied destination buffer is too small to hold the requested string, the string is truncated and followed by a null character, and the return value is equal to nSize minus one.
If either lpAppName or lpKeyName is NULL and the supplied destination buffer is too small to hold all the strings, the last string is truncated and followed by two null characters. In this case, the return value is equal to nSize minus two.
假设事先我也不知道INI文件里的一个KEY的值有多少字符,就给了一个50字符的BUG去读,返回值49! 这时我怎么判断有没有读完呢,,,
类似这样的问题还有_tstol,也是一样,无法判断啊,,,
The return value is the number of characters copied to the buffer, not including the terminating null character.
If neither lpAppName nor lpKeyName is NULL and the supplied destination buffer is too small to hold the requested string, the string is truncated and followed by a null character, and the return value is equal to nSize minus one.
If either lpAppName or lpKeyName is NULL and the supplied destination buffer is too small to hold all the strings, the last string is truncated and followed by two null characters. In this case, the return value is equal to nSize minus two.
假设事先我也不知道INI文件里的一个KEY的值有多少字符,就给了一个50字符的BUG去读,返回值49! 这时我怎么判断有没有读完呢,,,
类似这样的问题还有_tstol,也是一样,无法判断啊,,,
相关文章推荐
- 关于QT5读取ini文件中文乱码问题
- [ZT]关于ASP.NET读取XML新闻的问题
- 关于Assembly.CreateInstance中被启动对象读取配置文件的问题
- 高手来看看这段代码是不是很杂啊!!关于API绘图的问题!
- 关于串口数据读取的几个问题
- 关于 StreamReader 逐字读取字符的问题
- 关于ASP.NET读取XML新闻的问题
- 关于ini读取错误问题?
- 两个关于.NET读取EXCEL文件的问题,记下来,很有用!
- 关于图片读取的问题!
- 关于oracle数据库中读取文件路径的问题整理
- 关于API的DLL的搜索顺序问题
- 关于读取数据库时中文编程乱码的问题
- 今天解决了两个关于.NET读取EXCEL文件的问题,记下来,很有用!
- prjGetWriteINIFile - How to Read-Write INI file using VB & API - 读取/写入INI文件 - VB6 + API - SourceCode - HackerJLY
- 关于消息钩子链的读取问题说明: NtUserSetWindowsHookEx返回的HHOOK怎么换成PHOOK
- 今天解决了两个关于.NET读取EXCEL文件的问题,记下来,很有用!
- 关于vb.net里面api Unicode/ANSI调用一个问题解答
- 关于读取txt文件的分段问题