console-application

Console application using Clipboard.GetFileDropList: how to check if that came from a cut or copy operation?

帅比萌擦擦* 提交于 2019-12-12 10:51:22
问题 When you cut/copy files from Windows Explorer, you can get that list of files through the Clipboard.GetFileDropList method. How can you determine if that list came from a cut or copy operation or notify the other party that the cut/copy operation finished? The other way around: you can put files to be cut or copied on the clipboard using the Clipboard.SetFileDropList method. How can you specify that this list is to be copied or cut? This is about a console application, so I cannot monitor the

_tprintf with Unicode characters in a console app

末鹿安然 提交于 2019-12-12 10:43:39
问题 I'm doing this simple output from a Unicode-built console application (using C++ and Visual Studio 2008). This code is intended to run on Windows: _tprintf(L"Some sample string\n"); Everything works fine. But if I add an non-ASCII character in there: _tprintf(L"Some sample € string\n"); what gets output to the console is everything until that character: Some sample What am I doing wrong here? 回答1: By default, windows console does not process wide characters. Probably the simplest way to

Return jsonp from self hosted WEB API Console app

扶醉桌前 提交于 2019-12-12 09:55:18
问题 I've use the jsonp formatter described in this blog post: http://www.west-wind.com/weblog/posts/2012/Apr/02/Creating-a-JSONP-Formatter-for-ASPNET-Web-API Has anybody tried using the formatter with a self hosted console application? I've tried the formatter in a regular MVC 4 project, and it worked immediately. However, I would like to use it in a self hosted console application, and I've had a lot of trouble getting it to work. I've registered the formatter, and verified that it is added: var

Unkillable console windows

这一生的挚爱 提交于 2019-12-12 09:52:38
问题 I'm developing an OpenGL based 2d simulation with GLUT under Visual C++ 2008, sometimes when I have an assert() or unhandled exception and break into the debugger, the GLUT display window closes, but the console window remains open.They just cant be killed!!! They do not show up with Task manager, Process Explorer or any other tool, I cannot find the window handle using the Spy++ tool either. Worst thing is they prevent my system (Windows XP) from shutting down, I have to manually poweroff

Why does my console application have command history?

廉价感情. 提交于 2019-12-12 09:29:29
问题 I have written a console application, which is essentially a Console.ReadLine()-Loop. When the application is waiting for input, pressing the up arrow key iterates through all previous lines of input. My application does not contain any code for this feature. What part of Windows provides this? How can I disable it? I can only image that it's either a feature of the console subsystem or implemented in Console.ReadLine(). Here is some sample code that exhibits the described behavior: namespace

How to get Doctrine ORM instance in Symfony2 console application? [duplicate]

↘锁芯ラ 提交于 2019-12-12 07:11:19
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How can i inject dependencies to Symfony Console commands? I want to make console application, which changes some records from the database (using Cron, every hour). How to get Doctrine ORM instance here? In casual controller, I do this: $this->getDoctrine(); 回答1: If you extend from ContainerAwareCommand you should be able to get your service $this->getContainer()->get('doctrine'); Here is similar question 来源:

QFileDialog::getOpenFileName in console application

安稳与你 提交于 2019-12-12 05:27:23
问题 This is a question first posted on qtforum.org where I've got no answer: I have trouble hiding the Open dialog in a console application after it has been used. Here is the content of main.cc file used to test this behaviour: #include <QApplication> #include <QFile> #include <QFileDialog> #include <QString> bool b_closing = false; static QString gofn ( void ) { QString s_file; s_file = QFileDialog::getOpenFileName( qApp->activeWindow(), QObject::tr( "Select the file to open:" ) ); if ( !s_file

MCR_CACHE_ROOT path empty after running the console application

回眸只為那壹抹淺笑 提交于 2019-12-12 05:05:34
问题 I set the MCR_CACHE_ROOT to a folder C:\MATLAB_cache to speed up my compiled application. Using the linke below How to setup MCR_CACHE_ROOT in Windows But after I ran the console application calling it from PHP the folder is still empty.Why is it? Should I add anything in my console application or php code after setting up the MCR_CACHE_ROOT? I am working on Windows 7-64bit. The console application is C++ Win32 console application. I deployed a c++ shared library using deploytool in MATLAB

How to pass argument while calling Task Scheduler from c#

不想你离开。 提交于 2019-12-12 04:49:46
问题 Here I have create service for writing .txt file and passing parameter from Task scheduler using this code : static void Main(string[] args) { string abc = string.Empty; foreach (var item in args) { abc += item +" "; } string path = @"D:\GST Project\Demo Text File.txt"; File.WriteAllText(path, abc); } I have added the task in task scheduler like this: I want to call my scheduler task by using C# code below is my code which I have taken from Link using (TaskService tasksrvc = new TaskService

How to run Outlook using Process.Start(“outlook.exe”) and get the control back

两盒软妹~` 提交于 2019-12-12 04:49:12
问题 My C# program needs to launch Office Outlook and get the current "running outlook application". In order to do that I've implemented the following simple program (so if you want you can test it simply): using Outlook = Microsoft.Office.Interop.Outlook; using System.Runtime.InteropServices; static void Main(string[] args) { Outlook.Application outlookObj = null; if (Process.GetProcessesByName("OUTLOOK").Count().Equals(0)) { Process.Start("outlook.exe"); // MY PROGRAM STOPS HERE } var process =