windows-vista

How does Windows (specifically, Vista) determine if my application is hung?

别说谁变了你拦得住时间么 提交于 2019-12-03 12:34:10
I have a problem very similar to the one described here: http://www.eggheadcafe.com/software/aspnet/30579866/prevent-vista-from-markin.aspx That thread suggests that Task Manager sends WM_NULL to the process and expects the process to consume this message within timeout limit (5 seconds?). When I google for "WM_NULL hung" there are many references to the same technique. However I don't see any WM_NULL messages in the queue of my application while it works on a lengthy operation - I have a secondary thread that switches to the main thread every 0.5 sec and calls PeekMessage() looking for WM

Windows Forms .NET 2.0: How to draw a PNG icon?

帅比萌擦擦* 提交于 2019-12-03 11:34:22
Note: Question Using 256 x 256 Vista icon in application deals with using a "Vista" icon as the application's icon. This question deals with manually painting a Vista icon. Note: Question WinForms .NET 2.0: How to paint the proper sized icon? deals with painting a Vista icon loaded from a file. This question deals with painting a Vista icon that is loaded from a .resource. I've included an icon in my Visual Studio project that has various formats: 16x16 32x32 48x48 256x256 (PNG compressed) Now want to draw the 256x256 version. None of the following things I've tried work. The following draws

Automatic confirmation of deletion in powershell

徘徊边缘 提交于 2019-12-03 10:34:22
问题 I'm running the following command: get-childitem C:\temp\ -exclude *.svn-base,".svn" -recurse | foreach ($_) {remove-item $_.fullname} Which prompts me very frequently like this: Confirm The item at C:\temp\f\a\d has children and the Recurse parameter was not specified. If you continue, all children will be removed with the item. Are you sure you want to continue? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): How can I have it automatically set to "A"? 回答1

What are the main differences between programming for Windows XP and for Vista?

此生再无相见时 提交于 2019-12-03 09:22:30
问题 From a desktop application developer point of view, is there any difference between developing for Windows XP and developing for Windows Vista? 回答1: User Interface Looking at the Windows Vista User Experience Guidelines you can see that they have changed many UI elements, which you should be aware of. Some major things to take note of: Larger icons New font (Which affects some custom UI constistency) New dialog box features (task dialogs) Altered common dialogs (like File Open, Save As, etc.)

Allow wake timers Windows 7/Vista

懵懂的女人 提交于 2019-12-03 09:06:55
I need to allow WakeTimers (computer wake up from sleep/hibernation) for all power plans set on plugged in to Enabled. I tried Win32_PowerSetting but it only works on english version of Windows. I need to use .NET 2.0 Thanks for responses ! I suspect you can do this using API calls to powrprof.dll, as well as WMI, but I haven't had the time to figure that approach out. This setting appears to be simply a boolean registry key that is located according to your current power plan: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\(Current Power Scheme GUID)\(Sleep

How to diagnose Java JNI EXCEPTION_ACCESS_VIOLATION errors in Windows Vista

不羁岁月 提交于 2019-12-03 08:54:01
We have a Java application that uses some C++ libraries through JNI. The application used to work just fine in Windows XP, but it does not work in Windows Vista, it just crashes the JVM right away. We also wrote the C++ libraries and produced JNI bindings using SWIG. We are a little bit clueless on where to start looking for a way to fix the problem. Here is the EXCEPTION_ACCESS_VIOLATION that we get: # # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x771b4335, pid=1320, tid=2004 # # Java VM: Java HotSpot(TM) Client VM (1

Ant + Vista 64 : “Unable to locate tools.jar” (jre/jdk conflict?)

瘦欲@ 提交于 2019-12-03 08:46:24
问题 I'm trying to use ant in a vista 64 environment to build some docbook/xml files. However, I can't resolve this error message. Anybody have suggestions? C:\Users\Robert Admin>ant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar Buildfile: build.xml does not exist! Build failed Googling around, I see that this tools.jar message is the result of ant not being able to find the jdk. In fact, C:\Program Files\Java\jre6\li b\tools.jar is a JRE installed

Making Vista style apps in C#

拈花ヽ惹草 提交于 2019-12-03 08:27:49
I'm running windows vista and want to get the appearance to look like regular vista programs. Are there any really good tutorials/articles on how to build Vista Style apps? I would also like to learn how to use the native code and convert it to C# like in this example. If you're using WPF you can use Microsoft's Vista Bridge library which has several useful controls. Otherwise, just look at the Windows UX Guidelines and roll your own. From that page: Some of the features included in the Vista Bridge Sample Library are - Vista style Task and File Dialogs, Common Open and Save dialogs,

How can I pass command-line arguments via file association in Vista 64?

大兔子大兔子 提交于 2019-12-03 08:21:34
How can one pass command line arguments via file association in Vista 64? I recently built a PC running Vista Ultimate 64-bit. I noticed several of the Perl scripts I transferred failed due to command-line arguments not being passed. As a simple test, I wrote the following (foo.pl): #!/usr/bin/perl -w use strict; my $num_args = $#ARGV + 1; print "${num_args} arguments read\n"; print "$^X\n" # to see what was being used Running "foo.pl 1 2 3" undesirably yielded: 0 arguments read C:\strawberry\perl\bin\perl.exe Running "perl foo.pl 1 2 3" expectedly yielded: 3 arguments read C:\strawberry\perl

How to run a process non-elevated with Delphi2007

二次信任 提交于 2019-12-03 07:42:08
I have an installer-like application that I have to run as elevated on Vista. But from there I have to start a new process as non-elevated. Any hints how to do this with Delphi2007? I found an excellent example for C++ and adapted it for Delphi: unit MediumIL; interface uses Winapi.Windows; function CreateProcessMediumIL(lpApplicationName: PWChar; lpCommandLine: PWChar; lpProcessAttributes: PSecurityAttributes; lpThreadAttributes: PSecurityAttributes; bInheritHandle: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: PWChar; const lpStartupInfo: TStartupInfoW; var