CONNECTED event not firing in TAPI 3.x - tapi

I am working on a TAPI application. While googleing I found a nice post http://www.codeproject.com/KB/IP/devangpro.aspx. But the problem is, I am not getting all the events triggered while making a call. I am able to get INPROGRESS and DISCONNECTD but no CONNECTED event is getting fired (even in the screenshot provided with the article, only "dialing" and "disconnected" values are present, so I am assuming even the author had the same problem).
In my case whole program logic is based on the CONNECTED and DISCONNECTED events.
Please help me to solve the issue.
Also, I am using a CISCO ATA box for obtaining dial tone. I tried with a FAX/DATA as well as FAX/DATA/VOICE modems.

As far as I can see from the code sample, it uses the TAPI3.dll by automatically creating an Interop wrapper through VS.Net. But the use of TAPI3 from managed code is not supported by Microsoft. See this KB article:
Because of the complexity of the TAPI 3.x Component Object Model (COM) interface, the managed wrapper that is created by Microsoft Visual Studio .NET does not work. Therefore, you cannot call TAPI functionality from managed code.
Microsoft has no current plans to release a TAPI interoperative component.
You will have to use a wrapper around TAPI 3.x to use it in managed code. For this, you could for example use JulMar's ITAPI3 wrapper.

Related

How to monitor and record Win API calls made by executable files for certain action?

PowerBuilder application has some limitations on how objects are managed in libraries. for example there is no way i can copy user object from one library to another through script.
I am looking for some way to monitor the PowerBuilder application and record sequence of system events performed in library painter. Based on recorded events i want to have a list of win32 API calls that were made for those actions. And in the end reproduce same results with win32 API calls i recorded.
The Purpose is to bypass use of PowerBuilder IDE for library functions.
Please tell me how is that possible?
Ver: PB 12.5 / Win 7, 8.1
You can use ORCA functionality to update the library files from an external application. Look at the PDF file under the SDK\ORCA folder. There is a function PBORCA_LibraryEntryCopy.
It would be helpful if you told us what version of PowerBuilder you are using. Also more detail on why. What is it that you want to accomplish? There could be a simpler method that you didn't think of if we knew exactly what and why.

How can I construct and interact with a dynamic (ActiveX) dialog using OLE on Windows?

I have looked at the Microsoft Forms 2.0 Object Library (FM20.DLL) and Microsoft Windows Common Controls (comctl32.dll), as both exist (I think) as OLE providers on my system. (I am doing this by opening them in VBA in Excel to look at the libraries with their members) and playing around with them in VBA.
My bigger problem is that I don't understand the relationship between the libraries themselves and ActiveX - how do I know which members can be created as ActiveX objects? (For example, you can create "Excel.Application", but not "MSForms.UserForm").
I want to be able to script (using OLE) a form using some library, display it, respond to events, etc. I would prefer using something that is already available (like the libraries mentioned above, if possible) to prevent having to install extra software.
If you can give an example (in any language) to get me started, that would be very helpful and much appreciated.
As per HansPassant's comment, what worked is using MS Forms 2.0, which has an ActiveX object, "Forms.Frame.1", which can be created and used in my program.
I found a program called ActiveXHelper, which allows one to see all the registered ActiveX objects on the system.

Xamarin Forms: How do I implement WebSockets?

We want to transfer data from a client to a server in realtime, so we have decided to go with WebSockets.
Using Xamarin.Forms it was surprisingly difficult to find a suitable WebSocket library.
The best match was "WebSocket4Net" because it is directly suggested on Xamarin's Homepage. However I was not able to install this library, because it only supports versions of .NET up to v4.0. (We are using v4.5)
Whenever I try to change the target framework of my PCLs from v4.5 to v4.0 I get loads of weird errors stating "Windows.Input library could not be found", "ObservableCollection could not be found" etc.
So we are currently using the library "WebSocket.Portable.Core", which although lacking some functionality worked out. However for some reason we can only receive one message. The event "MessageReceived" always is just called once.
Has anyone heard about such a problem with WebSockets? Maybe it is just time to use another library, but I just can't find one?
I also can't find any solution how to implement WebSockets natively for each platform.
WebSockets.PCL has a native implementation for each platform and it's well documented
https://github.com/NVentimiglia/WebSockets.Pcl

Winsock LSP vs API hooking

I need your advices what to use - Layered Service Provider or just load mine DLL in all
process and hook necessary functions using, NCodeHook or EasyHook library.
This is needed for inspection of HTTP traffic.
P.S. This need to be done for commercial application
Thanks!
Before making a decision you need to consider the following:
Code hooking:
AV doesn't like code hooking, if you're using a library that has external DLLs, run a check with AV total before committing to it.
Make sure the library's license works for you, for example, for LGPL you won't be able to embed the library as static without becoming GPL yourself.
I heard people managed to hook Metro apps, it's something to investigate.
If you have another code hooking app, it may conflict.
LSP:
The default MS sample/installer is broken.
You may get something working on a VM or fresh install, but to get LSP working properly across all OS and browsers, will take 6-12 months.
Will not work with Metro apps.
In Komodia we use a combo of LSP/WFP for our SDK, knowing what I know now, if I'd go back 4 years, I'd use LSP all over again.
Good luck.
Using Easyhook will be a nice way to do it check the following http://www.sghaida.com/easyhook-for-systemcall-hooking/

How to scan Wifi access point on Windows Mobile?

I need to scan Wifi access point on Windows Mobile and connect the one of scanned results.
Currently I am using C# language, Windows Mobile 6.5 device, also to scan I am using the below code.
[DllImport(wlanapi.dll", SetLastError=true)]
I am using wlanapi.dll, but it seems that not possible to use on Mobile.
Does anyone know about the belows.
Could I use the dll in Windows Mobile 6.5 to scan and connect?
If the 1 is not possible, please let me know the different methods..
Please give me the clues.
wlanapi.dll doesn't exist in WinMo/WinCE. You have to use an API that is supported.
Most WinMo WiFi drivers (though probably not all) support the Wireless Zero Config (WZC) set of APIs. The native versions of these APIs, like WZCQueryInterface, are outlined in MSDN.
Microsoft does not provide any managed interface for these APIs, in fact the native documentation for them is pretty bad too. The definitive "example" of it's use is in the NETUI component source of Platform Builder. Gettign the eval version just for the source is very worthwhile if you plan to do much WinCE/WinMo development.
From a managed perspective I wrote an MSDN article back in '06 that talks about using the SDF for getting network info. The SDF has been reworked a lot since then, especially in the WZC area, but it's still pretty similar.
I did an updated blog post in '07 about custom-drawn ListBoxes, and while that's not what you're after, the data being displayed is wireless network info, which is in line with what you're after.

Resources