Click here to Skip to main content
15,903,385 members
Home / Discussions / COM
   

COM

 
Questionparse object array into string.... Pin
vijay.victory11-Feb-09 20:29
vijay.victory11-Feb-09 20:29 
AnswerRe: parse object array into string.... Pin
Mike the Red16-Feb-09 6:26
Mike the Red16-Feb-09 6:26 
AnswerRe: parse object array into string.... Pin
frx9616-Feb-09 18:25
frx9616-Feb-09 18:25 
QuestionNeed help asap on serial port Pin
rj_21_200311-Feb-09 4:08
rj_21_200311-Feb-09 4:08 
AnswerRe: Need help asap on serial port Pin
Roger Stoltz11-Feb-09 22:27
Roger Stoltz11-Feb-09 22:27 
QuestionNeed some help regarding Outlook Addin Pin
wasimsharp10-Feb-09 19:10
wasimsharp10-Feb-09 19:10 
QuestionProblem with COM DLL---- Firing event in thread Pin
chetanjoshi910-Feb-09 18:34
chetanjoshi910-Feb-09 18:34 
AnswerRe: Problem with COM DLL---- Firing event in thread Pin
Roger Stoltz11-Feb-09 22:22
Roger Stoltz11-Feb-09 22:22 
chetanjoshi9 wrote:
But if I tried to fire event for one of the ATL object function there is no problem at all.


This is due to the fact that you have not initialized COM for your new apartment, i.e. in your worker thread. You have to call ::CoInitialize() before using any COM functionality from your worker thread. Don't forget to place a matching call to ::CoUninitialize() before exiting your worker thread.

When you've done that you will hit another problem since you're trying to call the interface to the client's event sink from another apartment than it belongs to.
You have to marshal the events sink interface to the apartment of your worker thread.
Have a look at Michael Lindig's solution for that here[^].
It uses the GIT (Global Interface Table) for that and you'll be able to fire your events from any apartment.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


QuestionBHO can set the certificate for SSL Login? Pin
maoxintt10-Feb-09 15:48
maoxintt10-Feb-09 15:48 
Generalneeds to write a program with MATLAB using Simulated annealing technique Pin
awoyale10-Feb-09 2:25
awoyale10-Feb-09 2:25 
QuestionSystem.__ComObject - how to check null Pin
coolestCoder5-Feb-09 7:13
coolestCoder5-Feb-09 7:13 
QuestionIs there any way to control menus (e.g File--> Save) in Office 2007 documents? Pin
SNI4-Feb-09 23:57
SNI4-Feb-09 23:57 
AnswerRe: Is there any way to control menus (e.g File--> Save) in Office 2007 documents? Pin
frx9616-Feb-09 18:49
frx9616-Feb-09 18:49 
QuestionSuggestions on OLE DB architecture [modified] Pin
robocodeboy4-Feb-09 6:12
robocodeboy4-Feb-09 6:12 
AnswerRe: Suggestions on OLE DB architecture Pin
Baltoro9-Feb-09 7:18
Baltoro9-Feb-09 7:18 
GeneralRe: Suggestions on OLE DB architecture Pin
robocodeboy10-Feb-09 4:15
robocodeboy10-Feb-09 4:15 
GeneralRe: Suggestions on OLE DB architecture Pin
Baltoro14-Feb-09 12:02
Baltoro14-Feb-09 12:02 
QuestionADO _ConnectionPtr still throwing even after reopening connection [modified] Pin
Dexterus4-Feb-09 3:33
Dexterus4-Feb-09 3:33 
AnswerRe: ADO _ConnectionPtr still throwing even after reopening connection Pin
Rajasekharan Vengalil4-Feb-09 4:35
Rajasekharan Vengalil4-Feb-09 4:35 
GeneralRe: ADO _ConnectionPtr still throwing even after reopening connection Pin
Dexterus4-Feb-09 4:46
Dexterus4-Feb-09 4:46 
GeneralRe: ADO _ConnectionPtr still throwing even after reopening connection Pin
Rajasekharan Vengalil4-Feb-09 5:08
Rajasekharan Vengalil4-Feb-09 5:08 
QuestionHow to transfer the Serialport settings in Form design to another Form Design in visualbasic2005 Pin
vidyashankar3-Feb-09 20:08
vidyashankar3-Feb-09 20:08 
QuestionRe: How to transfer the Serialport settings in Form design to another Form Design in visualbasic2005 Pin
Jonathan Davies4-Feb-09 0:42
Jonathan Davies4-Feb-09 0:42 
QuestionHow to append text in winword document caption? Pin
SNI2-Feb-09 23:35
SNI2-Feb-09 23:35 
AnswerRe: How to append text in winword document caption? Pin
Rajasekharan Vengalil4-Feb-09 6:21
Rajasekharan Vengalil4-Feb-09 6:21 

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.