windows

Assertion failure before program even starts

What is going on?! I fixed some structs, extensive amount of search/replace in my code. Then i finish and everything compiles fine, but the program crashes immediately. This is my main function: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ exit(1); In all logics it shouldnt cras...

How can I find out how many GDI objects my process is allowed to create?

There's a registry key where I can check (& set) the currently set GDI object quota for processes. However, if a user changes that registry key, the value remains the old value until a reboot occurs. In my program, I need to know if there's a way to determine, programatically, how many more GDI objects I can create. Is there an API for g...

Creating a library?

I'm using MSVC, but I plan to make my library cross platform. Right now, I have h and cpp files of classes and functions. Is making a library in MSVC as simple as adding all my files to a Visual C++ Project marked as either Static or Dynamic Library? Or must I make my classes and functions extern and whatnot? Thanks ...

Registry Defragmenter

Hello folks, This is out of curiosity, but I have seen several (and some of them very popular) software called registry defragmenter. While I can see the benefit they offer, but I am very curious on how exactly do you do registry defragmenting? Note that I'm not asking for software name, just a basic description of how it's done program...

How to reset an object's security descriptor to the default?

As part of a testing utility I am creating some registry keys and applying a specific security descriptor to them. Later on I want to reset it to the "default" security descriptor (i.e. inherited from the parent). What is the proper way to do this? I can't save and restore the original security descriptor because this utility may be r...

Windows UAC do not popup (Access Denied)

I have made an installer using izpack which is packaged as an executable jar file. Normally when I double click the jar/installer file the windows 7 UAC box pops up and I grant temporary administrator rights when installing the application (my UAC level is second lowest). But for some reason this box no longer pops up when I double cli...

Get the word under the mouse cursor in Windows

Greetings everyone, A friend and I are discussing the possibility of a new project: A translation program that will pop up a translation whenever you hover over any word in any control, even static, non-editable ones. I know there are many browser plugins to do this sort of thing on webpages; we're thinking about how we would do it sys...

how to change color of msgbox in vb6?

how to change color of msgbox in vb6? ...

ImageScience for Windows on Ruby 1.9

Has anyone have any success installing ImageScience on Ruby 1.9 for Windows? Unfortunately, I am currently using Ruby 1.8 Windows for my development. I want to upgrade to Ruby 1.9 for the performance improvement. I was able to install almost all of the gems, but I haven't had any luck with ImageScience. Rob Anderton had put in useful i...

How to run a form with it's own message pump?

I've got an application where I need to open many forms which are heterogeneous to my own and run independently. My application then proceeds to block on long running operations (making those operations asynchronous is not possible). So I would like to run these forms on a separate thread with their own message pump. Any way to do that? ...

Compiling static TagLib 1.6.3 libraries for Windows

I am having a super hard time compiling and using TagLib 1.6.3 in my Qt project. I've tried everything I can think of. TagLib claims that it is supported through CMake but I'm not having any luck. Furthermore, I'm confused about what kinds of files I even need for my Qt libs! I've built *.a files, *.lib, and *.dll. From what I understan...

How do I know which file is open in Windows from command line?

I would like to know which file is open in Windows from command line. In linux we have command lsof for that purpose. Is there any command in Windows like that? ...

Windows service won't stop and restart

I wrote a windows service in C++ that needs to restart every night at midnight, so I call exit(1) on it so that it can be restarted by SCM. The problem is it seems every other night it starts up partially and hangs. In the event log, I get this: Application popup -Application Error: The instruction at "0x0043c145" referenced memory a...

Windows C/C++ Drive Init/Partition/Format

Hi, I am trying to build an application for Windows XP 64bit which is able to detect drives of a particular model in the system, and if they are not initialized & formatted perform these processes. I would also like to be able to query and set the partition information(including the volume label). I have started putting together code ...

Windows Forms TableLayoutPanel 2 Rows use all space

I want a TableLayoutPanel with 2 Rows. The second row is 200px high. The first row the rest. If resize, only the first row resizes. How to implement? ...

SConscript StaticLibrary atribute error.

Hi, I couldn't find any information on the net, so I kindly ask you for one. I have my build environment set up properly, My compiler is 'cl' from VS express package. I try to build static library, when i set my tools to 'default' everything works, but when i set it to 'msvc' i have following error: scons: Reading SConscript files ......

putty on windows using AF_UNIX

Hi, I have recently downloaded source code for putty for windows client. It is using AF_UNIX address family. AFAIK AF_UNIX socket family is not present in windows. Then how it is working here ? I am working on porting a *nix project to windows which has AF_UNIX socket family. Thanks Arpit ...

Egit very slow at handling big projects

The problem is that Egit/Eclipse is very slow at dealing with big Java projects (~2,000k files). Very slow means following on a windows 7/quad core/SSD setup: 60 seconds for drawing the commit window another 30 s for doing the commit (would be acceptable) 60 s for drawing the push window (changes view) another 120 s for pushing ...

Is there a performance penalty for creating Direct3D vertices with all semantic types?

In Direct3D, you can create any type of Vertex you like. You can have a simple Vertex with just positional information, or you could add colour info, texture info, etc etc. When creating your input layout, you define what parts of a Vertex you've implemented: D3D10_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B...

Faulting application <app_name>, version <version number>,faulting module kernel32.dll

Hi, I have one windows application built using C# and .net framework 2.0 and its installed on Windows Server 2003. I have tested application on my machine and it works perfectly on my machine. Only difference between two machines is that, my machine has Windows Vista OS and machine on which error occured has Windows Server 2003 OS. W...