Solved

RAS Server API

Posted on 1998-04-12
1
312 Views
Last Modified: 2010-04-04
I'm attempting to call routines in the RASSAPI.DLL in Windows NT from Delphi 3, but I'm not having much success.  If anyone can provide me with a translation from VC++ to Delphi 3 for the following it should help me on my way.

<from the header file>

typedef struct _RAS_SERVER_0
{
    WORD TotalPorts;             // Total ports configured on the server
    WORD PortsInUse;             // Ports currently in use by remote clients
    DWORD RasVersion;            // version of RAS server
} RAS_SERVER_0, *PRAS_SERVER_0;

DWORD APIENTRY RasAdminServerGetInfo(
    IN const WCHAR *  lpszServer,
    OUT PRAS_SERVER_0 pRasServer0
    );

<from the C File>
RasAdminServerGetInfo(RasSrv, pRasServer0);
0
Comment
Question by:Dazza051197
[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
1 Comment
 
LVL 1

Accepted Solution

by:
mrider earned 200 total points
ID: 1361471
it'd be like this:
type RAS_SERVER_0 = record
 TotalPorts word,
 PortsInUse word,
 RasVersion integer
end;
PRAS_SERVER_0=^RAS_SERVER_0;
var
 Server:pwidechar;
 RasServer:PRas_Server_0;
 error:integer;
function RasAdminServerGetInfo;external
begin
 error:=RasAdminServerGetInfo(Server,RasServer);
end.
.....
and
 RasAdminServerGetInfo must be stdcall and external from rassapi.dll
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

688 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