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

COM

 
GeneralRe: Word document to stream Pin
jan larsen23-Feb-05 23:44
jan larsen23-Feb-05 23:44 
GeneralRe: Word document to stream Pin
vishalmore1-Mar-05 2:39
vishalmore1-Mar-05 2:39 
GeneralRe: Word document to stream Pin
jan larsen1-Mar-05 2:49
jan larsen1-Mar-05 2:49 
GeneralRe: Word document to stream Pin
jan larsen2-Mar-05 1:08
jan larsen2-Mar-05 1:08 
GeneralRe: Word document to stream Pin
Jörgen Sigvardsson26-Feb-05 8:08
Jörgen Sigvardsson26-Feb-05 8:08 
GeneralRe: Word document to stream Pin
jan larsen27-Feb-05 20:05
jan larsen27-Feb-05 20:05 
Generalextracting mail from yahoo using mozilla Pin
Spiritofamerica23-Feb-05 5:09
Spiritofamerica23-Feb-05 5:09 
GeneralC++ Client for a C# object Pin
Fragging22-Feb-05 9:14
Fragging22-Feb-05 9:14 
Help!

A series of business objects have been created in C# and COM Interop has been enabled to send objects back and forth between the Managed C# and the unmanaged C++ code.

After hurdling a series of obstacles to get these two worlds talking with each other, the problem of accessing the objects returned in a SAFEARRAY from the C# side is causing a problem.

Here is a code sample from the C# side.

The interface is _YohoFolders while the CoClass is YohoFolder.

ArrayListRule RuleFolders;

public object[] GetFolderArray()
{
return RuleFolders.ToArray();
}

object[] _YohoFolders.GetFolderArrayI()
{
return GetFolderArray();
}

However on the other side of the gap between Managed and Unmanaged the only elements that are accessible are the interfaces. Is there a methodology for passing back an Array of interfaces back to the C++ side of the fence? If so please let me know.

In the C++ world the code looks something like this:

MyNamespace::YohoSingleFolder pFolder;

pLeSafe = pAllFolders->GetFolderArrayI();

for( int i = 0; i < nTotalFolders; i++ )
pFolder = (MyNamespace::YohoSingleFolder)(pLeSafe[i].pvData);

End code

If anybody has any ideas, please let me know.

Thank you all in advance for looking at this.

Regards

Ward Smile | :)


Frag
Try, Fail..Fail, Succeed
Tool Developer
Michigan, USA
GeneralRe: C++ Client for a C# object Pin
Fragging28-Feb-05 3:08
Fragging28-Feb-05 3:08 
GeneralDifference b/e COM and ActiveX Pin
Muhammad Azam21-Feb-05 23:40
Muhammad Azam21-Feb-05 23:40 
GeneralRe: Difference b/e COM and ActiveX Pin
ThatsAlok22-Feb-05 6:08
ThatsAlok22-Feb-05 6:08 
GeneralRe: Difference b/e COM and ActiveX Pin
Muhammad Azam22-Feb-05 17:24
Muhammad Azam22-Feb-05 17:24 
GeneralRe: Difference b/e COM and ActiveX Pin
ThatsAlok22-Feb-05 18:44
ThatsAlok22-Feb-05 18:44 
GeneralRe: Difference b/e COM and ActiveX Pin
Muhammad Azam22-Feb-05 18:57
Muhammad Azam22-Feb-05 18:57 
QuestionWhat are the rules for changing a published COM interface? Pin
Sir Garence21-Feb-05 15:15
sussSir Garence21-Feb-05 15:15 
AnswerRe: What are the rules for changing a published COM interface? Pin
Christian Graus21-Feb-05 15:31
protectorChristian Graus21-Feb-05 15:31 
GeneralRe: What are the rules for changing a published COM interface? Pin
Sir Garence22-Feb-05 4:25
sussSir Garence22-Feb-05 4:25 
GeneralRe: What are the rules for changing a published COM interface? Pin
Christian Graus22-Feb-05 8:41
protectorChristian Graus22-Feb-05 8:41 
GeneralCOM with C# multi client model Pin
sokettepower20-Feb-05 23:50
sokettepower20-Feb-05 23:50 
GeneralRe: COM with C# multi client model Pin
vishalmore21-Feb-05 18:08
vishalmore21-Feb-05 18:08 
QuestionCan we set a global hook in a COM object? Pin
nadzzz20-Feb-05 7:24
nadzzz20-Feb-05 7:24 
AnswerRe: Can we set a global hook in a COM object? Pin
Jörgen Sigvardsson20-Feb-05 9:02
Jörgen Sigvardsson20-Feb-05 9:02 
AnswerRe: Can we set a global hook in a COM object? Pin
vishalmore20-Feb-05 18:23
vishalmore20-Feb-05 18:23 
GeneralError firing callback event Pin
Mayur Mahajan19-Feb-05 19:03
Mayur Mahajan19-Feb-05 19:03 
GeneralIPropertyBag Pin
nsrsetty18-Feb-05 18:33
nsrsetty18-Feb-05 18:33 

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.