I feel like there is an obvious answer to this, but it's been eluding me. I've got some legacy code in C++ here that breaks when it tries to call OpenThread(). I'm running it in Visual C++ 2008 Express Edition. The program first gets the ThreadID of the calling thread, and attempts to open it, like so:
ThreadId threadId = IsThreaded...
I've got some legacy code in C++ here that does some things I don't understand. I'm running it in Visual C++ 2008 Express Edition on a machine running Windows XP.
The code uses some Windows functions: GetAdaptersInfo and GetAdaptersAddressess. I realize that the final parameter for both of these is a pointer to the size of the buffer a...
I need to work with some old C++ code that was developed in Visual C++ 6.0. Right now it's giving me compile errors galore. (For instance, "cannot open include file: 'iostream.h'"... because now it should say #include <iostream> rather than #include <iostream.h>).
How can I work with this code without having to change it all over the ...
So the other day I went to compile a VC++ project I am working on and all of a sudden I get errors in almost all of my files saying:
new.h: error C2039: 'set_new_handler' : is not a member of 'std
new.h: error C2039: 'set_new_handelr' : symbol cannot be used in a using-declaration
"new.h" and 'set_new_handler' are not being used ...
I have limited my application to one instance(in vc++ 6.0), if you open second time the message will display like "Another instace is already running".ok thats fine.
but if you open second time,third time the message will repeatedly display with new messagebox.
I want to display one MessageBox Repeatedly same .Otherwise the user has to ...
When we will use DrawItem for a listbox?
Normally, if the listbox is ownerdraw, we will use DrawItem. What are the other senarios we use drawitem?
...
Hello,
I m developing a tool in VC++ which fetches system information for Windows 7:
Here is the sample code snippet:
CRegKey key;
if(ERROR_SUCCESS == key.Open(hKey, pPath, KEY_READ))
{
// read the value, length will contain the size after the call
if (ERROR_SUCCESS != key.QueryBinaryValue(pValueName, pData, &length))
{
...
I am a vc++ developer but I spend most of my time learning c++.What are all the things I should know as a vc developer.
...
Hello,
I have bmp images in image folder on my computer.I named it from 1.bmp to 100.bmp .
I want to read one by one these hundered images.And I wrote this code:
int i;
System::String^s;
for(i=1;i<=100;i++)
{
s=("C:\\images\\%d.bmp",i);
System::Drawing::Bitmap^ image;
image= gcnew System::Drawing::Bitmap(s,true );
}
And VS 2008 g...
I'm using Visual C++ 2008 SP1 Express Edition, and as far as Intellisense goes, it is interpreting CLR keywords (like event), instead of treating them as regular C++ identifiers. This is not a CLR project, so I'm at a bit of a loss - any ideas on what's going wrong / how to fix? I wasn't able to find anything that sounded promising in ...
Possible Duplicate:
How to output array of doubles to hard drive?
Hello everyone,
Sorry for asking the same question twice, I'm new at this and still learning how to use this site properly.
I want to store an array of floats/doubles to my hard drive in the form of a file (.txt .dat .bin, whatever, it doesn't matter).
I want ...
I am using VC++ 6.0 on Windows XP SP2 platform. I am using GUID structure in my code.
typedef struct _GUID { // size is 16
DWORD Data1;
WORD Data2;
WORD Data3;
BYTE Data4[8];
} GUID;
How to initialize this structure to zeros while creating an object? Or when I create an object, what is the default value f...
Iam getting the following error , could some one help me how to fix it .
fatal error C1001: INTERNAL COMPILER
ERROR (compiler file
'f:\vs70builds\3077\vc\Compiler\CxxFE\sl\P1\C\pdbmgr.cpp',
line 149) Please choose the Technical
Support command on the Visual C++
Help menu, or open the Technical
Support help file for more...
Is it possible for the SetCurrentDirectory() to timeout if there is network slowdown preventing the directory from being accessed for some length of time? (In the order of 15-30 seconds...?)
If so is the timeout configurable and where can it be set?
...
I'm using MSVC++ 6 to build a very large project. Some of the source files in this project are shared with a small utility that we use for maintaining the application. Previously, this small utility required linking against many libs from the main app and also required the main app's DLLs at runtime. I was tasked with removing these d...
In GCC you can use the '-include ' flag to automatically include a file in the compilation unit. Is there any equivalent method for this in MSVC?
...
I have a set of Windows programs that is mostly created with VB6 and VC++ 6. Its installer is created using InstallShield.
A couple users have recently reported a problem trying to install it on Vista. It is complaining that "MDAC 2.6 Sp2 cannot be installed on this machine. MDAC 2.6 Sp2 requires any one of the following configuratio...
I've been tasked with updating one of our old programs still in production and don't know my way around MS Visual C++ 6.0. Thanks in advance!
...
I'm using Visual Studio to develop a C/C++ library. I would like to know if there is a way to customize the autoformat tool (Ctrl+K,F) so that:
It automatically break lines that are bigger than 120 columns
Format a function/method parameter the following way:
void myFunction(int parameterA,
float parameterB,
string par...
How to improve the performance of VS 2005 VC++ compare to VC++ 6.0??
Examaple by setting compiler flags...
any other listing which will improve the performance of VS 2005
...