Solved

RAS Server API

Posted on 1998-04-12
1
308 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 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