visual-c++

Problems during Migration from VS 2003 to VS 2008

I have converted one of my Visual studio 2003 projects into VS2008 and when trying to build the project in VS2008 I get the below mentioned error. In oledb.h, I have typedef LONG DBROWCOUNT; and in sybdb.h, I have #define DBROWCOUNT 16 When I compile, I get the following errors: c:\program files\microsoft sdks\windows\v6.0a...

dialog box visual c++

On changing the dimension of dialog box with MoveWindow function , the dimension of inner content does not change . I mean that when I am changing the dimension of dialog box using movewindow or setwindowpos ,the button and other control which were inside it go out of border or change there relative position. Is there any way which can ...

Updating Boost Wave from SVN

Hi, I have run into some bugs into one of the boost components that I am using. After analyzing the problem a bit, I've found that I was not the only one, and the author had already issued a fix that is available in the boost SVN trunk. What would be the best approach if I wanted to update just this component and reuse the libraries th...

Facing an issue with recv() and send() winsock api. Recv() hangs while receving the last packet

Hi, I am facing an issue with recv() and send() winsock api. Recv() hangs while receving the last packet. Problem Description:- System A's app is writing data over a non-blocking socket and system B's app is receiving data over a blocking socket in chunks of 64k. It seems that while reading probably the last packet of 64k, which may ...

charlower with gcc

I am trying to convert the following code from msvc to gcc #define ltolower(ch) CharLower((LPSTR)(UCHAR)(ch)) char * aStr; * aStr = (char)ltolower(*aStr); This code is giving a compiler error: cast from ‘CHAR*’ to ‘char’ loses precision My understanding is that tolower(int) from c wouldn't convert the whole string. Thanks...

what is linux analog to WIN32_FIND_DATA structure

also, how would you build that structure from scratch. What is the fastest way to get the source code of the ls command in linux? Thanks. ...

Is the msvc datatype word signed or unsigned ?

on a 32 bit machine: typedef int word; or typedef unsigned int word; ...

Code::Blocks Problem - Can't break file format after uninstalling Visual C++ Express

I decided to try Visual C++ Express and didn't like it so I went back to Code::Blocks. However, when I went to run a program in Code::Blocks I noticed that all of my files were saved under the format VCExpress.cpp.9.0. I deleted all of the files and went to where I have all of them uploaded to re-download them. However, they keep being s...

How do I turn off Unicode in a VC++ project?

I have a VC++ project in Visual Studio 2008. It is defining the symbols for unicode on the compiler command line (/D "_UNICODE" /D "UNICODE"), even though I do not have this symbol turned on in the preprocessor section for the project. As a result I am compiling against the Unicode versions of all the Win32 library functions, as o...

How to include a build timestamp in a VC++ project?

I am converting a makefile project into a Visual Studio VC++ project. It's actually C source code. One of the statements I have in my makefile is: echo char * gLibraryBuildSig ="%DATE% %TIME%"; > BuildTimestamp.c This produces a C source file with a single line in it: char * gLibraryBuildSig ="Sun 08/23/2009 17:56:05.05"; In the...

In a VC++ project in Visual Studio, how to I specify /EXPORT symbols?

I have a makefile project that builds and links a DLL, using the command-line cl.exe compiler, which is included in the VC++ Express (free) tool. I now want to convert that makefile project into a Visual Studio project. The DLL is not actually C++; it's all written in C. The DLL exports a small number of symbols, functions that are c...

How to show linker command line in Build output, in Visual Studio?

This question is related to How to show command line build options in Visual C++ 2008 But in addition to showing the Compiler command line, I'd like to see the linker command line. I have "unset" the /nologo option in the linker options. But I still don't get the command line in the output window. What do I need to do? Is thi...

Why isn't cl.exe producing a valid Windows module?

I have a simple C DLL that exposes functions from a static library. The DLL compiles without errors and I can run DUMPBIN on it to see the exports. However, when I attempt to load it with DllImport in C#, it says this: System.DllNotFoundException: Unable to load DLL 'ei.dll': The specified module could not be found. (Exception from H...

Why does Visual Studio 2008 highlight internal as a keyword in C++ code?

I'm porting VC++7 codebase to VC++9. Surprisingly Visual Studio 2008 highlights internal as a keyword in C++ code but looks like it is not really treated as such. What is this - a bug in VS, an environment setting I haven't found yet, or a sign that I will no longer be allowed to use internal as a regular identifier in some upcoming ver...

What is the /FD option to cl.exe

When I use Visual Studio for a C++ application, it generates a cl.exe command line with an /FD option. But I can't find that option in the compiler documentation Is it a legacy option? what does it do? ...

Dependency problem in C++ app built with scons msvc option

Hello, I am using scons with option compiler=msvc for building c++ modules. After compilation finishes there is no error, however when I want to start the application I get an error which indicates linking problem with QtCore.dll. However, the problem is a little bit deeper. The application uses a dll file also built using scons compile...

Do all C++ compilers allow using a static const int class member variable as an array bound?

In VC++ when I need to specify an array bound for a class member variable I do it this way: class Class { private: static const int numberOfColors = 16; COLORREF colors[numberOfColors]; }; (please don't tell me about using std::vector here) This way I have a constant that can be used as an array bound and later in the c...

c++ windows service Without ATL

Hi, Does any one knowns any good visual studio wizard for creating a Windows NT Service without the use of ATL. I don't need to implement any COM interface. Thanks ...

arrays and functions

my assignment requires me to write a function that reads in a title and return the corresponding fee to the calling function. if the title is not in the list, return -1.0. as per my previous question, im a noob on c++, and this is what i have got at the moment: struct eventType { string title; double fees; }; eventType even...

Share source code between projects [VS2008,C++]

How can I share source code between 2 projects in MS Visual Studio 2008 (I'm programming in C++)? In my case, I have the code for the main game project and now I want to make a simple model editor that uses the game's code, so that whenever I change/add some code in one project it will be updated in the second one. ...