Questions tagged [windows-console]

Windows character mode applications using the functions provided by the console I/O functions. This tag should be used by questions about the console functions, structures and winevents, which support character mode applications.

614 questions
0
votes
1 answer

Getting Errno::ENOMEM: Not enough space when 'getting' a page via Mechanize

I'm currently trying to follow a tutorial on web scraping and have been receiving a ruby error message "Errno::ENOMEM: Not enough space". I've found a workaround from http://bugs.ruby-lang.org/issues/show/1063 but I was wondering if there is a more…
Lifeweaver
  • 986
  • 8
  • 29
0
votes
1 answer

mfc how to write commands in command window

I need to write some commands in command window using C++ code. How to implement it. I have tried with CreateProcess function but it seems some wrong in it. Please refer my code below: STARTUPINFO sInfo = {0}; sInfo.cb =…
sivanesan1
  • 779
  • 4
  • 20
  • 44
0
votes
0 answers

Multiple console command crash the code

Hi I'm trying to get my C console program to flash between different colors to indicate a warning to the user. But each time I launch the program, the next fgets crashes the whole thing. char vitesseOverdrive[5]; int vitesse = 0; system("cls"); …
Polar Bear
  • 354
  • 3
  • 15
0
votes
1 answer

Is System.ConsoleKeyInfo.Key a virtual key code?

I am implementing my own version of PSHostRawUserInterface. I'd like to implement PSHostRawUserInterface.ReadKey(), and therefore I need to map System.Management.Automation.Host.KeyInfo.VirtualKeyCode to System.ConsoleKeyInfo.Key. I can cast…
Justin Dearing
  • 14,270
  • 22
  • 88
  • 161
0
votes
1 answer

How to decrease the user objects and Handles for console application

I am having the console application which creates the PDF for a set of records. For if the count is 9000 above an error occurred that "Error creating window Handle". In the application level i am using 6 threads. As i observed in the Task Manager…
Vara Prasad.M
  • 1,530
  • 9
  • 31
  • 55
0
votes
1 answer

make windows console cursor invisible with python ctypes modules

I've recently tried using the Console module for python 2.7 on Windows XP, but found that it was poorly documented and would crash on my machine. So, what I'm doing now is essentially writing my own module, but have come across this bump where I…
foxfluff
  • 71
  • 1
  • 4
0
votes
0 answers

When using settings file, updating app.config directly yields no results

I am using a settings file (*.settings) in one of my console application projects. The problem is that if I directly update, the app.config generated by the settings file, the changes do not take effect. For any change in configuration, I need to…
developer747
  • 15,419
  • 26
  • 93
  • 147
0
votes
1 answer

How do read connection string created by the settings file?

When I just had an app.config, everytime I tried ConfigurationManager.AppSettings[0] or ConfigurationManager.AppSettings["keyName"] I got a null. So I tried to use a *.settings file which created me an app.config that looked like…
developer747
  • 15,419
  • 26
  • 93
  • 147
-1
votes
1 answer

In scheduler How to active project in custom time

Work on C# VS2010 console application. My solution contains three projects. I set this solution exe on window schedule, Every morning scheduler active my solution projects consecutively , they work perfectly ,but In every morning I want to active…
shamim
  • 6,640
  • 20
  • 85
  • 151
-1
votes
1 answer

_CrtisValidHeapPointer(block) error using SetConsoleCursorPosition function

Develop console Snake. At the end of the program gives an error _CrtisValidHeapPointer(block). Found out by experience, that the problem is in SetConsoleCursorPosition function in line 32 #include #include #include…
-1
votes
2 answers

Windows Console: Extract specific range of lines from a huge file to a new file

I want to extract a few thousands lines from a giant CSV file (~15GB, 6 million lines) from line number X to line number Y, without using a lot of RAM. Using Powershell 2.0 from the command line interpreter, I was able to extract the first 2000…
-1
votes
2 answers

How to make output : 1 1 2 6 3 11 4 16 5 21

How to make output : 1 1 2 6 3 11 4 16 5 21. when i input start value = 1, and end value = 5 my code : Console.Write("input start value : "); start = int.Parse(Console.ReadLine()); Console.Write("input…
im robot
  • 21
  • 3
-1
votes
1 answer

SetWindowDisplayAffinity does not work for console app

I get accessdenied(5) error in following console app codes, is there anyway to protect console window against screenshot? int wmain(void) { HWND hWnd = GetConsoleWindow(); BOOL b = SetWindowDisplayAffinity(hWnd, WDA_MONITOR); DWORD e =…
herb
  • 139
  • 8
-1
votes
1 answer

Why does getchar() only return (char)13 after another key has been pressed? (windows)

I was playing around with the Windows Console API and found some interesting behaviour. Using this function: void defConsole() { HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); DWORD mode = 0; GetConsoleMode(hStdIn, &mode); …
-1
votes
2 answers

Highlight text in WriteLine

I want to highlight text in WriteLine how can I do it? For example Console.Write("Hello World"); and I want "World" to be in green color. Can you guys help me please?