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 > july 2007

Filter by week: 1 2 3 4 5

COM tlb file
Posted by George at 7/31/2007 6:40:06 PM
Hello everyone, Two questions about COM tlb file, 1. I am wondering what are the content of COM tlb file? I think it should be something like import library file (.lib) for a DLL which contains address and signature of exported functions. 2. Why for C# COM client, tlb file is not need...more >>

HELP!! Library for deleting file not there!
Posted by smp9737 NO[at]SPAM gmail.com at 7/31/2007 1:43:00 PM
Hello. I'm developing a Win32 Console Application for a Smart Device (MotoQ). All i need to do is delete a file with a known name and path. I'm under the impression that I have to use File::Delete( path ) based on what MSDN is telling me. Thus I need to include mscorlib.dll ... I #using ...more >>

_vsnwprintf_s seems to be broken
Posted by Norman Diamond at 7/31/2007 12:00:00 AM
I think the current version of _vsnwprintf_s is broken, in ordinary Windows. I'm not completely sure yet but it looks like this breakage is worse than previously known Windows CE breakage of StringCchPrintf. For Windows CE breakage of StringCchPrintf, since the %S format died instead of conver...more >>

TranslateCharsetInfo failing
Posted by PLS at 7/30/2007 2:04:39 AM
I hope someone can explain why this piece of code is failing: CHARSETINFO csi; BOOL brc = TranslateCharsetInfo(&cf.locale, &csi, TCI_SRCLOCALE); cf.locale is an LCID with value 0x00000409. The function returns false and GetLastError returns 0x57, invalid parameter. The operating sy...more >>

What's the difference of [DllImport ....] with _declspec(dllimport)
Posted by Ed at 7/30/2007 1:53:13 AM
Hello, dear all, I often see these two import usage in the code. Both are the interface to use the Dll library. I think they are the same. Normally P/Invoke means using the [DllImport ....] to import the dll. But I have some confusion about them. 1. Is the "_declspec(dllimport)" also one ...more >>

Global variable in c++.net 2003
Posted by Audwin at 7/28/2007 11:01:34 PM
How to declare a global variable in c++.net 2003 ? There is no something like module in c++.net . Thanks ...more >>

i want to pass the part of the clipped image as parameter
Posted by Udhay at 7/28/2007 10:19:08 PM
Hai I am new to C#. I am cutting a part of an image from the picturebox and i want to pass the part of the clipped image as a parameter to do image processing.The parameter is input image file.How to carry on this process?? Udhay ...more >>

invoking C# function from C++
Posted by George at 7/28/2007 5:30:01 AM
Hello everyone, I have developed a COM component using C++. And I need to invoke some functions in another DLL which is implemented in C#. I am wondering whether there are any tutorials or samples of how to do this correctly and safely? I have this question because I noticed that the dat...more >>



convert from size_t to unsigned int
Posted by George at 7/27/2007 11:36:00 PM
Hello everyone, When converting from size_t to unsigned int, there will be a warning message, warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data I do not know why, since in crtdbg.h, size_t is defined to int, right? thanks in advance, George...more >>

help me figure this out - control collection
Posted by jerry at 7/27/2007 1:12:42 PM
I wrote a ton of code in the older VC 6.0 and admit to being behind the times. I struggled through and prototyped an application in 2005.net VB that I am now converting to VC++ in 2005.net, not sharp. To begin with, the following code clears all the checkbox controls in a groupbox of 60 chec...more >>

two dimensional array initialization
Posted by George at 7/27/2007 2:40:06 AM
Hello everyone, I find to initialize two dimentional array in Visual Studio, I have to specify the number of elements. For example, [code] const char foo[][] = {"hello", "world"}; // compile error const char goo[][64] = {"hello", "world"}; // compile correct [/code] So, the best so...more >>

ATL question
Posted by Grey Alien at 7/27/2007 12:00:00 AM
might be slightly OT... I am writing a wrapper (ATL) COM class around a C++ class. The C++ class does not have a default ctor - The ctor requires various arguments to be passed to it - one of which is a C++ reference. How may I pass the arguments to the ATL ctor?...more >>

Define a PUBLIC form variable
Posted by Johnson at 7/26/2007 11:06:20 PM
In VB: Public x as new Form1 How to change the above code in VC++ it seems the following doesn't work in the winmain public x* =3D new Form1();...more >>

