CeGetUserNotification (coredll)
Last changed: -79.117.194.175

.
Summary
This function retrieves notification information associated with a handle.

C# Signature:

[DllImport("coredll.dll", EntryPoint="CeGetUserNotification", SetLastError=true)]  
private static extern bool CeGetUserNotification (int hNotification, uint cBufferSize, ref int pcBytesNeeded, IntPtr pBuffer );

VB Signature:

Declare Function CeGetUserNotification Lib "coredll.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Taken from openNetCF in OpenNETCF.Win32.Notify

Parameters:

hNotification

    [in] Handle to the notification.

cBufferSize

    [in] DWORD that specifies the size of the buffer pointed to by pBuffer.

pcBytesNeeded

    [out] Pointer to a DWORD that receives the number of bytes needed for the buffer pointed to by pBuffer.

pBuffer

    [out] Pointer to a buffer to hold the requested information.

Return Values

    TRUE indicates success. FALSE indicates failure.

Remarks:

Call CeGetUserNotification with cBufferSize set to 0 first to retrieve the size that you need for the buffer in pcBytesNeeded. Then, allocate a DWORD-aligned buffer of that size and call CeGetUserNotification again with pBuffer pointing to the buffer and cBufferSize set to the size obtained from the first call to CeGetUserNotification. This second call retrieves the notification information.

If the second call to CeGetUserNotification succeeds, the buffer contains a CE_NOTIFICATION_INFO_HEADER structure at the beginning. This structure points to two other structures that are allocated in the same buffer, CE_NOTIFICATION_TRIGGER and CE_USER_NOTIFICATION. The CE_USER_NOTIFICATION structure contains the information with which the notification was created.

If the buffer size is insufficient, this function fails and returns the necessary buffer size in pcBytesNeeded. For other failures, ERROR_INVALID_PARAMETER is set and pcBytesNeeded is 0.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation