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 > recent posts

RE: how to link unmanaged c++ into .net class library to test with nunit?
Posted by Ken Kasajian at 1/6/2008 7:11:31 PM
Check out the article "How to use NUnit to test native C++ code": http://www.kasajian.com/2008/01/how-to-use-nunit-to-test-native-c-code.html From http://www.developmentnow.com/g/42_2006_3_0_0_725408/how-to-link-unmanaged-c-into-net-class-library-to-test-with-nunit.htm Posted via DevelopmentN...more >>


sample code for setting up ReportViewer Page Layout attributes or methods before running the program!
Posted by Davood Riazi at 12/4/2007 1:53:04 AM
Hi,I have a problem to write a metod in C# for setting up ReportViewer Page Layout Attributes before building my project in Design time . for example ,i want to write a code in my ReportForm.cs to show my ReportViewer layout preview for users to be exactly A4 page size or my ReportViewer BorderStyl...more >>

Re: delete []
Posted by SvenC at 11/3/2007 12:00:00 AM
Hi George, > I have checked http://www.accu.org, it is a not a web site which sells > books > with discount, right? :-) No, it is a site with book reviews to help you decide which one to buy at your favorite book store. Just click on "Book reviews" and search for C++ and maybe some other...more >>

Re: delete []
Posted by Bo Persson at 11/3/2007 12:00:00 AM
George wrote: :: Thanks SvenC, :: :: :: I have checked http://www.accu.org, it is a not a web site which :: sells books with discount, right? :-) :: No, it's not. But if you look in the Book Reviews section, you will find lot's of books reviewed by IT professionals and listed from Exce...more >>

Re: delete []
Posted by David Wilkinson at 11/3/2007 12:00:00 AM
George wrote: > Hi David, > Sorry for my confusion again. :-) > > I will show you a sample. Suppose I have a class Foo and in this class > (constructor), I malloc 10 bytes, and in the destructor of this class I will > call free to release the 10 bytes. > > Suppose some other components u...more >>

Re: Directory::GetDirectories returning non-existent directories
Posted by Doug Harrison [MVP] at 11/2/2007 11:48:07 PM
On Fri, 2 Nov 2007 21:21:03 -0700, "Peteroid" <peteroid69@hotmail.com> wrote: >Assuming you have the default directory settings, try this code: > >String^ full_path = "c:\\Users\\Owner\\Documents" ; >array<String^>^ dir_list = Directory::GetDirectories( full_path ) ; > >In my case, it retur...more >>

Re: delete []
Posted by George at 11/2/2007 10:43:00 PM
Hi David, Sorry for my confusion again. :-) I will show you a sample. Suppose I have a class Foo and in this class (constructor), I malloc 10 bytes, and in the destructor of this class I will call free to release the 10 bytes. Suppose some other components use new Foo[5] to malloc 10 ...more >>

Re: delete []
Posted by George at 11/2/2007 10:37:00 PM
Thanks SvenC, I have checked http://www.accu.org, it is a not a web site which sells books with discount, right? :-) regards, George "SvenC" wrote: > Hi George, > > > Global namespace you mean namespace std? > > No. If Ben would have wanted to say "namespace std", then he wo...more >>



Re: name conflicts in enum
Posted by George at 11/2/2007 10:31:00 PM
Thanks Cholo! regards, George "Cholo Lennon" wrote: > - microsoft.public.vc.language > - microsoft.public.vc.atl (for your question about COM) > > Regards > > -- > Cholo Lennon > Bs.As. > ARG > > > "George" <George@discussions.microsoft.com> wrote in message news:CBC5E930-...more >>

Directory::GetDirectories returning non-existent directories
Posted by Peteroid at 11/2/2007 9:21:03 PM
Assuming you have the default directory settings, try this code: String^ full_path = "c:\\Users\\Owner\\Documents" ; array<String^>^ dir_list = Directory::GetDirectories( full_path ) ; In my case, it returns all the directories as it should in dir_list, but it also returns the following non...more >>

