Редагувати

Поділитися через


GetCaptureMacType function

The GetCaptureMacType function returns the MAC type of a given capture.

Syntax

DWORD WINAPI GetCaptureMacType(
  _In_ HCAPTURE hCapture
);

Parameters

hCapture [in]

Handle to the capture. For information about obtaining the capture handle, see the Remarks section in this GetCaptureMacType topic.

Return value

If the function is successful, the return value is one of the following MAC types.

  • MAC_TYPE_UNKNOWN
  • MAC_TYPE_ETHERNET
  • MAC_TYPE_TOKENRING
  • MAC_TYPE_FDDI

If the function is unsuccessful, the return value is an error code.

Return code Description
NMERR_MAC_TYPE_UNKNOWN
Network Monitor could not find a known MAC type.

Remarks

The handle of the capture can be obtained in several ways, depending on who makes the call. For experts, the handle is specified in the hCapture member of the EXPERTSTARTUPINFO structure. For parsers, the capture handle can be obtained by calling the GetFrameCaptureHandle function.

Experts and parsers can call the GetCaptureMacType function.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Netmon.h
Library
Nmapi.lib
DLL
Nmapi.dll