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 2006

Filter by week: 1 2 3 4 5

Problem in Calling native code from managed c++ dll.
Posted by Haroon_Saeed at 7/31/2006 7:47:10 AM
Hey, I wrote a managed c++ class library in viusal studio 2005. This managed c++ dll calls native C++ methods of an SDK. When I referenced this managed c++ library in a console applciation written in C# for testing every thing worked fine. Now I need to call the managed c++ class library thro...more >>

performance , speed and portability of VC++.NET and VC++ 6.0
Posted by bhag at 7/31/2006 1:10:44 AM
hi all, I'm writing because I haven't been able to find enough information at the book stores and at the MS web site on some of my questions. Perhaps I'm asking the wrong questions, but if you could help me out here, I'd really appreciate it. Iam a project trainee. I have to ...more >>

Managed Event Question
Posted by Craig at 7/31/2006 12:04:01 AM
Hi I have a static event called PropertyChanged. PropertyChanged is a delegate called PropertyChangedEventHandler(Object^ sender, PropertyChangedEventArgs^ e) If I remove my PropertyChangeEventArg parameter from the delegate and replace it with a string, the project compiles. Here is...more >>

Portable C++
Posted by Andrew Roberts at 7/30/2006 4:13:04 PM
Could anyone recommend to me any good books or online articles that contain in depth coverage of portable C++ development? Specifically writing binary compatible C++ interfaces and code that will work and be fully compatible where code built under multiple versions of the compiler/runtime are...more >>

streets w/ GPS
Posted by fredly at 7/30/2006 9:55:02 AM
1) how can I remove the GPS trail markings from my saved .est file? I have the same problem with calculated distance marks. 2) can I export the GPS trail data that is captured on to a spreadsheet so that I can: retreve my exact route, speed, etc.? -- :-)...more >>

Bitmap <-> ArrayList of points
Posted by Iwanow at 7/30/2006 5:34:55 AM
Hello! My goal is to develop a program that opens a bitmap, copies its pixels to an ArrayList in order to perform some complex calculations (edge detection, Hough transform etc.), and save resulting image back in some other bitmap. It works pretty fast, except for stages of coping pixels ...more >>

C DLL + variable length parameters
Posted by Bit Byte at 7/28/2006 1:06:04 PM
Is it possible to pass variable length parameters to a C function exported in a DLL (i.e. using varargs.h without resorting to say passing a delimited string to be parsed in the function)? i.e. I want something like this: #include <varargs.h> CCONV foo( char* fmt, va_list args ) ; wh...more >>

Using Windows Image Acquisition (WIA) from C++/CLI Managed Code
Posted by Nicholas Lee at 7/28/2006 11:11:02 AM
I am using Visual Studio 2005 and wish to program using managed C++ code. I am writing an application to take still images from a webcam. I have created an interop 'reference' to the platform SDK dll for Windows Image Acquisition (WIA). This has created a set of classes under "Interop.WIAL...more >>



Memory usage question
Posted by Jenea Ciur at 7/27/2006 11:50:34 PM
Hi ! If I will make char* pHugeMemory = (char*)malloc( huge_number_of_bytes ); in some place of my program, and after some time my program will jump to other processing place, that won't reference pHugeMemory location, then if physical memory storage is full, I suppose Windows, will disca...more >>

.NET C++ SMTP question
Posted by hedbonker NO[at]SPAM gmail.com at 7/27/2006 4:57:19 PM
have been asked to do the following: Create an application that will take an e-mail address entered by the user into a field and, once a button is clicked, will take that e-mail address and check it against the mail server for that address using SMTP to determine if it's a valid or invalid ma...more >>

VC++ compiler warning C4345
Posted by Bit Byte at 7/27/2006 12:00:00 AM
I have the following warning: warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized Should I care (if yes, why?) Should I worry (if no, under what conditions should I worry ? - if yes why?) I looked on the MS site...more >>

Writing to an MS-Word or PDF doc.
Posted by Jose Cintron at 7/26/2006 5:04:53 PM
Hello all I have a program that parses 5 XML documents and from there it needs to write a report. At the moment the report is being written as a flat ASCII file, but managers want the output to have pretty pictures and colors (damn managers). Which libs can I use to write to an MS-Word an...more >>

visual studio 2003 and clearcase
Posted by Budyanto at 7/26/2006 4:35:41 PM
Hi, I have a visual c++ project that refuses to build when the project is in clearcase. It kept complaining that it could not open an include file. I'm pretty sure that all my include paths are set correctly because other files in the same directory could be included successfully. In fact I d...more >>

