C#, remote screenshot without client and server [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I just tried a program demonstrated in C# on YouTube. The video shows how to build a client/server based program to capture desktop remotely, and it works perfectly. Now I have a question. Is is possible to do the same job without the client/server architecture? Is there some kind of relative windows API that I can access remotely? My imagination is just to click a button on computer A(with specific program) and receive a screenshot from computer B(without specific program) through network. Is is possible? Thank you very much!

The thing is, that when you access "some API" remotely and get result from that "some API" it's called a client / server architecture, where you is a client and "some API" is a server.
You can't receive something if there is no one to give))
If you wanted to ask "is there anything in windows that would give me a screenshot without injecting anything and etc?" - then:
if you don't care about laws, theoretically, you could find some bug in system itself or applications that are running on it, and through them get access to that computer and make it do whatever you want, that's called hacking, the very black hacking, and that type of things are hard to do.
if you care just a little about any of laws and don't want to visit a prison, then the answer is no.

Related

What is the difference between the Ping and WebClient classes in C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I was looking for ways to check and report the status of a webservice, and came across both these classes. Is there any benefit in using one of these over the other?
Ping tells you whether a machine is accessible.
WebClient allows you to make HTTP (web) requests.
You almost certainly want the latter. Or consider HttpClient - https://msdn.microsoft.com/en-us/library/system.net.http.httpclient(v=vs.118).aspx .
You may find https://stackoverflow.com/a/7523808/34092 useful as well.
Ping sends ICMP echo requests to the target machine. Many machines will not respond to these requests because firewalls. So this is an unreliable means of checking if a machine is running, let alone running the service you're interested in connecting to.
The best way to check if a service is running is to try and use it (without any kind of pre-check) in the way that the service provider intends you to use it. If it doesn't work, then you can safely say that the service is down.

Moving and Copying Remote Files [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need to backup a file located on a remote machine using C#.
For example: "\server1\docs\test.txt" needs to be copied or moved to "\server1\docs\backup\test.txt."
Question: When I use File.Copy, does that move the file from the server, to my machine, back to the server -- essentially round-tripping the file across the network?
I'd like to avoid round-tripping.
Details: Both machines are Windows OS's on the same Domain.
Note: I want you guys to know that I have searched all over for the answer to this question, however, I have found contradicting answers. I'd like to know definitively. Thank you for your time.
You should run this from the server in order to avoid round-tripping the data. Keep in mind that if the files you're trying to work on are located on the same hard drive, moving them will be faster than copying them.
Just looking at the source code of C# (http://referencesource.microsoft.com/#mscorlib/system/io/file.cs,4a0905e7dc32d77d) it seems that File.Copy calls Win32Native.CopyFile function. To be honest I don't know exactly what it does, I mean I never saw the code, but I guess there's no magic and it reads the bytes from the remote computer and writes to the other remote computer.
Edit
One alternative is to login into the remote server via powershell (you can invoke ps scripts via C#) and execute the command to copy to the 2nd machine.

c# notify a running process [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to somehow notify a running process from the "outside"?
I have a C# program that theoretical runs forever. And I would like to notify it to trigger some action manually. It would be best, if this solution is possible on Windows and Linux (mono).
EDIT:
The solution should work without a user interface
My program is, as for now, a part of web service. On initializing, a new Theread is created, which uses the Task class to stay alive
Take your forever-running-process and let it provide a webservice other processes can call.
You might use any cross-plattform webservice framework like WebApi or ServiceStack to achieve this via HTTP calls. This will even work over the internet (if the machines can reach each other).
There are dozens of approaches. You could also use named pipes for example, or put commands into a database (the other process has to query regularly) or - if you're fearless enough - write/read files to communicate. Be creative ...

Remote Screen Viewing application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am looking for a way to remotely share my screen with another computer, the main problem is that I need to integrate it into my current C# application. I have been doing research and was looking for someone who has already done this.
I am thinking from my research that I will need a piece of client software installed on the target machine to view the screen.
In theory I would like to view six separate screens from one computer and if possible have the ability to control the remote screen, just to verify I do not want to have a Remote Desktop like connection but a live view of the target computer.
Hoping someone can help.
Cheers,
Ben
You may need to implement piece of remote desktop in your code. There are plenty of resources addressed this problem some of them below.
http://bobcravens.com/2009/04/create-a-remote-desktop-viewer-using-c-and-wcf/
http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET
http://stackoverflow.com/questions/10311770/
http://www.codeproject.com/Articles/33979/Multi-RDP-Client-NET

How to limit windows application to install only one computer using c#? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am about to setup my first windows application which is built in C# Visual studio 2010 to my customer.
I want to limit usage to only one computer per installation, but I don't know how to do that.
Can anyone guide me on how I might accomplish this?
Typically this is managed by what's called a "product activation" system. When the customer installs your application, they must enter a serial number or key to "activate" it. If they don't do this, the application remains locked. When they activate your product, the system calls back into your server and says "Hey, this key has been used, and this is the machine it was used on. don't let anyone else use this key again."
http://en.wikipedia.org/wiki/Product_activation
You probably don't want to write this yourself, so there are many third party packages you can purchase to make it difficult for your client to install on multiple machines. There's a fine line though between alienating your client by treating them like a criminal, and trying to protect your hard work.
Pirates gonna pirate.
Encrypt the serial number of the hard-drive into your program. It must be saved to a DB of some kind. Name the field something obscure (not related to a HDD serial #). Then check that it matches every time the app is launched. Not super-high tech, not super-secure, but will work in most situatons. If someone copies the app to another PC, display a message not related to copying the app, but you will know what happened. I've been doing it for years in VB and .NET. Works fine.

Categories

Resources