Board index » delphi » So *nobody* knows the Windows NT Network API from Delphi?

So *nobody* knows the Windows NT Network API from Delphi?

Hi Roger,

Quote
> A couple of weeks ago I asked if anyone used the Windows NT network
> API from Delphi (v2). The problem was that several API calls haven't been
> translated into Pascal calls by Borland - I was particularly concerned
> with that of retrieving the domain name, PDC name, and changing user
> passwords.

There's a file called mslogon.zip on Delphi Super Page
(http://sunsite.icm.edu.pl/delphi/) which gets you the info. Here's the
description:

  mslogon.zip ( 12,486 bytes ) Demonstrates programatically logging
      on and off a Microsoft NT or LanMan Domain with or without dialog
      boxes ( ver. 1.0.2, uploaded 1997-2-17 )  by John Melendy

Hope this helps.

Cheers!                                                 - Jon -

 

Re:So *nobody* knows the Windows NT Network API from Delphi?


If you have the developer's or higher version of Delphi, you have the
source code to the VCL.  If you print out the source code of the
windows.pas unit, you will find pascal declarations of almost all of the
functions to access any part of the Win32 API.  Good luck.
Gene

Roger Foss <roger.f...@oslo.itservice.telenor.no> wrote in article
<MPG.e6d11c91eb7de5f989...@134.47.108.15>...

Quote
> A couple of weeks ago I asked if anyone used the Windows NT network API
> from Delphi (v2).  The problem was that several API calls haven't been
> translated into Pascal calls by Borland - I was particularly concerned
> with that of retrieving the domain name, PDC name, and changing user
> passwords.

> I also asked if anyone knew of components or units that encapsulated the
> NT (LANMAN) network API.

> So far, nobody has replied.  COME ON, GUYS?!  At least somebody explain
> how to go about using the NetGetDCName function (it's in the WIN32.HLP
> file) and translating the NET_API_STATUS structure. I'll take it from
> there, and if I come up with a few components or units I'll make'em
> freeware w/source.  But I need something to get started..

> Roger

Re:So *nobody* knows the Windows NT Network API from Delphi?


Quote
Roger Foss wrote:

> A couple of weeks ago I asked if anyone used the Windows NT network API
> from Delphi (v2).  The problem was that several API calls haven't been
> translated into Pascal calls by Borland - I was particularly concerned
> with that of retrieving the domain name, PDC name, and changing user
> passwords.

> I also asked if anyone knew of components or units that encapsulated the
> NT (LANMAN) network API.

> So far, nobody has replied.  COME ON, GUYS?!  At least somebody explain
> how to go about using the NetGetDCName function (it's in the WIN32.HLP
> file) and translating the NET_API_STATUS structure. I'll take it from
> there, and if I come up with a few components or units I'll make'em
> freeware w/source.  But I need something to get started..

Roger,

Don't know much about the NT API calls, but I did a bit of searching (on
my Win95 machine), and this is what I found out:

NET_API_STATUS is defined as,

#define NET_API_STATUS DWORD

It's not actually a structure. All you have to do is figure out what it
will mean when it returns.

In addition, Borland doesn't have to "translated" API calls. They
usually just show you the Pascal version (Pascal datatypes) in the help
file. All you have to do is map the appropriate Pascal datatypes to the
C/C++ datatypes that the API call uses. You might have to load the DLL
that exports the function (probably NetAPI32.DLL), since there may not
be an "include" file. The compiler should be able to figure out the
rest.

Actually, if the Delphi "uses" files are anything like the C++ "include"
files, they should be packed full of #ifdef so that the version of
Delphi on an NT will have all the NT functions defined, as well as
datatypes required...

Hope this helps a bit.

David.

Re:So *nobody* knows the Windows NT Network API from Delphi?


In article <01bcb35f$e64c33f0$0390a8c0@svr_theta>, Gene
(ge...@mindspring.com) says...

Quote
> If you have the developer's or higher version of Delphi, you have the
> source code to the VCL.  If you print out the source code of the
> windows.pas unit, you will find pascal declarations of almost all of the
> functions to access any part of the Win32 API.  Good luck.
> Gene

  (Thanks for your replies, everyone)

   Ah... The windows.pas file is exactly the one that lacks the
   Net API declarations.
   But perhaps someone has an updated windows.pas from Delphi 3,
   and could post it here?

Roger

Other Threads