Partager via


ISmsMessaging::Invoke Method

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

The ISmsMessaging::Invoke method, in Configuration Manager, sends a request message to the specified management point host and retrieves a reply message.

[IDL]
HRESULT Invoke(
      LPCWSTR szHost, 
      ISmsMessage* pRequest, 
      ISmsMessage** ppReply
);

Parameters

  • szHost
    Data type: LPCWSTR

    Qualifiers: [in]

    Management point host. Specify an HTTP URL, to invoke the management point through HTTP. The port must be specified using ISmsMessage4::SetPort Method.

    Specify a non-HTTP URL to use remote DCOM to invoke the management point. If null is specified, the management point on the local host is invoked through DCOM.

    Setting the port number or using HTTPS as part of the HTTP URL does not enable HTTPS communication. HTTPS communication is only used if Native mode is enabled by using SetFlags.

    Example: http://MyHost.MyDomain.com – Communicate with MP using HTTP

  • pRequest
    Data type: ISmsMessage

    Qualifiers: [in]

    Pointer to the request message.

  • ppReply
    Data type: ISmsMessage

    Qualifiers: [out]

    Pointer to the reply message.

Return Values

An HRESULT code. Possible values include, but are not limited to, the following:

  • S_OK
    The method succeeded.
  • E_ACCESSDENIED
    Caller does not have permissions to send messages to the management point (see Remarks).
  • RPC_S_SERVER_UNAVAILABLE
    The RPC server is unavailable. DCOM only.
  • SMS_ERR_INVALID_SCHEMA
    The message schema is invalid. The HRESULT value is 0x80040605
  • SMS_ERR_NO_REPLY
    There was no reply from the management point. The HRESULT value is x80040607
  • HRESULT_FROM_WIN32(<WinHTTP Win32 error code>)
    The management point interface uses WinHTTP as a transport for HTTP communication. HTTP communication errors raised by WinHTTP will be surfaced to the caller.

    For HTTP error codes, see https://go.microsoft.com/fwlink/?LinkId=110485.

Remarks

The message is sent to the management point endpoint that is specified on the message through ISmsMessage::SetTargetEndpoint Method. The method blocks until the endpoint processes the message and retrieves a reply (or no reply).

When using DCOM, the caller must either be part of the Administrators group on the management point, or part of the Local Service account on the management point. Otherwise, an access denied error occurs.

When using HTTP, the caller must have access to the management point interfaces DLL and, when using certificates, access to the certificate private key. No other special account membership is required.

See Also

Concepts

ISmsMessaging Interface