Click here to Skip to main content
15,921,028 members
Home / Discussions / COM
   

COM

 
GeneralHidden dialog from Dll Pin
Atin Kumar24-Jul-02 18:06
Atin Kumar24-Jul-02 18:06 
GeneralRe: Hidden dialog from Dll Pin
Ernest Laurentin27-Jul-02 12:48
Ernest Laurentin27-Jul-02 12:48 
GeneralRe: Hidden dialog from Dll Pin
Atin Kumar28-Jul-02 15:35
Atin Kumar28-Jul-02 15:35 
Generalmethod executing too many times Pin
mgriffith24-Jul-02 8:09
mgriffith24-Jul-02 8:09 
GeneralSafearray with byte data Pin
Anonymous24-Jul-02 4:09
Anonymous24-Jul-02 4:09 
GeneralRe: Safearray with byte data Pin
Vi224-Jul-02 4:20
Vi224-Jul-02 4:20 
GeneralRe: Safearray with byte data Pin
Anonymous24-Jul-02 5:53
Anonymous24-Jul-02 5:53 
GeneralPassing COM object as parameter to C++ function Pin
Tomaž Štih24-Jul-02 0:23
Tomaž Štih24-Jul-02 0:23 
I am back to C++ at least for one project and need a quick solution to this problem:
I have a MathLib component, written in ATL, with two COM classes: MathLib.Matrix and MathLib.Vector. For those of you who have no background in math, vector is an array and matrix is 2 dimensional array (i.e. int a[3][3] is a matrix whereas int b[3] is a vector). I only encapsulated functionality to objects because I am going to use these two classes from SQL server and it does not support COM & arrays very well.

Now I would like to perform some quantitative analysis (mathematical operations) on these two classes.
Suppose I have MathLib.Fn COM class. This COM class has function that adds the contents of two arrays and returns array of sums.

For example, I have
[1 2 3] + [4 5 6] = [5 7 9]
(because 1+4=5, 2+5=7, 3+6=9)

My function name is AddVectors, it takes two vector object as input parameters and return vector object as output. This function is in the same C++ dll as the two other ATL classes.

Now I need to know what is the easiest way to declare this function? Don't forget that the Vector and Matrix object will most likely be generated by SQL server transact SQL and only then passed, so I'll be dealing with late binding.

Basically, this is how they'll be used:

SQL SERVER
m=create object mathlib.matrix <--- will probably create IDispatch *
populate m with some values
fn=create object mathlib.fn
n=new matrix
n=fn.execute_some_function(m) <--- will pass object to my COM object

And the second question is how to use these pointers in the function, do I need any marshalling? Anyone has sample of such code?

Kind Regards,
Tomaz
GeneralRe: Passing COM object as parameter to C++ function Pin
Vi229-Jul-02 3:12
Vi229-Jul-02 3:12 
GeneralVARIANT and Byte Arrays Pin
Jose Fco Bonnin23-Jul-02 22:26
Jose Fco Bonnin23-Jul-02 22:26 
GeneralInside COM Pin
CaesarCZ23-Jul-02 12:09
CaesarCZ23-Jul-02 12:09 
GeneralPass a specific C++ object through COM server Pin
chrisl23-Jul-02 3:42
chrisl23-Jul-02 3:42 
QuestionHow to disable script in my Browser Control Pin
rokia22-Jul-02 16:17
rokia22-Jul-02 16:17 
GeneralHELP: Composite Control Pin
minhhoang22-Jul-02 11:59
minhhoang22-Jul-02 11:59 
GeneralmsWord automation Pin
pnpfriend22-Jul-02 10:25
pnpfriend22-Jul-02 10:25 
GeneralEvent Sinking Interfaces Pin
QAU22-Jul-02 2:03
QAU22-Jul-02 2:03 
GeneralEvent Sinking Interfaces Pin
Anonymous22-Jul-02 2:02
Anonymous22-Jul-02 2:02 
GeneralThumbctl doesnt work. Pin
rokia21-Jul-02 17:18
rokia21-Jul-02 17:18 
GeneralRe: Thumbctl doesnt work. Pin
toon21-Jul-02 19:44
toon21-Jul-02 19:44 
GeneralThreaded COM object Pin
Jörgen Sigvardsson21-Jul-02 8:14
Jörgen Sigvardsson21-Jul-02 8:14 
GeneralRe: Threaded COM object Pin
Len Holgate21-Jul-02 12:10
Len Holgate21-Jul-02 12:10 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 12:19
Jörgen Sigvardsson21-Jul-02 12:19 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 13:05
Jörgen Sigvardsson21-Jul-02 13:05 
QuestionHave I understood COM correctly? Pin
Paul Ingles20-Jul-02 13:47
Paul Ingles20-Jul-02 13:47 
AnswerRe: Have I understood COM correctly? Pin
Noam Ben Haim24-Jul-02 3:55
Noam Ben Haim24-Jul-02 3:55 

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.