Where do I go for SAPI newsgroup?
Posted by Peter Oliphant at 7/26/2006 1:58:45 PM
Sorry to bother everyone, but where do I go to discuss SAPI (speech recognition) software? Thanx! ...more >>

Question regarding Activation Context API: lpAssemblyDirectory use (Registration-free COM)
Posted by jlbradley1844 NO[at]SPAM gmail.com at 7/26/2006 1:16:11 PM
Hello, I'm attempting to apply Registration-free COM Activation Context API and I'm having a heck of a time doing it. The problem seems to be the way the API works - or doesn't work, as it were. The CreateActCtx does not seem to pay proper attention to the lpAssemblyDirectory in the ACTCTX st...more >>

vcbuild syntax - how to use $ALL?
Posted by jpetrang NO[at]SPAM harris.com at 7/26/2006 12:28:41 PM
Can you tell me if the vcbuild $ALL is the same as the msdev ALL? If so, how do I use it? I have a VS 6.0 command "msdev ProjectName.dsw /make ALL /clean" which, I believe, builds all the .dsp configurations in the .dsw file. I'm trying to figure out how to accomplish the same thing using vcbui...more >>

ManagedC++ and [System::Security::SuppressUnmanagedCodeSecurityAttribute] and stack walk
Posted by Lloyd Dupont at 7/26/2006 12:00:00 AM
I have a managed C++ API which calls extensively into native API. I would like to remove the security walk above!! in C# I could tag my declaration like that: [System::Security::SuppressUnmanagedCodeSecurityAttribute] extern static void SomeCFunction(); but in managed C++ I don't declare ...more >>

ManagedC++ security: How to avoid the stack walk?
Posted by Lloyd Dupont at 7/26/2006 12:00:00 AM
In C# I could remove security check on an C DLL call by tagging my function as follow: [System::Security::SuppressUnmanagedCodeSecurityAttribute] [DllImport("SomeDll.dll")] static extern void SomeMethod(); In Managed C++ I don't declare the function I just #include the headers. How could ...more >>

Start Application with more rights
Posted by Alexander Weiner at 7/26/2006 12:00:00 AM
Hello, I have coded a program to change the IP-Adress Settings on a windows xp workstation. Works with an admin account without problems. Now I like to give some Users the program so that they can also change the IP-Settings to logon to different Networks. The problem is that a normal User ...more >>

Project running issue
Posted by Anderson at 7/26/2006 12:00:00 AM
Dear all, I have a VC project related with SQL server database operation, when I only handle a few records , this project can run perfectly, but when I use this project to handle more than 2000 records, it will run into a debug information as the following lines detailed. //comutil.h ...more >>

Technology migration
Posted by ChitraCK at 7/25/2006 7:23:02 AM
Hi All, I have a VC++ application its a bit big application having more than 10 ATL components. The application is client/server architecture with multi-threading. The server does the data trasnfer from one database to another using ODBC/OLEDB. If at all I want to change the technology f...more >>

for those who still create COM servers
Posted by Egbert Nierop (MVP for IIS) at 7/25/2006 12:00:00 AM
Boost BSTR performance by 3000% http://technolog.nl/eprogrammer/archive/2006/07/25/1009.aspx...more >>

interop & performance
Posted by Lloyd Dupont at 7/25/2006 12:00:00 AM
I have an application which use has a DLL with 100+ (auto-generated) Managed C++ wrapper around some native API. Compare to a purely version my application has some performance issue and I just realized it is probably due to the security check which happen just before each of the (numerous)...more >>

char pointer issue
Posted by Anderson at 7/25/2006 12:00:00 AM
Hi,all I use the following code to read 10000 bytes from a file(fp1) and write them to another file(fp2). char *pStr = new char[10001]; fread(pStr,dw_size,1,fp1); int i = 0; while(i<10000) { fwrite(pStr,1,1,fp2); pStr++; } I fou...more >>

compression application
Posted by Neo at 7/24/2006 7:55:12 PM
I am developing compression application in C++ (vs2k5) using zlib library for compressing files/folders. I understand how to compress a single file, but is there any way to compress a folder containing subfolder and files? I mean is there some single function that does this or will I have to writ...more >>

