Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends!!


Actually i got a VC++ project from "Research in Motion" which is used to Connect Blackberry with PC. There are two Programs First is in C++ and Second is in JDE.

I'm working on C++ program and i modified that program a lot and It was working good till i was Transferring Text or Strings. But Now i have to Transfer Binary data(Byte Array) but when my program is to execute "Send" Function than "exe" break and shows the Error Message:

"This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."


The where exe is breaking is:
C++
HRESULT result = _channel->WritePacket((unsigned char*)buf, lenght);

(This Function was Predefined in the program; It is not written by me)
(Here "buf" is the byte array which i passed it to this function and "length" is the length of the bytearray)


I really don't know Can
C++
_channel->WritePacket()
Function work with ByteArray(Binary Data)??
But I ampretty sure It works well with Simple Text.

I Don't know What to do know???
Help!!
I am using MVS2008 on Windows XP SP3.
I also Searched this Error on MSDN; They were providing me a HotFix but that was for Windows XP SP2 only. :(


Thank You all in Advance :)


@Regards
Naveen Kumar Dushila
Posted
Updated 9-Sep-11 19:54pm
v2
Comments
Paul M Watt 10-Sep-11 2:36am    
When you write string buffers to the channel are they NULL terminated?
How large of a binary buffer are you sending?
Richard MacCutchan 10-Sep-11 3:59am    
Check that your length parameter is correct in that it specifies the exact number of bytes in the buffer. As to whether this function can correctly handle a byte array, only the original developers could answer that question.

1 solution

This error can be because of your bite array length. otherwise if length is correct ,you can try as go to Property->Configuration Property->c/c++ and make Runtime Library as Multi-threaded Debug (/MTd)

i got same problem in my exe on 64bit operating system.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900