LPCTSTR and HRESULT
Posted by George at 7/26/2007 9:56:01 PM
Hello everyone, If I want to convert LPCTSTR and HRESULT to standard C/C++ data type (like char*, int, long, etc.), I am wondering what standard data types should I convert to be safe and do not lose and data precise? thanks in advance, George...more >>

WriteFile issue
Posted by George at 7/26/2007 6:06:01 AM
Hello everyone, The 3rd parameter of WriteFile is number of bytes to write, http://msdn2.microsoft.com/en-us/library/aa365747.aspx I am wondering if I want to write multi-byte character string or wide character string on Windows, how could I get the number of bytes? thanks in advan...more >>

HANDLE and FILE*
Posted by George at 7/26/2007 2:20:01 AM
Hello everyone, I am using Windows API open (create) a new file by CreateFile, http://msdn2.microsoft.com/en-us/library/aa363858.aspx the return value is HANDLE, if I use fwrite to write content to the file, since fwrite requires FILE* as parameter. I think HANDLE is not the same as F...more >>

Listview DragDrop
Posted by Thomas at 7/25/2007 10:49:13 AM
Hi, This may not be the right place, but it seems like a good starting point so here goes: I am trying to scroll the listview during a drag drop operation. I have the drag drop part working, but the scrolling is trouble. How can I set the scroll to follow my mouse position while dragging. ...more >>

Converting from System::String to std::string while keeping nulls.
Posted by Abhimanyu Sirohi at 7/24/2007 2:46:03 PM
Hi, I am using Visual C++ in Visual Studio 2005 to create a Managed Wrapper around some C++ LIBS. I've created some classes that contains a pointer to the LIB classes and everthing seems to compile well. The problem is getting a std::string from System::String and still preserving the nulls....more >>

TFTP app
Posted by Daniele at 7/23/2007 3:10:42 PM
Hello everybody, I wanto to embed FTP/TFTP client into my application, is there any microsoft lib in order to implement that functionality? Thank you. Daniele...more >>

Using C++ COM from c# web application
Posted by Hari at 7/23/2007 5:43:02 AM
Hi, I write simple COM object (from c++) using 'ATL Simple Object' template, than I make reference to compiled dll from c# application and everithing works ok. Next step is to move this dll to web application, but i got next mesage (at bottom of post). I change dll permisions to full contr...more >>

Cant use std lib.
Posted by G123456 at 7/22/2007 10:37:22 PM
I am using Microsoft Visual Studio 2005 Prof. I am (only) using the C++ part of it (or i think so). When i am compiling my code i get the error "error C2653: 'std' : is not a class or namespace name" If i try to use "using namespace std" i get the error "error C2871: 'std' : a namespace wit...more >>

defender
Posted by john at 7/21/2007 3:32:02 PM
running vista ultimate - i have found defender turned off for no apparent reason several times. Any solutions or comments would be appreciated -- john...more >>

Access violation in unmanaged code: Linking managed with unmanaged static libs
Posted by at 7/20/2007 12:00:00 AM
Hi, Gurus, I recently attempted to build a .Net forms application, that links with old style unmanaged C++ static libs. Of course I had to recompile the static lib projects to link properly with the managed application. My questions are two fold: [1] The managed project uses /clr and /MD...more >>

private delegate, and scope
Posted by DaTurk at 7/19/2007 8:17:13 AM
Hi, if I declare a delegate as private, within a namespace, what's the scope? ...more >>

C++\CLI: Supress XML Document Generator for unmanaged header files?
Posted by Apoxy at 7/18/2007 6:34:48 PM
Is there a way to suppress the XML Document Generator in such a way that it ignores header files? The ACE headers used in my project unfortunately contain a lot of comments starting with "///" that aren't intended for use as XML documentation comments. The doc generator tries to parse them any...more >>

Unmanaged to managed callback, and GCHandle / gcroot
Posted by DaTurk at 7/18/2007 12:12:35 PM
Hi, I'm coding up an application that has a native c++ layer, asynchronously calling callback in a CLI layer. We originally did this with static inline methods in the CLI layer, but this solution only works with singleton objects. So I have to explore other solutions. So beside pinning ...more >>

