Creating a New Queue

New queues can be created on a Windows CE device by calling the MQCreateQueue (Table 15.2) function and initializing a MQQUEUEPROPS structure with the following properties:

  • PROPID_Q_PATHNAME— Pathname for the new queue

  • PROPID_Q_LABEL— Label (or description) for the new queue

The data for both these properties is VT_LPWSTR. The pwszVal member for PROPID_Q_PATHNAME is a pointer to a string containing the pathname. In the following code example, the "." refers to the local Windows CE device, "PRIVATE$" specifies this is a private queue (remember, public queues are not supported), and "WinCEInQueue" is the name of the new queue.

 LPWSTR wszPathName = _T(".\\PRIVATE$\\WinCEInQueue"); aQueuePropId[0] = PROPID_Q_PATHNAME; aQueuePropVar[0].vt ...

Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.