1. Is it possible?
On
any POS device? NO.
The most common POS device world-wide is a good old fashioned cash register. You can't run a C# application on that.
Probably the next most common POS devices world-wide are proprietary POS systems provided by companies like NCR that are installed in major retailers. The don't necessarily run Windos, and even if they do, they aren't going to be configured to allow you to install third-party add-ons.
Your average small-to-medium sized business either uses a cash register, or bought a POS device from somebody like NCR or HP who also sold them the software that runs it. Minimally, the software tracks inventory or generates sales reports. And that same vendor has a software option that will track additional details -- and it's already integrated and working with that system. Not likely those vendors have much incentive to give you an open API to add on to their system -- and also not likely your average business is going to take the risk of going with a third party solution if they can get it from the same vendor.
So what are you targeting?
Actually go find a POS device that you want to develop your application for.
Is it just a barcode reader, plus a magnetic strip reader, plus some software running on top of a windows based pc?
In that case, YES, it is
possible depending on how much work you want to do.
(But before you go any further, find out if anybody will actually use what you have in mind. How many businesses have that sort of POS system? Does the original vendor already provide a software option similar to what you have in mind? Survey some of the businesses and find out if (a) they need or want what you have in mind and (b) if they would buy it from you rather than from the original vendor.)
2. If answer to 1 is yes, then can there be two software which can receive events from POS device? Like the barcode being scanned?
YES, but you might have to write your own device driver to do it.
It's pretty unlikely the existing POS software has an open API that you can just get the data from. It's also pretty unlikely that the original authors of the POS software designed the system with the idea that they would be sharing the magnetic stripe reader and the barcode reader with another software package.
If that's the case, then you could still replace the existing device drivers for those devices (or, perhaps simpler, add a driver to the device driver chain for the devices) so that you can intercept the data from the device as it goes to the other software package.
(To give you and idea of what I'm talking about, here's a code project article on intercepting keystrokes:
Keystroke Monitoring[
^]
Intercepting data form some other device is perhaps more complex, but the concepts are the same.)
If you have to write a kernel level driver to do what you want, you are going to end up writing it in native C or C++ rather than C#.
So the answers is:
YES, it's possible.
BUT, unless there is a really compelling reason to do it, it's not worth the amount of work involved.