@Tracerbullet -- Can you help with this?
Unhandled exception at 0x7c812afb in RTDMan.exe: Microsoft C++ exception: std::invalid_argument at memory location 0x0012f82c..
> msvcp100d.dll!std::_Xinvalid_argument(const char * _Message) Line 9 C++
RTDMan.exe!std::stod(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Str, unsigned int * _Idx) Line 646 + 0xd bytes C++
RTDMan.exe!MiscUtil::getDouble(const tagVARIANT & var) Line 51 + 0x3a bytes C++
RTDMan.exe!Worker:: processRTDData(const std::map<long,ATL::CComVariant,std::less<long>,std::allocator<std:: pair<long const ,ATL::CComVariant> > > * data) Line 209 + 0xc bytes C++
RTDMan.exe!Worker:: poll() Line 162 C++
RTDMan.exe!wmain(int argc, wchar_t * * argv) Line 48 C++
RTDMan.exe!__tmainCRTStartup() Line 552 + 0x19 bytes C
RTDMan.exe!wmainCRTStartup() Line 371 C
kernel32.dll!7c817077()
Line 208 and 209 of Worker
Code:
case LTP // This is last field received from RTD Server (Enum = 3)
newdata.ltp = MiscUtil::getDouble( topic_value );
This is MiscUtil::getDouble
Code:
double MiscUtil::getDouble( const VARIANT &var ){
double output = 0;
if( var.vt == VT_I4 ){ // Long
output = (double)var.lVal;
}
else if( var.vt == VT_R8 ){ // Double
output = var.dblVal ;
}
else if( var.vt == VT_BSTR ){ // BSTR
[B] output = std::stod( getString(var) ); // Line 51[/B]
}
return output;
}
I have not tinkered with your COM code.
Is it possible to send data to console as it is?