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 > april 2006 > threads for april 15 - 21, 2006

Filter by week: 1 2 3 4 5

How to hide system folder?
Posted by NianHawk at 4/21/2006 11:11:01 PM
Hi, I know IShellFolder::GetAttributesOf can get property of any sys folder. But how can I hide sys folder? which function can do it? -- Nothing impossible, Nothing sure...more >>


Mixed mode programming problem in C++/CLI
Posted by Edward Diener at 4/21/2006 2:46:50 PM
In Managed C++ in order to share the functionality of a class between its CLR code and native C++ code, in essence mixed mode programming for a class, I would design the __gc class so its corresponding __nogc C++ class would be a nested class of the __gc class. The __gc class would have a po...more >>

convert String ^ in char *
Posted by nicolas.hilaire NO[at]SPAM motorola.com at 4/21/2006 12:10:23 PM
hi all, i'm using this code to convert a String ^ in char * String ^str = "string .net"; IntPtr p = System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(str); LPCSTR str2 = reinterpret_cast<LPCSTR>(static_cast<void *>(p)); System::Runtime::InteropServices::Marshal::FreeHGlobal(...more >>

Singleton per DLL instance
Posted by Herby at 4/21/2006 6:20:37 AM
I am going to develop a multi-threaded application that creates many instances of a calculator object. Consequently the DLL housing the Calculator is to be thread safe. Within the DLL i want some global singleton objects - these then become accessible from all sub-objects comprising the calcu...more >>

Command line error D2022 : cannot open ''
Posted by alexander.meister NO[at]SPAM bucher-suter.ch at 4/21/2006 2:18:27 AM
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. cl : Command line error D2022 : cannot open '' Have any body an idea? OS: Win2000 Pro Tool: Visual Studio .Net 2003 ...more >>

Odbc<< Oledb?
Posted by ram_palavalasa at 4/21/2006 1:02:26 AM
Hi all, I have a assignment of vc++.net and sybase to populate data an generate reports which is the best one? is OLEDB more efficient than ODBC? i think OLEDB itself is a layer o the ODBC..then how it can be? Thanks, RA -- ram_palavalas -------------------------------------------...more >>

Perl Script When Launched From the Service Fails to Load Environment Variables
Posted by ANarula at 4/21/2006 12:00:00 AM
I am running into a strange problem. I have perl script which reads the "APPDATA" environment variable, and does some work on that directory. When I a launch this script from Command Prompt, it works perfectly fine, however when the same script is launched from a DLL hosted in a particular ...more >>

How to link old 3 pty libs in MC++???
Posted by Thorsten at 4/21/2006 12:00:00 AM
Hi all I'm trying to use a third party library which is compiled with an older C++ compiler then the compiler in Visual Studio 2003. My project is a managed C++ library and I use the Visual Studio 2003. In the header files of the third party lib I can see that <fstream.h> is used and...more >>



VS2005 major development bug
Posted by Edward Diener at 4/20/2006 11:19:38 PM
After spending more than a day reducing a complicated compiler bug to a simple case I reported it to the MSDN Product Feedback Center as a bug just now. However this bug is completely stymying my development of a VC++ component. Does Microsoft still offer any free bug reporting cases for VS2...more >>

How to read late bound Excel worksheets collection properties?
Posted by J Daniel Melton at 4/20/2006 11:06:02 PM
Hello, I am using late binding in a managed VC++ .NET 2003 application. I used KB 302902 (for C#) as a starting point and converted it to managed C++. I built a managed class that is intantiated by a form. The class can instantiate Excel, open a new workbook, add a new worksheet, get a range, ...more >>

Which one is best?
Posted by ram_palavalasa at 4/20/2006 10:19:55 PM
Hi all, Whichone is the best among the following while proessing the data? ODBC,DAO,ADO,OLEDB...please justify urself why ? also let me know how to loas dll component to the workspace i VC++.Net? Thanks, Ram..: -- ram_palavalas ----------------------------------------------------...more >>

VC7.1 and IL code
Posted by Bit byte at 4/20/2006 10:13:48 PM
I have some IP (intellectual property) concerns regarding IL code. 1). If I compile a native (i.e. 'unmanaged') C++ project (i.e. application or library) using C++ and the VC7.1 compiler tools, how can I be sure that it is native code (not IL) that is generated? 2). Is native code generat...more >>

proper way to pass pointers by reference from managed c++ methods to native c++ methods
Posted by Scott McFadden at 4/20/2006 10:12:12 PM
What is the proper way to pass pointers by reference from managed c++ calls to native c++ calls? In managed C++, I have a pointer to an array of structures, that I pass to a native c++ method by reference: //Managed c++ QueryResult* qr = NULL; ExecuteQuery(1, "abc", qr); //invoke nativ...more >>

