By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,897 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,897 IT Pros & Developers. It's quick & easy.

RasEnumConnections

P: n/a
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?
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Blind" <at******@public.srce.hr.removethiswhenyousendmail > wrote in message
news:cf**********@bagan.srce.hr...
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++.

--
David Hilsee
Jul 22 '05 #2

P: n/a
> 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++.

--
David Hilsee
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.