Click here to Skip to main content
16,004,836 members
Home / Discussions / COM
   

COM

 
GeneralRe: Marshalling problem Pin
Vi222-Aug-05 21:59
Vi222-Aug-05 21:59 
GeneralRe: Marshalling problem Pin
RikaBoy26-Aug-05 21:45
RikaBoy26-Aug-05 21:45 
General[Message Deleted] Pin
RikaBoy26-Aug-05 21:18
RikaBoy26-Aug-05 21:18 
GeneralRe: Marshalling problem Pin
Lim Bio Liong19-Aug-05 3:12
Lim Bio Liong19-Aug-05 3:12 
GeneralRe: Marshalling problem Pin
David_Leikis19-Aug-05 3:38
David_Leikis19-Aug-05 3:38 
GeneralRe: Marshalling problem Pin
Lim Bio Liong19-Aug-05 4:04
Lim Bio Liong19-Aug-05 4:04 
GeneralRe: Marshalling problem Pin
David_Leikis19-Aug-05 4:13
David_Leikis19-Aug-05 4:13 
GeneralRe: Marshalling problem Pin
Lim Bio Liong19-Aug-05 4:44
Lim Bio Liong19-Aug-05 4:44 
Hello David,

>> The array contains the x and y coordinates of each of the nodes that have been found and therefore is two times the number of nodes. They are just packed in sequential pairs.

I see. However, would I be right in asserting the following :

1. The array is one dimensional nevertheless, as far as COM is concerned.
2. The fact that you have packed pairs of values in the array is a high-level design point.

If I'm correct about the above two points, then take note that "pNum_ROI_nodes" needs to be set to the actual number of elements in the array (which, from a high-level standpoint, would be "two times the number of nodes"). It should not return the "total number of nodes divided by two" - this is a high-level design issue and will not be understood by COM.

The "for" loop in your client code may need to be modified in view of the fact that the logic behind the value of "pNum_ROI_nodes" is now different.

>> Do you understand what Vita was talking about with a Proxy/Stub DLL and why wouldn't the TypeLib marshaller understand the size_is ?

Yes, David. Due to the fact that you are using a non-OLE-automation-compatible array (OLE-automation-compatible arrays would require the use of SAFEARRAYs, the size_is attribute is not relevant here), a Proxy/Stub DLL is required so that the marshaller knows how to properly handle your method and your array (between the server and the client).

The TypeLib marshaller is used when your interface is based on IDispatch and all parameters are based on automation-compatible types.

If you are using VC++ 7.0 (i.e. from Visual Studio .NET), a proxy/stub DLL project is generated automatically for you by the wizard, but you would need to make sure you fully build it. Once it is built, the wizard will register it. Once it is registered, the marshaller will know where to locate it and use it during client run time.

If you are using VC++ 6.0, you would need to build the proxy/stub project and dll manually.

Best Regards,
Bio.

GeneralRe: Marshalling problem Pin
David_Leikis19-Aug-05 5:01
David_Leikis19-Aug-05 5:01 
GeneralRe: Marshalling problem Pin
Lim Bio Liong19-Aug-05 5:20
Lim Bio Liong19-Aug-05 5:20 
GeneralRe: Marshalling problem Pin
Lim Bio Liong19-Aug-05 4:52
Lim Bio Liong19-Aug-05 4:52 
Generalmshtml programming Pin
softty18-Aug-05 9:46
softty18-Aug-05 9:46 
GeneralAdding a new Interface to Existing component Pin
BicycleTheif18-Aug-05 1:50
BicycleTheif18-Aug-05 1:50 
GeneralRe: Adding a new Interface to Existing component Pin
Milton Karimbekallil20-Aug-05 8:30
Milton Karimbekallil20-Aug-05 8:30 
GeneralCOM with VB.net and C#.NET Pin
Darren Whittall17-Aug-05 11:01
Darren Whittall17-Aug-05 11:01 
GeneralPowerpoint automation with VC++ Pin
spelhatre17-Aug-05 4:21
spelhatre17-Aug-05 4:21 
GeneralRe: coclass Pin
Lim Bio Liong17-Aug-05 6:36
Lim Bio Liong17-Aug-05 6:36 
GeneralUsing ActiveX as pop-up menu Pin
Spaz8016-Aug-05 22:02
Spaz8016-Aug-05 22:02 
GeneralIn-Proc becomes client to Out-of-Proc Pin
Jnewg516-Aug-05 1:35
Jnewg516-Aug-05 1:35 
GeneralAutomation Question Pin
Joel Holdsworth15-Aug-05 22:38
Joel Holdsworth15-Aug-05 22:38 
GeneralActiveX Ctrl for web application Pin
SS0587015-Aug-05 5:40
SS0587015-Aug-05 5:40 
Generaltopic for projects Pin
V.G13-Aug-05 2:14
V.G13-Aug-05 2:14 
GeneralIDispatch Question Pin
Joel Holdsworth12-Aug-05 4:20
Joel Holdsworth12-Aug-05 4:20 
GeneralRe: IDispatch Question Pin
Vi214-Aug-05 19:48
Vi214-Aug-05 19:48 
GeneralRe: IDispatch Question Pin
Joel Holdsworth15-Aug-05 2:59
Joel Holdsworth15-Aug-05 2:59 

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.