logo
VitNX3 Documentation

# GWK.CheckMSDM Method

Namespace: VitNX3.Functions.Helpers.WPK
Assembly: VitNX3 (in VitNX3.dll)
VB
C#
F#
C++
JScript
Copy

    public static bool CheckMSDM(
       out byte[] buffer
    )

    This language is not supported or no code example is available.

#### Parameters

buffer
  byte[]

#### Return Value

bool
Source code
VB
C#
F#
C++
JScript
Copy

    public static bool CheckMSDM(out byte[] buffer)
     {
         var firmwareTableProviderSignature = Enums.FIRMWARE_TABLE_TYPE.Acpi;
         uint bufferSize = Import.EnumSystemFirmwareTables(firmwareTableProviderSignature,
             IntPtr.Zero, 0);
         IntPtr pFirmwareTableBuffer = Marshal.AllocHGlobal((int)bufferSize);
         buffer = new byte[bufferSize];
         Import.EnumSystemFirmwareTables(firmwareTableProviderSignature,
             pFirmwareTableBuffer,
             bufferSize);
         Marshal.Copy(pFirmwareTableBuffer,
             buffer, 0,
             buffer.Length);
         Marshal.FreeHGlobal(pFirmwareTableBuffer);
         if (Encoding.ASCII.GetString(buffer).Contains("MSDM"))
         {
             uint firmwareTableID = 0x4d44534d;
             bufferSize = Import.GetSystemFirmwareTable(firmwareTableProviderSignature,
                 firmwareTableID,
                 IntPtr.Zero, 0);
             buffer = new byte[bufferSize];
             pFirmwareTableBuffer = Marshal.AllocHGlobal((int)bufferSize);
             Import.GetSystemFirmwareTable(firmwareTableProviderSignature,
                 firmwareTableID,
                 pFirmwareTableBuffer,
                 bufferSize);
             Marshal.Copy(pFirmwareTableBuffer,
                 buffer, 0,
                 buffer.Length);
             Marshal.FreeHGlobal(pFirmwareTableBuffer); return true;
         }
         return false;
     }

    This language is not supported or no code example is available.

Applies to

#### .NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

#### .NET Core

Supported in: 5.0+, 6.0+
See Also
GWK Class
VitNX3.Functions.Helpers.WPK Namespace