windows-vista

Run-Time Check Failure #0 loading QueryFullProcessImageName from kernel32.dll

旧城冷巷雨未停 提交于 2019-11-28 00:06:15
I have an application that needs to run both on WinXP and Vista64. My program requires QueryFullProcessImageName() to work on Vista but not on XP. I try to load QueryFullProcessImageName() (instead of linking statically) via the kernel32.dll so that the same executable can run on both WinXP and Vista. The code that loads it is: //only gets called on vista bool LoadQueryFullProcessImageName() { HMODULE hDLL = LoadLibrary("kernel32.dll"); if (!hDLL) return(0); //Now use pointer to get access to functions defined in DLL fpQueryFullProcessImageName = (LPQueryFullProcessImageName)GetProcAddress

Vista or XP for Dev Machine [closed]

試著忘記壹切 提交于 2019-11-27 23:18:36
问题 I am about to get a new PC from work, and it will include the option to have either Vista Business as the OS, or a downgrade to XP Pro. Aside from a tiny bit of testing, I have never used Vista, but overall I have heard many more bad reports than good regarding Vista. I don't think that hardware will be an issue (Intel Core Duo T9300, 4GB RAM, 256MB NVIDIA) in terms of performance. I am just uneasy about using Vista for my main dev system given its history, when I have the opportunity to keep

Hide Start Orb on Vista / Win 7 in C#

你说的曾经没有我的故事 提交于 2019-11-27 23:08:24
When hiding the Task Bar on Vista and Windows 7 the Start Button (also known as the Start Orb) doesn't get hidden. I've been looking for a solution to this and I've found one but it seems more complex than necessary. This CodeProject article describes (and contains code for) a solution where you enumerate all child windows of all threads in the process that contains the start menu. Has anyone found a simpler solution? Just for reference. The code for hiding the Task Bar (without hiding the Orb) is as follows. First do the necessary Win32 imports and declarations. [DllImport("user32.dll")]

How to associate a program with a file type, but only for the current user?

不问归期 提交于 2019-11-27 22:11:37
So, I cannot associate my program with a specific file type without forcing the poor user to enter its admin password (it may be ok for home users, but it is a gigantic problem for users in a corporate env). In this case the only solution is to make the association only for the current user. I have tried that but something is not working. If i understand correctly I have to write a key like (let's say) '.mp3' in ctCurUserFileExt and write in it something like 'my_file'. Then in ctCurUserClases I add a key like this: WriteReg_String(RootKey, ctCurUserClases+ 'my_file\shell\open\command', '',

C# Run Windows Form Application from Service (and in Vista)

十年热恋 提交于 2019-11-27 21:06:28
问题 I am writing an application in C# that needs to run as a service but also have user interaction. I understand that services have no UI, etc, so I've divided up my program into a windows form application and a service that can communicate with each other. The problem I'm having is that I need the service to make sure the windows form application is always running and restart it if it is not. I'm able to detect if it is running, and restart it with the following code on Windows 2000/XP: System

OS.symlink support in windows

别说谁变了你拦得住时间么 提交于 2019-11-27 19:26:20
I downloaded python 2.7.1 from the python website and installed it to windows. When attempting to symlink a file, I find that it is not supported. However, I found this issue , and saw that it was fixed. Will this be implemented, and if so when? I'm running windows Vista. Fernando Macedo There's a way to fix this, patching the os module on your's python environment start. The function to create symlinks is already avaliable from Windows API, you only need do call it. During python's startup, an attempt is made to import a module named sitecustomize.py , on the site-packages directory . We will

As a developer, how should I use the special folders in Windows Vista (and Windows 7)?

冷暖自知 提交于 2019-11-27 19:22:06
Where should I save data related to my application? Where should I save configuration files? Where should I save temporary files? Should I do it in "Documents"? "AppData"? Etc... What is the best practice for saving data to the disk (I guess, best practice for special folders?!)? Foxfire ApplicationData : Everything that your application needs as "per user" data and does not fall under other categories. Standard configuration files would go here. CommonApplicationData : Everything that is not "per user" data. LocalApplicationData : Data that is per user and non-roaming. For example, everything

Determine if O/S is Windows 7

你说的曾经没有我的故事 提交于 2019-11-27 18:17:17
问题 Working on a project and need to be able to determine whether the O/S is Windows 7, Vista or default to XP. I understand I could run into Win2K and earlier versions but let's just say that's not a concern as other code will catch that before it gets to this point. My application will be in C++ for the time being using VS2005. I've found articles and sample code alike but they seem way bloated for my uses. Just looking for a quick and dirty return. http://msdn.microsoft.com/en-us/library

Can I listen on a port (using HttpListener or other .NET code) on Vista without requiring administrator priveleges? [duplicate]

家住魔仙堡 提交于 2019-11-27 17:23:54
This question already has an answer here: HttpListener Access Denied 11 answers I'm using HttpListener to allow a user to set up a proxy on a user-defined port. When I start the HttpListener, I get an exception if the application isn't running under administrator privileges in Vista. From what I've read, this is expected behavior - administrator privileges are required to start listening on a port. But I'm sure there are ways around this, as I run plenty of programs (like Skype) which listen on a port without requiring elevation to administrator. Is there a way to do this with HttpListener? If

Active Directory - Check username / password

落花浮王杯 提交于 2019-11-27 17:10:40
I'm using the following code on Windows Vista Ultimate SP1 to query our active directory server to check the user name and password of a user on a domain. public Object IsAuthenticated() { String domainAndUsername = strDomain + "\\" + strUser; DirectoryEntry entry = new DirectoryEntry(_path, domainAndUsername, strPass); SearchResult result; try { //Bind to the native AdsObject to force authentication. DirectorySearcher search = new DirectorySearcher(entry) { Filter = ("(SAMAccountName=" + strUser + ")") }; search.PropertiesToLoad.Add("givenName"); // First Name search.PropertiesToLoad.Add("sn"