In C#, how do I invoke a DLL function that returns an unmanaged structure containing a string pointer?

后端 未结 4 1011
天命终不由人
天命终不由人 2020-12-18 11:27

I have been given a DLL (\"InfoLookup.dll\") that internally allocates structures and returns pointers to them from a lookup function. The structures contain string pointer

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-18 12:08

    For an example, see this netapi32.NetShareAdd interop declaration. It includes a SHARE_INFO_502 structure, with a public string shi502_netname member. Many more examples are available at Pinvoke.net.

提交回复
热议问题