![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i'm trying to use COM Interop to return an array of c# structures to Native code. I tried to marshall the Array as SAFEARRAY. |

#3
| |||
| |||
|
|
i'm trying to use COM Interop to return an array of c# structures to Native code. I tried to marshall the Array as SAFEARRAY. Question: Does it HAVE to be an array or can you return a collection? Personally, I HATE passing arrays (SAFEARRAYS) around in COM, they are a real pain. If a collection is an option, look into the IEnumVARIANT interface. I would susspect that a C# ICollection interface is a IEnumVARIANT. Google it and I think you will find much easier ways of dealing with this issue ![]() |
#4
| |||
| |||
|
|
On Jun 14, 9:41 am, hpw <h... (AT) hp-weidinger (DOT) at> wrote: i'm trying to use COM Interop to return an array of c# structures to Native code. I tried to marshall the Array as SAFEARRAY. Question: Does it HAVE to be an array or can you return a collection? Personally, I HATE passing arrays (SAFEARRAYS) around in COM, they are a real pain. If a collection is an option, look into the IEnumVARIANT interface. I would susspect that a C# ICollection interface is a IEnumVARIANT. Google it and I think you will find much easier ways of dealing with this issue ![]() Cartoper |
#5
| |||
| |||
|
|
GetCallEntries(pszSmthing,i); |
|
This is exactly the same problem I'm having. Have you got any code samples you could post or url's I can refer to? -- Steve "herc" wrote: On Jun 14, 9:41 am, hpw <h... (AT) hp-weidinger (DOT) at> wrote: i'm trying to use COM Interop to return an array of c# structures to Native code. I tried to marshall the Array as SAFEARRAY. Question: Does it HAVE to be an array or can you return a collection? Personally, I HATE passing arrays (SAFEARRAYS) around in COM, they are a real pain. If a collection is an option, look into the IEnumVARIANT interface. I would susspect that a C# ICollection interface is a IEnumVARIANT. Google it and I think you will find much easier ways of dealing with this issue ![]() Cartoper |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |