Skip to content

raw samples for desktop toasts using com activation with squirrel support

License

Notifications You must be signed in to change notification settings

software-architects/desktop-toasts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

desktop-toasts

Samples for Win32 desktop apps using toast notifications with COM activation.

This sample demonstrates how a desktop app can display a toast notification and respond to events generated by the user's interaction with the toast.

This sample is provided as-is in order to indicate or demonstrate the functionality of the programming models and feature APIs.

How to use the sample...

Desktop Bridge

  1. Open the project in VS
  2. Set the DesktopToastsPackageProject as the startup project
  3. Deploy

Toasts will work out-of-the-gate thanks to Desktop Bridge!

Classic Win32

  1. Install WiX Toolset if you haven't yet
  2. Open the project in VS
  3. Build the SetupProject
  4. Install the generated MSI from the bin/Debug folder
  5. Launch the Desktop Toasts app from the Start menu

After you've installed with the MSI once, you can debug straight from Visual Studio. Installing via the MSI creates the Start menu shortcut with the AUMID and COM CLSID so your notifications can appear and be actionable.

If you don't install the MSI first, toasts will not appear.

Squirrel Installer

Squirrel derives the AUMID (AppUserModelID) by building a string of schema com.squirrel.<package id>.<executable name>. This needs to be set to the process at runtime/when registering the COM server/activator. The COM CLSID is derived from the AUMID via https://tools.ietf.org/html/rfc4122#section-4.3 which does not seem to be implemented in the base class library of .NET. As a workaround App.OnStartup contains the calls to invoke the squirrel-internal implementation.

Packaging/Installing

  1. Build the solution in Release configuration
  2. In the package manager console run nuget pack .\SquirrelSetup\DesktopToastsApp.nuspec
  3. In the package manager console run Squirrel --releasify .\DesktopToastsApp.1.0.0.nupkg
  4. Install Releases\Setup.exe

About

raw samples for desktop toasts using com activation with squirrel support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 51.5%
  • C++ 48.5%