Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / June 2005

Tip: Looking for answers? Try searching our database.

compile VC++6.0 vs. VC++.NET2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sonu - 24 Jun 2005 23:03 GMT
Hi all,
Does VS.net catches more run time errors than VS 6.0???

My aplication was written in VC++6.0 MFC which I am opening in VC.NET2003
and compiling it. It works fine when I run compile it in VS6.0 but when I
compile it in VS.net 2003 it crashes during run time (debug mode) in file
dbgrpt.c at this function:
#undef _CrtDbgBreak

_CRTIMP void _cdecl _CrtDbgBreak(
       void
       )
{
       DebugBreak();
}
which, I don't know what this is supposed to mean :-|

This seems totally unrelated to the place it crahes in when I step thru it:
Then, it crahes at the following place in the function
DegMinSec_To_DegDecimal (a function to return 12.33 for 12:20 for eg )
Can anyone point me to any error I might be making in the the calling
function? And also why this only happens in .NET????

Thanks a lot in advance
Srishti Wilhelm

{

POSITION pos = DashaListCtrl_1->GetFirstSelectedItemPosition();
int year, month, day; double hour;
int nItem = DashaListCtrl_1->GetNextSelectedItem(pos);
CString b = DashaListCtrl_1->GetItemText( nItem, 1 );
CString a;
if( Date_format==1 )
_stscanf( b, _T("%02ld/%02ld/%04ld  %s"), &month, &day, &year, a );   
else
_stscanf( b, _T("%02ld/%02ld/%04ld  %s"), &day, &month, &year, a );
hour = DegMinSec_To_DegDecimal(a);

}

double DegMinSec_To_DegDecimal( CString DegMinSec )
{
    int sign=1;
    if( DegMinSec.Find(_T("-"))!=-1 )
        sign=-1;
    double Degrees = _ttoi(DegMinSec);
    Degrees = abs( (int)Degrees );
    int i = DegMinSec.FindOneOf(_T("EWNSewns:. "));
    if( i!=-1 )
    {
        TCHAR a = DegMinSec.GetAt(i);

        :
        :           
    }
    :
    :
}
Sonu - 24 Jun 2005 23:20 GMT
> Hi all,
> Does VS.net catches more run time errors than VS 6.0???
[quoted text clipped - 55 lines]
>     :
> }

Also,
The application is built for Unicode.

DegMinSec seems to have a decent looking vlaue like "4:56"
When I step into the DegMinSec.GetAt(i) which is defines as following"
XCHAR GetAt( int iChar ) const
{
    ATLASSERT( (iChar >= 0) && (iChar <= GetLength()) );  // Indexing the '\0'
is OK
    if( (iChar < 0) || (iChar > GetLength()) )
    AtlThrow(E_INVALIDARG);       
           
    return( m_pszData[iChar] );
}

It seems to have a length of 0 and so it gives an assertion failure. (ichar
has a value of 2 as it should be)

Any help is much appreciated
Thanks
Srishti

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.