SetWindowsHookEx Hook into Explorer To Intercept Win32API call - winapi

If I want to intercept a win32 API call, specifically one of the win32 api calls listed at:
https://learn.microsoft.com/en-us/windows/win32/winmsg/window-functions
I presume I need to:
Get the explorer thread id, either from some win32 api call to get threadId by process name (or some special one that exists for explorer).
Call SetWindowsHookExA()
SetWindowsHookExA(WH_CALLWNDPROC, HookProc, GetModuleHandle(NULL), explorerThreadId)
After I call SetWindowsHookExA, I presume I then analyze the messages that are sent to my custom written HookProc to see which win32 api call i'm intercepting, to then react based on that? Are there any good examples out there for identifying which win32 api call the hookProc is being called for? Or examples where somebody has hooked one particular win32api call successfully?

Related

Azure Communication Services - Teams Calls

Hi with the new ACS will it be possible to fire an event when a call is answered and fire an event after the call has finished?
I'm wanting to capture the number of the call that has been answered and then open a program to pop up the details of the caller.
Thanks
It is possible to hook to EventGrid events:
Call Started
Call Ended
You can extract the phone number from rawId or use the new createIdentifierFromRawId method to convert it to the correct identifier type for further usage.
See the events reference and the quickstart for Azure Communication Services.
You can also listen to some events with the Call Automation SDK.

MS Teams call event

we have a windows form made using VB.net
Is there an API we can use, so that when a call is received in Teams an event is triggered?
And in the event it can determine the caller number?
And is there an event for when the call is finished, which can determine how long the call lasted?
Thanks
There is no direct way that you can handle the call triggered event at your custom application but you can get the call related details using Graph API: Reference doc https://learn.microsoft.com/en-us/graph/api/callrecords-callrecord-get?view=graph-rest-1.0&tabs=http
In order to get the Id which getting use to fetch callRecords you need to Create subscription to get call notifications.
Create subscription- Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph.

Disallow user to make a call when there are no more credits: Sinch Javascript SDK

My application allows unlimited instant messages for free, but takes credits for calls. I want to be able to disallow user to make a call when he does not have any more credits. How in a ideal scenario is this managed using javascript SDK?
I am coming from a standpoint, that although I am able to control this behavior through some validations in code itself, but what happens when the user is a hacker? He can go to console and call javascript methods of its own such as removeListeners and then callClient.callUser(userId). How do you protect sinchClient in such case? Thanks.
Note: I am open to provide more information if the question is not clear.
Sinch exposes a REST based callback mechanism to control your call flow. You can set a callback URL in the Sinch Portal under Applications >> Voice and Video settings. Each call will then trigger a Incoming Call Event (documented here: https://www.sinch.com/docs/voice/rest/#callbackapi) and you can control whether or not to connect this call via the callback response.

The TSF(Text Service Framework) interfaces wait for windows logon?

I worked on a project about Input Method using TSF(Text Service Framework) of Microsoft. The process of my program was started by an auto-run service when Windows logon.
I wrote the TSF api call like this:
HRESULT hr = _pInputProcessorProfileMgr->EnumProfiles(langID, &pEnum);
in which pEnum is an instance of IEnumTfInputProcessorProfiles and _pInputProcessorProfileMgr is an instance of ITfInputProcessorProfileMgr. Generally, this api enumerates all the registered profiles according to language ID.
However, the API call got nothing but profiles with GUID/CLSID "00000000-0000-0000-0000-000000000000". If I delayed the current thread for several seconds(by Sleep method), the API call returned the right profiles that I expected(and still included the profile with id = 0). It seemed the result of TSF API calling depended on the some component's initialization.
Does anyone have any concerns about this? How can I know the TSF has been ready to work?

Glympse API event handling

I am trying to launch glympse app by using an intent and receiving the information through broadcast. Is there any way that I will be notified about the events occurring like ticket removed, expired, updated etc?
There sure is.
We created a library project to make this easier for you. It can be found here: https://github.com/Glympse/glympse-app-sdk/tree/master/Android/GlympseIntentsLib
A sign-in is required to view these documents that might be helpful.
Tutorial: https://developer.glympse.com/Content/client/app/guides/Glympse_Intents_Tutorial.html
Reference Docs: https://developer.glympse.com/Content/client/app/guides/Glympse_Intents_Reference.html
Specifically, check out the method CreateGlympseParams.setCallbackAction(String). This will allow you to set an action which will be used to broadcast a message back to your app.
Another option is to use CreateGlympseParams.setEventsListener(EventsListener). With this method, you can supply an object that implements GlympseApp.EventsListener. Using this method, our library handles the broadcast under the covers and your object's methods will be invoked as the event occur.

Resources