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 2007

Filter by week: 1 2 3 4 5

Syntax for Serializing generic ref class
Posted by Edward Diener at 3/31/2007 10:20:42 AM
Following the example in the help for the generic List class, which shows the Serializable attribute being used on the generic class, like so: [SerializableAttribute] generic<typename T> public ref class List : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable ...more >>

Erasing a List View's items, without erasing the columns
Posted by Miesha.James NO[at]SPAM gmail.com at 3/31/2007 6:12:47 AM
Hi, I have a list view that will be update dynamically when new information is received. I parse through the information and call the update function to clear the current items that are in the list and print out the new data. My problem is that I dont see a function that will only clear out...more >>

tool to check dependency of a .lib file
Posted by Jazz at 3/30/2007 11:34:04 AM
Hello, Anyone knows which tool is able to find out the dependency of a .lib file. Seems Depends.exe only works for .dll. Thanks, Jazz...more >>

Using a C Library in a managed DLL
Posted by Kidan at 3/30/2007 7:11:12 AM
I have a .LIB file, built an compiled in C that I need to use in my .NET application. If I build a C++.Net Console application and activate the exposed functions directly the library works perfectly. If I try to compile the .LIB file into a managed DLL for use in either my VB.Net GUI or my ...more >>

Same Class, different Types
Posted by Born Bugler at 3/30/2007 12:00:00 AM
What I'm actually talking about is, when you put the same class in different assemblies, you get two different types. This is reasonable (if you would call it) in most cases as it avoids possible misuse. However, what about if I do want to consider classes with exactly the same definition in d...more >>

Storing objects into a generic list.
Posted by Miesha.James NO[at]SPAM gmail.com at 3/29/2007 1:57:35 PM
Hello, I'm trying to rewrite visual c++ code into visual c++ .NET code and I've run across a problem with storing objects into a list. Here;s an example of the code I have: ref struct Cookies { String^ Name; array< RaisinCookies ^>^ rCookies; array< ChocolateCookies ^>^ cCookies; } ...more >>

Cannot convert parameter from cli::interior_ptr<Type> to HRASCONN
Posted by Whitney Kew at 3/29/2007 9:46:02 AM
Hi there, I'm having a bit of trouble using an HRASCONN object as a class member variable inside my managed C++ class. When I call RasDial() and pass in the address of my HRASCONN object, I get the following compiler error from Visual C++ 2005: error C2664: 'RasDialW' : cannot convert p...more >>

800736B1
Posted by Scott at 3/29/2007 6:04:05 AM
After upgrading to VS2005/SP1 we started seeing this error (800736B1) on our VC dlls. As close as I can determine it has something to do with the C runtime.? I copied the files from Microsoft.VC80.CRT along with the VC dll and this seems to work on some machines but not on others, so there ...more >>



linkage errors in release build with VS2005
Posted by 2b|!2b==? at 3/29/2007 12:39:04 AM
I am having linkage errors in my release build as ff: ------ Build started: Project: myModule, Configuration: Release Win32 ------ Linking... Creating library c:\mypath\myModule.lib and object c:\mypath\myModule.exp Class1.obj : error LNK2001: unresolved external symbol __imp___CrtDbgRep...more >>

List View variable throwing NullException
Posted by Miesha.James NO[at]SPAM gmail.com at 3/28/2007 2:43:55 PM
Hello, I've added a list view to a windows form and I want to add items and subitems to the list at runtime. The problem that I have is that when I try to use the list view control variable it throws the following error An unhandled exception of type 'System.NullReferenceException' occurr...more >>

Managed Event Question - Static Event
Posted by NEW2.NET at 3/28/2007 2:28:10 PM
I have a static event declared in a C++ ref class, that can then be handled in a VB app. I'm trying to expose the static event through the interface that the C++ ref class implements so the VB app can use the interface as preferred. How do you expose a static event through an interface? ...more >>