Debug VB6 ActiveX from VC++
Posted by John at 7/24/2006 3:59:02 PM
I have a VB6 ActiveX dll and it's called from a VC++ app. How can I debug the dll through the app? Please help. Thanks....more >>

Open Excel workbook. VB and VC
Posted by k-w at 7/24/2006 7:27:38 AM
Hi all In vb I do: Dim Ex As New Excel.Application Ex.Workbooks.Open "c:\tmp\Book1.xls" Similar code in VC doesn't work: #pragma comment(lib, "ole32.lib") #import "c:\program files\Microsoft Office\OFFICE11\XL5EN32.OLB" rename("DialogBox","__AA__") /* ... */ Excel::Ap...more >>

unmanaged dll in VS2005 Express?
Posted by mimeo at 7/24/2006 1:34:02 AM
Hi all I would like to know if it is possible to build a dll with VS2005 C++ Express Edition, that is unmanaged, and that is not dependent on the .NET framework. So the dll should be able to run on a machine that doesn’t have the .NET framework installed. Is that possible or would I need...more >>

2-dimensional ArrayList
Posted by Iwanow at 7/23/2006 5:48:01 AM
Hello! Is it possible to use ArrayList as a 2-dimensional list? I want to keep a bitmap in it, and I would like to access its elements by providing two parameters (row and column) rather than calculating offset from the begin. Thanks in advance for any hints. -- Iwanow ...more >>

VC8 program writing to cout much slower than VC6 program
Posted by Julian at 7/22/2006 5:51:13 PM
hi, i have the following piece of code in a program compiled using both VC8 and VC6. it basically just writes out two arrays to cout. the VC6 program takes about 4 seconds to go through that bit of code whereas the VC8 program takes almost 18 seconds ! can someone tell me why this is so ? is t...more >>

pin a generic collection
Posted by Lee Crabtree at 7/22/2006 5:22:48 PM
Pinning a regular managed array is pretty easy in C++/CLI, such as: if buffer is defined thusly: array<System::Byte^> buffer pinning it would be something like: pin_ptr<unsigned char> pinBuf = &buffer[0]; What I'm curious about, though, is whether or not it's possible to pin a generic c...more >>

_decsplec (dllexport) and Ostream operations
Posted by Bit Byte at 7/22/2006 3:07:24 PM
I have written a Dll which contains a class. I overload the "<<" opertor in global functions to perform Ostream operations - a follows: ostream &operator << (ostream &os, const struct _mystruct_t &ms) However (perhaps unsuprisngly), my function is not expoted in the DLL/lib - and when I tr...more >>

