Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making API calls in C# which use structures?
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00782605
Message ID:
00783152
Views:
15
Your example did the trick - thanks very much. One of the key things I couldn't work out was how to define fixed length strings as part of the structure:

// specify the size of the string arrays to 32
public const int SA_SIZE = 32;

// struct (class) members
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=SA_SIZE)]
public string lpzDeviceName;

Thanks again for the example,
Gary.
Previous
Reply
Map
View

Click here to load this message in the networking platform