Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Odd problem with called function in DLL

Reply
Thread Tools

Odd problem with called function in DLL

 
 
Jake Thompson
Guest
Posts: n/a
 
      01-06-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd behavior with odd code Michael Speer C Programming 33 02-18-2007 07:31 AM
WebService called by automation dll times out when being called from Navision Felix ASP .Net Web Services 1 09-29-2006 01:43 PM
odd problem in called function Jake Thompson C Programming 0 01-06-2006 09:43 PM
Templete Function called from shared object file(DLL) Haro Panosyan C++ 2 04-11-2005 09:08 PM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57