Click here to Skip to main content
15,036,363 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a c++ dll which needs to be ported onto c#. There is structure under which there is a nested structure which is pointed by a pointer.
Code Snippet is as follows:
Struct Application
struct hostent *hp;

Since i am new to the concept of marshalling, please let me know i anybody had hands on this kind of structure.

1 solution

Instead of porting the code over to C# byte for byte, look for equivalent functionality in the .NET framework.

The hostent structure is usually used to associate hostname and IP address.

For example ...

System.Net.IPAddress[] list = System.Net.Dns.GetHostAddresses("");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900