Re: interop for string[] array

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Fri, 18 Nov 2005 01:44:14 +0100, "Egbert Nierop \(MVP for IIS\)"
<egbert_nierop@xxxxxxxxxxxxxx> wrote:

> sample what I would like to pass to a win32 function
>
> struct blah
> {
> int cElements;
> string [] elements
> }

Egbert,

I don't know if it is supposed to work in 2.0, but I had the same problem
in VB.Net with CLR 1.1, and there I did get an exception at runtime: "Can
not marshal field xxx of type yyyy: This type can not be marshaled as a
structure field." (xxx is a string array)

see Message-ID: <mheon1l85fask6vtsrq3bnriqrflaj7jne@xxxxxxx>
(posted yesterday, "Marshal array in structure")
.



Relevant Pages

  • Re: Copy Array
    ... >> I have a single dimension string array. ... >around my string arrays so that I can set references, ... Dim sArryCopy() As String ... Dim lLp As Long ...
    (microsoft.public.vb.general.discussion)
  • Re: Gridview1 fired event Sorting which wasnt handled
    ... Dim dt As DataTable = DirectCast ... so the datasource is of type array string. ... DataTable variable and populate it with a string array - that's never ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Excel ActiveX TextBox Question
    ... So what is the syntax for a string array? ... code a loop - put the characters in the array - and do a string compare. ... You need to get into design mode and set the linkedCell property ... View - Toolbars - Control toolbox. ...
    (microsoft.public.excel.misc)
  • Re: NameValueCollections GetValues does not return multiple entries
    ... > For key1 I am getting an array with a single string "Value1,Value2", ... >> Hello Vagif, ... The NameValueCollection returns a string array based on a string ... When I use AppSettings and try to retrieve multiple values ...
    (microsoft.public.dotnet.framework)
  • Re: An interview question by MS
    ... Define a function to split a string with some token. ... I said let the function return a string array. ... the first time. ... Surely the desired response was to create and ...
    (comp.lang.c)