Is it possible to edit a program without the source code? [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 2 years ago.
Improve this question
My doctor uses software in his practice. He is always annoyed about the focus in one form. When he heard that I was a junior developer, he asked me if I could change the focus of the text field to another text field but i have no source code. only the exe. Is there a possibility with any tools to change the program?

Whilst in theory this might be possible, I would strongly advise against it.
You trying to de-compile the exe, figure it out what to change, and then re-compile, is unlikely to end well. De-compiling doesn't magically get you the original source - you get something, but it's likely to be extremely difficult to comprehend. Even if you get as far as successful re-compilation, you have as much chance of breaking the program completely, or introducing unexpected bugs, as you have of fixing the specific issue.
And anyway if you did that you'd immediately invalidate any support you did have from the vendor, as well as probably breaking the license conditions, and most importantly you're potentially putting patients at risk by screwing up the software accidentally.
None of those risks are worth taking just for a bit of irritation over setting the focus in a form. Maybe instead you can just take a look at the GUI and see if it's possible for the doctor to quickly and easily use the tab key to move the focus to the other field without too much friction - most forms should support that if they're written in a good way.
And at the end of the day it would make more sense for the doctor to raise a feature request with the makers / vendors of the software (to either change the default, or at least introduce an option so it can be configured).

Related

Is using extensions in Visual Studios or any application for programming in general a bad practice as a beginner programmer? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Of course, it does depend on the application in question. If I am using, for example, a grammar checker to check for mistakes to make the code more readable, I don't think that that is a bad practice (though tell me if it is).
But I am thinking about bigger extensions like Resharper that adds so much, with me not even knowing 95% of what it does.
My big question is: is it a bad practice to use Resharper or similar applications that I mostly don't understand (while the few bits I do understand does help me), while I don't even know how most of the basic Visual Studios application works?
A productivity tool (like R# or others) is supposed to enhance your productivity.
That means you should be able to do your job, just do it faster (or cheaper or whatever other metric you use) with the tool.
If you catch yourself not being able to do the job without the tool, because you don't understand what the tool does or cannot replicate it without the tool, that is a problem.
Just keep in mind that a tool can vanish for any reason at any time. Your employer may not want to pay for it, may not like it, use a different product or maybe the product does not support your preferred environment anymore or simply has bugs. You cannot tell an employer that you cannot do something because a $100 tool broke when you are paid $100K. It's acceptable that you take longer, but not that you have to give up.

Changing variable of an application from another 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 have a question about changing an variable of an application from another application.
For example: If in 1.exe I have defined string a="a", how will I be able to change a="a" to a="b" by using another application?
Do I have to get the memory address of string and then change it's content to b? Or Is there any another easier way?
You can set up a shared resource for the two applications and read the values from there. It could, be a database, cache or even a simple text file.
Refresh the variables from the shared resource when appropriate.
Given the scenario you have mentioned (i.e. you do not control the code for the 1st application).. The general idea of opening the target process with admin privileges, finding the memory location you want to update, and then updating it applies..
However, be warned that it will generally not be that simple. For example,
It can be extremely hard to predict, how many copies, of the variable are maintained by the applications logic, and where?
Without disassembling the code (no way a trivial task.. none of this is), scanning for the value and guessing the memory location is the only option which comes to mind. But it has the risk of making wrong guesses, and corrupting the entire process.
PS - There are freely available software, which attempt to do exactly what I've described above.. I'd advise that you try to examine how they work (scenarios they support), to get better idea of what you are trying to accomplish.
PPS - Also be careful what you download.. Applications like these, if downloaded from un-reliable sites, can be damaging / security risk.
I think the easiest way is communication with network sockets in localhost via UDP or TCP. It gives you a good event mechanism so you can easily handle your data without checking the new data changes frequently, also will be doesn't matter how amount of application communicating each other in same time. Other solutions like shared memory etc. will be hard to control especially when you running three and more apps.

Right place to store the int ID value ,if an application crashes or restarts in c# windows application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am reading the last updated integer application id value from settings file when application crashes or restarts happens in c# windows application.
But i would like to know whether this approch is good or not ?
Also please let me know is there any other option for storing the variables during application crash or restart.
This entirely depends on how much trouble you'll get into when you re-use an ID and how easily you can recover from that. And keep in mind that it is not just limited to program crashes, you'll have the same problem when somebody trips over the power cord or a machine's hard drive fails and needs to be replaced. Which significantly cuts down on the number of "good" places to store this info. It is usually a lot of trouble, always consider providing the user with a way to recover. A settings file is not easy to find, you need to help.
The standard guidance is to store it in the same place as the data that depends on the ID value. So you'll lose them at the same time. And get them backed up at the same time :) Always favor a database table's identity column for example.
And very strongly consider using a Guid so you never care about the previous value.

Conceptual Query -- C# 4.0, ASPX.NET, GUI [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am looking for honest / constructive feedback.
I hear a lot of my peers who have been using .NET for a while now, say how easily they built their GUI interfaces. On closer inspection they have used 3rd party tools such as Infragistics.
As a new .NET programmer (certified I may add), I wanted to know if anyone has actually created interfaces using nothing but what ever happens to be available by default with the framework...
I am guessing it shouldn't be too difficult to create a good, aethestic looking GUI without using 3rd party addons.
Yes We've done it (windows).
Depends on where you put the emphasis in your guess. No its not TOO difficult, but it's definitely not easy, unless your requirements are truly trivial, as opposed to apparently trivial.
All depends on what you need / want to do. My advice don't tell your boss, this will be easy, well not unless you want help getting out of the door for the last time.
For instance take a straight textbox.
They want to enter currency in it.
Multiple rounding algorithms.
Enter raw value display formatted, Currency symbol, thousand
separators.
Optional pounds or pence.
Optional blank or zero
Optional treatment of negatives.
Optional display formatting of negatives.
Alignment on decimal point.
Auto change of font on resizing.
And break none of the standard behaviours.
Trust me not simple at all. Especially if you do something Infragistics did not, and go for a good developer interface as well as the end user behaviours.
Not trying to put you off. It's challenging and rewarding, but when you have the entire application stuck behind some irritating bug in the UI, bosses lose patience real quick and you haven't got that get out of jail free card in shrugging and saying that's how X works.
NB just buying a suite won't fix all these problems, you can spend a lot of time producing a totally crap UI with them as well, just you don't have to write the code...
The answer to that is a lot of hard work. :(
Can your current suite be upgraded?
If you have the source could it be fixed, if you had the source and it's been twiddled with, are those "improvements" interfering?
Needs some hard-headed realistic analysis this. Which components are broke? How much are they used? How much of the extra behaviour in the suite do you really need.
Most important, how good is your separation of concerns in the current code, and how comprehensive both unit tests and automation tests.
Would compatibility mode sort it out?
Need to get to a point where the number of questions doesn't significantly out weigh the number of answers.
I've been where you are though it was another suite in another environment. The people looking for the cheap, quick and painless way of dealing with a mess like this were hugely disappointed, but it can be attacked in parts as long as everybody takes a heavy dose of pragmatism.
As a for instance,
Someone had bought a windows component that looked like a html link, and was heavily dependent on File associations and API calls. It was very visible and all over the place, I knocked up a much better and far less fragile one in a few days, swapped it in, a lot of perceived problems disappeared, confidence increased, and the remaining problems started to look less horrible.
Think of it like going into triage mode on bugs at the end of a struggling release.

Confuser .NET Obfuscator. Is it safe? [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.
The community reviewed whether to reopen this question 8 months ago and left it closed:
Opinion-based Update the question so it can be answered with facts and citations by editing this post.
Improve this question
I'm currently developing an application where it's rather crucial to keep the user from decompiling the code. Now, I'm aware of the fact that most .exes are decompilable if executed by an experienced programmer. However, my goal is simply to keep it safe from the "regular" user with basic programming knowledge.
I've come across several obfuscators, and the one I'm using right now is Codeplex Confuser, which you can find here. Since I'm no obfuscation guru, or that experienced within programming of any high level, I'm asking you if you know anything about the safety of this obfuscator.
From my experience Confuser is one of the hardest (free) obfuscators to reverse at this moment. At least by 1-click tools.
Personally I had a few issues with it, namely, a few false positives when using max settings and a few cases that made my .exe's unable to run.
Keep in mind that regardless if it's a bit harder to reverse than other free alternatives it's still very possible for someone to do so if he devotes a bit of time.
Using an obfuscator will make it a lot harder to decompile the code, but it's still not safe.
The only way to keep your code safe is to keep it out of the hands of the users. You can put critical code in a web service, and let the application call it. Unless the user can actually hack the server and get to the code, it's completely safe from decompiling.

Categories