Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

CeGetUserNotification (coredll)
 

coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for CeGetUserNotification in other DLLs exists, click on Find References to the right.

.
Summary
This function queries the user for notification settings by displaying a dialog box showing options that are valid for the current hardware platform.
Summary
This function retrieves notification information associated with a handle.

C# Signature:

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

VB Signature:

Declare Function CeGetUserNotificationPreferences Lib "coredll.dll" (TODO) As TODO
Declare Function CeGetUserNotification Lib "coredll" (ByVal hNotification As IntPtr, ByVal cBufferSize As UInt32, ByRef pcBytesNeeded As Int32, ByVal pBuffer As IntPtr) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Taken from openNetCF in OpenNETCF.Win32.Notify

Tips & Tricks:

Please add some!

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.

Sample Code:

Please add some!

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.

Documentation

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions