473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DLL is not moving up the flag

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
Feb 14 '07 #1
1 1048
The DLL is returning 2 and it should return 0 or 1385..
Feb 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Woody Splawn | last post by:
I have a grid with, lets say, 3 fields in it, Debit, Credit and Comments, in that order. When the user moves to the debit field, if he enters data in it, I would like for the cursor to skip past...
3
by: Jim Archer | last post by:
Hi All... I'm been fighting this problem for a few days now, and it seems like it should be simple. But the solution has eluded me so far... I need to flag a record when it is updated or when...
3
by: raj.raghavan | last post by:
Hi, I am trying to move the msdb database, I am following the MS technet document. I have added trace flag "-T3608" to startup parameters, restarted the SQL server, stopped the agent, detatached...
14
by: TS | last post by:
I have this custom data list control and i override the onItemDatabound event. After upgrading to vs 2005, this event is not always getting called, though it does at other times. No changes were...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In a database search application (vb2005), the user wants to be able to scroll through records using the mousewheel. The data display form contains textboxes for the main data and a datagridview...
224
by: Jon Slaughter | last post by:
Sorry for all the cross posting but I'm interesting in getting a serious discussion about how usenet has become lately. Many people are moving away from usenet because of all the spam and cooks...
0
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
0
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
3
by: adiel_g | last post by:
Hello everyone, I am trying to move a field name to a variable in vb.net. For example, first I retrieve the record from the database and save its value: .... userGroup =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.