Re: Re: Getting RAS_LINKS info from C#

Home Forums Discussions Support Getting RAS_LINKS info from C# Re: Re: Getting RAS_LINKS info from C#

#6961
libzhark
Participant

    Yes, when calling the line

    Ndisapi.GetRasLinks(hNdisapi, AdList.m_nAdapterHandle, ref pLinks);

    an exception is thrown:

    System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #3': Internal limitation: structure is too complex or too large.

    This happens when RAS_LINKS_MAX = 256. From quick googling, it appears there is a hard 64k (65535 byte) limit for marshaling a single chunk of data.