Click here to Skip to main content
15,915,765 members
Home / Discussions / COM
   

COM

 
QuestionHow to use a VC# COM (with .dll and .tlb) files in VC++6 Pin
nonothing2-Nov-05 6:34
nonothing2-Nov-05 6:34 
QuestionDCOM and memory management: ??? Pin
morenz1-Nov-05 23:04
morenz1-Nov-05 23:04 
AnswerRe: DCOM and memory management: ??? Pin
Gizzo3-Nov-05 7:37
Gizzo3-Nov-05 7:37 
GeneralRe: DCOM and memory management: ??? Pin
morenz10-Nov-05 3:53
morenz10-Nov-05 3:53 
QuestionHow to convert _bstr_t to wchar_t* Pin
chenxiujie1-Nov-05 16:34
chenxiujie1-Nov-05 16:34 
AnswerRe: How to convert _bstr_t to wchar_t* Pin
Rory Solley1-Nov-05 21:41
Rory Solley1-Nov-05 21:41 
AnswerRe: How to convert _bstr_t to wchar_t* Pin
Lane Yu7-Nov-05 7:09
Lane Yu7-Nov-05 7:09 
QuestionFix for CSerial and MultiThreading Pin
James Underwood1-Nov-05 14:52
James Underwood1-Nov-05 14:52 
Hi all,

Firstly thanks to Ramon de Klein for his nice CSerial class. I find this class to be very useful.

I have been writing multithreaded apps which require simultaneously calling on the CSerial::Read and Write functions. The problem is that the reader thread causes the write function to signal prematurely - the WaitForEvents function returns but the overlapped result is IO_INCOMPLETE (error 996).

This is due to the CSerial member variable m_hevtOverlapped (the event) being shared by Read() Write() (and also WaitEvent() ) - so when read fires a signal, the write event is signalled and returns early.

To fix this problem, I have created three member variable event, readEvent, writeEvent and waitEvent, and these are used by the corresponding function instead of the one common one. That means that multiple threads can access read and write and waitevent at the same time. This is sufficient for me.

NB: - with this particular fix, it is still not possible to call read more than once from different threads (or write or waitEvent) - ie calling different functions simultanously is ok, but multiple calls to the same function is not supported because there are still only three events.

To fix that, you could check if the user has supplied their own overlapped structure or not, and if not - create the event locally to the read write or waitEvent function.

Cheers and thanks again Ramon de Klein

James Underwood
QuestionGetIDsOfNames returns E_ACCESSDENIED after installing SP2 on Windows XP Pro Pin
Lonnie Johnson1-Nov-05 12:06
Lonnie Johnson1-Nov-05 12:06 
AnswerRe: GetIDsOfNames returns E_ACCESSDENIED after installing SP2 on Windows XP Pro Pin
morenz2-Nov-05 22:57
morenz2-Nov-05 22:57 
GeneralRe: GetIDsOfNames returns E_ACCESSDENIED after installing SP2 on Windows XP Pro Pin
Lonnie Johnson4-Nov-05 11:35
Lonnie Johnson4-Nov-05 11:35 
AnswerRe: GetIDsOfNames returns E_ACCESSDENIED after installing SP2 on Windows XP Pro Pin
User 2155974-Nov-05 11:57
User 2155974-Nov-05 11:57 
GeneralRe: GetIDsOfNames returns E_ACCESSDENIED after installing SP2 on Windows XP Pro Pin
Lonnie Johnson10-Nov-05 10:59
Lonnie Johnson10-Nov-05 10:59 
QuestionWBEMTest.exe: Query seems to fail at Asynchronous mode when monitoring a remote Windows 2000 Server. Pin
JEFF MENG1-Nov-05 7:27
JEFF MENG1-Nov-05 7:27 
QuestionMsCommLib problems (COM port) Pin
hertz_j31-Oct-05 22:59
hertz_j31-Oct-05 22:59 
Questionhow to get IWebbrowser2 by using HWND? Pin
yj31-Oct-05 22:27
yj31-Oct-05 22:27 
AnswerRe: how to get IWebbrowser2 by using HWND? Pin
User 2155971-Nov-05 8:09
User 2155971-Nov-05 8:09 
QuestionCreating web browser object in my application... Pin
Alex Kofman31-Oct-05 4:20
Alex Kofman31-Oct-05 4:20 
AnswerRe: Creating web browser object in my application... Pin
User 21559731-Oct-05 11:46
User 21559731-Oct-05 11:46 
GeneralRe: Creating web browser object in my application... Pin
Alex Kofman31-Oct-05 20:21
Alex Kofman31-Oct-05 20:21 
GeneralRe: Creating web browser object in my application... Pin
User 2155971-Nov-05 8:01
User 2155971-Nov-05 8:01 
QuestionExposing an external interface Pin
RChin31-Oct-05 1:57
RChin31-Oct-05 1:57 
AnswerRe: Exposing an external interface Pin
FearlessBurner31-Oct-05 22:03
FearlessBurner31-Oct-05 22:03 
QuestionWhere I can found definition of some interface Pin
handy12330-Oct-05 17:59
handy12330-Oct-05 17:59 
AnswerRe: Where I can found definition of some interface Pin
Christian Graus30-Oct-05 18:36
protectorChristian Graus30-Oct-05 18:36 

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.