Hi,
I have this part of code in my app to check if my
'dictionary version' is valid:
bool TDiMainForm::IsDictionaryVerValid( AnsiString Version ) // <---
"2.0"
{
bool Result = true;
try
{
DecimalSeparator = '.';
// C() is just LoadStr()
float Min = StrToFloat( C(IDS_SER_MAIN_APP_DB_VER_MIN) ); // <---
"2.0"
float Max = StrToFloat( C(IDS_SER_MAIN_APP_DB_VER_MAX) ); // <---
"2.5"
float Ver = StrToFloat( Version );
if ( ( Ver < Min ) || ( Ver > Max ) )
{
Result = false;
}
}
catch ( const Exception &e )
{
Result = false;
}
return ( Result );
}
On maybe 500 copies of the program no one complained because
of variety of Regionional Options, but in 2 cases so far the result
of this check was 'false' ?!
When I suggested them to manualy change the Regional Options
and set DecimalSymbol - the app worked!
I know that this seems to be *impossible* but, do you see
what could be wrong to this routine?
--
Best regards,
Vladimir Stefanovic
2. COM+ Activation failed because an initialization function failed
3. How to detect proxy failed or remote host failed
Hi All, I have an application where I am accessing resources from internet/intranet. I am using HttpWebRequest/HttpWebResponse. The connection is made through proxy. During error handling I want to detect if the connection is failed while accessing proxy or while accessing remote host. If proxy is failed I want to do proxy recovery. (In case multiple proxies are specified then fail over to another proxy), in case remote host is failed I just want report the error. When I catch WebException, the status of WebException in both the cases (when proxy is down or remote host is down) is ConnectFailure. According to MSDN help, if status == ConnectFailure then proxy or firewall is failed, but this is not true. I checked by making direct connection (without proxy) and if my remote host is down still I get ConnectFailure. According to MSDN help, HttpWebRequest.Address is suppose to return the actaul URL that has responded but I checked even when my proxy is down still the HttpWebRequest.Address is the original address pointing to remote host. I checked the InnerException of the WebException I am getting,it clearly showes two different error messages when proxy is down and host is down. Can anybody help me in detecting if proxy is failed or remote host ?
4. TransactionEscope Fails - When NetWork Connections Fails (ORACLE) - CSharp/C#
5. CDataExchange::Fail() fails
When I try to call CDataExchange::Fail() function in my member I get the
following list of errors.
<ERRORS>
error C2059: syntax error : 'constant'
error C2039: 'func1' : is not a member of 'CDataExchange'
error C2039: 'func2' : is not a member of 'CDataExchange'
error C2039: 'AfxMessageBox' : is not a member of 'CDataExchange'
error C2039: 'pDX' : is not a member of 'CDataExchange'
</ERRORS>
The problematic code is below.
<CODE>
CFoo::MyDDV( CDataExchange* pDX )
{
if( pDX->m_bSaveAndValidate )
{
if( ! func1() )
{
AfxMessageBox( "ERROR.", MB_ICONEXCLAMATION );
pDX->Fail();
}
}
}
</CODE>
What is wrong?
Thanks
6. CDataExchange::Fail() fails
7. Debug assertion failed but not failed in release version
Hi
i got "debug assertion failed" in debug version while not get in
release version .
i created dialog box in thread in thread in that i pass parent HWND
when i call "DoModal()" it failed
it failed in WINCORE.CPP at
ASSERT((CWnd*)p == this); // must be us
line,
as i know ,in release version all ASSERT statement are not considered
(compiled) so i am not got in release.
Is there any solution for dubug version ???
thanks in advance
will it create any problem in release version ???
p2