Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: program crash before main Pin
Code-o-mat5-Oct-09 1:28
Code-o-mat5-Oct-09 1:28 
GeneralRe: program crash before main Pin
hrishiS5-Oct-09 2:06
hrishiS5-Oct-09 2:06 
QuestionRe: program crash before main Pin
CPallini5-Oct-09 2:17
mveCPallini5-Oct-09 2:17 
AnswerRe: program crash before main Pin
benjymous5-Oct-09 4:45
benjymous5-Oct-09 4:45 
GeneralRe: program crash before main Pin
CPallini5-Oct-09 7:32
mveCPallini5-Oct-09 7:32 
QuestionContextMenu with icons diplayed on right clicking the tray icon Pin
Aabid5-Oct-09 0:31
Aabid5-Oct-09 0:31 
AnswerRe: ContextMenu with icons diplayed on right clicking the tray icon Pin
Code-o-mat5-Oct-09 8:53
Code-o-mat5-Oct-09 8:53 
QuestionExe is getting crashed when i enter wrong password/username Pin
Vetukuri Raju5-Oct-09 0:17
Vetukuri Raju5-Oct-09 0:17 
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.
AnswerRepost. Pin
CPallini5-Oct-09 0:22
mveCPallini5-Oct-09 0:22 
GeneralRe: Repost. Pin
Vetukuri Raju5-Oct-09 0:31
Vetukuri Raju5-Oct-09 0:31 
QuestionRe: Repost. Pin
CPallini5-Oct-09 1:58
mveCPallini5-Oct-09 1:58 
QuestionSet font Courier for Edit box (VC++6.0) ??? Pin
aa_zz5-Oct-09 0:14
aa_zz5-Oct-09 0:14 
AnswerRe: Set font Courier for Edit box (VC++6.0) ??? Pin
Hans Dietrich5-Oct-09 0:45
mentorHans Dietrich5-Oct-09 0:45 
GeneralRe: Set font Courier for Edit box (VC++6.0) ??? [modified] Pin
Michael Schubert5-Oct-09 1:18
Michael Schubert5-Oct-09 1:18 
AnswerRe: Set font Courier for Edit box (VC++6.0) ??? Pin
aa_zz5-Oct-09 16:04
aa_zz5-Oct-09 16:04 
QuestionECDSA in Visual C++ 6.0 Pin
Eka Candra5-Oct-09 0:00
Eka Candra5-Oct-09 0:00 
QuestionRe: ECDSA in Visual C++ 6.0 Pin
Rajesh R Subramanian5-Oct-09 0:15
professionalRajesh R Subramanian5-Oct-09 0:15 
AnswerRe: ECDSA in Visual C++ 6.0 Pin
Stuart Dootson5-Oct-09 0:21
professionalStuart Dootson5-Oct-09 0:21 
QuestionRedistributing of exe devloped using VC++ 6.0 Pin
shir_k4-Oct-09 23:57
shir_k4-Oct-09 23:57 
AnswerRe: Redistributing of exe devloped using VC++ 6.0 Pin
Cedric Moonen5-Oct-09 0:02
Cedric Moonen5-Oct-09 0:02 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
shir_k5-Oct-09 0:21
shir_k5-Oct-09 0:21 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
CPallini5-Oct-09 0:30
mveCPallini5-Oct-09 0:30 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
shir_k5-Oct-09 0:35
shir_k5-Oct-09 0:35 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
CPallini5-Oct-09 2:39
mveCPallini5-Oct-09 2:39 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
PJ Arends5-Oct-09 15:56
professionalPJ Arends5-Oct-09 15:56 

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.