windows

Why does Windows reserve 1Gb (or 2 Gb) for its system address space?

Hi; It's a known fact that Windows applications usually have 2Gb of private addess space on a 32bit system. This space can be extended to 3Gb with the /3Gb switch. The operating system reserves itself the remaining of the 4Gb. My question is WHY? Code running in kernel mode (ie device driver code) has its own address space. Why, on t...

Copying text from a textbox in C++

Specifically, a program is running and I want to extract the text from a text box inside the program. Generally, what methods/topics should I be using to "get inside" another .exe running on my system and extract data from a text box inside it using C++? I just want a pointer towards the way in which I might achieve this. Thanks. ...

Can a 64 bit EXE link against 32-bit DLLs?

I ask because I noticed that many 64 bit EXEs link against what appear to be 32-bit DLLs. For example, my 64 bit MFC app links against user32.dll, urlmon.dll, wininet.dll - all of which are 32 bit DLLs that reside in windows\system32. So is this some MS specific wizardry that applies to these DLLs, or is there backward compatability, a...

How will Windows 7 be programmed? Will .NET still be king?

With Windows 7 due to be released at the end of 2009, what changes should we expect? What impact will Windows 7 have on the industry? Are we still going to be using .NET (3.5?) to program Windows? Where does 64-bit figure in all this? We'll definitely be able to use Java for 64-bit stuff, but how is Microsoft going to have us making nat...

Should a Windows developer know the command line?

The command line has eluded me for years. I started in 1999 so I was already spoiled by the GUI; using my good ol' mouse to point and click away. Ten years later and I have some basic command line statements under my belt: cd, dir, rm, ipconfig, etc. Outside of that not much else. Heck, even my keyboard shortcuts are fairly limited t...

Adding specific files or folders to a windows explorer view

I've been working on a tagging program for my computer. I need to the ability to pass a list of files or folders into an explorer (or something similar) to display them and be able to manipulate them much like you would do with a folder view in Windows. I've already written the software which records and stores tags relative to file's ...

concating 2 unicode strings - how to do that ?

hello everyone, I have 2 unicode strings which I like to concat. everytime I try to concat using RtlAppendUnicodeStringToString it telling me "STATUS_BUFFER_TOO_SMALL", even though im increasing my destination unicodestring.length to big numbers. what is the method to concat 2 unicode strings ? thanks ...

What is the best client from Windows to Mac for VNC?

I have been trying different clients from Vista and I am not having a great experience with them. If I leave them sit for a while they stall and I have to close and reconnect. I have been using both TinyVNC and RealVNC and they both have this problem. I switched from TinyVNC to RealVNC and I get better refresh rates but it still stalls. ...

Never ending WM_PAINT loop with ATL CWindowImpl

I have a very simple Win32 application that uses CAtlExeModuleT. The module simply creates a class CTestWindow derived from CWindowImpl. It just has a single message handler for WM_PAINT. After I create the window and display it, the OnPaint method (WM_PAINT message) is called infinitely and there by consumes 100% CPU. The code that cre...

Are there any unshar utility for windows?

From time to time I need to extract the contents of a shar file. And I need to wait to have access to a *nix box to obtain the files. And I was wondering if there is a unshar utility for windows. I can install the cygwin package but I think that is to much for only extract files from time to time. ...

JQuery- hotkeys and windows prompt issue

By referring to http://jshotkeys.googlepages.com/test-static-01.html I try to implement this powerful tool and facing some issue. everytime when I click Ctrl S, it will popup a window prompt asking me whether I want to save my testing.html I want to ignore windows prompt. What I want is simple: 1. when people click save button/ use s...

Local System only ACL in Windows

I am using a named pipe for communications between two processes and want to restrict acess to any user on the local system in Windows. I am building up and ACL for use in the SECURITY_ATTRIBUTES passed to CreateNamedPipe. I am basing this code on that from Microsoft. SID_IDENTIFIER_AUTHORITY siaLocal = SECURITY_LOCAL_SID_AUTHORITY; i...

How to deal with accelerators for disabled controls?

I have a dialog created from a template. It has controls listed in the template in the following order: some irrelevant controls a label with an accelerator (let's pretend it's Alt-A) an edit box OK and Cancel buttons Normally when I hit Alt-A the keybord focus is transferred to the edit box - just as needed. However I sometimes need...

how do i start explorer using process class in c#

i have replaced windows shell with my application it worked perfectly, after closing my application i have to launch windows explorer with the following piece of code Code to start explorer Process.Start(@"c:\windows\explorer.exe"); Registry key i have used to replace shell HKEY_Local_Machine\Software\Microsoft\WindowsNT\CurrentVer...

What scaling factor to use for mapping the Font size on a high resolution monitor?

We have a requirement where our application needs to support high resolution monitors. Currently, when the application comes up in High res monitor, the text that it displays is too small. We use Arial 12 point font by default. Now to make the text visible, I need to change the font size proportionally. I am finding it tough to come up...

run command in each subfolder

What is the easiest way to run a command in each subfolder of a path? In this case I have to run svn cleanup for every directory in my repository. ...

Can a local glassfish on windows be configured to work with a remote db2 on UNIX?

Hello I am trying to make db2 work in glassfish with no luck at all. I've read the documentation, but no matter what I do I end up stuck with an error when I do a ping. I put the jar files for the db2 driver and connectivity in the classpath prefix, added them to the lib directory of the domain and no go. What am I doing wrong? Thank yo...

How can I get a list of COM apartments for a process from WinDBG

I have DLL running in IE context and it crashed on UnLoad under ApplicationVerifier. The error states that COM proxy was called from wrong context or in other words, COM object was accessed from a wrong apartment. A COM Proxy was called from the wrong context. 75a867c0 - Pointer to IID of interface being called on. 2 - ...

Get value of a field in the active window

Hi, I need to get the values of a specific combo box (or list box) in the active window using VBA (in the order they appear). I need it to determine what are the "SendKeys" commands I need to choose a specific value that its location is unknown. Thanks Oded ...

Get the topmost window of my own application ONLY - in C

I'm using the following code to get a handle of the topmost window: HWND hwnd; hwnd = GetForegroundWindow(); The problem with this is that it returns the top most system-wide. Is there any way to get the topmost ONLY from my own application? I want to get the top most window ONLY of my application. This means, that I need an API to ...