Re: delete []
Posted by SvenC at 11/2/2007 7:06:23 PM
Hi George, > Global namespace you mean namespace std? No. If Ben would have wanted to say "namespace std", then he would have written "namespace std". But he wrote global and meant global. In fact he did specify that in his first answer. Please see the relevant part cited here: > any ...more >>

RichTextBox::AppendText misbehavior
Posted by rwf_20 at 11/2/2007 6:19:09 PM
I've got a form that contains a RichTextBox control and periodically receives strings to append to it. The function in question is below. I've been receiving mysterious bug reports of application crashes ('Attempt to Read/Write Protected Memory', 'Object Reference not set to instance of an obje...more >>

Re: delete []
Posted by David Wilkinson at 11/2/2007 2:09:51 PM
George wrote: > Thanks David, > > > Now I understand why I am confused. You mentioned, > >> Destructors are called to clean up the objects >> The memory is freed by operator delete [] (which uses free() by default) > > I think destructor itself could free the memory (please correct me i...more >>

Re: name conflicts in enum
Posted by Cholo Lennon at 11/2/2007 12:49:43 PM
- microsoft.public.vc.language - microsoft.public.vc.atl (for your question about COM) Regards -- Cholo Lennon Bs.As. ARG "George" <George@discussions.microsoft.com> wrote in message news:CBC5E930-527A-41C7-876E-48640988AF1B@microsoft.com... > Hi Cholo, > > > Could you recommend m...more >>

Re: Problems with sizeof function
Posted by Mark Salsbery [MVP] at 11/2/2007 11:45:11 AM
You may want to read the "Remarks" section here as well: http://msdn2.microsoft.com/en-us/library/83ythb65(VS.80).aspx Mark -- Mark Salsbery Microsoft MVP - Visual C++ "Fran" <Fran@discussions.microsoft.com> wrote in message news:193B0BFA-3231-43CE-9DB6-3ABC9D589CB3@microsoft.com....more >>

Re: Problems with sizeof function
Posted by Cholo Lennon at 11/2/2007 10:18:41 AM
This is a common question. Take a look to: http://groups.google.com/group/microsoft.public.vc.language/browse_frm/thread/8e7400441b97eb1e/72c336cb677db72c?lnk=gst&q=struct+s izeof#72c336cb677db72c Regards -- Cholo Lennon Bs.As. ARG "Fran" <Fran@discussions.microsoft.com> wrote in m...more >>

Re: delete []
Posted by George at 11/2/2007 8:41:01 AM
Thanks David, Now I understand why I am confused. You mentioned, > Destructors are called to clean up the objects > The memory is freed by operator delete [] (which uses free() by default) I think destructor itself could free the memory (please correct me if I am not correct at this po...more >>

Re: name conflicts in enum
Posted by George at 11/2/2007 8:19:09 AM
Thanks Cholo, It works! Cool! regards, George "Cholo Lennon" wrote: > You have to put them in different namespaces, otherwise the code doesn't > compile. If you do that, you can refer enum values using namespace name. > > Regards > > -- > Cholo Lennon > Bs.As. > ARG > >...more >>

Re: name conflicts in enum
Posted by George at 11/2/2007 8:19:08 AM
Hi Cholo, Could you recommend me a better newsgroup which is more suitable for my question please? Thanks. regards, George "Cholo Lennon" wrote: > BTW... this is a newsgroup for C++ CLI so I suppose that you're using it. You > can use 'enum class' instead of C++ enum. Enum class ...more >>

Problems with sizeof function
Posted by Fran at 11/2/2007 5:41:01 AM
sHi! I have a very strange problem with the behaviour of the sizeof command. I have tested it in vc6,vc 2001 and vc 2003. The problem is quite simple. When I made a sizeof to the next struct, it returns that the size is 40 instead of 38. I consider that a short is 2 bytes, float 4 bytes, u...more >>

name conflicts in enum
Posted by George at 11/2/2007 2:29:01 AM
Hello everyone, Suppose I have two enums which has an item with the same names -- but different values, [Code] enum foo { NAME = 100; } enum goo { NAME = 200; } [/Code] Are there any ways to specify whether I need to access NAME in fo...more >>

Re: VC++ 2005 problem creating an ActiveX in a secondary Thread
Posted by jetan NO[at]SPAM online.microsoft.com ( at 11/2/2007 2:24:08 AM
Hi Daniele, Thank you for the further information. I would suspect the problem occurs because you are passing the main thread window "pParent" as the parent of this control in second thread. This may cause some problem. As Brian pointed out, all the windows/controls in the same top-level...more >>

module definition file
Posted by George at 11/2/2007 2:18:01 AM
Hello everyone, I am using Visual Studio 2005 to develop C++ DLL (in-process COM). There is a setting in Linker --> Input called Module definition file. This setting makes me confused, 1. I have tried that if input a file name (.def), then the generated DLL be larger than the time when...more >>

Re: Does anyone know what this text means? (related to C4251 warning)
Posted by Anonymous at 11/2/2007 12:34:23 AM
Ben Voigt [C++ MVP] wrote: > "Anonymous" <no.reply@here.com> wrote in message > news:MYidnefeK_u5nbfanZ2dnUVZ8qijnZ2d@bt.com... > >> >>Ben Voigt [C++ MVP] wrote: >> >>>BTW David's way is what the article is referring to. Inheritance is done >>>via aggregation and implementing the s...more >>

Re: name conflicts in enum
Posted by Cholo Lennon at 11/2/2007 12:00:00 AM
BTW... this is a newsgroup for C++ CLI so I suppose that you're using it. You can use 'enum class' instead of C++ enum. Enum class values don't have the problem of scope visibility (present in C++ enum values). Regards -- Cholo Lennon Bs.As. ARG "Cholo Lennon" <chololennon@hotmail.co...more >>

Re: name conflicts in enum
Posted by Cholo Lennon at 11/2/2007 12:00:00 AM
You have to put them in different namespaces, otherwise the code doesn't compile. If you do that, you can refer enum values using namespace name. Regards -- Cholo Lennon Bs.As. ARG "George" <George@discussions.microsoft.com> wrote in message news:884912D5-4C39-4793-AA85-402B80C5737E@...more >>

Re: delete []
Posted by David Wilkinson at 11/2/2007 12:00:00 AM
George wrote: > Hi Dave, > > > I have two questions below, Your answer, > >> Because under the hood, a call to new [] incurs a call to malloc(). So >> delete [] has to call free() to release the memory. > > is for which question. Sorry that I am a little confused. :-) George: Ob...more >>

Re: DllUnregisterServer
Posted by George at 11/1/2007 11:29:01 PM
Hi Ben, Your always have smart ideas! Cool! have a good weekend, George "Ben Voigt [C++ MVP]" wrote: > > > And while both of the responses from David and Arnaud above are correct, > > if > > you have some code in the DLLUnregisterServer function that is causing you > > proble...more >>

Re: DllUnregisterServer
Posted by George at 11/1/2007 11:27:01 PM
Thanks for your clarification, Ben! regards, George "Ben Voigt [C++ MVP]" wrote: > > "George" <George@discussions.microsoft.com> wrote in message > news:878C1CA2-84F8-4A63-B19B-5E7368A3E270@microsoft.com... > > Thanks Ben, > > > > > > I want to confirm with you that you mean, > ...more >>

Re: delete []
Posted by George at 11/1/2007 11:13:00 PM
Hi Dave, I have two questions below, Your answer, > Because under the hood, a call to new [] incurs a call to malloc(). So > delete [] has to call free() to release the memory. is for which question. Sorry that I am a little confused. :-) have a good weekend, George "David Wil...more >>


DevelopmentNow Blog