I have been trying to find a way to "defragment" the registry on my Windows machine. Firstly, does this make sense? Any benefits in doing this? (Not much love on superuser.com) Secondly, I am looking for a way to rewrite the registry using C/C++ with Windows API. Is there a way to read the registry and write it to a new file getting rid ...
Hi..
please let me know what are the devices wil be listed using the below code
guid = GUID_DEVINTERFACE_VOLUME;
// Get device Information handle for Volume interface
hDevInfo = SetupDiGetClassDevs( &guid, NULL, NULL,
DIGCF_DEVICEINTERFACE | DIGCF_PRESENT );
Thank you
...
Supposing that memory is not an issue does targeting a 64 bit OS make a C/C++ Windows console application run faster?
Update: Prompted by a few comments/answers the application involves statistical algorithms (e.g., linear algebra, random number draws etc).
...
I'm trying to fix a problem that only recently happens on a number of machine's on a VPN. They each run a client application I wrote that exposes a COM automation object.
For some strange reason I haven't been able to discover yet, one thread in the application takes up all of the available CPU time, slowing other operation on the machi...
My Problem
I'm using PInvoked Windows API functions to verify if a user is part of the local administrators group. I'm utilizing GetCurrentProcess, OpenProcessToken, GetTokenInformationand LookupAccountSid to verify if the user is a local admin.
GetTokenInformation returns a TOKEN_GROUPS struct with an array of SID_AND_ATTRIBUTES stru...
Hi
I have no experience on perl.
I am trying to configure the W3C validator on my localhost (win32).
I have already followed all the instructions given by W3C @http://validator.w3.org/docs/install_win.html, but I am getting the following error:
Can't locate loadable object for module Encode::HanExtra in @INC (@INC contains: C:/xampp/...
I am using the function CertCreateSelfSignCertificate (http://msdn.microsoft.com/en-us/library/aa376039(VS.85).aspx) to generate a certificate. I need to specify the key size to be 2048. I do not see how to provide this parameter.
I would appreciate any help in this matter.
Thanks.
...
Is it possible to output images so that they all will be inside a single window?
Before, I used to output data using only opencv functions:
cvNamedWindow("Image 1");
cvShowImage("Image 1", img);
So I change image, then call: cvShowImage function and so on.
But If I want to look at more than one image, then every new image needs its ow...
I have created a native application. It works without questions under Win XP and Win Vista. Under Win 7 my application installed fine. I ran it. It worked normally until i selected 'Exit' from menu. On exit "Program Compatibility Assistant" window appeared telling me my application is incompatible with Windows 7 and some compatibility se...
I am trying to get the effective rights a user has on a file using interop in C#. Following is the code I am using :
public static FileSystemRights GetFileEffectiveRights(string FileName, string UserName)
{
IntPtr pDacl, pZero = IntPtr.Zero;
int Mask = 0;
uint errorReturn = GetNamedSecurityInfo(FileN...
I tried to translate some new part of winuser.h header to Delphi.
Why this structure is expected to be 48 bytes (only this size was accepted by the corresponding function). With 4-bytes boundary, it looks like it should have 40 bytes.
typedef struct tagGESTUREINFO {
UINT cbSize;
DWORD dwFlags; ...
Hello all,
I have a dialog in which the edit box is disabled but the text should be displayed in red instead of the default grey. I tried the following:
void CMyEdit::OnEnable(BOOL bEnable)
{
CEdit::OnEnable(bEnable);
if (bEnable)
{
m_BackGroundColor = kRGBWhite;
}
else
{
m_BackGroundColor = kRGBDefaultGray;
}
...
In order to use SetWindowsHookEx in a GUI application, you usually want in the bottom line to have a function in your thread called whenever an event has occurred.
So for instance if I'm making a software to show all keys being pressed on the system, I want that somehow my GUI app will have the function AddKeyToList(int vkeycode) called...
I have a window handle and am trying to call GetGUIThreadInfo by passing in the window's process id. I am always getting an error "Parameter incorrect" on the call to GetGUIThreadInfo and I can figure out why. Has anyone got this to work?
[DllImport("user32.dll", SetLastError = true)]
public static extern bool GetGUIThreadInfo(unit hT...
When using CreateProcessAsUser we pass STARTUPINFO and with lpDesktop NULL, the target is winsta0/default, the interactive desktop of the interactive user.
I wish to target a window station in another session of a second, non-interactive user, say a remote desktop user.
I assume that it can't be winsta0 because that's reserved for the ...
In Windows, a List View can have its items grouped, as in the following picture:
My application employs a white-on-black GUI. Most of the controls (buttons, edit fields, check-boxes etc.) I have created myself, but I am kind of fond of the Windows List View control, so I want to use it. To this end, I set the background colour to blac...
The project I'm working on right now is essentially an open source version of Ultramon (the multiple taskbar program). Thus think of the application to be just like the windows taskbar. Buttons for each window, etc. This is coded in C/C++ using WinAPI
I've just started doing it, and have some of the functionality down. However, I'm get...
My laptop has a trackpad that can do horizontal scrolling aswell as vertical (WM_MOUSEWHEEL) . How can I handle horizontal scrolling? Thanks
...
I have a set of local paths, and some of them are capitalized (C:\SOMEDIR\SOMEFILE.TXT). I need to convert them to their real names (as shown in Explorer). Suggest a way plz.
...
Hi,
I came accross a code snippet which detects whether app is running in x32 emulated environment on x64 PC here
Generally I understand that code but there is one thing I don't get:
1) typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
Why does WINAPI have to be there? Why is it so important to know that pointer doesn't p...