共用方式為


IDebugCoreServer2::GetPort

Retrieves a specific port.

HRESULT GetPort( 
   REFGUID       guidPort,
   IDebugPort2** ppPort
);
int GetPort( 
   ref Guid        guidPort,
   out IDebugPort2 ppPort
);

Parameters

  • guidPort
    [in] GUID of the port to be retrieved.

  • ppPort
    [out] Returns an IDebugPort2 object representing the desired port.

Return Value

If successful, returns S_OK; otherwise, returns an error code. Returns E_PORTSUPPLIER_NO_PORT if there is no port with the given identifier.

See Also

Reference

IDebugCoreServer2

IDebugPort2