Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can We make ContextMenu as "sytem modal" Pin
Iain Clarke, Warrior Programmer5-Oct-09 8:50
Iain Clarke, Warrior Programmer5-Oct-09 8:50 
Questionproblem with sizeof() Pin
KASR15-Oct-09 1:18
KASR15-Oct-09 1:18 
AnswerRe: problem with sizeof() Pin
Rajesh R Subramanian5-Oct-09 1:23
professionalRajesh R Subramanian5-Oct-09 1:23 
GeneralRe: problem with sizeof() Pin
KASR15-Oct-09 1:54
KASR15-Oct-09 1:54 
AnswerRe: problem with sizeof() Pin
Code-o-mat5-Oct-09 1:31
Code-o-mat5-Oct-09 1:31 
GeneralRe: problem with sizeof() Pin
Nemanja Trifunovic5-Oct-09 7:23
Nemanja Trifunovic5-Oct-09 7:23 
GeneralRe: problem with sizeof() Pin
Code-o-mat5-Oct-09 8:02
Code-o-mat5-Oct-09 8:02 
AnswerRe: problem with sizeof() Pin
Cedric Moonen5-Oct-09 1:32
Cedric Moonen5-Oct-09 1:32 
AnswerRe: problem with sizeof() Pin
goonyangxiaofang5-Oct-09 1:45
goonyangxiaofang5-Oct-09 1:45 
GeneralRe: problem with sizeof() Pin
CPallini5-Oct-09 3:55
mveCPallini5-Oct-09 3:55 
GeneralRe: problem with sizeof() Pin
goonyangxiaofang5-Oct-09 18:06
goonyangxiaofang5-Oct-09 18:06 
GeneralRe: problem with sizeof() Pin
CPallini5-Oct-09 20:51
mveCPallini5-Oct-09 20:51 
QuestionHow to Implement "Show In Groups" feature in Mini Shell Extension Framework III? Pin
gurjant singh5-Oct-09 1:04
gurjant singh5-Oct-09 1:04 
AnswerRe: How to Implement "Show In Groups" feature in Mini Shell Extension Framework III? Pin
Richard MacCutchan5-Oct-09 10:38
mveRichard MacCutchan5-Oct-09 10:38 
Questionprogram crash before main Pin
hrishiS5-Oct-09 0:52
hrishiS5-Oct-09 0:52 
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 

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.