IESP::Connect method
The Connect method connects the NPP to the network by using a specified NIC and provides configuration information about the connection.
Syntax
HRESULT STDMETHODCALLTYPE Connect(
[in] HBLOB hInputBlob,
[in] DWORD StatusCallbackProc,
[in] DWORD UserContext,
[out] HBLOB hErrorBlob
);
Parameters
-
hInputBlob [in]
-
Handle to the BLOB that specifies the NIC that the NPP connects to and the configuration information for that connection.
-
StatusCallbackProc [in]
-
Address of the user's callback function, which receives status updates such as triggers. If a callback function is not used, set this parameter and the UserContext parameter to NULL.
-
UserContext [in]
-
Value passed when the user's callback function is called. The value of this parameter is typically either HWND or a 'this' pointer. If a callback function is not specified, set this parameter and the StatusCallbackProc parameter to NULL.
-
hErrorBlob [out]
-
Handle to an error BLOB that contains additional error information.
Return value
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 (which include those errors returned by the internal IESP::Configure call):
Return code | Description |
---|---|
|
This instance of the NPP COM object is already connected to the network. |
|
The configuration BLOB is corrupt. This error is generated by the IESP::Configure call. |
|
The input BLOB specified by the hInputBlob parameter lacks an entry needed to perform this operation. This error might be generated by the IESP::Connect or IESP::Configure call. Look at the error BLOB returned by hErrorBlob to determine which entry was not found. |
|
The CreateBlob function has not been called. This error is generated by the IESP::Configure call. |
|
The string is not null-terminated. This error is generated by the IESP::Configure call. |
|
The trigger portion of the input BLOB is corrupt. This error is generated by the IESP::Configure call. |
|
The object specified in hInputBlob is not a BLOB. This error is generated by the IESP::Configure call. |
|
The default capture directory was not set in the registry. Use the following path to set the capture directory.
|
|
The memory needed to perform this operation is unavailable. This error is generated by the IESP::Configure call. |
|
The request has timed out. This error is generated by the IESP::Configure call. |
|
The version number of the BLOB specified in hInputBlob is incorrect. This error is generated by the IESP::Configure call. |
Remarks
When the Connect method is called, Network Monitor automatically calls IESP::Configure by using the BLOB provided by the hInputBlob parameter. Note that any error codes returned by the call to IESP::Configure are passed back and returned by the IESP::Connect call.
This method must be called before you can start capturing frames. Note that when you connect to the network by using this method, you must continue to use the IESP interface to capture frames.
The input BLOB specified by hInputBlob can be obtained by calling GetNPPBlobFromUI, GetNPPBlobTable, and SelectNPPBlobFromTable.
The error BLOB returned by hErrorBlob contains entries that Network Monitor could not understand or find in the input BLOB specified in hInputBlob. The returned error BLOB contains error information that the application can use for troubleshooting. For example, if NMERR_BLOB_ENTRY_DOES_NOT_EXIST is returned, the entry that Network Monitor could not find is included in the returned error BLOB.
For information about | See |
---|---|
Obtaining the input BLOB that represents a NIC | Selecting a Network Interface Card |
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
DLL |
|