Solved

RasGetConnectionStatistics API Use

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
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.
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…
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 …

773 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