Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
all groups > visual c > march 2006

Filter by week: 1 2 3 4 5

Reallocating a char *
Posted by Abubakar at 3/31/2006 6:22:53 PM
Hi, (all unmanaged c++) I have a char *. I allocate it using: char * t = new char [ any_size_here]; at some point I want its length to grow to accomodate copying more characters. What is the best way of doing it? Also, can I just use std:string instead, and is its string appending very ...more >>


file opening in a mixed-mode solution
Posted by Lee Crabtree at 3/31/2006 2:39:32 PM
I've got a solution that has a C++ project that compiles to a DLL, and a C# project that is the main piece of the program. The DLL is managed C++ on top of regular C++. In one of the native functions, I make a call that looks a little like this: file = _fsopen(path, mode, SH_DENYNO); T...more >>

i wanna tell Microsoft ...
Posted by beginthreadex at 3/31/2006 10:22:03 AM
.... a few things about what I feel would help make me more productive in my environment. I think that others could benefit too. Is there an email or place where I can post my ideas directly? Back in the day there were programs that allowed you to enter items for consideration and you got a...more >>

precompiled headers question
Posted by Abubakar at 3/31/2006 12:00:00 AM
Hi, I am writing some unmanaged c++ code that would need to be compiled in the future using compilers other than vc++. I'm using the feature of vc++ "use precompiled headers", is there going to be any problem if I compile this code on other compilers? I'm asking this because when I use pch *so...more >>

Storing a ValueType inside an STL map?
Posted by Whitney Kew at 3/30/2006 6:30:01 PM
Hello, I'm using Managed C++ in .NET 2003. I'm trying to map integers to Enums inside an STL map container, but I cannot get it to compile. This might be a simple question, and I'm sure I'm missing something, but I haven't used STL a lot inside MC++. Here's my code: #include <map> #i...more >>

Accessing control in indexed mode
Posted by H.B. at 3/30/2006 9:40:04 AM
Is it possible, in Managed C++, to name/access visual controls an indexed way like VB 6.0 Thanks, Hugo...more >>

Workaround for fatal error C1067: debug information module size ex
Posted by Dirk Theune at 3/30/2006 6:48:01 AM
Hi, when compiling with debug information, I get an error: fatal error C1067: compiler limit : debug information module size exceeded The error is caused by a very large enum (about 2000 elements) which comes from a referenced component. Is there any workaround to make a debug build and k...more >>

