Solved

RasGetConnectionStatistics API Use

Posted on 2003-12-03
6
456 Views
Last Modified: 2013-11-13
RasGetConnectionStatistics  API defined in which header file, using ras.h gives undeclared identifier error...
I want to get the stats of the connections dialup  which is established.

Please suggest

Joshmachine
0
Comment
Question by:joshmachine
  • 2
6 Comments
 
LVL 22

Expert Comment

by:cookre
Comment Utility
Was it that ras.h can't be found or there'e a compile error in it?
If the latter, what's the error?
0
 

Author Comment

by:joshmachine
Comment Utility
"error C2065: RasGetConnectionStastics Undeclared identifier"

I have included the "ras.h" file , the MSDN documentation says that this API is declared in ras.h, but i am getting this error on compile time.
Please suggest

joshmachine
0
 
LVL 22

Accepted Solution

by:
cookre earned 125 total points
Comment Utility
Bingo.

That routine is not in the VC6 RAS.H, but is in the VC7 RAS.H.

I found it in these two files:

C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\Ras.h
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\prerelease\Ras.h


Here's its declaration:

DWORD APIENTRY RasGetConnectionStatistics(HRASCONN hRasConn,RAS_STATS *lpStatistics);


typedef struct _RAS_STATS
{
    DWORD   dwSize;
    DWORD   dwBytesXmited;
    DWORD   dwBytesRcved;
    DWORD   dwFramesXmited;
    DWORD   dwFramesRcved;
    DWORD   dwCrcErr;
    DWORD   dwTimeoutErr;
    DWORD   dwAlignmentErr;
    DWORD   dwHardwareOverrunErr;
    DWORD   dwFramingErr;
    DWORD   dwBufferOverrunErr;
    DWORD   dwCompressionRatioIn;
    DWORD   dwCompressionRatioOut;
    DWORD   dwBps;
    DWORD   dwConnectDuration;

} RAS_STATS, *PRAS_STATS;

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now