Pointers and reference question
Posted by Abubakar at 4/20/2006 8:56:18 PM
Hi, check the following code: ++++ class nodeinfo{}; nodeinfo * v1_proc1 () { nodeinfo * ni= new nodeinfo(); return ni; } void v1_use_proc1() { nodeinfo * n = NULL; n = v1_proc1 (); // use n.... delete n; } ++++ another version: class nodeinfo{}; nodeinfo &...more >>

In search of a short cut key in vc 2k5 ide
Posted by Abubakar at 4/20/2006 4:59:32 PM
Hi, I desperately need this functionality in the VC++ 2k5 IDE: If I'm in some class's header file, lets say "portlistener.h", I press a key and goto its corresponding cpp file, which in this case will be "portlistener.h". If in *.h file it should goto *.cpp and vice versa. I use the ctrl+ta...more >>

Thread question
Posted by Abubakar at 4/20/2006 4:41:49 PM
Hi, (me using visual c++ 2005, all native/unmanaged). So my question is about allocating memory in one thread and using it in another. I think its good to explain as following : Somewhere I have this: someclass * _obj; thread_proc1() //used by thread1 { // this thread does the fo...more >>

"End of statement expected." error at Japanese message
Posted by Tran Hong Quang at 4/20/2006 3:11:02 AM
Hi, I'm using Windows 2000, English version, Microsoft Visual Studio.Net 2003. I compile a project developed for Japanese client, on which there are some Japanese messages. I have error "End of statement expected." at the line of Japanese message. How to make Visual Studio.Net 2003 under...more >>

Class wizard in vc++.net
Posted by ram_palavalasa at 4/20/2006 12:00:00 AM
Hi, any body let me know that, does vc++.net have ClassWizard or not? if not how to add message handlers and components to the project? please its very necessery as i am new vc.net IDE.. -- ram_palavalas ----------------------------------------------------------------------- ram_palavalasa...more >>

Help with Threads, and Callback from Unmanaged to Managed
Posted by ricecake NO[at]SPAM gehennom.invalid at 4/19/2006 2:23:25 PM
I have processing code (I'll call it the "model") written in native unmanaged pure C++, and I have put a GUI on top of it written using Windows Forms (.NET 1.1). The GUI is used to set the parameters for the model, and once all parameters are set and checked to be valid, I run the model. The m...more >>

'Gui-less' windows executable
Posted by Bit byte at 4/19/2006 12:58:27 PM
I want to create a GUI-less windows executable (i.e. an executable that has no gui) and no console. The idea is to have this running as a kind of daemon (it can't be a service, for reasons I wont go into here ..). I can't seem to find any code that shows how to do this which is probably not...more >>

Any easy way to convert legacy C++ code to managed C++?
Posted by nick at 4/19/2006 11:14:02 AM
I am building a SQL Server CLR user-defined function (which means it must be pure safe?). I got hundres/thousands of error. And most errors are in vadefs.h, crtdefs.h, yvals.h, ymath.h, math.h, float.h, swprintf.inl, ..... Any easier way to convert the code without many changes?...more >>

What is a packed 32-bit?
Posted by Doru Roman at 4/19/2006 9:56:57 AM
Hi, Can somebody tell me what is a packed variable? For example a packed 32-bit integer. Is it the same as unsigned? Thanks ...more >>

The least-cost way to return a one-row IEnumerable object?
Posted by nick at 4/19/2006 8:17:02 AM
The function must return a IEnumerable object with one row (any data). I have the following code. Any less cost way? IEnumerable^ udf() { DataTable dt; dt.Columns->Add("Test"); dt.Rows->Add(1); return dt.Rows; }...more >>

c++ and telnet
Posted by Peted at 4/19/2006 12:00:00 AM
Hello i was wondering if anyone has any examples of access and sending info to a telnet server (with and without login) I was hoping to find some examples in unmanged code, but managed would do. I want to write my own class to do this, but would like a step by step guide showing how to sta...more >>

dotnet or MFC
Posted by dusanv NO[at]SPAM gmail.com at 4/18/2006 7:01:15 PM
Hi, I'm starting a new project and am still torn deciding whether to go with MFC or to do it in C++/CLI with dotnet. The app makes extensive use of C++ native libraries which cannot go managed (closed source) and will have a whole pile of UI. Dotnet is way easier for UI than MFC but it doesn'...more >>

How to convert C# out parameter to C++?
Posted by nick at 4/18/2006 1:44:42 PM
For example: public static void FillRow(Object obj, out SqlDateTime timeWritten, out SqlChars message, out SqlChars category, out long instanceId) ...more >>

illegal reference to non-static member?
Posted by nick at 4/18/2006 1:14:02 PM
I got the following error: Error 1 error C2597: illegal reference to non-static member 'Microsoft::SqlServer::Server::SqlFunctionAttribute::FillRowMethodName' when compiling #include "stdafx.h" using namespace System; using namespace System::Data; using namespace System::Data::Sql; ...more >>

C interface to C++ classes
Posted by Bit byte at 4/18/2006 12:55:21 PM
I have a set of C++ classes for which I want to provide a C API - and compile into a C DLL, for use in an application that can only work with a C interface DLL. Any suggestions/pointers on how to proceed. Googling is not bringng anything up that directly addresses the issue (parashift info ...more >>

Linker generated Manifest version differs from Redist versions
Posted by HarryH at 4/18/2006 12:40:02 PM
I am finding that the linker for a C++ application in VS 2005 is generating a manifest with old version #s for DLLs such as mfc80.dll. How do I make sure that the linker generates a manifest that reflects the correct versions numbers of the DLLs? My application appears not to run on the tar...more >>

Cannot compile the following code
Posted by nick at 4/18/2006 11:34:02 AM
Seems the FillRowMethodName caused the problem? C# works. but not C++? using namespace System; using namespace System::Data; using namespace System::Data::Sql; using namespace System::Data::SqlTypes; using namespace Microsoft::SqlServer::Server; public ref class AddNewUDF { public...more >>

Managed C++ dll in a C# app. Can't add the Debug version.
Posted by MB at 4/18/2006 6:50:33 AM
I had a C++ dll that I used for C++ applications. I added a managed C++ class to this library and started to use the managed C++ class in my C# application. This works OK only if I build the C++ dll in release mode. If I try to build the C++ dll in Debug mode, I am unable to add the dll as a ...more >>

cannot successfully build MS Express sample programs
Posted by brad at 4/18/2006 5:25:18 AM
Hi, I'm new to this group, and recently downloaded the MS Express package for C/C++. I tried to install and run some of the sample programs, and get a peculiar error. ------ Skipped Build: Project: Calc ------ ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped ========== ...more >>

MVP
Posted by news.chi.sbcglobal.net at 4/18/2006 3:46:38 AM
How does one become an MVP? ...more >>

CLI string question
Posted by news.chi.sbcglobal.net at 4/18/2006 3:38:07 AM
I have a question about string literals with C++/CLI. Is there a difference between the following two lines? String ^s1 = gcnew String("Hello"); String ^s2 = gcnew String(L"Hello"); I have been playing around with the compiler options for "Character Set" and "Common Language Runtime Su...more >>

ref classes and value classes
Posted by news.chi.sbcglobal.net at 4/18/2006 3:07:10 AM
Hi. I am a little confused about the difference between a "value class" and a "ref class". I have the following code sample that shows the definition of a value class and of a ref class and each is instantiated twice - one on the stack and one on the managed heap. I see no difference bet...more >>

typedef struct { ... } S1
Posted by Wei at 4/18/2006 2:32:02 AM
Hi there! I have a very wired problem when I develop a C/C++ based application using Visual Studio 2005. #include <stdio.h> typedef struct _S1 { int data; int text; } S1; int main() { printf("Hello, Vorbis!\n"); S1 oy; } Code above doen't compile. On line 12 it sta...more >>

Need Help Regarding System.Security.Permissions.FileIOPermission
Posted by Usman Ghani at 4/17/2006 7:04:10 PM
Hi, I am trying to develop an activex control with the .Net by exposing an interface to the com as described in the following article. http://www.c-sharpcorner.com/UploadFile/dsandor/ActiveXInNet11102005040748AM/ActiveXInNet.aspx?ArticleID=99d9681d-84de-4d64-9c85-9ae9c15a4ee7. This works fine f...more >>

I am new to OOP
Posted by Allen Maki at 4/16/2006 8:21:05 PM
/* I am new to OOP. I have problem in including an array in a class. I would like to know why the following codes can be built but can not be compiled. Thanks. */ #include <iostream> using namespace std; class Array { public: int *item; int capacity; }; int mai...more >>

templates exported from a DLL and /CLR
Posted by Vyacheslav Lanovets at 4/16/2006 12:00:00 AM
Hi All! In native mode I can export class template from a DLL this way: template <typename T> class TSuperType { public: T doSomething(); }; .... template class __declspec (dllexport) TSuperType<int>; And I can import it this way in another module: template class __declspec (dllimp...more >>


DevelopmentNow Blog