windows

How to write a Vertical Right-Side IE Explorer Bar

Hi, I've written explorer bars (band object) before and AFAIK vertical explorer bars can only be on the left side. However, I was amazed when I saw this explorer bar by HP that is docked on the right hand side instead: I've searched up google for a bit and I can't find any resources on this. Does anyone know how to build a vertical r...

How to read a registry value whose name is a file path using WshShell.RegRead

I am writing some javascript to be executed by the Windows Scripting Host, and I need to be able to read the shared file counts from the registry for certain specific DLLs. The registry key and values look like this: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls] "C:\\Program Files\\Common Files\\ACME Corp\\...

How to create a right-click context shell shortcut "edit with Emacs"?

Notepad++ automatically adds a shell shortcut so that when you're in Windows Explorer, you can right-click on a file and select "edit with Notepad++". How can I do the same with emacs? I am using GNU Emacs 22.3 for Windows. ...

Sending a password to a Windows Service

What is the best way to send a password to a Windows Service? Our application needs a password in order to start. I don't care that services are "normally" supposed to run without user interaction. Its good enough for us that an operator can start the application and then log off. On a unix system, I would just echo the password over ...

Creating big file on Windows

Hi, I need to create big relatively big (1-8 GB) files. What is the fastest way to do so on Windows using C or C++ ? I need to create them on the fly and the speed is really an issue. File will be used for storage emulation i.e will be access randomly in different offsets and i need that all storage will be preallocate but not initia...

What alternatives are there for PHPLint that run under Windows?

I just finished a little 5000-line PHP application and are now going into testing and debugging. A short while before the end I stumbled upon PHPLint. I really liked the idea - with some special comments I can specify variable types and the tool then checks my code for all kinds of mistakes. Neat. I thought that at the end of the develop...

Formating file on windows

Hi, Following my question about creating files. After fast creation of large file, now i need to create a file system on this file. How can i create something like Loop device on Linux. After this i guess formatting will be really easy. Any alternative method (instead mounting) for formatting file to different FAT (12/32) and ext3 are ...

How should I use FormatMessage() properly in C++?

Without: MFC ATL How can I use FormatMessage() to get the error text for a HRESULT? HRESULT hresult = application.CreateInstance("Excel.Application"); if (FAILED(hresult)) { // what should i put here to obtain a human-readable // description of the error? exit (hresult); } ...

How can I prevent users from taking screenshots of my application window?

What are some methods to prevent screenshots from being taken, if any? I've considered setting the "Print Screen" button as a hotkey, which makes the window fuzzy. However, there would be the problem of other 3rd party screenshot tools. How can I prevent their use? Why would I want such a thing? The idea is to create a chat client wh...

How to detect launching from a "Startup"-folder shortcut?

I need to add the "Run when Windows starts" option to my program CintaNotes, but do not want to sacrifice the "cleanness" of it: it is a 100% portable freeware and should not leave traces in the system. I've come up with the idea to autodetect running from the Startup shortcut and automatically minimizing to the system tray. Is there a w...

Create thread with >70% CPU utilization

I am creating a test program to test the functionality of program which calcultes CPU Utilization. Now I want to test that program at different times when CPU utilization is 100%, 50% 0% etc. My question how to make CPU to utilize to 100% or may be > 80%. I think creating a while loop like will suffice while(i++< 2000) { cout<<" ...

In Slapd, how do I deal with the "connection table full (64/64)" error?

I'm working on an application running on Windows servers which requires heavy use of LDAP. For now we are stuck with the slapd LDAP server on a Windows platform - it's not great but for various reasons we are stuck with this architecture. Our system scales with demand, so at peak times there will be more application servers. Each applic...

What is the normal way to send crash reports, product registrations, etc in C++?

Hi all, What is the normal way to send crash reports, product registrations, etc? In other words, how do you guarantee your C++ Windows apps can 'call home'? I'm not a novice by any means but I'm completely lost in this area. I've never done it before so would appreciate any advice. Kind Regards, ...

Java charset and Windows

I have a java program that runs msinfo32.exe (system information)in an external process and then reads the file content produced by msinfo32.exe. When the java program loads the file content into a String, the String characters are unreadable. For the String to be readable I have to create the String using String(byte[] bytes, String c...

How can I add a new button to the navigation pane (outlook bar) in Outlook 2003/2007?

Most of us are familiar with the "accordion-style" navigation bar on the left side of Outlook 2003. It has buttons like Calendar, Tasks, Mail, etc, and clicking on one of those buttons opens up a browser pane with the list of common folders in that section. Using C++ or Delphi, I'd like to write a plugin that adds a new section to the ...

Impersonating users to access hives - various methods, what are the practical issues?

I am designing a Service to run under LocalSystem account on Win2000, XP and Vista. It will need access to users registry hives, sometimes for extended periods of time, both when the users are logged-in, and also, when they are not logged-in (IF the profile is local. If the profile is Roaming and not loaded, I will not attempt to load it...

What is the difference: LoadUserProfile -vs- RegOpenCurrentUser

These two APIs are very similar but it is unclear what the differences are and when each should be used (Except that LoadUserProfile is specified for use with CreateProcessAsUser which I am not using. I am simply impersonating for hive accesss). LoadUserProfile http://msdn.microsoft.com/en-us/library/bb762281(VS.85).aspx RegOpenCurrent...

Putting a close button on QTabWidget

I'm using a QTabWidget to render multiple documents in a window, and I want to draw a close button on each tab. I'm using Vista and Qt4, so the tab widget is a native windows control; this may affect the feasibility. Does anyone know if it is possible to do this using the QTabWidget control, or do I have to create a custom widget? If cr...

Is there a way to make a self-updatable executable in windows?

I would like to produce an executable that could make an update verification before it loads, and then, if there is some update, I would like it to replace its file and then reload. I think it would be better than to have an "updater" exe separated, because what if the updater has to be updated? It is not possible for me to have shared...

Best solution for making an Autorun application?

For my work I need to create a Autorun application for a CD for our client. The problem is all I'm a C# programmer by trade and .NET does not make for the best autoruns since not all computers will have .NET installed on them. What is a good solution that will work on Win98-Vista computers? ...