odd problem in called function

J

Jake Thompson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top