windows-7

Making an app/service such that trying to end/kill its process in Task Manager would result in “Unable to Terminate Process”

偶尔善良 提交于 2019-12-10 10:13:32
问题 I have an Avast antivirus and it has a process "AvastSvc.exe". If I try to end/kill that process in Windows Task Manager, then a windows with the following messages appears: "Unable to Terminate Process", "The operation could not be completed.", "Access is denied". Trying to end some system Windows processes (like winlogon.exe) may feature the same behaviour (although once I managed to kill winlogon.exe and got my machine hanged!). I want my application (possibly, converted to a service)

Undefined reference to CLSID_MMDeviceEnumerator and IID_IMMDeviceEnumerator

感情迁移 提交于 2019-12-10 10:13:23
问题 Trying to compile an example code using COM and CoCreateInstance() using MinGW-w64 in C fails. #include <windows.h> #include <mmdeviceapi.h> #include <endpointvolume.h> #include <stdlib.h> #include <stdio.h> extern const CLSID CLSID_MMDeviceEnumerator; extern const IID IID_IMMDeviceEnumerator; int main( void ) { CoInitialize( NULL ); LPVOID device = NULL; const HRESULT ok = CoCreateInstance( &CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, &device );

Windows OSes and Memory Management— What happens when an application is minimized?

北战南征 提交于 2019-12-10 10:12:37
问题 I'm asking this question for posterity reasons and general interest. Years ago I noticed an odd behavior within Windows. I know this works in XP and at that time it also worked in Windows 2000 and even 98 and I'd assume this behavior still works for Windows 7. To setup my question, try this experiment by following these steps. Open the Task Manager and navigate to the Processes tab. Open an application that you use that you know consumes a fair amount of memory (a web browser should work fine

Can't enable CURL - WAMP on Windows 7 64 bit - PHP 5.3.13 Apache 2.2.22

☆樱花仙子☆ 提交于 2019-12-10 09:43:17
问题 Ok, I have read this and this. I have done the following: Enabled extension=php_curl.dll in both c:\wamp\bin\apache\apache2.2.22\php.ini and c:\wamp\bin\php\php5.3.13\php.ini Downloaded curl here and replaced php_curl.dll in c:\wamp\bin\php\ext\ Added c:\wamp\bin\php\php5.3.13\ to PATH (coz libeay32.dll and ssleay32.dll are there). My PATH is as follows btw: C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\wamp\bin\php\php5.3.13\ Copied and Pasted

How to execute large MySql data-insert script file using command line in Windows 7?

别等时光非礼了梦想. 提交于 2019-12-10 09:25:00
问题 I'm new to MySQL so please guide me through how to do this via command line; I've tried but I get NO logging in the console output and the character set is not utf-8 Please help. 回答1: Since your SQL script doesn't contain any character set configuration directives, mysql just runs in its default character set Latin1. To change the default character set, start mysql like this: mysql -e "source /path-to-backup/backup-file.sql" db_name --default-character-set=UTF8 回答2: mysql -e "source /path-to

Installing Visual Studio 2005 on Windows 7 X64

北城余情 提交于 2019-12-10 08:53:54
问题 I am trying to install Visual Studio 2005 Professional on Windows 7 X64 and it fails quickly while installing Microsoft Visual Studio 2005 64bit Prerequisites (x64). The install error logs includes the following: [08/25/09,14:46:14] Microsoft Visual Studio 2005 64bit Prerequisites (x64): [2] Component Microsoft Visual Studio 2005 64bit Prerequisites (x64) returned an unexpected value. [08/25/09,14:46:17] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager:

tnsping ping fails, even though I can successfully connect to database

耗尽温柔 提交于 2019-12-10 04:19:16
问题 In trying to establish connectivity from my workstation (actually, am seeing the same behavior on both WinXP32 and Win764 workstations) to an Oracle server, the first thing I always try is a tnsping. When I do so, this is what I get: > C:\>tnsping MYDBNAME > > TNS Ping Utility for 32-bit Windows: > Version 10.2.0.1.0 - Production on > 25-JAN-2 011 15:03:35 > > Copyright (c) 1997, 2005, Oracle. All > rights reserved. > > Message 3511 not found; No message > file for product=NETWORK, > facility

“No such module” error when trying to get Mocha to watch my project

我们两清 提交于 2019-12-10 04:06:23
问题 I'm trying to get Mocha to watch my project for test and constantly run the tests but when I use the -w flag I get an error. Here the test executes fine: C:\Foo>mocha . ? 1 tests complete (3ms) and here with -w C:\Foo>mocha -w node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: No such module at EventEmitter.<anonymous> (node.js:392:27) at Object.<anonymous> (C:\Users\Greg\AppData\Roaming\npm\node_modules\mocha\bin\_mocha:203:11) at Module._compile (module

How can I simulate a low memory condition in Windows 7

南楼画角 提交于 2019-12-10 03:54:34
问题 I have an application written in C# that works well, but occasionally in the field gives errors which we believe are due to low memory conditions, or interactions with the garbage collector. If anyone is interested, it is described here: Unable to cast object of type 'NHibernate.Impl.ExpandedQueryExpression' to type 'NHibernate.Linq.NhLinqExpression' I want to try and reproduce this for debugging, but my development machine has too much memory. I've removed the pagefile so my virtual memory

How can I restart IIS from C# code running as a user who is an administrator?

守給你的承諾、 提交于 2019-12-10 03:38:26
问题 Typically (in Windows 7), installing a program will ask for permission to modify the system. As an administrator, I can give the authorization without supplying a password. I'm trying to figure out how to take an administrator action (restart IIS) from C# code running as a user who is AN administrator, but the not THE "Administrator" account. 回答1: To run a process as elevated you can use the runas verb. Process elevated = new Process(); elevated.StartInfo.Verb = "runas"; elevated.StartInfo