Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making API calls in C# which use structures?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00782605
Message ID:
00783152
Vues:
16
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform