Groups | Blog | Home


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 > december 2006 > threads for december 8 - 14, 2006

Filter by week: 1 2 3 4 5

Expose C++ array through managed wrapper class.
Posted by joshuapking NO[at]SPAM gmail.com at 12/14/2006 9:52:22 PM
I'm having a very difficult time coming across an appropriate solution for this seemingly simple problem. I've written a managed wrapper class for some legacy C++ routines. One routine generates an array of ints, which I wish to expose through the managed wrapper. The managed C++ wrapper is b...more >>


New/delete vs. declare/garbage-collect
Posted by Vincent Fatica at 12/14/2006 7:20:20 PM
I noticed that if I give MY_STRUCT a simple c'tor and d'tor, say, MY_STRUCT::MY_STRUCT() { hEvent = CreateEvent(...); } MY_STRUCT::~MY_STRUCT { CloseHandle(hEvent); } then using a local instance via simple declaration, INT my_function() { MY_STRUCT foo; // blah ...more >>

Impersonation vs. Job API
Posted by Marco Mechelli at 12/14/2006 3:38:08 PM
Hello, i'm facing with the following problem while using the Job API during an impersonation. I have a main process that needs to do the following: 1. Creates a new Job Object that will be used to handle its children. 2. Create a new process (either by CreateProcessW() or by CreateProces...more >>

VC++ 2005 - Compilation Errors using "ifstream"
Posted by marathoner at 12/14/2006 3:31:59 PM
I tried your advice, and replaced "ifstream" with "std::ifstream". I also replaced instances of "ofstream" with "std::ofstream". Those syntax errors were resolved. When I added "std" to the following statement: m_InFile.open(m_sFileName, ios::in | ios::binary); which became m_InFile.ope...more >>

VS2005 Command line compilation errors
Posted by wxforecaster at 12/14/2006 2:44:36 PM
As alluded to in my post yesterday, I'm trying to compile a common C utility in Windows. It's only reference is to zlib.h, which needs zconf.h and in turn libz.a On Unix I've compiled this with success by running: gcc -lz -o foo.exe foo.c (where -lz is a link to 'z' or libz.a) I've placed ...more >>

Help me understand
Posted by QbProg at 12/14/2006 2:24:02 PM
Hello, I did some experiments with VC++ 2005, and some ILDasm. Please tell me if I have understood the concepts of C++ programming under .NET, since I'm a bit confused! -- There are 4 types of classes in VC++/CLI: Unmanaged classes (i.e. normal classes compiled in a unmanaged source or dl...more >>

Smart Pointer
Posted by Mullai at 12/14/2006 4:17:22 AM
Hi Frendz, I am working in VC++ MFC. The application comsumes lot of memory resources. Can anyone help me out with an idea of how to reduce the memory consumption. Now am working to implement Smart Pointers for this. But cant implement properly. Pl help me to overcome this problem. ...more >>

incrementing an STL list interator
Posted by Abubakar at 12/13/2006 10:42:32 PM
Hi, lets say I have a iterator of the type: list<string>::const_iterator itr; lets say its at some position in a given list. Now I can goto the next item by simply doing a itr++. But I want to increment more than just 1. Lets says I want to increment the itr 3 times, ie being able to do som...more >>



Windows Compile
Posted by wxforecaster at 12/13/2006 8:48:01 PM
I'm a VB programmer by trade (hold the tomatoes please), and I have a very small C utility that I need to compile into a windows executable. It's a widely used utility in academia for meteorological purposes, but generally in the Unix/Linux environment. If anyone would be so kind as to com...more >>

My Computer won't close down since installing IE7
Posted by Kiwibruce at 12/13/2006 8:24:00 PM
After installing IE7 my computer hangs at "Turn off Computer" specifically it says that it can't end ctfmon.exe and explorer.exe (I can close them manually and machine shuts down ok). This occurred after installing IE7, I uninstalled it and everything went back to normal. I have since reinstal...more >>

Trouble porting simple class from MEC++ to C++/CLI
Posted by Bern McCarty at 12/13/2006 3:00:25 PM
I have a simple ref class in its own namespace that needs to coexist with a legacy typedef alias for "unsigned int" in the global namespace that has the identifier as itself. Everything compiles fine with the old MEC++ syntax, but I cannot figure out how to write the code so that it will co...more >>

Problem with BEGIN_TEMPLATE_MESSAGE_MAP (long)
Posted by skydivergm NO[at]SPAM gmail.com at 12/13/2006 5:01:07 AM
Hi, Consider the following code: --- template <class T> class TMyCWndWrapper : public T { public: afx_msg void OnEnable(BOOL bEnable) { // For the sake of simplicity I'll just call the base class imp. T::OnEnable(bEnable); } DECLARE_MESSAGE_MAP() }; // Define a custom...more >>

How to use DrawDibDraw
Posted by ulillillia at 12/12/2006 9:52:00 PM
I'm trying to learn programming and I've got quite far so far, but I've run into a few problems, the main ones involving DrawDibDraw. First, 12 bytes seem to be missing from "bitmapinfoheader" that I see in the hex edittor. Second, I'm puzzled about the difference with the Dst and Src values...more >>

Access Denied opening device with CreateFile?
Posted by Joe B. at 12/12/2006 3:54:48 PM
I have been wading through using SetupDi... API to get a device path to use in CreateFile so that I could open a USB HID device. I can now get a device path, but when I try to open for GENERIC_READ|GENERIC_WRITE, I get an error that only tells me "Access Denied". If I use zero in dwDesiredAc...more >>

wrapping C++ API with virtual functions
Posted by Gerhard Prilmeier at 12/12/2006 1:15:15 PM
Hello, I have an unmanaged C++ API that uses virtual functions, like this: class A { public: virtual void handleMe(){} }; The user would use A by inheritance: class B : public A { public: void handleMe(){ /* doSomething */ } }; Now I need to port this API to .net, such that it...more >>

How do I do __typeof(__box MyValueType) in the new C++/CLI syntax ?
Posted by Bern McCarty at 12/11/2006 7:39:48 PM

Implementation changes for function pointers
Posted by A Wieser at 12/11/2006 6:43:15 PM
Hello, It seems something's going on with regard to the way Visual Studio 2005 implements function pointers. Once upon a time, it was possible to have unmanaged code as follows: __declspec(naked) void HookJump(...) { _asm { nop nop nop nop nop nop // six bytes for the original da...more >>

using SetupDiGetDeviceInterfaceDetail
Posted by Joe B. at 12/11/2006 1:25:10 PM
Hello, This is my first attempt at posting to the newsgroup. My apologies if I have directed this question to the wrong bunch. I am trying to use SetupDiGetDeviceInterfaceDetail function in order to get a handle to a USB HID device so that I can open it using CreateFile. After struggling wit...more >>

Writing raw data to a USB printer
Posted by AM at 12/10/2006 2:27:06 PM
What I am trying to do is write raw data to a USB to parallel adapter to control an external device (as I dont have a parallel port) using VC++.net or C# The adapter is not a true parallel port and is hence treated as a USB device. How would I be able to write raw data or ASCII data to this ada...more >>

i can't define a string - help
Posted by Jack at 12/10/2006 11:21:53 AM
#include <string> #include <iostream> int main(){ string s= "Application"; return 0; } What am i doing wrong, I get an error message saying 'string undeclared identifier'. This used to work. ...more >>

an unmanaged type cannot derive from a managed type
Posted by andy6 via DotNetMonster.com at 12/9/2006 8:27:26 PM
I took a c++ 6.0 project and converted it to c++ .net 2005 project. I want to make a web service out of it. One of the new files I created was a cpp where I have the webmethod pointing to a function in the previously 6.0 code and I get the error noted below. What I don't understand is since I cre...more >>

how do I demangle C++ symbol names in libs produced by Visual Studio .NET 2003 please?
Posted by Andrew Marlow at 12/8/2006 4:07:31 PM
I am getting a missing symbol from my application library but it looks to me like the symbol must be there (judging from the source code). So I would like to list the symbols in the ".lib", demangled. How do I do that please? -- There is an emerald here the size of a plover's egg! Don't top...more >>

Managed C++ to C++/CLI Convertor tool now available
Posted by Carl Daniel [VC++ MVP] at 12/8/2006 7:25:16 AM
http://blogs.msdn.com/vcblog/archive/2006/12/08/managed-extensions-for-c-to-c-cli-conversion-tool.aspx It's not perfect, but people have found it useful. The tool is totally unsupported, but includes source code so those needing a more elaborate tool can use it as a starting point. -cd ...more >>


DevelopmentNow Blog