这篇文章主要介绍了VB中的RasEnumConnections函数返回632错误解决方法,使用MSDN中的例子在XP SP3系统上出现的错误,需要的朋友可以参考下
今天用了一下RasEnumConnections函数,发现MSDN上的例子是错误的。
MSDN上RasEnumConnections的文档是这么说的:
代码如下:
To determine the required buffer size, call RasEnumConnections with lprasconn set to NULL. The variable pointed to by lpcb should be set to zero. The function will return the required buffer size in lpcb and an error code of ERROR_BUFFER_TOO_SMALL.
MSDN上提供的示例代码也是这么写的:
代码如下:
DWORD __cdecl wmain(){
DWORD dwCb = 0;
DWORD dwRet = ERROR_SUCCESS;
DWORD dwConnections = 0;
LPRASCONN lpRasConn = NULL;
dwRet = RasEnumConnections(lpRasConn, &dwCb, &dwConnections);
if (dwRet == ERROR_BUFFE来源[email protected]搞@^&代*@码网R_TOO_SMALL) {
// ……
}
以上就是VB中的RasEnumConnections函数返回632错误解决方法的详细内容,更多请关注gaodaima搞代码网其它相关文章!