I'm trying to find out how to get the number of CPU cores programmatically. This is the code I'm using:
SYSTEM_INFO sysinfo;
GetSystemInfo( &sysinfo );
std::cout << "CPU count: " << sysinfo.dwNumberOfProcessors << std::endl;
This is running on Windows on the iMac i7 via Boot Camp. It would be nice to find out that Apple made a manufac...
For our build machines, we run VMware Workstation. We have source code checked out in a shared folder (shared from the host using VMware). In the builds we do svn operations like update etc.
This worked fine until updating to Workstation 7. Now we get errors like this:
svn: In directory 'E:\bitten\winxpbitten\bitten\j5-trunk\j5\Sites\C...
My problem is that I've written an application entirely using CNG on Windows 7, and now I have to port it backwards to Vista. Vista has CNG of course, but the SSL provider is an older version and is not always compatible - for example it won't import opaque keys exported from the Win7 version of the same provider.
E.g. this code works ...
I have followed a tutorial on http://www.codeproject.com/KB/IP/beginningtcp_cpp.aspxt
which teaches how to use winsockets with c++, i finally managed to get my program to work, by testing wiht 127.0.0.1, i can open two process instances of my program and then make one listen on port (700) and then connect to it with the other program on...
I'm developing an app and I'd like to trigger functions in my app via keystroke combos when it's not in focus.
Because I'm developing my app in AIR, I do not have access to listen to global Keystrokes. However, I can receive STDOUT from an application. So, I'm looking for a utility that can give me this ability. I'm looking for both Win...
My job involves system-level performance testing with third party tools that I do not have sources for. I'm also testing Windows, and can use debugging symbols but not Windows source code. I'd like a quantitative way to describe the areas of the host OS my tests cover. There are two big steps to this: identifying what DLLs and functio...
C++
how to programatically change system IP...
and if the the account has Limited Rights how to use the password to perform the task
...
This is Line 519 of WinNT.h (BUILD Version: 0091)
#define DECLARE_HANDLE(name) struct name##__{int unused;}; typedef struct name##__ *name
Why do we need a pointer to an struct with a single int member with a weird name called unused?
And will we ever need to use a line of code like this one?
HINSTANCE hInstance = new HINSTANCE__;
...
I'm trying to convert a stream of bytes with MultiByteToWideChar() WinAPI fucntion.
Documentation says function fails with ERROR_NO_UNICODE_TRANSLATION on incomplete strings (no trailing byte in multibute encoded string). How do I prevent this error? The only way that comes to mind is not to convert the last multibyte character of input...
im using visual studio c++ 2008 i created project that contents the full window code. i don't know how to output text to window. i mean i have full functional window with menu bar and under the menu bar there is the body im trying to ouput the text in the body but how?
...
I am using SysMonthCal32 windows in my application and I am seeing some strange problems while using it.
The problem is regarding sending keydown event to calendar window. As per msdn documentation, if the window handles the message, it should return 0. The problem is whatever key i passes to the calendar window, it returns 0. This caus...
I have been using the gcc compiler with code::blocks ide, and have noticed there are some things missing in the commctrl.h which are:
PBS_MARQUEE and PBM_SETMARQUEE to set a progress bar to marquee animation style.
LVS_EX_DOUBLEBUFFER for a double buffer on a list view...
there are probably a lot more missing, but these are the ones i...
i have created a form using visual c++. all im trying to do is this when a button is clicked the form is gone and new window will be showen. i don't know if i should repaint the window or there is another solution? please help
Rami
...
What is the Message that matches the TextChanged property in .NET for C++\Win32?
...
Hi,
I'm making a basic program in C# wich calls a C++ dll. I give the pannel's handle to the dll so OpenGL knows where to draw.
[DllImport(@"../../../Debug/Model.DLL")]
public static extern void startOpenGL(IntPtr hWindow);
I mashall IntPtr hWindow to HWND hWindow.
after I call draw from C#
[DllImport(@"../../../Debug/M...
I know I can use MoveWindow to move it but I only want to move the button on the x axis. Thanks.
...
Dear friends..
Can anybody provide me the example of using SetupDiGetDeviceProperty ()
I have searched via google but i cant get it to work..
Thank you
...
i have created a win32 window it work fine but im tryin to get command argument using lpcmdline. it works fine but when i try to compare it to string it to does work here is the comparing code
TCHAR checking[]=_T("hello");
if(args==checking) // args equals lpcmdline like this LPTSTR args=lpcmdline
{
TCHAR greeting[]=_T("heys");
}
e...
How to get logged-in user's full name (the one he/she entered as his/her real name) using windows API or something else? For example how to get "John Smith", not "john" (as it were his username).
GetUserName(...) doesn't do the job because it returns the username, not the full name.
...
if i set printer quality = DMRES_HIGH
then also it printing in normal mode.
...