I've seen ReSharper recommended a lot Unfortunately, it doesn't support C++ in Visual Studio. Is there anything out there you can recommend? I already use Visual Assist, and it does its job very well, but it's quite limited in comparison with ReSharper.
Any suggestions?
...
I'm using the DnsQueryConfig Win32 function to get the DNS servers used by Windows. This works fine for IPv4 addresses, but what if the DNS servers have IPv6 addresses?
...
Hi,
I'm using libcurl in a Win32 C++ application.
I have the curllib.vcproj project added to my solution and set my other projects to depend on it.
How do I build it with SSL support enabled?
...
What is the best way to determine how many window handles an application is using? Is there a tool or a WMI performance counter that I could use?
I would like to run up an app and watch a counter of some sort and see that the number of window handles is increasing.
for (int i=0; i < 1000; i++)
{
System.Threading.Thread.Sleep(1000...
Inside a service, what is the best way to determine a special folder path (e.g., "My Documents") for a specific user? SHGetFolderPath allows you to pass in a token, so I am assuming there is some way to impersonate the user who's folder you are interested in.
Is there a way to do this based just on a username? If not, what is the minim...
I'm overriding WndProc, so I want to write code like
if (m.Msg == WM_COMMAND)
my special stuff
else
base.WndProc(ref m)
...
I would like to load a BMP file, do some operations on it in memory, and output a new BMP file using C++ on Windows (Win32 native). I am aware of ImageMagick and it's C++ binding Magick++, but I think it's an overkill for this project since I am currently not interested in other file formats or platforms.
What would be the simplest way ...
I'm subclassing a native window (the edit control of a combobox...)
oldWndProc = SetWindowLong(HandleOfCbEditControl, GWL_WNDPROC, newWndProc);
In my subclassing wndproc, I'll have code like this, right, but I can't figure out the syntax for calling the oldWndProc.
int MyWndProc(int Msg, int wParam, int lParam)
{
if (...
I can't find documentation for it, even on MSDN...
...
It's possible, but is it appropriate to use SHFileOperation within a Windows service? All those SHxxx API functions in shell32.dll seem to have been written with user level programs in mind. Can I be certain SHFileOperation won't display GUI ever?
...
When the WIN32 docs says something like:
wParam
The low-order word specifies the edit control identifier.
The high-order word specifies the notification message.
What's a nice way of building that wParam?
...
e.g, Is the user playing a movie full screen, or looking at powerpoint in full screen mode?
I could have sworn I saw a IsFullScreenInteractive API before, but can't find it now
...
I've a windows service that updates our product. It copies the product files into a temp directory, usually "C:\Windows\Temp", patches the binaries, and then uses MoveFileEx to copy the files back to the install directory on a reboot, usually "C:\Program Files\Product". The files in the install directory are inheriting their security att...
I am intercepting Win32 API calls a native dll or exe is doing from C# using some kind of hooking. In this particular case I am interested in DrawText() in user32.dll. It is declared like this in Win32 API:
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
The LPRECT struct has the following signature (als...
Does anyone know if there is an API to get the current monitor state (on or off) in Windows (XP/Vista/2000/2003)?
All of my searches seem to indicate there is no real way of doing this.
This thread tries to use GetDevicePowerState which according to Microsoft's docs does not work for display devices.
In Vista I can listen to GUID_MO...
I have been using win32api.MessageBox to do alerts, and this works for apps running from the interactive prompt and normally executed code, however when I built a Python service when a MessageBox is triggered I can hear the 'beep' but the box does not display. Is it possible to display alerts from services?
...
I've got two applications I'm developing using Qt on windows. I want the user to be able to press a button in one application which makes the other application come to the foreground. (The programs communicate using QLocalSocket / named pipes)
Currently I'm using Qt's QWidget::activateWindow() which occasionally brings the application t...
What?
I have a DLGTEMPLATE loaded from a resource DLL, how can I change the strings assigned to the controls at runtime programmatically?
I want to be able to do this before the dialog is created, such that I can tell that the strings on display came from the resource DLL, and not from calls to SetWindowText when the dialog is initiali...
I'm copying a file from folder A to folder B and then trying to copy the file permisions. Here are the basic steps I'm using:
CopyFile(source, target)
GetNamedSecurityInfo(source, GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION)
Print source SD using ConvertSecurityDescriptorToStringSecurityDescriptor
SetNamedSecurityInfo(target...
I need a way to determine whether the computer running my program is joined to any domain. It doesn't matter what specific domain it is part of, just whether it is connected to anything. I'm coding in vc++ against the Win32 API.
...