# Creating and sending MSPP queries

Create an MSPP query using the mspBuildQuery macro with an MSPP endpoint command. You can send an MSPP query to the specified endpoint with mspSendQuery.

The mspBuildQuery macro and mspSendQuery are described below. The MSPP endpoint queries are described in MSPP queries and commands for the 3G-324M Interface.

## mspBuildQuery macro

The mspBuildQuery macro builds a query by concatenating the endpoint filter ID with a query. It is defined as follows:

#define mspBuildQuery(filterid,queryid) ((filterid << 8) | query)

For more information about the mspBuildQuery macro, see the MSPP Service Developer's Reference Manual.

## mspSendQuery command

mspSendQuery sends a concatenated query to an MSPP endpoint. It is defined as follows:

DWORD mspSendQuery(MSPHD msphd, DWORD query)

where:

- msphd is a unique MSPP endpoint handle (obtained when creating the endpoint with mspCreateEndpoint).

- query is a valid query from the mspBuildQuery macro.

For more information about mspSendQuery, see the MSPP Service Developer's Reference Manual.