IDelaydC::Start
The Start method starts a capture.
HRESULT STDMETHODCALLTYPE Start(char*pFileName);
- pFileName
[out] Pointer to the name of the capture file used to store the network data. Be sure to cache this file name if it is needed for future reference.
If the method is successful, the return value is NMERR_SUCCESS.
If the method is unsuccessful, the return value is one of the following error codes:
Return code | Description |
---|---|
NMERR_CAPTURE_PAUSED | The capture is in a paused state and must be stopped before it can be restarted. Call IDelaydC::Stop to stop the capture. For more information, see the Remarks section in this topic. |
NMERR_CAPTURING | The capture is already started. |
NMERR_NOT_CONNECTED | The NPP is not connected to the network. Call IDelaydC::Connect to connect to the network. |
NMERR_NOT_DELAYED | The NPP is connected to the network but not with the IDelaydC::Connect method. |
The location of the capture file is specified in your Windows registry, but you can use Network Monitor to change the file's location.
To restart the capture by using IDelaydC::Start and IDelaydC::Stop, you must call the IDelaydC::Configure method to reconfigure the connection each time you call the IDelaydC::Start method to restart capturing data. When you start and stop the capture with these three methods, a new capture file is created each time the capture is started.
Note You can also start and stop the capture by using the IDelaydC::Pause and IDelaydC::Resume methods. When you use these two methods, the captured data is stored in the same capture file.
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. |
DLL | Requires Ndisnpp.dll. Requires Rmtnpp.dll. |
IDelaydC::Configure, IDelaydC::Connect, IDelaydC::Pause, IDelaydC::Resume, IDelaydC::Stop