console-application

Using WINAPI ReadConsole

I am trying to use the WINAPI ReadConsole() to wait for any keypress at the end of my Win32 console application. CONSOLE_READCONSOLE_CONTROL tControl; char pStr[65536]; DWORD dwBufLen = 1; DWORD dwCtl; tControl_c.nLength = sizeof( CONSOLE_READCONSOLE_CONTROL ); tControl_c.nInitialChars = 0; tControl_c.dwControlKeyState = 0; tControl_c....

Missing Language File or Wrong Language File Version

Hi, I used a win 32 console application application to test a crash reporting mechanism. But when I run the Release exe, I got this error : Missing Language File or Wrong Language File Version. Can someone please explain what is the matter here and how to overcome it??? I use Visual Studio 2008 pro. ...

On Windows, how does console window ownership work?

When a console application is started from another console application, how does console ownership work? I see four possibilities: The second application inherits the console from the first application for its lifetime, with the console returning to the original owner on exit. Each application has its own console. Windows then someho...

WCF Self Host Service - Endpoints in C#

My first few attempts at creating a self hosted service. Trying to make something up which will accept a query string and return some text but have have a few issues: All the documentation talks about endpoints being created automatically for each base address if they are not found in a config file. This doesn't seem to be the case for...

Application with both console and gui mode

Hi, I have a python console app. Like most python console apps it uses the OptionParser module to take arguments. I've now developed a GUI for my app using wxPython and i'd like to integrate the two. I'd like my app to be run both from the console and from the OS's UI. When it is invoked from the console it runs as a console app and whe...

readline-like library for Java

Which readline-like library for Java do you use? By 'readline' like library I mean library for editing console input, with support for history, tab-completion, and stuff like this. I'm looking for one, and I cannot choose from so many choices (jLine -- unmaintained, java-readline -- last release on 2003, others?) ...

Does all SPWeb or SPSite instances get automatically disposed when console app process has ended?

We have Best practices on using disposable object in SharePoint. But i`m thinking - can I skip these when using Console Application? That's some code I want to execute once and after that process has finished. Do or don't SPSite and SPWeb's remain opened somwhere? Why i`m asking this? I just don't want to stress when using something l...

InvalidOperationException: The Undo operation encountered a context that is different from what was applied in the corresponding Set operation...

I got the following exception: Exception Type: System.InvalidOperationException Exception Message: The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone). Exception Stack: at System.Threadin...

C# Looping A Process Over And Over Until A User Presses A Key

I have a schedule checker that needs to run until a user presses a key to make it stop. My thoughts on doing this are as follows: The user starts the process Process runs every 10 seconds When the process is not running, Console.ReadLine(); gives the user the option to press "q" to stop the process My approach would work fine exce...

how to set target to application exe during deployment

Hi All, I have a console application and I want to deploy/share it using some msi/setup.exe file. I have used Visual Studio Setup Project type. I have created a desktop shortcut in User's desktop folder. But I can not point this shortcut to the application .exe file, it only allow to add application folder. So what I want, once I insta...

Is there a way to make a console window flash in the task bar programatically

Basically I made console app that performs some task that takes a few minutes. I'd like to have it flash in the taskbar to let me know when it's done doing its thing. ...

Detect Shift key at any point during the execution of a console app

I would like to have my console app that runs for a while to give some options to the user at the end if at anytime during the process the user pressed the shift key. Is this possible? ...

Is it possible to run a hidden console application from a Windows service?

I've written a server in Delphi 2010 that needs to launch a console application every now and again to back up a database. The console application can send log information to the console window, but it is not required. This works fine when running as an application, but when run as a service I get an access violation when launching the ...

Is there a way to emulate the Console in a Silverlight or WPF application?

I really like using Console applications to learn different aspects of .NET programming. I'm wondering if there is a way to emulate the Console in a Silverlight or WPF application. Is there already an open source Console control that I could plug into my application? Most importantly, I'd need to be able to emulate the appropriate Rea...

Compile to stand alone exe for C# app in Visual Studio 2010

Similar to this question http://stackoverflow.com/questions/2035083/compile-to-a-stand-alone-executable-exe-in-visual-studio But nothing there works for me. I've written an app that is very simple in C#. I want this to compile to a stand alone exe file, but I can't seem to find the proper settings to do this. Everything compiles into...

How to pass a config file as parameter to a console application .Net

I need a sample/example demonstrating how to pass a config file as a parameter to a console application in .Net ...

Need help with output custom shape in ConsoleApplication - C#

Hi I have this shape and I want to output it to ConoleApplication Windows. I have this code but it doesn't work as I need : int i,j; for(i=0;i<5;i++) { for(j=5-i;j>0;j--) Console.WriteLine(" "); for(j=0;j<=2*i;j++) Console.WriteLine("*"); Console.WriteLine("\n"); } Thanks in advance. EDIT : I am very sorry ...

How to automaticly close process that uses more that specified amount of memory on windows

How to automatically close process that uses more that specified amount of memory on Windows? Is it possible to specify some amount of memory (for example 1MB) and to run some executable file with those parameters? If the process tries to allocate more than that amount of memory it should close and return some error value. Is there an ea...

how to create a batch file to directly open the java console ?

how can i create a ".bat" file to directly open the java console to write the programs? for example: c:\cd \program files\java\jdk1.6\bin now ive entered the above mentioned folder, after that if i have to write a program a will type "edit" i.e- c:\program files\java\jdk1.6\bin> edit After doing all this, an application opens to wr...

Converting app to MVC and running it in both console and gui

I have a simple java gui calculator, with 3 number systems (there are some bugs but that doesn't matter now). Currently all code is in one file. My task is to rewrite it as MVC, and add possibility to run it in either gui or console mode. How should I divide this program to organise it as M-V-C ? Is it written properly enough to add cons...