compile error: storage size of 'var' isn't known
Posted by George at 3/28/2007 8:52:04 AM
Hello everyone, I get a strange compile error when compile such simple program. Any ideas? foo.c: In function `main': foo.c:5: error: storage size of 'var' isn't known foo.c [CODE] #include "goo.h" int main (int argc, char** argv) { t_st var; var.member = 100; retu...more >>

Easy question regarding console apps
Posted by Paul Hemans at 3/28/2007 12:00:00 AM
Hi newbie here. I am learning c++/cli I by writing console apps. When my apps finished they used to display a message at the bottom of the screen, something like "press any key to continue" so that you could see the results before returning to the IDE. But now they don't. I must have turned a ...more >>

Good way to use native C++ callback as managed C++ delegates / events
Posted by lallous at 3/27/2007 5:28:40 PM
Hello I don't have C++/CLI 2.0 reference handy and the code below was written after long hours of research and shallow readings. From what I see, the code works and looks logical to me. Can you please review it and tell me if I overlooked something. On the other hand, can you suggest a g...more >>

Best way to use unmanaged buffer as a Byte []? preferably w/o copying from native to managed memory
Posted by lallous at 3/27/2007 5:24:32 PM
Hello I am writing managed c++/c++ native code. We have soem buffer passed as char* from native, and we want to pass to a managed MemoryStream object. Is it possible to have a Byte [] reference that char* and then we set the Byte[] size? Or this: http://msdn2.microsoft.com/en-us/lib...more >>

Data Transfers and IAsyncOperation
Posted by JDavide at 3/27/2007 5:04:37 PM
Hello again! :( I'm trying to implement asynchronous DnD (and Copy/Paste) in a custom NSE: despite the lack of documentation, I found that i need my DataObject implement the optional interface IAsyncOperation. I want to always use asynchronous operations, so I added the following lines to my ...more >>

MPR.DLL
Posted by Joachim at 3/27/2007 4:06:26 PM
When trying to deploy my C#/C++/CLI application on a Win XP Pro SP2 with .NET FW 1.1 and 2.0 I get the following error when opening my C++/CLI application with dependency walker: Besides the MPR.DLL module in dependency walker there is a Delay-load module warning. And when I run the applica...more >>

lock statement in C++?
Posted by Tao at 3/27/2007 2:24:29 PM
hi.. Group, is there any lock statement like C# in managed C++? thanks ...more >>

Marshal::StringToHGlobalAnsi and the corresponding overhead
Posted by DaTurk at 3/27/2007 8:22:46 AM
Hi, I have a c# GUI that needs to untimately send its data down to unmanaged c++. I've decided to do this by having a ref struct in the CLI layer and have the c# populate this, and then pass it back to the CLI layer. The CLI layer will then populate the unmanged struct where the data needs ...more >>

VS2005 - Manually loading debug symbols
Posted by 2b|!2b==? at 3/27/2007 12:00:00 AM
I am attempting to manually load debug symbols for a module. I am doing it by carrying out the ff steps: i). Select the call stack window ii). right click and select 'Load Symbols' from displayed menu iii). The Find Symbols: MyModule.pdb dialog box is displayed However, when I navigate ...more >>

_ATL_MIN_CRT VC8 release build?
Posted by Vincent Fatica at 3/26/2007 7:53:38 PM
How do I get it to work? I keep getting the likes of LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in atlmincrt.lib(atlinit.obj) for the following (none of which I explicitly call). __encode_pointer __encoded_null __decode_pointer _osplatform _get_osplatfo...more >>

basic_fstream and large files
Posted by Eric Twietmeyer at 3/26/2007 5:41:39 PM
Hello, I have code written using the basic fstream object on a Win32 system. This is of course simply a typedef for basic_fstream<char, char_traits<char> >. This object can not be used to write or read files that are larger than 2Gb in size, as it would appear (from looking at the iosfwd ...more >>

Conversion of unmanaged structure containing array to the managed one!
Posted by pkoniusz NO[at]SPAM gmail.com at 3/26/2007 1:28:54 AM
Hello everybody, Been just thinking how actually one could convert the following unmanaged code to the managed C++: struct JustAnExample { char value1[100]; int value2[120]; // etc .... } There're numerous examples how to cope with unamnaged C++ to C# conversions, but I don't f...more >>

Running a function in the background
Posted by ADT_CLONE at 3/25/2007 11:52:22 PM
Hello guys, Right now I have run into a problem. In my windows application I wish to run a function called waitForClient(), which waits for a clients connection using WinSock. Anyway, within the button click event, I have inserted this function. The only problem is that when you click the but...more >>

VB ActiveX to VC 2005
Posted by Michael Tissington at 3/25/2007 6:55:44 PM
I have a Visual Basic 6.0 ActiveX Control. It seems there is no way with VS 2005 to create a similar control for containers that host ActiverX controls, is this correct ? I'm thinking of converting the VB 6 project to VC in VS 2005. This seems to be a very different process. Where is a...more >>

stack depth problem
Posted by PJ6 at 3/25/2007 9:47:45 AM
I have an algorithm that processes data recursively. When I'm testing it works fine, but when I feed it data from the actual application, I get "stack overflow". What bothers me is that the data my recursive processor is seeing in production is identical to the test data; the only difference i...more >>

DLL registration problem
Posted by Harish Kumar Dixit at 3/23/2007 6:02:30 AM
Hi friends, i making a COM DLL in vc++ , this DLL is using a 3rd party dll function. i m calling a function of this DLL. But i m getting error error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry. when i m commenting t...more >>

VC++ 2005 SP1 : redistirbutable files
Posted by lfcdm at 3/22/2007 2:27:35 PM
Hi, I'm facing an issue and your help could be very helpful. In few words, I have a app build with VC++ 2005 SP1. I want to deploy it on a target machine, because the CRT dependency described in the manifest can't be resolved -> I have to deploy the CRT on my traget computer. No real issu...more >>

Int 13h
Posted by EndTime at 3/21/2007 11:36:55 PM
I'm fairly good with VB6, and as far as I know there is nothing in the reference books that allow manipulation of Int13h. There must be a way using VC++, but I have no documentation. Could someone lead me in the right direction? Thanks. -- EndTime -----------------------------------...more >>

static linking (GDIPlus.dll) with an VC++ application
Posted by Ramendra Kotharkar at 3/21/2007 9:47:03 PM
Hello, I want to know how to statically link GDIPlus.dll with VC++ application that should be able to run on W2k machine without the existence of GDIPlus.dll on the target machine. Currently, when i statically link the dll and run the application on target (W2K) machine it throws an exce...more >>

Vista Icons
Posted by Yuri Martsynovskyy at 3/21/2007 12:17:40 PM
I get this error message in VS 2005 when compiling Vista icon: ..\File.rc(623) : error RC2176 : old DIB in res\main.ico; pass it through SDKPAINT Using VS 2005 with latest SP1 for Vista ...more >>

Temlate member of class, LNK2028 and Static Library.
Posted by pkoniusz NO[at]SPAM gmail.com at 3/21/2007 8:23:40 AM
Hello everyone. The problem may be obvious, though I'm a bit puzzled by the error LNK2028 when attempting to utilize my static library. The all methods of the class defined within that library do not pose any troubles, but template based methods. Let's say this is a header: class LooseFunc...more >>

Automating VS2005 builds
Posted by 2b|!2b==? at 3/21/2007 12:50:50 AM
I am working on a largish project (about 40 modules). I have created a solution that builds all 40 modules/projects. However, I want to be able to automate the build process - and kick it off without having to start the IDE etc. I fiddled around with NAnt for a while but it seems VC8 dosent...more >>

Linking Between Two Projects in a Solution
Posted by Sami Lakka at 3/21/2007 12:00:00 AM
I have a solution with a two projects. The first project contains my classes and an executable using those classes. The second project contains unit tests for the classes. Because the unit test framework that I use requires a main function I have to keep the tests in a separate project. Now wh...more >>

/EHa vs. /EHs
Posted by PLS at 3/20/2007 5:27:56 PM
If I understand the difference correctly, when compiling with /EHs "catch" will only catch objects that were "throw"n. With /EHa, "catch" will catch thise plus will catch things like addressing exceptions. When compiling with /EHa, can exceptions like addressing exceptions be caught as a sp...more >>

sharing unmanaged object across managed borders
Posted by DaTurk at 3/20/2007 1:56:04 PM
Hi, I'm trying to have a unmanaged object contatined in a a managed class. THis is no problem, but I need access to this object in other managed classes. I'm not sure how to do this. I mean, it wouldn't really make sense to be able to pass in a unmanaged object into a managed anything beca...more >>

top-level const-ness inhibits override
Posted by Ben Voigt at 3/20/2007 8:54:53 AM
Found another variation on my previous bug (https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100917) I would welcome validation and votes. class ISkewEstimator { virtual void get_Sum(double* const pdRetval) const = 0; }; class CSkewEstimator : ...more >>

Return ref struct
Posted by Maxim at 3/20/2007 12:46:24 AM
Hi all, Why is the following code doesn't work? public ref struct MyType { .................. }; MyType GetMyType() { MyType result; ...................... return result; } The compiler says Error 3 error C2440: 'return' : cannot convert from 'MyLib::MyType' to 'MyLib::MyT...more >>

ListView/Process Questions
Posted by Newbie Coder at 3/20/2007 12:00:00 AM
In C++.NET 2003 Windows Forms App I fill a ListView control with process name & second column is the Process ID. I would like to kill the selected process, which is simple in VB.NET or C#, but cannot work it out in C++. In VB.NET, I'd do the following: Dim intProcID As Int32 Dim Proc ...more >>

VS2005 SP1 crashes
Posted by Norman Diamond at 3/20/2007 12:00:00 AM
After VS2005 SP1 crashes enough times, it stops offering to send crash dumps to Microsoft. But it doesn't stop crashing. When VS2005 SP1 reloads a project after a crash, it still displays a reminder "ha ha, you forgot to spend 30 minutes doing an Analyse in SourceSafe". Then it still proc...more >>

Experts please: defining DllMain in static library
Posted by Sean Connery at 3/19/2007 9:45:29 PM
Hi, Is it possible to define DllMain in a static library for use in dlls? The reason is that I am defining a platform abstraction for being loaded as a shared library and I figured the simplest way is to implement DllMain in a static library, which then calls mydllmain. I define this lib...more >>

Call COM Object by VC++
Posted by EricLun at 3/19/2007 8:55:15 PM
Dear All, I am a NewBie in Visual C++. I would like to know how to call a "Active X Dll" COM Library created by VB 6.0 At this moment, i am using a simple hello world console program and a customized VB 6 COM as the client. Should i use something like ?: #import "D:\testing.dll" htt...more >>

WndProc Help
Posted by Newbie Coder at 3/19/2007 8:36:40 PM
I am trying to override WndProc like I would in this VB.NET sub. How do I do it? <System.Security.Permissions.PermissionSetAttribute(System.Security.Permissi ons.SecurityAction.Demand, Name:="FullTrust")> _ Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m....more >>

Previous Existance (Managed C++.NET 2003)
Posted by Newbie Coder at 3/19/2007 8:34:22 PM
Can anyone convert this to managed C++.NET 2003? Private Function PrevInstance() As Boolean If UBound(System.Diagnostics.Process.GetProcessesByName(System.Diagnostics.Proc ess.GetCurrentProcess.ProcessName)) > 0 Then Return True Else Return False End If End Fun...more >>

Question about showing a form from unmanaged code
Posted by Tao at 3/19/2007 1:48:57 PM
hi.. Group Some unmanaged code invokes my code to show a form. If I use ShowDialog() to show the form, form shows but main application stops running. If I use Show() to show the form, main application runs but my form does not get shown. Does anyone have experience on how to handle th...more >>

sizeof() on members
Posted by Michael Bauers at 3/19/2007 11:24:45 AM
I am trying to migrate code to MSVS 2005. I found some code trying to take sizeof a member in a nested struct, see below. I know the typedef is wacky, probably a C coder who did not know C++ well. Now, to me, neither sizeof() looks right, I thought there were restrictions on that kind of th...more >>

How to write a program to track the value of a certain variable at run-time using debug features???
Posted by trungthanh78 NO[at]SPAM gmail.com at 3/18/2007 10:22:54 PM
Hello everyone, I'm totally new to the group and I would like to learn from you. Thank you in advance! I need to write a program to track whether a mathematical function has changed during run-time or not. The program should work with any mathematical function provided by users. Let's ta...more >>

Equivalent to CSharp's IS and AS
Posted by Maxim at 3/18/2007 9:13:32 PM
Hi all, What is the equivalent construction in managed C++ to CSharp's IS and AS keywords? Thanks. ...more >>

C++/CLI redistribution
Posted by StuartJSmith NO[at]SPAM gmail.com at 3/16/2007 7:18:49 AM
Hi, I'm trying to deploy an application written in C++, C++/CLI and C# on pc's that do not have VC2005 installed. I am having issues with assemblies loading, in particular the C++/CLI one and am getting FileLoadException when it tries to load the dll. I know I can get round this problem by ru...more >>

CFileDialog Does not show mapped files in system account
Posted by CrimeMaster at 3/16/2007 6:21:50 AM
I have write some simple code,this code does not shows network mapped drives when we run it under system account, otherwise under user account it shows them correctly. Any body tell me why did its behaviour change under system account, and how we can do it under system account. CFileDialo...more >>


DevelopmentNow Blog