Hi X-perts,
I am getting a strage value when i am calling a DLL to validate user.
This code is working on a server but showing error on a diffrent server.
here is the code..please hav a look
--------------------------------------------------------------------------------------------------------------
#!c:\perl\bin\perl.exe
use strict;
use CGI;
use CGI::Carp('fatalsToBrowser');
use Win32::Internet();
use URI::Escape;
use warnings;
use Win32::API;
use FindBin;
use constant IS_NOT_PEOPLESOFT_ONLY_ACCOUNT => 0;
use constant IS_PEOPLESOFT_ONLY_ACCOUNT => 1;
sub main()
{
print "Content-type: text/html\n\n";
my $inet = new Win32::Internet();
my $path = $FindBin::Bin; //Path is right
my $path = $FindBin::Bin;
my $auth = Win32::API->new("$path/authenticate.dll", '_isUser@12', 'PPP', 'I');
if(not defined $auth)
{
#control is not coming here that means $auth is ok die "Can't import _isUser!: $!";
}
# Set variables to call with.
my $domain='xyz';
# Call it and check the return value.
my $success = $auth->Call('msharm', $domain, 'abcdef');
#For every valid user we are getting $success = 2, So the control directly goes in the else statment
#End Modifications
if ($success == 0 || $success == 1385)
{
# Success! Account and password are valid in FLASH. Redirect user to application via post of #login info.
print"NT Authentication was Successfull!!";
#post_data($query, $username, $escaped_password, $success, $action, $httpPort, $timezone);
}
else
{
# Authentication failed for some reason. Added a space to username so we get a decent #looking error message
print"NT Authentication was NOTTTT Successfull!!";
#post_data($query, " $username", $escaped_password, $success, $action, $httpPort, $timezone);
}
}
main();
-------------------------------------------------------------------------------------------------------------
Thanks,
Manic