?
Solved

RAS Server API

Posted on 1998-04-12
1
Medium Priority
?
313 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 800 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

Independent Software Vendors: 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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 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