\r\n\r\n
Go Back  Xtreme .NET Talk > .NET > Syntax Specific > Visual C++ .NET > axWinsock->GetData method Exception


\r\n \r\n \r\n \r\n
 
 
Thread Tools Display Modes
\r\n \r\n
\r\n
\r\n \r\n Hi All,
\r\n
\r\nThis is my first post. My code is generating an exception when the GetData method executes in my DataArrival event handler. I get the following exception message: Exception from HRESULT:0x800A9C52. My code is listed below. I suspect one of my parameters is incorrect. Help please!
\r\n
\r\nprivate: System::Void axWinsockCmd_DataArrival(...)
\r\n{
\r\nObject* objBuffer = new Object;
\r\nObject** refBuffer = &objBuffer;
\r\nint maxLen;
\r\n
\r\n maxLen = axWinsockCmd->BytesReceived ;
\r\n try
\r\n {
\r\n axWinsockCmd->GetData(refBuffer, DataFormats::Text, __box(maxLen));
\r\n }
\r\n catch(Exception* pe)
\r\n {
\r\n MessageBox::Show (pe->Message, S"An Exception Error occurred" );
\r\n }
\r\n txtIncomingCmdData->Text = dynamic_cast<String*>(*refBuffer) ;
\r\n}\r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[435931] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 01-30-2005, 03:33 PM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
dynamic_sysop\'s Avatar\r\n\r\n
\r\n \r\n dynamic_sysop\r\n dynamic_sysop is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 01-28-2005, 04:21 PM
mkomsa mkomsa is offline
Newcomer

Preferred language:
C++
 
Join Date: Jan 2005
Location: Sunspot, New Mexico
Posts: 1
mkomsa is on a distinguished road
Question axWinsock->GetData method Exception

Hi All,

This is my first post. My code is generating an exception when the GetData method executes in my DataArrival event handler. I get the following exception message: Exception from HRESULT:0x800A9C52. My code is listed below. I suspect one of my parameters is incorrect. Help please!

private: System::Void axWinsockCmd_DataArrival(...)
{
Object* objBuffer = new Object;
Object** refBuffer = &objBuffer;
int maxLen;

maxLen = axWinsockCmd->BytesReceived ;
try
{
axWinsockCmd->GetData(refBuffer, DataFormats::Text, __box(maxLen));
}
catch(Exception* pe)
{
MessageBox::Show (pe->Message, S"An Exception Error occurred" );
}
txtIncomingCmdData->Text = dynamic_cast<String*>(*refBuffer) ;
}
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An unhandled exception has been caught by the VSW exception filter my_lou General 0 11-16-2005 08:50 AM
What does the following exception mean? Khaledinho Database / XML / Reporting 2 07-08-2005 06:55 AM
Overriding Exception handle method Cassio General 0 05-13-2004 08:13 PM
Inherited form - exception - The type initialiser for "XXX" threw an exception jbaggaley Windows Forms 2 01-09-2004 06:34 AM
winsock getdata fuzzyprogger Network 2 07-08-2003 09:24 AM

Advertisement:

Powered by liquidweb