visual-c++

CD burning using ICDBurn

hi i want to burn my audio files into CD. Is it possible to do programatically. I heard about ICDBurn. But not gettng that much idea when reading MSDN. I am from embedded domain. Can u give some help or sample program. I want to implement in VC++ or qt. ...

Unusual heap size limitations in VS2003 C++

I have a C++ app that uses large arrays of data, and have noticed while testing that it is running out of memory, while there is still plenty of memory available. I have reduced the code to a sample test case as follows; void MemTest() { size_t Size = 500*1024*1024; // 512mb if (Size > _HEAP_MAXREQ) TRACE("Invalid S...

Unicode sources in eMbedded Visual C++, unicode string literals

Hi all, I'm back-porting a Windows Mobile project from Visual Studio 2005 to eMbedded Visual C++, 'cause VS2005 does not compile for the SH3 CPU family, only SH4. I ran into the fact that eVC 3 does not support Unicode sources, and I have quite a few of those, not easily convertible to a single-byte encoding. Question - between eVC 4, ...

Visual C++ 9.0 (2008) Static Lib + Boost Library = Large .lib File

I have a Visual Studio 2008 C++ project that outputs a static library and uses some functionality of the Boost Library. When I build the project in Debug configuration, the .lib file is 7.84 MB. When I build the project in Release configuration, the .lib file is 23.5 MB. !!!! The only Boost headers I include are: boost/function.hpp...

Instruction for installing an environment with Qt and Qt integration with Visual Studio 2008.

I want to use Qt lib but I don't know how to install Visual Studio 2008+Qt+Qtintegration. I have read some forums, that step by step tell what to download, where to download from, and then what to do. But that was for old versions of mentiond products. I ask to Qt developers tell me the way to install these items on Windows. Any forum o...

Linking to MSVC DLL from MinGW

I'm trying to link the LizardTech GeoExpress DSDK into my own application. I use gcc so that we can compile on for platforms. On Linux and Mac this works easily: they provide a static library (libltidsdk.a) and headers and all that we have to do is use them. Compiling for windows isn't so easy. They've built the library using Microso...

Good C++ array class for dealing with large arrays of data in a fast and memory efficient way?

Following on from a previous question relating to heap usage restrictions, I'm looking for a good standard C++ class for dealing with big arrays of data in a way that is both memory efficient and speed efficient. I had been allocating the array using a single malloc/HealAlloc but after multiple trys using various calls, keep falling fou...

Stack buffer overrun (Windows, C++) : how can I detect the culprit?

Are there any tools/libraries on Windows that can help me tarck down the culprit? This is a fairly large codebase, with multiple threads. I code for Linux mostly; Windows is unfamiliar territory. Thanks for your input. ...

Error C2451: Illegal conditional expression of type 'UnaryOp<E1, Op>' in ostream - visual studio 9

I am getting a repeated error with VS 9. The code compiles under GNU C++, but I want debug with the VS IDE. Any idea what could be causing this error. Error 13 error C2451: conditional expression of type 'UnaryOp' is illegal \Microsoft Visual Studio 9.0\VC\include\ostream 512 //unary constraint template class UnaryOp : public Const...

Drawing a continuous rectangle

Hi..i m currently working on visual c++ 2008 express edition.. in my project i have a picturebox which contains an image, now i have to draw a rectangle to enaable the user to select a part of the image.. I have used the "MouseDown" event of the picturebox and the below code to draw a rectangle: Void pictureBox1_MouseDown(System::Objec...

How to test COM object integrity automatically?

Every COM object must have integrity. In simplified terms this means that if an object implements 3 interfaces - A, B and C and I have A* pointer to the object I must be able to successfully QueryInterface() both B and C and having B I must be able to retrieve A and C and having C I must be able to retrieve A and B. Now my object implem...

Unable to retrieve the complete description string of the event log record

Hi All, I have an MFC application that reads and displays event log records using the ::ReadEventLog() API. The problem is with reading the "Description" message string of the event log record. The MFC application is unable to read the complete "Description" message string and displays only some part of it. However the Windows System Ev...

Need some pointers/hints in writing a Windows Application

Hi, I want to create applications in windows that has complete portability (within windows OSes of course). I have tried using one application written in Visual C++ but I had a real tough time in making it run in other windows OS (like it required .net framework libraries to be installed). This put me on the back foot because I had to c...

No "redefinition of default parameter error" for class template member function?

Why does the following give no compilation error?: // T.h template<class T> class X { public: void foo(int a = 42); }; // Main.cpp #include "T.h" #include <iostream> template<class T> void X<T>::foo(int a = 13) { std::cout << a << std::endl; } int main() { X<int> x; x.foo(); // prints 42 } It seems as thoug...

Why does defined(X) not work in a preprocessor definition without a space?

A preprocessor definition that includes defined(X) will never evaluate to true, but (defined X) will. This occurs in MSVC9; I have not tested other preprocessors. A simple example: #define FEATURE0 1 #define FEATURE1 0 #define FEATURE2 1 #define FEATURE3 (FEATURE0 && !FEATURE1 && (defined(FEATURE2))) #define FEATURE4 (FEATURE0 && !FEAT...

Is there a Visual C++ equivalent to gcc --kill-at?

Namely, a DLL name has an extra @8 at the end which is causing trouble. Apparently, using the --kill-at flag in gcc would solve this, but I can't find any similar suggestions for MSVC. EDIT: A little more info: I'm trying to get a C++ JNI dll to work, but I constantly get Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: ...

I need help on my C++ assignment using Microsoft Visual C++

Ok, so I don't want you to do my homework for me, but I'm a little lost with this final assignment and need all the help I can get. Learning about programming is tough enough, but doing it online is next to impossible for me... Now, to get to the program, I am going to paste what I have so far. This includes mostly //comments and what I ...

ATL CString or_bstr_t?

In our COM project, we need to choose between best string class implementation so that BSTR (used for COM interfaces) and elegant string class like CString provides many string manipulation APIs. Are there any better way to handle the strings and string operations so that it can be BSTR complaints as well as we can have naive CString op...

the fastest C++ Compiler

Hello, What is the fastest C++ compiler possible. I want to compile C++ version of LZMA. I did compile it using Visual Studio .NET, but it is not fast enough for my job. In addition, I need to change the Compiler settings in order to make it as fast as possible. I would appreciate if you introduce me a fast compiler and/or some informat...

"Nearly divisible"

I want to check if a floating point value is "nearly" a multiple of 32. E.g. 64.1 is "nearly" divisible by 32, and so is 63.9. Right now I'm doing this: #define NEARLY_DIVISIBLE 0.1f float offset = fmodf( val, 32.0f ) ; if( offset < NEARLY_DIVISIBLE ) { // its near from above } // if it was 63.9, then the remainder would be large,...