own Vector class
Posted by Martin S. at 3/30/2006 5:50:03 AM
the class: public __gc class Vector { private: Double y, x, z; public: Vector() { y(0), x(0), z(0) { } }; Vektor(Double y, Double x, Double z){ y = x1; x = x2; z = x3; } Vector(String __gc* strVector); // "123.23,1232.23,4235345." __property Double get_Y(); __property vo...more >>



Assertion failed in vector iterator
Posted by Johan Pettersson at 3/30/2006 12:51:03 AM
Hi, I'm trying to "port" a project from VC++ 2003 to VC++ 2005 (Express Edition). This project contains the following code on several places (It is not exactly this code but a generalization of what it does.): vector<int> int_vector; vector<int>::iterator i, j; for (i = int_vector.begi...more >>

Linker error 1104
Posted by Felix at 3/30/2006 12:00:00 AM
After porting a project from VC6 to VC.NET 2003 I have a very strange problem generating link error 1104 for import libraries. I just ported the project and made some small adaptions so it fits the new IDE. The project itself links against some import libraries belonging to dll's I wrote (thes...more >>

Outlook 2000
Posted by DK at 3/29/2006 6:27:02 PM
I receive this error message. unable to display folder, error has been detected in the file C:/_______________, quit all mail applications and then use the inbox repair tool. How do I use this tool? -- pk...more >>

Unresolved External
Posted by Michael Primeaux at 3/29/2006 11:18:44 AM
I'm writing an ISAPI DLL [unmanage code] that calls into managed C++ code (same DLL). I'm receiving the following link errors: EditResponse.obj : error LNK2001: unresolved external symbol "int __cdecl stricmp(char const *,char const *)" (?stricmp@@$$J0YAHPBD0@Z) EditResponse.obj : error LNK2...more >>

New to C++ entirely (HELP!)
Posted by James at 3/29/2006 10:56:19 AM
I'm interested in learning C++. I'm not sure exactly what this means. I'm currently a VB.NET/C#.NET programmer (both Windows Forms and ASP.NET). I am totally clueless when it comes to C++. I've tried creating new projects and even that is confusing. I'm unsure of the differences between M...more >>

problems with GDI+ and tiff images
Posted by Asfar at 3/29/2006 10:17:31 AM
I am using GDI+ to load a tiff image and write a string to it and save the tiff image to another file. I can save the image with only LZW Compression and not abel to save with CCITT4 compression. If I use CCITT4 compression I get an invalid paramter error when saving file. The file saved...more >>

#import and wchar_t
Posted by Peter Nimmo at 3/29/2006 9:45:40 AM
Hi, Is there any way to make #import use wchar_t as a Built-In type? I have a .idl file that has some wchar_t parameters when run through MIDL it produces a header file that also references wchar_t parameters, but whenever I use #import on the DLL, which was generated in the DLL project ...more >>

The "/clr" flag (C++ compiler) corrupt my structures !!
Posted by Chris at 3/29/2006 4:49:02 AM
I m trying to create a C++ managed class to use it in C#. I m new to MC++ and interoperability and I try to find a bug since a long time without succes, maybe you can help me ? (I have a sample project if you want to debug it, you can contact me at cdemez2@hotmail.com too) I describe the...more >>

VC++ FAQ moved
Posted by Tomas Restrepo (MVP) at 3/28/2006 10:00:39 PM
Hi Guys, With the help of Karl Petterson, we've moved tonight the old MVP VC++ FAQ (http://www.mvps.org/vcfaq/) over to the new MVPS.ORG server. The new address is http://vcfaq.mvps.org/ but redirects are in place so existing links will keep working, so no need to worry about that. That ...more >>

difference between Visual Studio 2005 Team Edition and Professional Edition?
Posted by Wanjun Yu at 3/28/2006 4:17:33 PM
What is the difference between Visual Studio 2005 Team Edition and = Professional Edition? Programming wise, there is no difference, right? Thanks. Wanjun...more >>

Does Visual Studio 2005 work with Source Safe 6.0
Posted by Wanjun Yu at 3/28/2006 10:50:37 AM
Does Visual Studio 2005 work with Source Safe 6.0? Thanks. Wanjun ...more >>

Using a DateTime with SQL ?
Posted by Herby at 3/28/2006 6:13:37 AM
I am using instances of DateTime within my application and i need their values to be used as selection criteria in an SQL select clause. So i need them to return a literal string representation of themselves in the following format '{ts '1990-01-01 00:00:00'}' Where the date can be any v...more >>

[C++/CLI] Callback from unmanaged to managed
Posted by Remi THOMAS [MVP] at 3/28/2006 12:00:00 AM
Hi, I did spend quite a long time finding how to call managed code from unmanaged C++ class. Here is the my final code: http://xtware.com/mcallback/mcallback.htm Is it the best way to do it? Does mgt^ callback = (mgt^)GCHandle::FromIntPtr(IntPtr(m_callback)).Target; take long time to ex...more >>

CXX0030 error:expression cannot be valuated
Posted by Gro.LG at 3/27/2006 4:36:02 PM
In visual studio 2005 I have built a simple win32 console programm.the code as follows: #include "stdafx.h" #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { LONG res,res1; HKEY hkey; CHAR childkey[100] ="SOFTWARE"; res = RegOpenKeyEx(HKEY_LOCAL_MACHINE,childkey,NUL...more >>

how to link unmanaged c++ into .net class library to test with nunit?
Posted by Ray Tayek at 3/27/2006 2:56:08 PM
hi, i am teaching a class using visual studio 2003 in the labs at school and trying to get some pure c++ into a dll so i can sic nunit on it. trying to put the code below into a .net class library gets unresolved externs: pure error LNK2020: unresolved token (0A000006) _CxxThrowException ...more >>

GDI+ in VC6
Posted by Asfar at 3/27/2006 2:28:43 PM
Hi, Can some one tell me from where can I download the GDI+ SDK to use with VC6. Thanks, -Asfar ...more >>

0xC0000005: Access violation reading location 0x513112f4
Posted by bhreddy at 3/27/2006 2:40:18 AM
Hi All, Can someone help me out how can I resolve the error "0xC0000005: Access violation reading location 0x513112f4"? Steps I followed... 1. I ran the application at DOS prompt 2. After some time my application got crashed and windows popped up a window asking for debug, send error rep...more >>

MC++... unable to compile my code correctly :-(
Posted by Chris at 3/27/2006 1:34:02 AM
I m new to MC++ and interoperability and I try to find a bug since a long time without succes, maybe you can help me ? (I have a sample project if you want, you can contact me at cdemez2@hotmail.com too) I describe the problem: I have 2 MS VC2003 projects... and have difference between ...more >>

VC++.NET 2003, Managed/Unmanaged code
Posted by Bill S. at 3/27/2006 12:29:53 AM
Hi, I'm trying to create an unmanaged instance within a managed object. In the one module, I've constructed an unmanaged class that makes a lot of API calls. It compiles with no errors. In the other module, when an instance of the unmanaged class is created, a Link error is encountered. (Un...more >>

Using MFC classes in non-mfc .net application
Posted by Chris at 3/26/2006 2:49:40 PM
Hi I am including a class into my mixed managed/unmanaged C++ application that uses MFC classes such as CSTRING. #include <afx.h> // have to include this in order to compile #include "CSharedMemory.h" In order to get my project to build, I have to change the project settings to use ...more >>

How to define a global COM object in VC++8
Posted by Minfu Lu at 3/26/2006 2:42:52 PM
Hi, I need define a global COM object in a VC++8 project. But when I compile it, I get a error message: error C3145:'ComLibC1': global or static variable may not have managed type MYCOMLib::Class1^ (MYCOMLib is a COM Wrapper built in VC++6). My code looks like this: namespace MyApp { ...more >>

replace a VC function or a definition from a header
Posted by Egbert Nierop at 3/24/2006 6:19:56 PM
Hi, Is it possible to redirect the linker & compiler to use a similar function without getting complaints about 'function x already in blah.obj'? Of course, I'm not talking about a runtime hook but about compilation time. ...more >>

Obtaining Handle to Object from Member Function
Posted by Chris Edgington at 3/24/2006 12:32:37 PM
How do I get a handle to an object from one of its member functions? I cannot find anything in the docs that shows a handle version of the "this" pointer - but there has to be one - right? Thanks, -Chris ...more >>

'void *' : unknown size
Posted by Betsy at 3/24/2006 8:12:02 AM
I'm trying to do some pointer manipulation and can not avoid using void * as the type declaration. I get this error message : error C2036 : 'void *' : unknown size though. Is there a compiler option or a way to tell the compiler the size of void * to avoid this? On a side note, when using W...more >>

VS2005 - question about copy-ctor
Posted by Patrick Kowalzick at 3/24/2006 12:00:00 AM
Hello all, find below an example which IMO should refuse to compile. It compiles fine with VS2005. What happens in the call? What is your opinion? Kind regards, Patrick class noncopyable { protected: noncopyable() {} ~noncopyable() {} private: // hide t...more >>

Could Not Load MSVCM80
Posted by Chris Edgington at 3/23/2006 7:42:21 PM
Well, my first .NET 2.0 app is done. I tested it here on two real machines and one virtual machine - worked fine in all of them. The first other person I gave the app to ran it and got the exception listed below. I asked if he'd installed the .NET 2.0 runtime, he said he downloaded and installed...more >>

Default Array Initialization Bug
Posted by ricecake NO[at]SPAM gehennom.net.invalid at 3/23/2006 6:08:22 PM
I found a bug in VC++ .NET 2003 regarding default initialization of arrays of primitives in a constructor initialization list, as detailed in this post: http://groups.google.com/group/comp.lang.c++/msg/dab44a8b786b6a79 and in the reply by Dietmar Kuehl, in which he quotes the relevant portion...more >>

Comments & intellisense
Posted by Egbert Nierop (MVP for IIS) at 3/23/2006 5:16:08 PM
Hi, I'm puzzled about comments & intellisense. Sometimes, during programming, you get comments that were typed just above the declaration in the header files, but sometimes, not while -there are- comments just above the declaration. Is this simply a bug or are the special conditions that ...more >>

Code Generation and VC++ 8...
Posted by Frederico Pissarra at 3/23/2006 4:26:12 PM
Recently I tried to use -G5 option on CL compiler (from Visual Studio 2005)... To my surprise, there is no processor specific optimizations anymore! Is that correct? Is so, why? []s Fred ...more >>

form loading speed
Posted by mikrogen at 3/23/2006 1:27:34 PM
Hi, I am using managed cpp, /clr, VS2005 Prof., and I must wait for terrible long loading time for even simple forms. does anybody encouter this problem too or u have any solutions for this? thx, Petr ...more >>

VC8 GDI+ dll in VC6
Posted by Asfar at 3/23/2006 9:16:12 AM
Hi, Can I write a VC8 dll which used GDI+ and then use this dll in VC6. I will be using GDI+ to basically load a image in memory and annotate it with some text and save the image. Any pointers on how I can do this? Thanks, -Asfar ...more >>

Casting operators
Posted by Herby at 3/23/2006 8:54:21 AM
Given class B C and D all inherit from class A They all override a method of the form: Add( A^ lhs, A^ rhs ); But only specific conversions are allowed So if i was defining Add for class D : D::Add( A^ lhs, A^ rhs ) { Value = ((D)lhs)->Value + ((D)rhs)->Value; } Ony C can be c...more >>

conversion from 'double' to 'unsigned int"
Posted by chauhan.alok at 3/23/2006 7:34:31 AM
hi I am a beginner to vc++. I am opening a file("c:\Mydoc.doc") and reading data from it and afte that i just want to write data of 1.2 MB part from firs file("c:\Mydoc.doc") to New file("c:\Newdoc1.doc") and remaining t other file("c;\Newdoc2.doc"). Code is Giving warning . Pls Help me How...more >>

Someone explain me this code
Posted by Tran Hong Quang at 3/22/2006 11:47:34 PM
Hi, In header file, I see this declaration: #define DECLARE_VTBL(iname) iname vt##iname; then, in C file, there are below codes: typedef struct _Abc { .......... } abc; DECLARE_VTBL(abc) I don't understant these code. Could someone explain me what it does? Thanks Tran Hon...more >>

Running processes
Posted by plmanikandan NO[at]SPAM gmail.com at 3/22/2006 10:44:08 PM
Hi, I have written a win32 console application(exname1.exe) which runs for ten minutes.I am calling this exname1.exe from another exe named exname.exe using shellexecuteex.Now from exname.exe coding i have to check whether exname1.exe is already running or not.How to find whether a win32 cons...more >>

Debug Assertion Failed! msvcr80d.dll!__loctotime64_t Expression: (((long)(yr-1900) >= _BASE_YEAR) && ((long)(yr - 1900) <=
Posted by Josh Soref at 3/22/2006 10:20:40 PM
It seems that windows file systems can have files dated to 1617, and unfortunately if you call _findfirst/_findnext on such a directory, msvcr80d will assert. Is there some provision for changing msvcr80d so that this assert doesn't happen? Debug Assertion Failed! File: dtoxtm64.c Line...more >>

Creating a process with its window hidden
Posted by itmanager at 3/22/2006 6:20:30 PM
Is there a way, using the CreateProcess/CreateProcessAsUser api's to launch an application with it windows hidden upon startup?...more >>

CreateProcess ignores dwX,dwY parameters in STARTUPINFO
Posted by itmanager at 3/22/2006 6:19:27 PM
I am trying to create a process at a particular set of coordinates (for example 1,1) but the CreateProcess api seemingly ignores the settings in the dwX and dwY properties of the STARTUPINFO structure which I have initialized as follows: STARTUPINFO si; ZeroMemory((PVOID)&si, sizeof(si)); ...more >>

delegate contravariance not fully implemented
Posted by Ben Voigt at 3/22/2006 5:05:47 PM
I've extended the article "Covariance and Contravariance in Delegates" from the C# Programmers' Guide, and it seems contravariance of delegates is implemented wrong. Lambda calculus states that Handler2Method is a subtype of HandlerMethod... why can't I convert? However the last line does ...more >>

pragma pack and inheritance
Posted by Mike Margerum at 3/22/2006 4:46:10 PM
I seem to be running into an issue where I am deriving a new class from a struct with a different alignemnt via the pragma pack #pragma pack(1) typedef struct { unsigned short a; unsigned int b; } MyBase; #pragma pack() class CDerived : public MyBase { public: unsigned short c...more >>

Internet/Web classes in .NET/VC++...
Posted by Peter Hayes at 3/22/2006 4:37:22 PM
Hi All, I have done some C, C++, C# development over the years, but wouldn't call myself an 'expert' at any of them (this has always been a part-time, write what is needed endeavor with whatever language was available or necessary). My networking experience (in programming anyway) is even...more >>

Reflection on const variables
Posted by Stabiplan BV at 3/22/2006 3:09:32 PM
Hi, I am trying to find const variables outside a class. Thur far I did not succeed. Without const, the variable is found but with const not. So, how can I get hold on global const variables using reflection? Regards, Rob // reflection.cpp : main project file. #include "stdafx.h"...more >>


DevelopmentNow Blog