C language > User contributions
Toast Notifications demo in plain C
frankie:
If you're not hungry, but want taste windows toast notifications... ;D
MrBcx:
Excellent demo Frankie!
It boggles the mind why MS makes some things so damn difficult to use.
Thank you for sharing this.
Vortex:
Hi Frankie,
Thanks for your efforts. The executable does not run on Windows 7 64-bit :
--- Code: ---\PellesC\bin\podump.exe /IMPORTS ToastDemo.exe | findstr ".dll"
--- End code ---
--- Code: --- KERNEL32.dll
ADVAPI32.dll
USER32.dll
ole32.dll
api-ms-win-core-winrt-l1-1-0.dll
api-ms-win-core-winrt-string-l1-1-0.dll
--- End code ---
The last two DLLs are missing on my system.
Installing the Update for Universal C Runtime ( Windows 7 ) didn't help.
https://github.com/dotnet/core/issues/6976
TimoVJL:
Testing Win 7 and using missing dlls
--- Code: ---Second chance exception 0xC0000005 (Access Violation) occurred in "TOASTDEMO.EXE" at address 0x000000013FEB160C.
--- End code ---
--- Code: ---22.08.2013 13:45 4 096 api-ms-win-core-threadpool-l1-1-0.dll
22.08.2013 13:42 3 584 api-ms-win-core-winrt-error-l1-1-0.dll
22.08.2013 13:42 3 584 api-ms-win-core-winrt-l1-1-0.dll
22.08.2013 13:42 3 072 api-ms-win-core-winrt-robuffer-l1-1-0.dll
22.08.2013 13:42 4 096 api-ms-win-core-winrt-string-l1-1-0.dll
--- End code ---
here it crash:
--- Code: --- if (!SUCCEEDED(RoGetActivationFactory(hsToastNotificationManager, &IID_IToastNotificationManagerStatics, (LPVOID*)&pToastNotificationManager)))
return 1;
--- End code ---
Better to do this:
--- Code: --- if (!SUCCEEDED(RoGetActivationFactory(hsToastNotificationManager, &IID_IToastNotificationManagerStatics, (LPVOID*)&pToastNotificationManager)))
return 1;
if (!pToastNotificationManager)
return 2;
--- End code ---
Vortex:
Hello,
On a Windows 11 system, the application works fine. Testing on a Windows 10 computer, I can only type 1 line as the Enter key has no any effect.
Navigation
[0] Message Index
[#] Next page
Go to full version