Solved

RasGetConnectionStatistics API Use

Posted on 2003-12-03
6
467 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 9866949
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
ID: 9872499
"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
ID: 9873071
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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 …
Six Sigma Control Plans

695 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