简体   繁体   English

Dllimport中C#的StringList

[英]StringList for C# in Dllimport

I am working on C#. 我正在使用C#。 I need to use an API exported from an unmanaged dll. 我需要使用从非托管dll导出的API。 The API in the dll is using Stringlist* as datatype for one argument. dll中的API使用Stringlist *作为一个参数的数据类型。 How can I define my DllImport in the C# project so that I can comfortably pass the equivalent data from C# to the unmanaged code. 如何在C#项目中定义DllImport,以便可以轻松地将等效数据从C#传递到非托管代码。

I tried using List, ArrayList, string[]. 我尝试使用List,ArrayList,string []。 None worked. 没有工作。 I am getting undefined exceptions on executing the API. 我在执行API时遇到未定义的异常。

I would be thankful if anyone could assist me with this issue. 如果有人可以协助我解决此问题,我将不胜感激。

Maybe the System.Collections.Specialized.StringCollection is the class, you are looking for. 也许System.Collections.Specialized.StringCollection是您正在寻找的类。 I hope, this will help 我希望这个能帮上忙

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM