Partager via


ISmsMessaging::Post 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::Post method, in Configuration Manager, posts a message to the specified management point host and returns immediately. The targeted endpoint processes the message asynchronously.

[IDL]
HRESULT Post(
      LPCWSTR szHost,
      ISmsMessage* pMessage,
      LPWSTR* pszTrackingID
);

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 invoke the management point using remote DCOM. 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 management point by using HTTP

  • pszTrackingID
    Data type: LPWSTR

    Qualifiers: [out]

    Pointer to the ID of the posted message, used for tracking. This value must be freed by using CoTaskMemFree.

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 the Remarks section later in this topic).
  • 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 specified on the message through ISmsMessage::SetTargetEndpoint Method.

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