Suggestion on geoloaction and application type - c#

I'm trying to make a program using c# that will allow me to determine where a computer of mine is located using geolocation services. I was wondering what you would suggest as far as geolocatio APis go and whether you think i should just make a background process or a windows service or if it is even possible to make it a service. I've heard of one by w3c, google, windows, and skyhook. I'm hoping to be able to determine an address from it and I was also hoping that the service would be free (even if its only for a few look-ups a day.
Thanks for the help!

I'm not really clear why you're asking about background process or Windows service. You application will not be able to get the location of the computer from services like google.
I suggest you install the Geosense driver for Windows 7 to add a Location driver (see http://geosenseforwindows.com/ ) I would then use something like the Location and Sensor interop library to query that sensor to find the rough location of the computer. (see http://archive.msdn.microsoft.com/SensorsAndLocation/Release/ProjectReleases.aspx?ReleaseId=2359)
If that's not what you we wanting to do; please provide more information.

Related

Develop a Windows Location Sensor in C#

Hello fellow developpers,
I need to develop an application that would get geographical coordinates from different sources and then update the Windows system location with these. (These sources could be NMEA streams, web service, or even manual inputs).
If I understood correctly, based on what I read on the Microsoft website (here and here) and over the Internet, I would need to develop my own Windows sensor driver to update this location of the system.
The goal is then to use the very simple System.Device.Location.GeoCoordinateWatcher to obtain the system's position from any other application.
The documentation seems quite complete but does not contain any example. Because it is my first Windows sensor driver, I'm completely lost on how and where I should begin.
Any clues on this that could help me getting started ?
C# would be great but C/C++ would obviously do it perfectly

How to get the Caller Info from VoIP in real-time in a .NET Application?

I am working on a project which includes a lot of VoIP functions. I don't have access to the source code of the previous system that was being used so I can't dissect it to find out what I need to know. I will describe how the previous system used to work and then ask my question.
First, the old system that we have been using depends on Physical Phones which receive calls over the internet. There is a Desktop App installed on our computer which somehow takes the phone call received by the phone and shows that phone number on the Desktop App. Which uses that number to look up data about the caller. But the problem is that this Desktop App is over a decade old and has not been updated since. So we want to build a new Web Based Application with .NET that will do the same. My question is:
1- How do I fetch the Caller Information From the Physical Phone and use it how I want? The phone being used is SNOM 760 but its possible that other brands or models be used in the future.
2- Let's say that a specific page is always opened on the browser. How do I transfer the caller number to the server and then show a pop up with the information about the caller in that page that's always opened in the browser in a RELIABLE way? What about when that specific page is not opened? Remember that the phone that is receiving this call is not directly in communication with the server. But that is also not a restriction. I read somewhere while researching that I could have my server take the call first and then transfer it to that physical phone. The only restriction is that we use VoIP phones/numbers.
Like I said, I have very vague information on the subject. Any help is appreciated. I've studied that I could use Twillio or other such third party services to achieve this task but I just wanted to know if I can do it myself instead of relying on someone else and hoping they don't shut down their services in the next few years.
Those are a lot of questions jammed into 1 there, I'll try to answer some.
As you already tagged it, TAPI is an option but not very easy to get into. TAPI normally get it's information centrally from the PBX, but in your particular case the SNOM system has the phones themselves connect to a central server to gather the information and distribute it there. You may be able to hook into a proprietary protocol.
Gathering calls on a central server to then distribute them to phones is usually done with an IVR (Interactive voice response). Channeling outside calls through it is easy but the problem with getting your call information from this point is usually you miss the internal calls.
Your website pop-up is not my area of expertise, maybe someone else could comment on the feasibility of that, but personally I would go with a task-tray style app if reliability is your highest priority.

Adding firewall rule on Windows Phone 8.1

I really don't know how to look for what I am trying to achieve. I will add two images to show you in a better way what I am doing here.
As you can see I have added a blocking rule in firewall which will block a range of addresses(first rule on the second image) of a specific application.
Is there a way to do something similar on windows phone?
I am not looking for some code or anything. Just for some guidance. Where should I look? What should I look for? Windows phone don't have firewall and I don't want to use any external firewall app's if there is one...
There is nothing like a firewall for Windows Phone. You don't have such a deep access to the network layer. Compared to desktop PC operating systems users and developers are much more restricted in the things they are allowed to do. That leads to less vulnerable systems.
The good side of a restricted system is that it's much harder (or almost implossible) to create a virus, trojaner etc. for it.
On the other hand you are not able to control the system in its depth since there is no API an anti virus software or firewall would need to consume.
In short: It's not possible to block IP addresses for specific applications.
You can't do it with the public API (no such API is available), however you still able to achieve your goal on the interop unlocked handset.
Please refer to this forum about unlocking your phone, and this thread about blocking some sites (i.e. it's an old trick with the editing of \windows\system32\drivers\etc\hosts file).
I'm pretty sure, you can also add a real firewall rule ('cause firewall service is up and running on the WP8.1 & up OS'es) to the registry but this require more investigation.

Register Application programmatically for Graphic card

I am trying to write a Setup for an application with Inno Setup, which is pretty neat by the way ;) , but now I am stuck with a problem regarding the graphiccard.
I am installing a 3D application and want to configure the program so that it uses a certain graphic card as default.
It sounded logical to me that somewhere in the registry must be a something to configure that.
I tried to change the default graphiccard manually und compare the changes in the registry but couldn't find any entrys relative to the changes
I know that programs like Adobe Photoshop are using the high performance graphiccards by default so there must be some kind of solution to my problem.
I am using inno script to write my setup but I can call external programs to do some tasks so I could write a C# program to execute this task.
This option is mostly relevant for Windows 7 and Windows 8 because I only saw it there.
Does anyone of you know how to change the default graphiccard of an application programmatically?
Your approach, sorry, sucks. This is not something you should do during setup. What if the card changes?
Check it during application start. Let the user choose if you do not find anything. Let him update. Not everyone has only one graphics card. People do update the graphics card. Why should I rerun setup just to get this done?
And it is quite easy to identify graphics cards, performance is another story. Which one is "high performance" in your eyes?

Is it possible to embed Windows Sidebar Widgeds in own .Net Application

I'm trying to embed Windows-Sidebar-Widgets into my own .Net Application (WPF and C#), but I dont't realy know where to start. I googled a bit but only found SDK and tutorials for widget-development. I found that there is a small service in Windows, running the widgets. My thought was that I could perhaps fake this service and provide his functions whithin my programm, so that I can run and show the widgets.
Does anyone have some tips on how to do this? Or some experience in doing so? Perhaps there is even some kind of libary for that kind of stuff?
If this is not possible it is also an option to switch to an OpenSource widged-manager to use this widgeds, but this is only an emergency solution and the windows-gadgeds would be very appreciated.
Some information about my system:
I've written some kind of small windowmanager for childwindows in my application. And on the top of this I want to show the widgets in some kind of HostWindow.
Any hint will be appreciated.
P.S.: I would be willing to share the results if I (or we) get this working :-)
I've never seen a library for hosting gadgets, but since they are basically just websites you could use the MSHTML component to host any arbitrary gadget in theory.
This isn't to say it will be easy.
You'll need to extract a gadget to some temporary directory, spin up something hosting MSHTML (in WinForms WebBrowser would be convenient), navigate to the appropriate file in that temp directory (discovered by parsing gadget.xml), and shove something resembling the System object into the gadget.
As a starting point, inject some script that sets System = window.external; onload and WebBrowerser.ObjectForScripting = new FakeGadgetSystem().
FakeGadgetSystem will need [ComVisible(true)] and to implement a decent amount of stuff. I'd advise grabbing a widget or two to test with that mildly exercise the Gadget API, and then slowly implement the calls they make. It'll be a long haul for 100% compatibility with the official gadget hosting service.

Categories

Resources