windows-vista

GetUserDefaultLocaleName() API is crashing

I have one application which reads user default locale in Windows Vista and above. When i tried calling the API for getting User default Locale API is crashing. Below is the code, It will be helpfull if any points the reason #include <iostream> #include <WinNls.h> #include <Windows.h> int main() { LPWSTR lpLocaleName=NULL; co...

Custom preview for open dialog using Delphi

I need to preview several CAD formats in the file open dialog box in Windows 7 / Vista. In the past I used a Delphi Preview Open Dialog and I could register and implement the CAD format that I had to preview. I have found some articles on how to create a preview handler in Vista, this is unfortunately not going to work for me. What I wou...

Synchronous logon notification in Vista and Windows 7 for Windows services

Is there any way for a Windows service to get a logon notification as in the WinLogon notification package in Vista and Windows 7? I have a Windows service that needs to be notified about users logging in in a synchronous way. The user is not supposed to be logged on before the service has dealt with the logon notification. This worked ...

Java Win WX and Win Vista

Hi, I've developed a Java application using Eclipse. The OS of the computer I used is Win Vista. I'm having trouble when using this application on a Win XP computer. The problem I've detected is: If in my code I use the following lines: File source = new File(C:\\Program Files\\); boolean directory = source.isDirectory(); The value ...

Is UAC on Win7 different than Vista?

[EDITED to avoid duplications] I posted this question and in trying to diagnose what is going on have become curious about the magic UAC that happens in the OS. (especially since it seems different on the two platforms. Can anyone confirm or refute this? Our unmanaged c++ program causes the "Do you want to allow the following program...

WaitForSingleObject gets his semaphore in XP but not in Vista

The following code runs perfectly well on my XP SP2 machine, but the call to WaitForSingleObject waits indefinitely when running on my Vista machine: HANDLE ghSemaphore; ghSemaphore = CreateSemaphore(NULL, 0, 1, "COM_PHILOERTEL_FINA"); if (ghSemaphore == NULL) { MessageBoxA(NULL,"Error creating semaphore","ERROR",0); return FALSE; } ...

Desktop problem with using CreateProcessAsUser from a service on Vista

Hello All, I am using VC++ to create a process from a service on Vista using CreateProcessAsUser. The process creation is succeeding when i execute this code by login on the machine locally. The same code is failing when I am using Remote Desktop (mstsc) to login in to my machine from another machine and launch my App. I can understand...

Required Registry location common to all users to avoid registry virtualisation in Vista

Hello All, In Vista standard user can no more create or write to keys under HKLM\Software. So to port the code according to Vista standards in to which key i should write the application configuration data. Same way like %AllUsers%/AppData for folders. My main requirement is I should avoid writting to HKLM\Software, but the key location...

LVM_GETITEMCOUNT working intermittently on VISTA

There is SysListView32 control.I am trying to get the no of elements in ListView by using API int iCount = SendMessage(hList,LVM_GETITEMCOUNT,0,0); LVM_GETITEMCOUNT returns the no of items properly on XP. But the same call working intermittently on VISTA. On Vista I am getting iCount =0; GetLastError() on vista returns 0x05.Access de...

how to get process handle from process id?

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. ...

Exe name like update.exe blocked by UAC in scheduled task

Hi folks I have a problem with windows UAC, scheduled tasks and a executable named "dbupdate.exe". I have full power over source code, manifests and so on, but not over user systems (short: normal software engineer ;-). Language is Delphi, but shouldn't be important I think. I have a problem using an application in task scheduler in wi...

How to adjust Windows "Visual Effects" option?

What is the system call to adjust the "Visual Effects" settings in Windows Vista or 7? Specifically, I want to adjust it from "Adjust for best appearance" to "Adjust for best performance". My first thought was to use SystemParametersInfo (SPI_SETUIEFFECTS), but that appears to do nothing when called. This is the dialog Windows provide...

Facebook, Yimg and google-analytics CDNs is freaking me out

Hi, Its been a couple of weeks that some sites just keeps on hanging. e.g. Facebooks => static.ak.fbcdn.net FLicker => l.yimg.com GoogleAnalytics I've googled and found many problems like this and some answers which are outdated or just doesn't solve the problem. I did: Cookies clearing, ran cc cleaner and several other nifty methods. ...

Navigate() fails on Vista internet Explorer 8 Protected mode

So far, my understanding on Protected mode Vista is: In vista ,by default any process runs in an Limited user Privileged (Protected mode).To run the exe in admin, we need run explicitely using "run as administrator". Any Process (exe) which is launched by other process should run in a same integritylevel or even lesser int...

Cannot get a proper Vista / 7 theme for toolbar with wxWidgets

Hi, I cannot get a proper theme for toolbars in Vista / 7 with wxWidgets (c++). For some unknown reason, I get gray bar now (as you can see here). I want it to get this look instead. I've linked against comctl32.lib (=> 5.82) and UXTHEME is on. Here's the code: #include <wx/wx.h> class TestAppFrame: public wxFrame { public: ...

How do I make OpenSSL write the RANDFILE on Windows Vista?

When I run: openssl genrsa -out mykey.key 2048 I get the following error: unable to write 'random state' e is 65537 (0x10001) My googling suggests this is some kind of Vista permissions issue. How can I allow Vista to write this file or how can I configure openssl to get round it? ...

How to detect if a Microphone is present

I just had a very long tech support call because a customer didn't have a Mic on their laptop. (Stupid me: they said they'd used the mic earlier and I have never heard of a laptop not having a Mic). I'm wondering if there is a way to detect whether there is a Microphone (recording capability) on Windows XP, Vista, 7. (I've got error ha...

Socket programming Xp > Vista, Vista > XP

I am developing a program which sends images from one computer to another (similar to remote assistance without mouse/keyboard input). The two computers I use to test this are one Windows XP machine and one Windows Vista. I have the stationary XP machine directly connected to a router, and a laptop which is connected through wireless. ...

Getting volume change notifications on Vista/7 (C++)

I'm trying to get notifications whenever the master volume changes on Windows Vista/7. This is the code I'm using: #include <audiopolicy.h> #include <audioclient.h> #include <mmdeviceapi.h> #include <endpointvolume.h> #include <windows.h> #include <shlwapi.h> #include <iostream> #include <Tchar.h> static const GUID AudioSessionVolumeCt...

XAMPP file path slashes error

I tried using XAMPP on vista and gave up...I faced an issue with backslashes(widows uses forward slashes)..due to this none of my scripts could save any files to folders because the path would be like dir1\dir2\folder/image_folder/image.jpg...I tried WAMP it worked like a charm..it threw no errors and saved the image files as intented..I...