How to recognize when Google Chrome sends a desktop notification c++ - c++

I am making a program that opens a website called Smashladder (https://www.smashladder.com/netplay?tab=matches), initiates matchmaking and then opens the emulator and basically does all the steps to connect to the opponent. When you match with someone, it sends a desktop notification (at least mine does). I want to have the program halt until the notification is sent then continue the program. How would I be able to have that information in a bool form (i.e notification was sent (t/f))?
edit: This is being made on windows 10.

Related

How to make an propertysheet application to facilitate "Closing Apps" action when we restart a machine

I am having a propertysheet application and I am doing some operation in it and now in the middle
I restarted my machine then all the applications or closed including my application.Instead of
forcely closing my application I want to make my application to support something similar to this when I press restart.
Exactly I should make application support same feature as in the above image.
Can anyone please let me know how can I solve this issue.
From MSDN: The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls one of the system shutdown functions. If any application returns zero, the session is not ended. The system stops sending WM_QUERYENDSESSION messages as soon as one application returns zero.
You can handle this message in your main window. If there is no MFC macro for this message you can use the ON_MESSAGE macro in the message map.

a ntservice c++ program can work well in xp but error in windows7

i wrote a program in c++ of win32, unicode; it uses socket to read data from another program;
i tested it in a local pc; i compiled it with vs2008;
when used as a console mode, it works properly in both winxp and win7;
when used as a ntservice, it works in xp, but fails in windows7;
in win7, that is, its socket is work well, and it can output logs used logcplus, but it can not access another program's api to read data; meanwhile, its logs cannot show in debugview, though i output logs used OutputDebugString under debug mode;
http://technet.microsoft.com/zh-cn/query/bb203962(v=VS.71) says:
Session 0 Isolation
Services have always run in session 0. Before Windows Vista, the first user to log on was also assigned to session 0. Now, session 0 is reserved exclusively for services and other applications not associated with an interactive user session. (The first user to log on is connected to session 1, the second user to log on is connected to session 2, and so on.) Session 0 does not support processes that interact with the user.
This change means that a service cannot post or send a message to an application and an application cannot send or post a message to a service. In addition, services cannot display a user interface item such as a dialog box directly. A service can use the WTSSendMessage function to display a dialog box in another session.
if it is the reason, how to resolve it?
thanks

An already running application to be informed about an incoming SMS - Windows Mobile 6.5

I have a C/C++ Windows Mobile 6.5 application that continuously runs on the phone. It needs to analyze the SMSes. How can I be notified in my application about an incoming SMS? I read in MSDN about the SmsSetMessageNotification() but this is starting an application once the SMS comes in, and in my case the application is already running, it just needs to be informed that a new SMS was received and then should have access to it in order to analize it and to decide if it's of any interest for the application or not.
So how can my already running application be informed about an incoming SMS which then needs to be analyzed?
I believe you need to use the IMailRuleClient to sign up for notifications of a text message being received.
There is a sample application as part of the sdk that demonstrates this functionality. You can download it from MSDN Code Samples
You can achieve your goal using the Radio Interface Layer (RIL) API. Download RIL.H to get started. Then use LoadLibrary and GetProcAddress to dynamically call the RIL functions from the DLL at runtime. You can setup a RIL notification callback to notify you when message activity happens. I found a code example here.

Webservice call hangs indefinitely

I have a webservice that prints to a printer.
If the type of printer selected is one like the Office XPS printer or printing to a file such that user input is requested, the call from the client to the webservice hangs indefinitely.
I am running on Windows 7 and IIS 7 and there is no user input prompted for explicitly (ie not dialog box appears) and nothing appears in the event logs.
I am confused as to why the webservice call from the client to the service does not time out, as the service is running in release mode so the timeout is supposed to take effect.
I've searched around a lot on MSDN and here to no avail.
Any help greatly appreciated.

How to receive power off events in a Symbian console application?

I am looking for a working code example for Symbian S60 5th edition in which a console application can receive power off events (i.e. detect phone switch off). I know how to do this from UI application [AppUI, HandleSystemEventL(const TWsEvent& aEvent), etc], but Windows Server does not seem to send events if simple console application is listening to these events.
So, I have tried to connect to WS, call EventReady(&iStatus), but RunL is never called, and the application never receives EApaSystemEventShutdown.
Can anyone here provide working code for this?
Thank you.
You can use CSaveNotifier (savenotf.h, powermgrcli.lib) to receive powerdown notifications. Sorry, don't have a code snippet available at the moment.