Click here to Skip to main content
15,906,081 members
Home / Discussions / COM
   

COM

 
QuestionLearning stage of COM Pin
Shaileshvb4-Oct-07 1:57
Shaileshvb4-Oct-07 1:57 
AnswerRe: Learning stage of COM Pin
Nathan Holt at EMOM4-Oct-07 9:58
Nathan Holt at EMOM4-Oct-07 9:58 
GeneralRe: Learning stage of COM Pin
Shaileshvb4-Oct-07 17:41
Shaileshvb4-Oct-07 17:41 
GeneralRe: Learning stage of COM Pin
QuickDeveloper5-Oct-07 1:38
QuickDeveloper5-Oct-07 1:38 
GeneralRe: Learning stage of COM Pin
Nathan Holt at EMOM5-Oct-07 5:44
Nathan Holt at EMOM5-Oct-07 5:44 
AnswerRe: Learning stage of COM Pin
ram.Jaddu8-Oct-07 23:43
ram.Jaddu8-Oct-07 23:43 
QuestionNeed book Pin
Tarek Jabri3-Oct-07 23:38
Tarek Jabri3-Oct-07 23:38 
QuestionAm I looking at this correctly? [modified] Pin
BubbaGeeNH2-Oct-07 6:18
BubbaGeeNH2-Oct-07 6:18 
This is what I'm trying to do. I'm trying to write a DLL that will give me access to COM components that are available from an Off-The-Shelf product (Sherlock32) so I can get information from it while it is running. I've seen a lot of examples of how to write stand-alone code but I'm lost as to how to handle everything properly.

Now if I understand things I can use:
#import "c:\sherlock\bin\sp32.exe" named_guids no_namespace
in my header file to get access to the CSLID (CSLID_Sherlock) which was put in the exe.
Then I can use the following code to get access to the various features.

ISherlockPtr m_Sherlock;
CoInitialize(NULL);
m_Sherlock->CreateInstance(CSLID_Sherlock);
m_Sherlock->function;
CoUnitialize();

I'm I at least headed in the correct direction? I know I need to add some error checking to make sure the instance was created and the function is returning the correct stuff. One big question I have is should I create the instance once and hold on to it for the length of the use of the DLL or should I create and release it every time I want access to the functions?

[Side note: For those of you that are thinking why don't I just put my access code in the program that needs access to Sherlock here is the reason. The DLL is going to be used by a scripting program/language that has DLL capabilities but not COM.]


Thanks,
George


-- modified at 8:54 Friday 5th October, 2007
AnswerRe: I'm I looking at this correctly. [modified] Pin
Baltoro4-Oct-07 13:18
Baltoro4-Oct-07 13:18 
GeneralRe: I'm I looking at this correctly. Pin
BubbaGeeNH5-Oct-07 3:00
BubbaGeeNH5-Oct-07 3:00 
QuestionError code 269 Pin
Ohad Cabiri1-Oct-07 2:35
Ohad Cabiri1-Oct-07 2:35 
AnswerRe: Error code 269 Pin
JamesS[C1]2-Oct-07 10:54
JamesS[C1]2-Oct-07 10:54 
QuestionWindows Services Pin
Chandra.Anumakonda30-Sep-07 22:39
Chandra.Anumakonda30-Sep-07 22:39 
Questionsys files Pin
zon_cpp29-Sep-07 20:31
zon_cpp29-Sep-07 20:31 
AnswerRe: sys files [modified] Pin
Baltoro4-Oct-07 12:24
Baltoro4-Oct-07 12:24 
QuestionCOM Transaction Support Pin
SakthiSurya28-Sep-07 0:34
SakthiSurya28-Sep-07 0:34 
Questionthreading And Distributed transaction Pin
Fadi Abu-Mathkour25-Sep-07 7:58
Fadi Abu-Mathkour25-Sep-07 7:58 
AnswerRe: threading And Distributed transaction Pin
User 21559726-Sep-07 0:36
User 21559726-Sep-07 0:36 
QuestionIXMLDOMAttribute::put_value Pin
IWannaTalk24-Sep-07 3:36
IWannaTalk24-Sep-07 3:36 
AnswerRe: IXMLDOMAttribute::put_value Pin
Nathan Holt at EMOM24-Sep-07 10:56
Nathan Holt at EMOM24-Sep-07 10:56 
GeneralRe: IXMLDOMAttribute::put_value [modified] Pin
IWannaTalk24-Sep-07 11:54
IWannaTalk24-Sep-07 11:54 
GeneralRe: IXMLDOMAttribute::put_value Pin
IWannaTalk25-Sep-07 23:35
IWannaTalk25-Sep-07 23:35 
GeneralRe: IXMLDOMAttribute::put_value Pin
Nathan Holt at EMOM26-Sep-07 12:40
Nathan Holt at EMOM26-Sep-07 12:40 
GeneralRe: IXMLDOMAttribute::put_value Pin
IWannaTalk27-Sep-07 4:12
IWannaTalk27-Sep-07 4:12 
Questionsimple helloworld program for caling java from c++ ! help ! Pin
amitamit19820-Sep-07 22:53
amitamit19820-Sep-07 22:53 

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.