About C++ IDEs
Posted by LifeStory via DotNetMonster.com at 7/18/2007 5:08:45 AM
Hi all, I am now using C++ for operations research techniques implementations to get numerical reults, I have a question what is the difference between VC++.Net, VC++ 6.0 (in terms of performance)? and which one is better to be used? and related to IDEs is it better to use Visual Studio 6.0 or...more >>

Problem using unmanaged static libs from managed C++ Windows Form Application in VC2005
Posted by Art at 7/18/2007 4:45:47 AM
I have some Static libs which were intially implemented in VC6 and then converted to VC2005. When I try to use these in my managed C++ application, I am getting the following exception: An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module. Addition...more >>

Regarding VC++ Project template for in VS2005
Posted by Art at 7/18/2007 12:00:00 AM
I have to use Windows Forms(Managed C++) and also existing VC6 backend static libraries(MFC) in my GUI Application Can anybody suggest me which template in VS2005 is more appropriate for this scenario: 1) VC++ project using "Windows Form Application" template. 2) VC++ project using the t...more >>

directory locking
Posted by Lloyd Dupont at 7/17/2007 12:00:00 AM
In our app we have a resource manager which used a temporariy directory in the temp folder to store data while the application is runnning. To preserve the integrity of our data we need to prevent the deletion of this folder while the application is running. How could I lock the directory?...more >>

Destructor is not called when an exception is propagating from unmanaged to mixed code.
Posted by caa NO[at]SPAM aurigma.com at 7/16/2007 9:24:36 PM
I have made a simple text example. I have two projects. First is an unmanaged static lib, containing function F(), which created an object of type A and throws an exception. The second project is a C++/ME console application that calls F() and catches all exceptions with a "catch(...)" filter. ...more >>

Parsing a string
Posted by sath at 7/16/2007 5:10:01 PM
I need to parse a string which is like ACS*PR*1*101.55**2*-22**66*166*68~ The data between the asterisks should go to sepate strings (string1, string2 etc) Can I string instead of c-string? Any help is appreciated. Thanks in advance....more >>

VC GUI components/libraries
Posted by A n g l e r at 7/16/2007 12:57:35 PM
Hello there. Could you recommend any decent GUI libraries meant for VC++ (unmanaged code)? I've heard about Xtreme Toolkit by Codejock, what else is worth looking into? Regards, P. ...more >>

COM component in Managed C++
Posted by iyengar.sheshadri NO[at]SPAM gmail.com at 7/16/2007 10:22:37 AM
Hi All, Currently we have COM component(dll) implemented using ATL. Because of the current business requirements, we would like to rewrite the COM component in Managed C++ and the clients will be unmanaged C++ and C# . I have been searching net to find some sample code and but could not ge...more >>

ide options for visual c++
Posted by otengofive NO[at]SPAM gmail.com at 7/16/2007 6:17:02 AM
Hi, my friend needed a free c++ compiler so I recommeded him visual c++, I told him, what I believed, that visual c++ compiler is free for download from msdn. Now he needed an ide and I recommended visual studio / express, but he says its too heavy for his home machine which is some pentium mac...more >>

How to add a VB ocx to a .NET VC++ project?
Posted by Kueishiong Tu at 7/15/2007 12:14:01 AM
Is it possible to add a VB ocx to a .NET VC++ project? If yes, how do I do it? ...more >>

FileOpen and FILE_SARE_WRITE
Posted by A n g l e r at 7/13/2007 3:24:50 PM
Hello there. What does happen when two threads write to one file opened with attribute FILE_SHARE_WRITE? Let's that both threads save an array of 10 elements as follows: THR1: WriteFile(handle1, array1, 10); THR2: WriteFile(handle2, array2, 10); where handle1 and handle2 are handles ...more >>

DllMain getting called a lot of times
Posted by Abubakar at 7/13/2007 12:00:00 AM
Hi, I have a dll that gets called by an exe, I just placed a little code in its dlmain method and put a breakpoint on the code only to discover that its getting called nearly hundreds of times. I suspect each time some exported function is getting called the dllmain also gets called. Why is i...more >>

