Share via


GetCaptureComment

The GetCaptureComment function returns a pointer to the comment of a capture.

LPSTR WINAPIGetCaptureComment(HCAPTUREhCapture);

Parameters

  • hCapture
    [in] A handle to the capture. For more information about obtaining the capture handle, see the Remarks section.

Return Values

If the function is successful (that is, if the capture contains a comment), the return value is a pointer to the comment string.

If the function is unsuccessful, the return value is NULL.

Remarks

Do not alter the returned comment string which is the actual comment string that is in the loaded capture. Any changes can corrupt the capture. Attempts to modify the string result in an access violation.

The handle of the capture can be obtained in several ways, depending if the call is made by an expert or parser. 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.

To retrieve the comment of a capture from its capture file, call the GetCaptureCommentFromFilename function.

Experts and parsers can call the GetCaptureComment function.

Requirements

Client Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0.
Server Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.
Header

Declared in Netmon.h.

Library

Link to Nmapi.lib.

DLL Requires Nmapi.dll.

See Also

EXPERTSTARTUPINFO, GetCaptureCommentFromFilename, GetFrameCaptureHandle