Solved

RasGetConnectionStatistics API Use

Posted on 2003-12-03
6
465 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

749 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