all groups > dotnet interop > september 2006 >
You're in the

dotnet interop

group:

How to Implement IEnumString


How to Implement IEnumString TheInquirer
9/29/2006 8:14:44 AM
dotnet interop:
Hi,
there's this type in .NET 2.0 IEnumString.
I'd like to write an implementation of it in my dll which is going to
be used by c++ code through COM.

how can I set the value of pceltFetched properly if this parameter is
not out or ref within the function?
int Next (
int celt,
[OutAttribute] string[] rgelt,
IntPtr pceltFetched
)

Thanks a million in advance.
Re: How to Implement IEnumString Dmytro Lapshyn [MVP]
10/2/2006 5:39:08 PM
Hi,

You can either declare this parameter as "ref int pceltFetched" or use the
Marshal.WriteInt32 method.

--
Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL

[quoted text, click to view]
Re: How to Implement IEnumString TheInquirer
10/4/2006 5:54:12 AM

[quoted text, click to view]
Hi,
Thank you and dyakuyu, it actually worked.
Greetings
K
AddThis Social Bookmark Button