B
Blind
I have problem with RasEnumConnections() Api function, it
backs me errors:
this error:
-------------------------------------------------------------
ViewAdapterInfo error LNK2019: unresolved external symbol
_RasEnumConnectionsA@12 referenced in function "public: void __thiscall
CViewAdapterInfoDlg::OnTimer(unsigned int)"
(?OnTimer@CViewAdapterInfoDlg@@QAEXI@Z)
-------------------------------------------------------------
and this:
---------------------------------------------------------------
ViewAdapterInfo fatal error LNK1120: 1 unresolved externals
---------------------------------------------------------------
code is here, where is problem?
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#include "stdafx.h"
#include "ViewAdapterInfo.h"
#include "ViewAdapterInfoDlg.h"
#include <Iphlpapi.h>
#include <Ras.h>
#include <raserror.h>
....
void CViewAdapterInfoDlg::OnTimer(UINT nIDEvent)
{
RASCONN * lpRasConn;
DWORD lpcb;
DWORD lpcConnections;
DWORD nRet=0;
lpRasConn = (LPRASCONN) GlobalAlloc(GPTR, sizeof(RASCONN));
lpRasConn->dwSize = sizeof(RASCONN);
lpcb = sizeof(RASCONN);
nRet =RasEnumConnections(lpRasConn, &lpcb, &lpcConnections);
if (nRet != 0)
{
m_title="bad";
KillTimer(1);
EndDialog(TRUE);
}
else{....
....
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Please help?
backs me errors:
this error:
-------------------------------------------------------------
ViewAdapterInfo error LNK2019: unresolved external symbol
_RasEnumConnectionsA@12 referenced in function "public: void __thiscall
CViewAdapterInfoDlg::OnTimer(unsigned int)"
(?OnTimer@CViewAdapterInfoDlg@@QAEXI@Z)
-------------------------------------------------------------
and this:
---------------------------------------------------------------
ViewAdapterInfo fatal error LNK1120: 1 unresolved externals
---------------------------------------------------------------
code is here, where is problem?
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#include "stdafx.h"
#include "ViewAdapterInfo.h"
#include "ViewAdapterInfoDlg.h"
#include <Iphlpapi.h>
#include <Ras.h>
#include <raserror.h>
....
void CViewAdapterInfoDlg::OnTimer(UINT nIDEvent)
{
RASCONN * lpRasConn;
DWORD lpcb;
DWORD lpcConnections;
DWORD nRet=0;
lpRasConn = (LPRASCONN) GlobalAlloc(GPTR, sizeof(RASCONN));
lpRasConn->dwSize = sizeof(RASCONN);
lpcb = sizeof(RASCONN);
nRet =RasEnumConnections(lpRasConn, &lpcb, &lpcConnections);
if (nRet != 0)
{
m_title="bad";
KillTimer(1);
EndDialog(TRUE);
}
else{....
....
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Please help?