Cyrcle reference problem...
Posted by MilanB at 7/22/2006 1:50:01 PM
Hello I have struct, and class that handle array of previous mentioned structs. How to declare struct member, that will point to class that it belongs? struct S { //HOW TO ADD MEMBER THAT WILL POINT TO CLASS C ??? } class C { S** items; } Thanks Milan...more >>

Program to check its own memory usage?
Posted by danlimcy NO[at]SPAM gmail.com at 7/21/2006 4:51:23 PM
Hi, Does anyone know whether it is possible for a VC program to find out about its own memory usage? Thanks. regards, Daniel ...more >>

compiling without Visual Studio .NET
Posted by tirzanello NO[at]SPAM gmail.com at 7/21/2006 3:52:17 PM
Hi all, I've found this amusing project: http://inpainting.alpha-sigma.net/ but there are only source codes, the author suggests to compile it with Visual Studio .NET 7.1 or more. The problem is that I don't have it, and I'm searching a way to compile it without the Visual Studio 7.1 is it...more >>

to set a native callback to managed member function
Posted by mot133t NO[at]SPAM gmail.com at 7/21/2006 2:55:05 PM
I will quickly try to write a code that shows my intention. I will pass unnecessary code. typedef void(FP*)(LONG _param1, LONG _param2, BYTE* _pData); class CNative { public: FP m_CallBack; private: void JobDone() { for(iter i = m_Jobs.begin();i!=m_Jobs.end();++i) { ...more >>

vc in .NET
Posted by BilfFord X at 7/21/2006 1:07:25 PM
I'm shopping around to figure out where I'm going to devote my finite energies as I get back into the windows world. A question that pops up right away for a lot of fellas is, if I'm going to be doing stuff in the dot net world, do I go c++/CLI or c#. Some people might be able to do both, bu...more >>

Can't generate dependencies in VS 2005?
Posted by jpetrang NO[at]SPAM harris.com at 7/21/2006 12:33:29 PM
We use VS6.0 to support our automated build environment, and we'd like to move to something that is currently supported. One aspect of VS6.0 is part of the "Generate Makefile" feature, which it seems was removed in VS 2003. Specifically, that feature creates dependency (.dep) files useful for th...more >>

Problem about the project sln
Posted by NEMA at 7/21/2006 8:17:41 AM
Dear all, i have a problem on the sln file. After i have a error while coding, i close the VS studio and find the sln file to open the project. But i discover that the sln file become 0kb and i couldnt open it. However, the .h and .cpp are still there. could i recover it ? thanks ...more >>

Char* variable in struct having junk address instead of NULL ptr
Posted by Vinod at 7/21/2006 8:16:02 AM
Hi, In VC8 project, I am having a struct which is having a char* variable. Now I am creating a 3 elements array object for the struct. I send the base address of the object using VARIANT to a function where I am casting to struct again using reinterpret_cast. Then If I am trying to tra...more >>

Variably sized instances of a class
Posted by Ole Nielsby at 7/21/2006 12:11:13 AM
I want to create a class with a variably-sized array inlined. The array size will be known at each instantiation but not at compile time. Once created, arrays won't grow or shrink and their contents won't change. The array length will be accessible via a smart pointer located before the array...more >>

Why I can not get the string buffer length ?Help!!!
Posted by Joseph at 7/21/2006 12:00:00 AM
Hi, all I have a sample code like the following detailed: //----------------- FILE *fp1; fp1=fopen("F:\\aa.dat","rb"); if(!feof(fp1)) { // Step 1 :the following code is to read binary data from an existing file CString ss...more >>

How to change binary data buffer read from a binary file to string format
Posted by Anderson at 7/21/2006 12:00:00 AM
Dear all, Could anyone tell me how to convert binary data in buffer to string format,thanks in advance! Anderson ...more >>

LNK9038 SAFESEH warning,
Posted by Matej Trampus at 7/20/2006 11:50:01 PM
Hi, Iam linking my C++ project with some external libraries and getting the following error: someLib.lib(omeObj.obj) : LNK9038: module unsafe for SAFESEH image. I do not have exception handling turned on in my main project (no /GX /Eh options). What is wrong? Matej...more >>

Atomic reference counting
Posted by Ole Nielsby at 7/20/2006 3:48:23 PM
I need to implement reference counting in a class hierarch, in a thread safe manner. (The classes are umanaged but I might want to compile them with the /clr option.) Some of the objects - atoms - are registered in a global hash table - let's call it an atom table. When an atom refernce count...more >>

Programmatically determine DLL dependencies
Posted by Mike C# at 7/20/2006 3:06:43 PM
Hi all, What's the "best" way to determine an EXE file's DLL dependencies from within a program? I basically need to figure out which DLL's are required by an EXE like Dependency Walker, from within a C++ application. Thanks ...more >>

CString->GetLength() does not work
Posted by Joseph at 7/20/2006 12:00:00 AM
Hi, I have a question for CString. My C++ code is detailed as below, FILE *fp1; fp1=fopen("F:\\aa.dat","rb"); if(!feof(fp1)) { // Step 1 :the following code is to read binary data from an existing file CString ss; fread(ss.Get...more >>

Pass parameters for Stored procedure in VC++
Posted by Joseph Lu at 7/20/2006 12:00:00 AM
Hi, all I have a stored procedure created in SQL Server like the following lines. // stored proceudre code starts here CREATE PROCEDURE sp_insertdata @strdata varchar(250) , @rsult BIT OUTPUT , @erridx CHAR(7) OUTPUT AS ...more >>

Create Instance Failed!
Posted by Joseph Lu at 7/20/2006 12:00:00 AM
Hi, all Could any boday tell me why I failed to create instance here in the following code ? Codes sample -------------------------------------------------------------------- void CInsertDataTestDlg::OnBnClickedButton1() { _ConnectionPtr pMyConnect=NULL; HRESULT hr=pMyConnec...more >>

error C2065: ¡°adCmdProc¡± : non-declared identifier
Posted by Joseph Lu at 7/20/2006 12:00:00 AM
Hi all, When I use the below line code to execute a stored procedure , I got a error as described below: My code line : pMyConnect->Execute("EXEC sp_test" ,&RecordsAffected,adCmdProc); Error : error C2065: ¡°adCmdProc¡± : non-declared iden...more >>


DevelopmentNow Blog