Solved

RAS Server API

Posted on 1998-04-12
1
305 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now