windows-vista

Javascript interface with RS-232 Serial Port

回眸只為那壹抹淺笑 提交于 2019-11-27 16:51:13
问题 I am currently working on a project that involves a 4 Port A/V switch. This switch can be controlled via RS-232. The computer that will interface with the switch runs Vista. I would like to create a sidebar gadget that has 4 buttons- 1 for each port on the switch. When the user presses the button, it switches to that port. I have done a bit of googling, and it seems that there isn't a very good way to interface between javascript and rs-232. Does anyone have any suggestions for me? Thanks!

How to achieve Vista glass transparency (AERO) in a WPF application?

会有一股神秘感。 提交于 2019-11-27 16:48:24
问题 It's easy for a WPF application to make parts of a window transparent or semi-transparent. But how to I apply the current Vista theme (colors, opacity) to these transparent parts? When I have a green glass border how will I get a green glass background of the same style? Is it even possible to do this without calls to the Windows API? I am thinking of something like this 回答1: Here's a nice example: CodeProject: Adding Glass Effect to WPF using Attached Properties 回答2: Take a look at this link

Looking for C# code for detecting removable drive (usb flash)

蓝咒 提交于 2019-11-27 15:43:33
I'm looking for a C# code snippet to give me a notification for when a USB drive is plugged into my PC in Windows Vista (or win7) Powerlord There's a class called DriveDetector over at Codeproject that sounds like it does what you want. Look at WM_DEVICECHANGE . This message should be sent when a drive is inserted. Matt Warren I know this is not exactly what you asked for, but if you want to check what devices are available at any moment in time, there's another way. You can use the WMI classes in the System.Management namespace , I've used this method and it works well. If you take a look at

powershell : changing the culture of current session

隐身守侯 提交于 2019-11-27 15:33:44
I am using powershell on windows vista. How do I change the culture of current session? My computer's culture is tr-TR so I am getting the error messages on Turkish. I would like to change to EN? any chance? manojlds Have a look here: http://blogs.msdn.com/b/powershell/archive/2006/04/25/583235.aspx and here: http://poshcode.org/2226 : function Set-Culture([System.Globalization.CultureInfo] $culture) { [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture [System.Threading.Thread]::CurrentThread.CurrentCulture = $culture } Additional Info To find which values can be used for

How to share memory between services and user processes?

蓝咒 提交于 2019-11-27 15:12:33
问题 I have a set of Win32 applications that share information using a shared memory segment created with CreateFileMapping() and MapViewOfFile() . One of the applications is a system service; the remainder are started by the logged-in user. On Windows XP, there was no problem. We named our segments “Global\Something” and all was well. The additional security in Vista (and assumedly Windows 7) appears to prevent this architecture from working. Normal users are not allowed to create (Win32 error 5)

HttpListener.Start() AccessDenied error on Vista

你说的曾经没有我的故事 提交于 2019-11-27 14:49:20
问题 Running this code as a regular user throws HttpListenerException (access denied). Snippet runs ok as an administator class Program { static void Main(string[] args) { HttpListener listener = new HttpListener(); listener.Prefixes.Add("http://myip:8080/app/"); listener.Start(); //.... and so on } } i went ahead and added the uri using netsh (netsh http show lists the uri) netsh http add urlacl url=http://+:8080/app user=domain\user still getting the same error. Adding ACLs did work for other

CreateDesktop() with vista and UAC on (C, windows)

我是研究僧i 提交于 2019-11-27 14:31:52
I asked this in CreateDesktop() with Vista UAC (C Windows) I set a bounty but in trying to vote down the only answer the "accept" was pressed by mistake (i've been awake for more than 48 hs). so I am asking it again. I'm using CreateDesktop() to create a temporary desktop where an application will run, perform a cleanup action (while remaining out of the way) and terminate. I'm closing that desktop once the application is gone. Everything is fine when using Windows XP and even Vista. The problem arises when you enable the (annoying) UAC. Everything is OK when you create a desktop, but when you

Draw Custom Buttons on Windows Vista/7 Aero Titlebar

强颜欢笑 提交于 2019-11-27 14:01:30
问题 I found this question on StackOverflow. Basically, the user wanted to draw custom buttons on the titlebar. I tried the code and realised it works in vista/7 only when Aero is disabled. My question is, is there any way to draw custom buttons on the titlebar while aero is enabled? Also, is there any way of reading information from the current theme so I can style my buttons to match the already existing ones. Update Here is a screenshot from my computer demonstrating the above concept. I got

how to get process handle from process id?

不羁的心 提交于 2019-11-27 13:58:48
I have process Id , I want to get its process handle. Is there any API available for that. I tried to use OpenProcess but it returns NULL, and GetLastError =0. This I am trying on Vista. I guess I need to enable SeDebugPrivilege before using OpenProcess . But for enabling SeDebugPrivilege I need to get its Process handle. OpenProcess(PROCESS_ALL_ACCESS, TRUE, procId); You'll need to verify that you're using a valid process ID, and that you're permitted the access rights you request from the process. Is this what you are looking for? HANDLE processHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE,

Avoid “program stopped working” in C#/.NET

99封情书 提交于 2019-11-27 13:30:39
问题 I have a console application written in C#/.NET that I want to run from a script (nant). If an exception occurs in the console application, I would like nant to continue, but in Windows Vista there is a popup that searches for solutions and asks for debug etc. I would like to avoid the popup with "program stopped working" when an exception happens in the console application. How can I control this from C#/.NET? (A similar question addresses the issue for the C language, but I would like a