SCE - Custom Data Feeds - wpf

I am using the syndicated client experience (SCE) SDK. Has anyone had success with creating custom datafeeds for this? I want to be able to host the masterfeed and other feeds at a URL instead of compiling as embedded resources like the example. For instance, the client application would gather its feeds from http://somesite/masterfeed.xml.
I believe this can be done, but I keep getting an AccessViolation exception during the debugging of the SCE client.

The application just happened to be writing to a bad memory space.

Related

Proprietary USB device access via browser... possible? Silverlight maybe? (Java is excluded for now)

Probably there are a lot of similar questions around, but since I know only few solutions to this which I am not sure will work for us, I am looking for something else, maybe new technologies...
What we have is this USB device which is not so fancy (of course, it requires a driver to be loaded), and it has couple of C++ dlls to help getting certain output from it. On top, we made a C# desktop application which makes use of the device in a more attractive way (plenty of interop inside).
So far so good, but to have the application lifted up to the web in order to gain more flexibility... What options are there?
Known solutions are:
1) ActiveX - kinda old technology and not cross-browser;
2) .Net 'applet' - not so common (is this even a solution?)
3) Java applet - well known, but JVM needed (since we went for C++ C#
maybe is out of scope);
4) Web service on the usb device itself - our device is very
light, we cannot have it there.
Are there other ways? Is Silverlight 4, 5 (maybe "out of browser") a feasable solution? What about these new technologies nowadays? Html 5 or something?
EDIT1: In particular I am interested in Silverlight. Is there a way using Silverlight?
EDIT2: I found this question: Can Silverlight access a .Net library that accesses a USB port? . What shall I understand from that? Is really Silverlight not a feasable solution for my scenario?
EDIT 3: VERY IMPORTANT!
These devices need to be used on customer side! People browsing must use them locally on their PCs!
Thanks in advance.
to have the application lifted up to the web [...]
Simple solution: Let the webserver (http server) run on the PC connected to the USB device, and use one of the webserver's interfaces like CGI to talk to your USB device. This way you need to code only a USB-to-CGI wrapper program, which can be C++ or C#.
Another way is to write a browser plugin.
The issue that you're going to face is that content in a browser is often run in a sandbox, in such a way that the web app does not have access to the computer. There are good reasons for this - security, primarily. One way to have some code running in the context of the computer is to have a browser plugin that can access the computer's hardware resources, but that can interact with browser content. Unfortunately, you may end up writing a different plugin for different browsers.
There do exist frameworks out there that make writing browser plugins more manageable. A simple search should turn up some of those candidates.
You can use Silverlight 5, it can give you access to your file system and USB storage device. If you want to get control for other USB device (printer, scanner, etc), you should give a device type. I know, Silverlight 5 works fine with a file system and web-cams...)

Silverlight 5 web cam capture: Two capture sources on the same device

I tried to attach the same Video Source Device (the WEB CAM) to two different CaptureSource objects but it looks like that want work.
The system throws an exception: A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
I think the web cam is locked on first CaptureSource.
Does anybody has an idea how to display two images from the same Device but from different capture source? I wanted to use a simple CaptureSource on one side and MediaStremSource with some filtering on the other side to see differences between original and filtered video source.
I wanted to use the plain CaptureSource because it's performance is better than MediaStreamSource. MediaStreamSource loses time when raises OnSample Event which is not happening with CaptureSource.
I know this exception, When you work on debug mode silverlight fails.
Run project by Ctrl+F5. (Release mode)
In addition use ask for permission methods this will display permission window for camera.
It is very capable, just did it myself. However, in experimenting with different cameras and different inputs.... 2 MS LifeCams connected to USB3 = same error. Connecting to USB2 hub to USB2 MB works like a charm. Also, if I run something like ActiveCam and it crashes, may need a reboot. Oh, you will need to use 2 capture sources.... but can still ask permission once.
Also remember not to use DefaultCaptureDevice but:
var dev1 = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices()[0];
var dev2 = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices()[1];
With perhaps better naming conventions and logic to check if devices exist etc...

WPF Application initialization and finalization

I am preparing to write a WPF client application that uses ICE (Internet Communication Engine) middleware. ICE requires proper initialization and finalization. All the examples show how to accomplish this in a usual console application - which is easy because you only need try-finally block and do some stuff in it.
What about WPF? How can I be sure that some code will be called no-matter-what happens to finalize the app?
Have a look at the Application.Exit event
Also, see How to detect when application terminates?

Cache Outgoing Data from browser

This might be a very broad question. But this is what i want. I open a website and enter some details in the website like my credentials to login or it may be any data that pass from my browser to the website. Now what i want is that i should cache ( write to a temp file ) whatever that i send to that website. How can this be done? I tried to extract the data present in the packets that are flowing out of my machine but i find only junk characters in that (may be header). any ideas are welcomed. I am using Ubuntu Linux and would like to achieve this using shell script/C/C++
One option would be to use the Fiddler Web Debugger which is scriptable (C#).
Although it's a Win32 program, it can act as a proxy for any Linux machine. See Debug traffic from another machine (even a Mac or Unix box) for details.
There's also a native Linux app called dsniff which can be used to log all HTTP traffic to a file.

How to send a notification to another PC?

Is there a way i can send a notification/message to another PC in C/C++? I think something like net send, but i don't know if there is another way to send a notification/message. I created an application which will run on every PC, and i want, that if my application has finished it should send a notification to my PC, that it has finished running. I don't know if there is a solution for my question, but if yes, could someone tell me, how to do that?
Thanks,
kampi
How about using sockets?
http://www.alhem.net/Sockets/tutorial/
Start by learning about WCF. http://msdn.microsoft.com/en-us/netframework/aa663324.aspx
We ended up building a system for alerting all of our retail locations of emergency situations by building a service that opens up a TCP channel using .NET Remoting. It just sits there and listens for notifications. Our command center has a program that can send out notifications to this service. The service is responsible for displaying the message.
The code is proprietary, so I can't share it, but that's the general idea. Remoting has been rolled into WCF, which is why I started by suggesting learning that.
It has been working very well for us for many years, and works just fine on newer versions of Windows (unlike Net Send) and it's faster than Net Send.
Edit - added
I hadn't heard of this until now but you could also look into msg.exe. it looks easier.
http://www.appscout.com/2009/03/vistas_msgexe_replaces_net_sen.php
If you want something like "NET SEND" use mailslots!
Here more info on MSDN: http://msdn.microsoft.com/en-us/library/aa365576.aspx
If you can't use net send, how about just creating a date-stamped temp file of some sort that your other PC looks for?
Make your application a Growl client
Net Send is an option, but I think it will annoy the crap out of you, as it sends console toast to your computer, which pops up in front of the tasks you are working on. Personally, I would find that incredibly annoying.
If you created the application, you have the ability to include notication code. As an example, you can set up a service on your box and write the code to contact that service. On a windows machine, this can be a WCF service. You can also wrap this in a windows service if you want to fire up non-annoying toast.
I am not sure how to set up C to access a service, so another option might be to drop something in a folder and have a file watcher tell you. A bit kludgy, of course.

Resources