map<> and function pointers
Posted by DaTurk at 7/12/2007 8:31:19 AM
Hi, I'm trying to hold a map of ints,and function pointers in C++ map<int, (*functPtr)(int, int)> something I need to hold a list of callbacks. For some reason this syntax is not working. Any ideas? ...more >>

How to Static link system libs
Posted by Johannes at 7/12/2007 4:52:01 AM
Hello, I have Visual C++ 2005 on XP-Pro. I try do do a "quick and dirty" program to run on a Win2000 computer. The only system call is a "printf()". When I try to run this program on the other computer, there is an error message saying "this program can not be started on this computer". I s...more >>

Using VS7.0 to test an SDK made on VS8.0
Posted by realrobby NO[at]SPAM gmail.com at 7/11/2007 6:28:39 PM
Hello, I'm wondering if anybody here can help. I'm currently using VS7 to test an SDK made on VS8 for the purpose of ensuring backwards compatibility. I'm having some problems (copy/ pasted below), however, and I believe it is a matter of incorrect linker settings on my part, but I'm not sure ...more >>

boot sector with .net 2005
Posted by Jordi Maycas at 7/11/2007 6:05:41 PM
Could I do something like this with .net 2005? PROGRAM WriteBootSector; VAR DiskSectorsPerTrack, DiskTracksPerHead, DiskHeads : WORD; FUNCTION WriteSector(Sector : WORD; Buffer : POINTER) : BYTE; ASSEMBLER; ASM mov CX, Sector mov AX, CX xor DX, DX div [DiskSectorsPerTrac...more >>

after change an unmanagered exe to support clr.old syntax
Posted by Laura at 7/11/2007 12:52:02 PM
I have a project, which is an unmanaged .exe file. It runs good after install it in a machine, which has no vs.net installed. But it has .net framwork 2.0. But after we set the support clr/old syntax for this project. It compiles and runs good in a developer machine, but when we install it in ...more >>

CLI and calling the base method from the derived method
Posted by DaTurk at 7/11/2007 10:19:34 AM
Just a syntax question, how do I call the parent's method I've overridden from the child in syntax. I notice there is no "base" Keyword. Thanks. ...more >>

Changing resources in .NET executable
Posted by PLS at 7/10/2007 2:10:48 AM
In the native world, there are a number of utilities that allow one to edit resources in an executable. I have a situation where I want an executable to contain a semi-static table. I want to be able to give selected people in the field instructions for changing this table. They will then d...more >>

Creating global objects in a class library
Posted by Leif902 at 7/10/2007 1:25:44 AM
Hi all, I'm working on a little project and have hit a roadblock, I'm trying to make an extension for a program who's extension DLL's must return either a double or a null terminating string (no void). This extension is actually a wrapper for another managed DLL which dosn't follow these ru...more >>

Marshal SafeArray as array<T>
Posted by Christian Schmidt at 7/10/2007 12:18:38 AM
Hi all, I need to implement an unmanaged function that gets a SafeArray and hands it over to a managed function having the managed array-type. Using MarshalAs I can call unmanaged functions having SafeArray from managed code. But here I need this vice-versa... I assume it is doable with Mar...more >>

vector-like wrapper for IList
Posted by Christian Schmidt at 7/9/2007 4:02:42 PM
Hi all, I'm trying to implement a std::vector-like wrapper for IList. The hard part seems to be operator[], because it returns an unmanaged reference. Probably I have to use pin_ptr to achieve this, but I don't know how. Can anybody help? Thanks, Christian template <typename T> clas...more >>

[OT?] CreateFileMapping errors 87 and 1006
Posted by testerman at 7/9/2007 11:47:04 AM
Greetings! I suppose you could help me with these errors I get or at least direct me to a more appropriate newsgroup. So, the problem is as follows: hFile = CreateFile((LPCWSTR)"somefile.ext", GENERIC_READ|GENERIC_WRITE, NULL, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); // As ...more >>

using C++/CLI DLL in C#
Posted by Rudolf Meier at 7/8/2007 5:49:17 PM
Hi I try to build a C++/CLI DLL as a Wrapper for my C++ DLL... now, this works more or less if I only have input-parameters... but I have a function like this in native C++ void GetParams(BOOL* p_bool, int* p_int, wchar_t* p_str); And those parameters are filled by this function (and ye...more >>


DevelopmentNow Blog