Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

RasGetConnectionStatistics API Use

Posted on 2003-12-03
6
Medium Priority
?
474 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

636 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