Click here to Skip to main content
15,899,937 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralCStatic text and icon (bitmap) without background Pin
Ajnstajn6-Jul-04 1:00
Ajnstajn6-Jul-04 1:00 
GeneralRe: CStatic text and icon (bitmap) without background Pin
Alexandru Savescu13-Jul-04 1:59
Alexandru Savescu13-Jul-04 1:59 
Question[wtl] CDialogImp that uses multiple dialogs? Pin
Tommy2k4-Jul-04 8:02
Tommy2k4-Jul-04 8:02 
AnswerRe: [wtl] CDialogImp that uses multiple dialogs? Pin
Michael P Butler6-Jul-04 2:08
Michael P Butler6-Jul-04 2:08 
QuestionHow do I implement an interface in ATL Pin
Field Zhang3-Jul-04 23:15
Field Zhang3-Jul-04 23:15 
Generalimport new type in ATL server Pin
Anonymous30-Jun-04 5:36
Anonymous30-Jun-04 5:36 
GeneralRe: import new type in ATL server Pin
Jörgen Sigvardsson1-Jul-04 11:24
Jörgen Sigvardsson1-Jul-04 11:24 
GeneralBSTR returns invalid characters when multiple event sinks are used Pin
Aby Philip28-Jun-04 20:06
Aby Philip28-Jun-04 20:06 
Hi
I have a component implementing a proprietary protocol (say,
Protocol.dll)and does the communciation over serial port. I have defined ATL
objects for each type of packet, and nearly all has a property called
"description" which returns a BSTR.

One ATL object encapsulates the serial communication. So I can set the baud
rate, port number etc.

A connection point event is defined corresponding to each packet that may
arrive to the PC (from the device). Say ProtocolPkt1, ProtocolPkt2,
ProtocolPkt3 etc.

Now we typically use 2 serial ports. One that does proper protocol
communciation and another that dumps trace staements. To take care of the
trace statements I have one event defined (LogData) in the same event
interface described above.

I have an application (say Mainwindow.exe) that uses the above component,
connects to both the ports and has separate event sinks to handle the 2
ports separately. The protocol data and the log data coming from the 2 ports
are to be shown in separate windows. Whenever an event notifies that log
data is received it is simply dumped in a window. Whenever any event
notifying any of the protocol packets is received, the corresponding packet
is created from the bytes received in the event, interpreted and displayed.

Now onto the problem. When some protocol packets are received, the
description property has to be called. When both the ports are connected the
log data comes fine. But when the description property of say ProtocolPkt1
event is called, the BSTR returned is prefixed with some log string that
came in the LogData event. Further the application displays a crash when it
is closed.

Some more observations.

1. This does not happen when the BSTR returned is very short. Typically only
when the string returned is long and computed in some for loop, does this
corruption occur.

2. This does not happen when I use the debug version of Protocol.dll.

I hope I have made myself clear. If any information is required please let
me know. Any pointers that can help me proceed would be greatly appreaciated

Thanks

aby


GeneralRe: BSTR returns invalid characters when multiple event sinks are used Pin
palbano29-Jun-04 13:53
palbano29-Jun-04 13:53 
GeneralRe: BSTR returns invalid characters when multiple event sinks are used Pin
vprashu1-Jul-04 9:05
vprashu1-Jul-04 9:05 
GeneralRe: BSTR returns invalid characters when multiple event sinks are used Pin
Jörgen Sigvardsson1-Jul-04 11:31
Jörgen Sigvardsson1-Jul-04 11:31 
GeneralWeb browser controls in vs.net Pin
Ram. Sundar28-Jun-04 6:23
Ram. Sundar28-Jun-04 6:23 
QuestionHow to debug asp component? Pin
wood27-Jun-04 23:25
wood27-Jun-04 23:25 
AnswerRe: How to debug asp component? Pin
Jaime Stuardo30-Jun-04 5:58
Jaime Stuardo30-Jun-04 5:58 
GeneralExceptions raised while CoCreateInstance Pin
Anonymous24-Jun-04 23:46
Anonymous24-Jun-04 23:46 
QuestionWhere can I find WTL reference? Pin
Ajnstajn23-Jun-04 0:15
Ajnstajn23-Jun-04 0:15 
AnswerRe: Where can I find WTL reference? Pin
palbano23-Jun-04 5:30
palbano23-Jun-04 5:30 
AnswerRe: Where can I find WTL reference? Pin
Michael Dunn23-Jun-04 14:16
sitebuilderMichael Dunn23-Jun-04 14:16 
GeneralRe: Can't get C++ ATL example to work...help? Pin
*Dreamz23-Jun-04 5:03
*Dreamz23-Jun-04 5:03 
GeneralDebugging CoTaskMemAlloc Pin
LasVegasGuy22-Jun-04 10:10
LasVegasGuy22-Jun-04 10:10 
GeneralRe: Debugging CoTaskMemAlloc Pin
Michael Dunn23-Jun-04 14:03
sitebuilderMichael Dunn23-Jun-04 14:03 
Generalvariably multidimensional arrays Pin
mickelliot22-Jun-04 6:43
mickelliot22-Jun-04 6:43 
GeneralRe: variably multidimensional arrays Pin
valikac22-Jun-04 19:12
valikac22-Jun-04 19:12 
GeneralCan't seem to compile a SAFEARRAY member for my interface Pin
Todd Jeffreys21-Jun-04 9:25
Todd Jeffreys21-Jun-04 9:25 
GeneralRe: Can't seem to compile a SAFEARRAY member for my interface Pin
pain21-Jun-04 15:02
pain21-Jun-04 15:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.