Before entering in the application, a login and a password
is asked. I would like to authenticate with LDAP annuary
(Active Directory).
I've tried to put library furnitured by Sybase (see link,
http://www.sybase.com/detail?id=1058501#789) in my project
but I fail.
With this link you get a zip file called "pb2ldap.zip" which
contains Powerbuilder Libraries and dll files.
When I launch LDAP authentification : my program fails, it
cannot launch Java virtual machine.
I don't know why, has someone already tested these libraries
?
Thanks for all information you can put in this subject.
http://www.topwizprogramming.com/freecode_validlogon.html
Here is the documentation for LogonUser:
http://msdn.microsoft.com/en-us/library/aa378184(VS.85).aspx
<Courtigu> wrote in message news:4ab77ee2.122...@sybase.com...
But I have 2 more questions :
1) If I attempt to log with a user and password which is not
a local account of the PC but which is an active directory
account known in the local network, can I use this function?
2) The function LogonUser doesn't require the IP address of
the named server on which Active Directory is running. How
does it find this server ?
Thanks for all information that could help me.
> I have an example using the Win API function LogonUser
> which is a much easier way of doing it.
>
> http://www.topwizprogramming.com/freecode_validlogon.html
>
> Here is the documentation for LogonUser:
>
>
http://msdn.microsoft.com/en-us/library/aa378184(VS.85).aspx
>
> <Courtigu> wrote in message
> news:4ab77ee2.122...@sybase.com... >I work on
> Client Application developed with Powerbuilder 9? >
> > Before entering in the application, a login and a
> > password is asked. I would like to authenticate with
> > LDAP annuary (Active Directory).
> >
> > I've tried to put library furnitured by Sybase (see link
> > , http://www.sybase.com/detail?id=1058501#789) in my
My example Netquery has the function NetWkstaGetInfo which will return the
domain that the computer is a member of.
<Courtigu> wrote in message news:4ab8819b.366...@sybase.com...
Excellent code, thanks a lot!!! Believe it or not I am still using PB
7 and this code was not working there. It does work on PB 11.5. Do you
now why ??
Update to above issue - I used following declerations and it worked on
PB 7 also. The change was to use logonuserA instead on LogonuserW as
the alias. all other declerations were kept as in your (Roland Smith)
post.
Function ulong WNetGetUser( &
string lpname, &
ref string lpusername, &
ref ulong buflen &
) Library "mpr.dll" Alias For "WNetGetUserW"
Function boolean LogonUser ( &
string lpszUsername, &
string lpszDomain, &
string lpszPassword, &
ulong dwLogonType, &
ulong dwLogonProvider, &
ref ulong phToken &
) Library "advapi32.dll" Alias For "LogonUserA"
Function boolean CloseHandle ( &
ulong hObject &
) Library "kernel32.dll"
Thanks Robert. Your code helps me a lot and it works with my
application in the local network of the customer.