CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    58

    Exclamation Another Release Bugs...

    Hello guys! I have encountered another problem about releasing of exe files in Release mode. It works on my pc after i configure and compiled it so i think i will have no problem when distributing to another pc... after the compilation, i transfer the exe to another computer but the program doesnt work... does anyone encountered this problem.. i have read all articles about problem in release mode but most of the problem is about compiling not the distributed exe..

  2. #2
    Join Date
    Feb 2002
    Posts
    5,757

    Re: Another Release Bugs...

    Run the application on the problematic system while under a debugger.

    I highly recommend Olly Debugger and SoftICE.

    Kuphryn

  3. #3
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Another Release Bugs...

    Quote Originally Posted by DjChris14
    Hello guys! I have encountered another problem about releasing of exe files in Release mode. It works on my pc after i configure and compiled it so i think i will have no problem when distributing to another pc... after the compilation, i transfer the exe to another computer but the program doesnt work
    What do you mean by "doesn't work"?
    ... does anyone encountered this problem.
    Yes. Every developer encounters this problem in some way or another. That's why most software has had bug fixes and new releases.

    Regards,

    Paul McKenzie

  4. #4
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: Another Release Bugs...


  5. #5
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    58

    Re: Another Release Bugs...

    i already created the exe file under Win32 Release... the program starts to excute giving my login... to give everybody an overview of my connection, i put my _ConnectionPtr under my AppClass named m_pConnection which is being used in all connections of sub-programs... i traced the error here in my function AuditTrail which is also a member of the AppClass, here is the code where i found it...

    void CBPLSAssessmentApp::AuditTrail(CString MCode, CString ATable, CString DObject)
    {
    CString sQuery,sCurrentDate;
    COleDateTime m_vodtMonth,m_vodtDay,m_vodtYear,m_vodtSaveTime;
    _RecordsetPtr pRSet = NULL ,pRights = NULL;
    _CommandPtr pCmd = NULL;


    try // CTS 02022004 add try and catch
    {
    pCmd.CreateInstance(__uuidof(Command));
    pCmd->ActiveConnection = m_pConnection; // <---- this is the error in Win32 Release

    sQuery = "insert into a_trail values ";
    sQuery+="('"+ SetStrLength(sUser,10) +"',";
    //m_vodtSaveTime = COleDateTime::GetCurrentTime();
    m_vodtSaveTime.ParseDateTime(GetSystemDate());
    sCurrentDate.Format("%04d-%02d-%02d %02d:%02d:%02d",
    m_vodtSaveTime.GetYear(),
    m_vodtSaveTime.GetMonth(),
    m_vodtSaveTime.GetDay(),
    m_vodtSaveTime.GetHour(),
    m_vodtSaveTime.GetMinute(),
    m_vodtSaveTime.GetSecond());
    sQuery+=" '"+sCurrentDate +"',";
    sQuery+=" '"+ SetStrLength(MCode,10) +"',";
    sQuery+=" '"+ SetStrLength(ATable,30) +"',";
    sQuery+=" '"+ SetStrLength(m_sComputerName,30) + "',"; // JJP 10112003 for Manila Workstation
    sQuery+=" '"+ SetStrLength(DObject,200) +"')";

    pCmd->CommandText = _bstr_t(sQuery);
    pCmd->Execute(NULL, NULL, NULL);

    }
    catch (_com_error &e)
    {
    _bstr_t bstrDescription(e.Description());
    MessageBox(NULL,LPCTSTR("CBPLSAssessmentApp:AuditTrail\n"+bstrDescription),APP_NAME,MB_OK);
    exit(1);
    } // CTS 02022004 add try and catch
    }

    so after the login session... the error is being catch but nothing is being written in the catch clause....

  6. #6
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    58

    Re: Another Release Bugs...

    to kuphryn: how can i use the SoftIce program? Im using VC++ 6.0... i found an analysis tool Gimpel Lint but i can't afford to buy it... is there any other tools that i can used to analyze my codes?

  7. #7
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    58

    Re: Another Release Bugs...

    is it possible that msado15.dll could be corrupted or something? i tried to compiled my program in another computer and transferred the released exe and it works very well... the only error that occur is the ActiveConnection of _CommandPtr if it is compiled in my computer... How can i overwrite msado15.dll? is there other files linked to msado15.dll or other component files related to it in relation to ado connections?

  8. #8
    Join Date
    Feb 2002
    Posts
    5,757

    Re: Another Release Bugs...

    Check out Olly Debugger.

    Kuphryn

  9. #9
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: Another Release Bugs...

    what is the HRESULT returned from:

    Code:
    pCmd.CreateInstance(__uuidof(Command));
    pCmd->ActiveConnection = m_pConnection; // <---- this is the error in Win32 Release

  10. #10
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    58

    Re: Another Release Bugs...

    To mick: how can i use the HRESULT command? how can i change it to CString so i can pop it as message box...

    To Kuphryn : Im trying to use the Olly Debugger... hope i understand some of its instructions....

  11. #11
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Another Release Bugs...

    Quote Originally Posted by DjChris14
    To mick: how can i use the HRESULT command? how can i change it to CString so i can pop it as message box...

    To Kuphryn : Im trying to use the Olly Debugger... hope i understand some of its instructions....
    Assuming CreateInstance is the standard COM call, it returns an HRESULT. Check that. If it's not S_OK, then it will be some error value.

    Viggy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured