473,320 Members | 2,164 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,320 software developers and data experts.

Odd problem with called function in DLL

all psz fields are char *

I am doing this
gencm.pszDBName = cszConnect_s;
gencm.pszApplicationName = NULL;
gencm.pszUserID = cu_dbvi__szUserName;
gencm.pszPassword = cu_dbvi__szPassword;
gencm.pszNewPassword = (strlen(cu_dbvi__szNewPassword) ?
cu_dbvi__szNewPassword : NULL);
gencm.pszProxyID = NULL;
gencm.pszProxyScope = NULL;
gencm.fSession = SIM_SS_NORMAL;
gencm.pAsyncCtl = NULL;
//lstat = SimLibLogon(cszConnect_s, NULL, cu_dbvi__szUserName,
cu_dbvi__szPassword,
// (strlen(cu_dbvi__szNewPassword) ? cu_dbvi__szNewPassword : NULL),
NULL, NULL, SIM_SS_NORMAL, NULL, &rc
);

lstat = u_generic_cm_call(L"Logon", gencm, &rc);

When I set the code up to go to the Generic call it goes to the dll and
finds the generic call and looks and finds Logon
All the values are what they should be in the exe and in the dll. When
it finds the tag logon it perfoms

l_stat = SimLibLogoff( gencmdll.hSession, gencmdll.pAsyncCtl, pRC );

that in turn does the following - Something that was not changed

ULONG SIMENTRY SimLibLogon( pszDBName, pszApplicationName, pszUserID,
pszPassword, pszNewPassword,
pszProxyID, pszProxyScope, fSession, pAsyncCtl, pRC )

PSZ pszDBName, pszApplicationName, pszUserID, pszPassword,
pszNewPassword;
PSZ pszProxyID, pszProxyScope;
BITS fSession;
PASYNCCTLSTRUCT pAsyncCtl;
PRCSTRUCT pRC;
{
if(!hLibrary)
{
if(u_lib_init(TRUE))
return(1);
}
return(u_SimLibLogon( pszDBName, pszApplicationName, pszUserID,
pszPassword, pszNewPassword,
pszProxyID, pszProxyScope, fSession, pAsyncCtl, pRC ));

When I run it comes back with a 6081 saying I can't login however
if I swap out the code to call directly

lstat = SimLibLogon(cszConnect_s, NULL, cu_dbvi__szUserName,
cu_dbvi__szPassword,
(strlen(cu_dbvi__szNewPassword) ? cu_dbvi__szNewPassword : NULL),
NULL, NULL, SIM_SS_NORMAL, NULL, &rc
);

then it returns sucessfully

I don't get it both are sending the same data however one is going
through an initial generic call and the other one is not. Do you guys
have any ideas? At first I thought it was data related but as I said
everything is passed properly and the only fields that are really used
are the cszConnect, cu_dbvi__szUserName, cu_dbvi__szPassword, and the
(strlen(cu_dbvi__szNewPassword) ? cu_dbvi__szNewPassword : NULL)

The values of what is passed

cszConnect = L for the first value of "LIBSRVN"
cu_dbvi__szPassword = j for "jake"
cu_dbvi__szPassword = p for "password" <----not actual password :-)
cu_dbvi__szPassword, and the (strlen(cu_dbvi__szNewPassword) ?
cu_dbvi__szNewPassword : NULL) = Null because I don't have a new
password

Ideas?

Thanks
Jake

Jan 7 '06 #1
0 1059

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: beveled edges | last post by:
I'm using the XML functions in PHP 5. The callback function I set for namespace declarations doesn't get called. Can anyone help me out? The code is: $xml = '<addressbook...
1
by: beveled edges | last post by:
I'm using the XML functions in PHP 5. The callback function I set for namespace declarations doesn't get called. Can anyone help me out? The code is: $xml = '<addressbook...
3
by: jack | last post by:
Hi there, I have a function F(x, y, z) and I want to calculate f(a) + f(b), where f(x) = F(x, x, z0) z0 is fixed. Suppose somebody wrote a routine called "Compute" which simply computes f(a)...
47
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
4
by: Marc Tanner | last post by:
Hello, I am currently working on a eventhandling system or something similar, and have the problem of loosing scope. I have read many interesting posts on this group and the faq article about...
9
by: Curious Student | last post by:
Some places till now, I've seen function prototypes within functions instead of in the global declaration space, which I thought was the way. I thought it was <I>only</I>: int myfunction(int,...
33
by: Martin Jørgensen | last post by:
Hi, In continuation of the thread I made "perhaps a stack problem? Long calculations - strange error?", I think I now got a "stable" error, meaning that the error always seem to come here now...
5
by: Frank Swarbrick | last post by:
Has anyone come upon this problem? My DB2/LUW 9.1 database seems to be both "started and not started". Check out the following: C:\Program Files\IBM\SQLLIB\BIN>db2 connect to sample SQL1032N ...
3
by: stenasc | last post by:
Hi, I have created an C based application in linux that uses a number of dlls. Within the dlls themselves, the code calls sub functions e.g dll_1 (Main dll function is called Return_Answer....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.