How to code a new Windows Shell? [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 7 years ago.
Improve this question
How would I go about coding a new Windows Vista Shell?

Everything you need to do as shell has never been documented, so there are some issues with file change notifications etc. The basics are:
SystemParametersInfo(SPI_SETMINIMIZEDMETRICS,...MINIMIZEDMETRICS) with (undocumented?) flag 8
Register as the shell (SetShellWindow,SetProgmanWindow,ShellDDEInit,RegisterShellHook etc)
Hide welcome screen by setting a signal ("msgina: ShellReadyEvent" and "ShellDesktopSwitchEvent")
Start registry run key, start menu\startup and ShellServiceObjects
Set registry Explorer\SessionInfo
The good thing is, you are not the first to write a new shell, if you look around, you can find some obscure required info. Here is a list to get you started:
https://web.archive.org/web/2019/http://www.lsdev.org/doku.php
http://bb4win.cvs.sourceforge.net/bb4win/blackbox/Blackbox.cpp?revision=1.49&view=markup
http://xoblite.net/source/Blackbox.cpp.html
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/
http://www.geoffchappell.com/viewer.htm?doc=studies/windows/shell/explorer/index.htm&tx=36

A good place to start would be investigating how to build a command line parser, something that can tokenize and interpret the inputs. There are tools that can help with this like ANTLR, or you might like to try building your own.
Once you've parsed the inputs you need to decide what actions to take - launching processes, piping between processes, redirecting output - and making those system calls.
If you're just after a more powerful shell rather than interested in building one, give PowerShell a try.

Related

Setup Openframework in Codeblock in Windows [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 would like to configure OpenFramework IDE in my codeblock. I want to build an app which prints the line on screen.
If the only thing you want is to just print a line of text you can use std::cout that prints to basic output onto your console window when the application runs. This is the most basic and easiest way to solve this.
If need to do something more complex than that, like program with GUI instead of console app, I would suggest you to use something other than OpenFrameworks, like f.e. Qt, that has a support for things like this. OpenFrameworks has the capability of doing all that, it just isn't it's main goal. You can download various addons that implement things like UI elemenets, but they are usually pretty simple.
Edit: I've just realized that by line you probably didn't mean a line of text...
Well, OpenFrameworks has no longer an Code Blocks support, you can still though download an older version from http://openframeworks.cc/download/older/

How to test a user's code? [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
My query is very basic one but just want to know the exact things which occur behind the bars and how. Lets say, I am given a question to code. User submits the code in any language(I'd like to go for C or C++ here specifically), now the code gets tested on various test files at the server side. How this happens? As I think and searched, there must be a code at the server side which must be accepting solutions(user's code) from the client in form of the file, then run that file on various test files(which will have all test cases according to the input and output specified in the problem description) and match the output. Is it? I think there is something else or something which I am mistaken.
If I have a very simple program to add two numbers, now I want to test the user's code, what exactly do I have to do? I am asking from the implementation point of view i.e. I want to actually do and test the same on my machine. Can someone please tell me from basic what all I should do?(Much the same way online judges do)
PS: I am not asking this for hosting any contest etc, just doing out of curiosity for learning.
I would divide this into two sub goals
learning automated testing
setting up some application which allows the user to submit testcases, run the automated tests and reports feedback
You could start to get some deeper insight by setting up automated tests for some program in your favourite programming language.
Use a search engine to e.g. look for "automated c++ testing".
If you have managed setting up a few automated tests on a local machine, your could then progress with the second goal.
For example you could set up a Jenkins instance and learn how to add automated tests to it.

How to execute code written in an editor embedded within a browser [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
Hi Guys I was writing a web application which requires me to compile and execute code from within a browser. I am a little clueless about it though I read the following links to see how I can go about it.
http://www.quora.com/Interviewstreet/How-can-I-build-a-compiler-like-the-one-on-InterviewStreet-from-scratch
http://norvig.com/lispy.html
developer.hackerearth.com
I am planning to write it for several languages namely C/C++/java/python/Ruby
Any pointers would be helpful
You can just take the code and send it to server server will compile and execute the code and send back to the browser.
If you don't have much time.
If you have much time then you can build your own compiler like one you want and integrate it with you'r web application. like w3school and ideone.
or pass it to local host compiler it will execute and return the result to the browser.

Window - Lock Program Background [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 want to lock a program in background by adding a service to background. The user needs to input password to use the program.
sc create newservice binpath = "C:\Users\User\Test.exe"
The problem is, I am not sure that How can I write the program.
First, what programming language can I use? Cmd, C++ or others?
Second, how can I write this exe?
I have heard this from my friend, but I am not sure how to write this.
Any help will be appreciated.
First note, background process not must be service.
Second note, if you wish wrote service, take in account Vista and above session isolation. Also service may run in another account.
Third note. How do you 'trap' browser? Code injection? Finding by process name/ window name? .... Many counterattacks exists, so this is not trivial thing.
Forth note, What if stop service or close/kill your process?
Fifth note, how do you wish store passwords? If as plain text, every skilled person obstruct your app. If encrypted, more code you must wrote...
Sixth note, nobody on SO.com wrote code for wish without you.

Writing your own version of windows [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Recently, I've been thinking about how there are multiple versions of linux and how they are all built on a similar kernel. And I was wondering if it was possible with Windows. In this case I am thinking of having the first program loaded after the kernel has booted up and started all the devices, would be the what pops up instead of the windows login screen.
The reason for this is because I was wondering if it was possible to have the system render all the objects on the screen in a distint styling, but still process it as if it were running on a normal windows machine.
Any Thoughts?
Initially I thought this was a naive question, but Mooing Duck's link in the comments proved insightful. There are projects that do just this: EmergeDesktop, SharpE, even the KDE.
They're open and on sourceforge, go get them and dink around to your hearts content.
I'm not sure that the login screen is part of the shell however. So your alternate shell would only show up after you log in.
However, in the long run, alternate shells have no hope of competition. Microsoft controls the environment and they don't play too nice with competition.