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

x
?
Solved

RAS Server API

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

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