Click here to Skip to main content
15,879,090 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is Doc/View a great architecture? Pin
includeh103-Oct-09 5:39
includeh103-Oct-09 5:39 
GeneralRe: Is Doc/View a great architecture? Pin
Jan Sommer3-Oct-09 5:48
Jan Sommer3-Oct-09 5:48 
AnswerRe: Is Doc/View a great architecture? Pin
Richard MacCutchan3-Oct-09 5:58
mveRichard MacCutchan3-Oct-09 5:58 
AnswerRe: Is Doc/View a great architecture? Pin
Stuart Dootson3-Oct-09 11:43
professionalStuart Dootson3-Oct-09 11:43 
GeneralRe: Is Doc/View a great architecture? Pin
Jan Sommer3-Oct-09 11:55
Jan Sommer3-Oct-09 11:55 
GeneralRe: Is Doc/View a great architecture? Pin
Stuart Dootson3-Oct-09 12:32
professionalStuart Dootson3-Oct-09 12:32 
GeneralRe: Is Doc/View a great architecture? Pin
Richard MacCutchan3-Oct-09 14:28
mveRichard MacCutchan3-Oct-09 14:28 
QuestionLogin crash when wrong password enters,,,,PLZ HELP Pin
Vetukuri Raju3-Oct-09 2:31
Vetukuri Raju3-Oct-09 2:31 
Hi all,
I have migrated my application(vs-2003 developed) into vs-2008 to be worked on vista machine.I got the .exe and working successfully when i enter a valid username and valid password but fails when i enter a wrong password/username......I am using SYBASE for my aplication,so it comunicates with some SYBASE dlls to get the access.
the code looks like below
(I am providing login details from other dialog)

int DBInterface::LoginSequence (BOOL bFirstLogin)
{
CString user_name;
char dbver[16];
CString srvrname, dbname;
char uname[33];
char upwd[33];

UINT msg;

if (bFirstLogin)
{
dbinit ();
dbsetlogintime (8);
dbmsghandle ((MHANDLEFUNC) msghandle);
dberrhandle ((EHANDLEFUNC) errhandle);
}

int rv = 0;

while (Ops.m_bAutologin && bFirstLogin)
{
if (CSD_DdeReqUserName (uname) == 0)
break;

if (CSD_DdeReqUserPassword (upwd) == 0)
break;

srvrname = App.GetProfileString (INI_SEC, _T("DBServer"), "");
if (srvrname.IsEmpty ())
break;

dbname = App.GetProfileString (INI_SEC, _T("DBDatabase"), "");
if (dbname.IsEmpty ())
break;

strcpy (_loginfo.dbid, uname);
strcpy (_loginfo.dbpwd, upwd);
strcpy (_loginfo.dbsrv, srvrname);
strcpy (_loginfo.dbdb, dbname);

_dbproc = dbConnect (&_loginfo, "Phoenix");

if (_dbproc == NULL)
break;

rv = 1;

TRACE0("Phoenix: successfully logged in using LOGPARMS from anotherapp...\n");

break;
}

CLoginDlg dlg;

while (rv == 0)
{
if (dlg.DoModal() != IDOK)
{
PostQuitMessage(0);
return 0;
}
else {
lstrcpyn(_loginfo.dbpwd, dlg.m_csPassword, 31);
lstrcpyn(_loginfo.dbid, dlg.m_csUser, 31);
lstrcpyn(_loginfo.dbsrv, dlg.m_csServer, 31);
lstrcpyn(_loginfo.dbdb, dlg.m_csDatabase, 31);
}
_dbproc = dbConnect (&_loginfo, _T("Phoenix") );

if (_dbproc != NULL)
break;

msg = (::GetKeyState (VK_CAPITAL) & 0x0001) ?DS_ERR_LOGINFAILEDCAPS : IDS_ERR_LOGINFAILED;

if (AfxMessageBox (msg, MB_OKCANCEL | MB_ICONHAND) == IDCANCEL)
{
PostQuitMessage(0);
return 0;
}
}

In the abobe code from dbconnect()(bold code) it is calling some SYBASE dll and it is not getting the return value when i enter wrong password/username.......
Is there any problem with the dll or anyting else?????
Since i have migrated the code i am thinking that the dll is not compatiable,but this is just an assumption....!
So can anybody help me to solve this issue......

Thaks in advance.

modified on Saturday, October 3, 2009 8:48 AM

Question[Message Deleted] Pin
Manmohan293-Oct-09 1:53
Manmohan293-Oct-09 1:53 
AnswerRe: Detect Laptop or Desktop Pin
PJ Arends3-Oct-09 4:45
professionalPJ Arends3-Oct-09 4:45 
QuestionCEdit, text color Pin
sashoalm3-Oct-09 0:36
sashoalm3-Oct-09 0:36 
AnswerRe: CEdit, text color Pin
CPallini3-Oct-09 3:45
mveCPallini3-Oct-09 3:45 
GeneralRe: CEdit, text color Pin
sashoalm6-Oct-09 3:38
sashoalm6-Oct-09 3:38 
QuestionWM ASF Writer Audio Recording problem Directshow Pin
Subhash Madhukar2-Oct-09 17:50
Subhash Madhukar2-Oct-09 17:50 
QuestionMFC Menu Expansion [modified] Pin
Jeff Archer2-Oct-09 15:53
Jeff Archer2-Oct-09 15:53 
AnswerRe: MFC Menu Expansion Pin
PJ Arends3-Oct-09 5:25
professionalPJ Arends3-Oct-09 5:25 
GeneralRe: MFC Menu Expansion Pin
Jeff Archer4-Oct-09 8:42
Jeff Archer4-Oct-09 8:42 
GeneralRe: MFC Menu Expansion Pin
PJ Arends4-Oct-09 12:23
professionalPJ Arends4-Oct-09 12:23 
AnswerRe: MFC Menu Expansion Pin
Jeff Archer9-Oct-09 12:45
Jeff Archer9-Oct-09 12:45 
QuestionNew, need to start with GUI's Pin
mtthw2-Oct-09 15:31
mtthw2-Oct-09 15:31 
AnswerRe: New, need to start with GUI's Pin
Richard MacCutchan2-Oct-09 23:23
mveRichard MacCutchan2-Oct-09 23:23 
GeneralRe: New, need to start with GUI's Pin
mtthw3-Oct-09 8:57
mtthw3-Oct-09 8:57 
QuestionObject over another object. Pin
Nikz22-Oct-09 15:23
Nikz22-Oct-09 15:23 
AnswerRe: Object over another object. Pin
Nikz23-Oct-09 9:53
Nikz23-Oct-09 9:53 
QuestionHow to extract variables from between html tags? Pin
purpleturple2-Oct-09 11:04
purpleturple2-Oct-09 11:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.