RasEnumConnections

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?
 
D

David Hilsee

Blind said:
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)
-------------------------------------------------------------

Linker errors when referencing external functions commonly occur when you
fail to link with the appropriate compiled object code. MSDN's
documentation says that the function is provided by Rasapi32.lib, so you may
want to link your program with that. If you have any more questions about
RAS, an MS-specific newsgroup would be a better place to ask them than
comp.lang.c++.
 
D

David Hilsee

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)
-------------------------------------------------------------

(Re-post, since the original seems to have vanished)

Linker errors when referencing external functions commonly occur when you
fail to link with the appropriate compiled object code. MSDN's
documentation says that the function is provided by Rasapi32.lib, so you may
want to link your program with that. If you have any more questions about
RAS, an MS-specific newsgroup would be a better place to ask them than
comp.lang.c++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top