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 > february 2004 > threads for february 15 - 21, 2004

Filter by week: 1 2 3 4

Linker problem
Posted by Stephen at 2/21/2004 4:31:05 PM
Hello I am using C++ 5.0 learning edition, to compile an DirectX8.0 SDK program sample included with the SDK download I keep getting a linker error --------------------Configuration: Donuts3D - Win32 Debug------------------- Linking.. C:\Program Files\DevStudio\VC\LIB\d3dxof.lib : fatal erro...more >>


[ANN] Firebird .NET Data Provider 1.5 released
Posted by Carlos_Guzmán_Álvarez at 2/21/2004 1:34:38 PM
Hello: Firebird .NET Data Provider 1.5 available for download. Thanks very much to all the people that has been helping during the development stage. --------------------------------------------------- You can read the Changelog at: https://sourceforge.net/project/shownot...more >>

volatile in multithreaded apps
Posted by Graeme Prentice at 2/21/2004 1:12:06 PM
Visual studio help has the following code to illustrate the use of ReadWriteBarrier. What does the volatile keyword do in Visual C++? Does it ensure the code will work correctly when executed on a machine with multiple CPUs i.e. that a read of a volatile variable always sees the most up ...more >>

Invoke DOS appliaction from C++ application
Posted by Joyce at 2/21/2004 8:51:06 AM
Hi Anybody has an idea of how to invoke a command line DOS(PERL) application from a C++ windows application given also the batch file. I'm not too sure on this. Your help will be greatly appreciated Joyce...more >>

Attach metadata to a dll or exe
Posted by Adam Benson at 2/20/2004 6:04:08 PM
Hi, We're looking to apply a system-wide version number across many dlls. We'd really like to do the build and then apply an attribute containing the version number. Is there any way of doing that ? We don't really care how it's done as long as it's something that stays with the file, and can ...more >>

Dll issue
Posted by kathy at 2/20/2004 12:41:08 PM
I use the C++ to write a dll and call the dll using VB6 VC++ Code BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserve return TRUE int WINAPI MyDLLAdd(int d1, int d2 return (d1+d2) int WINAPI...more >>

DDE help please
Posted by Dale Magnuson at 2/20/2004 12:16:09 PM
If anyone can help me it would be greatly appreciated I am struggling with connection to a DDE server - I have a global variable defined as my conversation handle (newDDE) and the instance defined also as a global variable (dwDDEInst). I get a successful connection, which sits until I want to sen...more >>

How to debug on win98 or ME?
Posted by Kay Levein at 2/20/2004 3:18:33 AM
Hi All, I developed my program on win2000 using VC++7.0, it also works well on WinXp, but unfortunately it crashs on 98 or ME, since VS. Net can't run on Win98, I can't debug it. The program is very complicated and would be very difficult just by TRACE. Can anyone suggest a better way for debugg...more >>



Packing for __nogc classes
Posted by Edward Diener at 2/20/2004 12:34:15 AM
Is the packing alignment of __nogc classes stored as part of the assembly ? I think it must as the compiler, when referencing the assembly, could not know how the original data is packed otherwise. Yet, in my understanding, attributes are only __gc and __value class specific and do not apply to ...more >>

How to set Startup Form in VC++
Posted by sach at 2/19/2004 5:40:27 PM
Hi, I am new to VC++. ... so..please help How to set a Form as statup Form in VC++ Windows form application? Thanks ...more >>

MC++ and native jagged Array
Posted by Jannis Linxweiler at 2/19/2004 4:36:33 PM
Hi guys! I'm fairly new to managed C++, so I hope someone can help me. I've got a Problem with the native C++ types. What I did is using an jagged array of double in my managed app. The code looks like this: double** arr = new double*[1000]; for(int i=0; i<1000; i++) arr[i] = new d...more >>

Hye, how to make a pure process without any GUI, but having MFC support...
Posted by Jigar Mehta at 2/19/2004 3:24:46 PM
Hye, I want to develop one core process which has a lot thing to do but fortunately does not have any GUI. In short, it is a core process which does its processing without any GUI and does the work according to system parameter values... (those are internal things.. I have managed them) but ...more >>

Managed C++ - Question
Posted by Rainer Sinsch at 2/19/2004 2:59:47 PM
Hi everyone, I'm relatively new to managed c++ (though experienced in unmanaged c++), but I just can't figure out how to do the following c-sharp lines in managed c++ (studio 2003). Can anyone enlighten me, please? Following is a simple C-Sharp-Source for reading out wireless lan signal-str...more >>

Mixed Mode DLL Issue (Need Help now!!)
Posted by Paul Brun at 2/19/2004 11:28:14 AM
Hello everyone, I have tried all the solutions trying to figure out how to remedy my = mixed mode DLL solution, however, I still can't get the project to compile. I have tried all the = solutions managed in the=20 Microsoft Knowledgebase article, but I get the following issues: libcmt.lib(...more >>

MSComm obj.
Posted by AA at 2/19/2004 10:49:09 AM
Hi I am developing an app in which I have used a MSComm object. I have opened the port, performed the transactions, and then closed the port. But when I check in the task mamager, the memory being held by the MSComm is not being released. I am using the SetPortOpen method. Is there any way of ...more >>

__property
Posted by <.> at 2/19/2004 10:36:48 AM
With the below example (taken from MSDN).. This also makes visible the set_Size and get_Size methods, and generates the Size property as we normally see it. Why didnt the get_ and set_ methods be private like the rest so just the Size property thats generated is visible? Doesnt make sense...more >>

Strings
Posted by Reza A at 2/19/2004 8:58:49 AM
Can anyone explain why when Visual Studio creates code that has to use strings it puts a S before every string? Example System::Console::WriteLine(S"Hello World"); ...more >>

compiler error
Posted by Reza A at 2/19/2004 6:18:52 AM
Hi all, I'm currently reading Microsoft Visual C++ .Net and I'm trying to compile a Dialog box form that I've just created however I'm getting the following errors. Output Window Compiling... MyDialog.cpp c:\Code\CppForm\MyDialog.h(168) : error C2440: '=' : cannot conver...more >>

Running win32 applications from c++ source.
Posted by Alan Dunne at 2/19/2004 3:56:07 AM
Two questions. The first and one more likely to be answered is Can you call/run a Windows executable file from within C++ source code? The executable itself runs in a DOS window and asks for user input, i.e. choose 1 to use an audio stream, 2 to read from a file, and 0 to exit. If 2 is selected a ...more >>

Is it possible to download visual c++ for free?
Posted by SBCore at 2/19/2004 1:01:05 AM
I am a college student trying to teach myself c++, and the book that I am using ("SAMS Teach Yourself C++ in 21 Days") incidently uses Microsoft Visual c++ as the compiler for its examples. So I need visual c++ to follow with the book. Since I can't afford the commercial version, does anyone know ...more >>

DLL With Static Library Initialization Conflict
Posted by Robert A Riedel at 2/18/2004 10:27:30 PM
I have an application that requires a DLL and an executable that uses the DLL, both of which were implemented in Visual C++ using unmanged code. Both the executable and the DLL are linked with functions that are stored in a static library. During initialization of the executable, classes and stat...more >>

C++/CLI and bitfield marshalling
Posted by <.> at 2/18/2004 3:46:56 PM
Hi, How do we marshall a type like this from a C++/CLI class wrapper to an unmanaged method? typedef struct { UINT32 blah : 1; UINT32 blah2 : 1; UINT32 blah3: 1; UINT32 someValue : 12; }SOMESTRUCT; Thanks. ...more >>

Command Line
Posted by Matt at 2/18/2004 2:36:05 PM
I am trying to write programs in C in a text editor and run them on a command line but I am having trouble. In Visual C++ 6.0 you can select text file then compile and then run the program and it will atuomatically run in command line, but in .net this is not available. Is there any way that you c...more >>

Managed C++ Newbie Help
Posted by Greif at 2/18/2004 2:31:06 PM
I want to rewrite the follwoing VB6 code in manged C++. Any suggestions on how to start would be greatly appreciated. Thanks. The code: On Error GoTo ErrorHandler Dim strArgs() As String strArgs = Split(Command$, " ") If (UBound(strArgs) <> 3) Then Err.Raise 9999, "Progra...more >>

Is C++/CLI available in some form now? Whence Whidbey Beta 1?
Posted by Bern McCarty at 2/18/2004 1:08:05 PM
The recent questions about C++/CLI in this group made me wonder if some folks had their hands on it.... Is it available someplace? How is the calendar shaping up for Whidbey Beta 1? ...more >>

Emacs/Vim style buffer/window switching
Posted by sashan at 2/18/2004 11:47:54 AM
Hi Is there a way to enable Emacs/Vim style buffer switching in the VC++ editor? For those that don't know this is where you hit a shortcut key in Emacs/Vim and then type the partial name of the file/buffer/window and it provides a list of matches to the partial name. It's kinda like hitti...more >>

C++/CLI and parameters
Posted by <.> at 2/18/2004 11:20:20 AM
Does C++/CLI support default values or is it like C# where we have to use overloading only? I have some unmanaged methods with default values (I may not need them thoough) I need to implement in my managed proxy class. ...more >>

cannot step into MFC code
Posted by Janiv Ratson at 2/18/2004 11:10:29 AM
Hi, Some how I cannot step into MFC code, it used to worked till last week. What is the reason? What is the solution ? 10x, J. ...more >>

Data marshalling in C++/CLI <-> C++
Posted by <.> at 2/18/2004 9:54:44 AM
Hi, Is there any good links for datatype interop? I need to pass some structure pointers into an unmanaged method and return char* etc but having some problems in my C++/CLI proxy class. I have a methods with signitures like the following... unsigned char someMethod(unsigned ch...more >>

Breakpoint checkboxe
Posted by John Smith at 2/18/2004 6:21:12 AM
Hi all, although I'm not new to news group, it's my first post in here. Had to go through the web interface since I couldn't find an direct access to the Microsoft NNTP server and my provider (sympatico.ca) doesn't publish this particular newsgroup :-( and not sure if I have the right forum. My q...more >>

destructors not permitted for __value types.
Posted by PaulW at 2/18/2004 2:56:07 AM
Personally, I like to use simple abstractions to wrap resources For example consider a class that wraps a resource - say an IntPtr which is allocated in the constructor and deallocated in the destructor. In the managed world I find that I can not use this because destructors (and copy constructor...more >>

funny problem about funtion-try-block in vc7.1
Posted by booker at 2/17/2004 10:47:08 PM
Following code can't pass compilation class CLS :public exception { public: CLS():exception("111") { } }; void Fun() try { throw CLS(); } catch(...) { } //; //adding this semicolon can pass compilation. void Fun1() { } if the class CLS does not derive from std::exc...more >>

How to put 48 X 48 - 32 bit icons in the interface...
Posted by Jigar Mehta at 2/17/2004 6:50:29 PM
Hye, I am Jigar Mehta, I want to ask how can we put our own 48 X 48 - 32 bit icons in the interface like near password field, I want to put Password Icon. The icons are created with Alpha support (that of Windows XP icons)... So, which control to be used for putting these icons on the form.....more >>

Problem wit std::string::substr
Posted by Jarek Bednarz at 2/17/2004 5:21:56 PM
Hi all, Following code causes strAddress to contain garbage data. When I decrease number of characters that appear before '\\' then everything is ok. 12 chars before '\\' seems to be a magic number. I have compiled it with VisualStudio 2003. Any ideas? std::string strAddress = "123456789012...more >>

XML Commenting
Posted by <.> at 2/17/2004 3:48:36 PM
Does C++/CLI have XML style commenting like C#?? If i do /// I dont get the completion like C# ...more >>

Creating a .NET wrapper around C library
Posted by Paul Brun at 2/17/2004 3:45:37 PM
Hi guys, I would like to find out if : 1) Is the above possible? I have tried to wrap a C library that our company produces in a .Net class library and am receiving the following error: LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in ...more >>

Namespaces
Posted by <.> at 2/17/2004 2:59:35 PM
Hi Can we not use the following.´?? namespace Vendor::Product It wont compile with that Must I always do the following? namespace Vendor { namespace Product { } } ???!!!?? ...more >>

Maybe dumb question... but really appreciate for help.
Posted by Ryan at 2/17/2004 10:11:13 AM
I'm currently using the following statements inside "Do.. While" loop cout << "Please enter the file name: "; cin.getline(FileName, 19, '\n') On the first execution, everything works ok, but when the 'while' condition is met and it goes back to the beginning of t...more >>

Interesting std::replace_if problem
Posted by Andrew Maclean at 2/17/2004 9:27:30 AM
I guess this problem can be distilled down to: How do I search through a string, find the first matching substring, replace it, and continue through the string doing this. Can replace_if() be used to do this? Here is a concrete example: If I have a string with sequences of CRLF and possibly ju...more >>

post vs. pre incrementation
Posted by Michael B. at 2/17/2004 9:09:09 AM
Hi! I have a very simple question: Is it still true that pre variable incrementation (like ++i) is faster than post incrementation (i++). I heard that in modern compilers it makes no difference as the both versions are optimised to one type of code. I've also never encountered any performance ...more >>

my windows.h has GONE
Posted by Bonj at 2/16/2004 11:54:15 PM
my windows.h file (and probably lots of other headers) has suddenly DISAPPEARED. Reinstalling the SDK didn't fix it. what could have happened to it? ...more >>

gc classes and destructors
Posted by Peter Hemmingsen at 2/16/2004 10:52:37 PM
Hi, Below is a smal test program which create two objects deriving from DataTable. When running the 3 lines of code marked as Ex1 the destructor of DataTableEx is never called,- why? When running the 2 lines of code marked as Ex2 the first line fail compilation claiming there is no destr...more >>

Irregular Exception
Posted by Manfred Huber at 2/16/2004 6:31:29 PM
Hello, sometimes the source code below raises following exception: HEAP[Test.exe]: HEAP: Free Heap block cda1788 modified at cda1880 after it was freed Unhandled exception at 0x77f65a58 in Test.exe: User breakpoint. This exception is only raised a few times. Sometimes the code works wit...more >>

VC7 exceptions
Posted by Harish at 2/16/2004 4:31:07 PM
Our company is about to upgrade to VC7 (.NET) from VC6.0 Regarding VC7, I have a question 1. In VC6 there used to be a problem when mixin C++ "catch" and SEH's "__finally". The compiler used to generate a lot of warnings. Has it been corrected If yes, how ...more >>

CollectionBase derived class not saving design time items
Posted by niyad at 2/16/2004 1:21:00 PM
hi On a form ive added my custom component (MyComponent) which has a property (IDs in the expample code) exposing a collection of int16. I see this property in the PropertyGrid and I dont have trouble adding items to the collection at design time (using standard CollectionEditor class). I can A...more >>

AssemblyVersion and FileVersion in Managed C++
Posted by waldyn.benbenek NO[at]SPAM unisys.com at 2/16/2004 1:00:54 PM
In C#, when one specifies an assembly attribute for the Assembly version, this becomes the file version as well. In Managed C++, there appears to be no relation between the assembly attribute and the file version. In fact, unless one specifies a version resource, no version attribute will be g...more >>

Import a "C" function that returns a struct...
Posted by sammyh NO[at]SPAM 3rddim.com at 2/16/2004 12:44:07 PM
I have a .dll with "C" functions that I need to call. One of the functions returns a simple struct(2 doubles) If I try to use DllImport like this: [ DllImport("somedll.dll] SomeStruct1 f1(SomeStruct1 *pS); I get compiler error C3385 "a function that has a DllImport Custom Attribute cann...more >>

hpp and h files
Posted by Abubakar at 2/16/2004 10:51:02 AM
hi, Just wanna know whats the difference between a *.hpp and *.h files. Seems like they are writing code in *.hpp and also using it as header file but in *.h they dont write code, only headers. ...more >>

Very newbie question about returning strings
Posted by George at 2/16/2004 9:57:40 AM
How do I call a function that returns a string in managed C++ This for example is very wrong. private: System::Void button1_Click(System::Object * sender, System::EventArgs * e) { string str; str= GetTextMessage; MessageBox(0,str.data(),"Test",MB_OK); } private: System::String...more >>

Template and Copy constructor
Posted by MurphyII at 2/16/2004 8:51:07 AM
Just a little sample : class A { public: A( ) { } template<typename T> A( const typename T& a) { } }; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int ...more >>

Scope Woes
Posted by Yuri Vanzine at 2/16/2004 7:58:51 AM
I have a class with a private member function: void H6809_CPU::StoreWord(Word Data, Word Address) { Memory[Address] = Data >> 8; // High byte of Data Memory[Address+1] = Data & 0xFF; // Low byte of X cout<<"Inside Store Word:"<<MemoryWord(Address)<<endl; } I call it from another public memb...more >>

getting the filename and the current directory of our program
Posted by Strubel Gregory at 2/16/2004 7:06:08 AM
I want to get the real name of my .exe and the current directory if the user change it, but i haven't find a function that do the job. Please help Thanks...more >>

No .obj files created
Posted by IanT at 2/16/2004 4:06:10 AM
Hi I'm using Visual C++ .ne I'm using the default compiler but it doesnt seem to be generating .obj files in debug mode It creates a debug directory in the correct place but doesnt put any obj files into it I get no compiler errors, then when it comes to linking I get error saying object files c...more >>

Create more columns from datagrid Control 6.0 ???
Posted by vivajuve9999 NO[at]SPAM yahoo-dot-com.no-spam.invalid at 2/16/2004 3:38:04 AM
Hi , I work with C++ for my final test , I use DataGrid Control 6.0 (OLEDB) to store the data , but the default column properties is only 2 , i can create more i use the ADODB to manipulate the database ( a table is more than 2 cols) so i cant view all fields from the table. I try f...more >>

How to avoid Save dialog in Active document
Posted by Andrew at 2/16/2004 2:16:05 AM
Hi all: I have create a both container and server's Active document ,it works well when open a document in IE, but when user close IE, it prompt a dialog : this document has been modified.Do you want to save changes? yes :... I don't want to prompt the dialog, how to disabled it? Best ...more >>

Data sizes, VC++ 6.0 vs VC++.NET
Posted by CaseyB at 2/15/2004 10:01:07 PM
Here is a chunk of data float m_fStrtTime, m_fTRise, m_fT0 float m_fFO20, m_fFO2M, m_fFO2F float m_fFCO20, m_fFCO2M, m_fFCO2F float m_fFHeF, m_fFHeFF; float m_fR2Hel, m_fR2Acet, m_fR2DME, m_fR2CO float m_fIHel, m_fKHel, m_fIAcet, m_fKAcet, m_fIDME, m_fKDME, m_fICO, m_fKCO float...more >>

I wasn't expected that !
Posted by Marchel at 2/15/2004 12:27:14 PM
For a long time I was a gib fan of Borland C++ Builder with VCL framework and never gave a second look in Microsoft products since I've seen MFC. Anyway, recently Borland decided out of the blue to abandon it's C++ Builder and I decided to give a look into the .NET C++ and .NET C# products. After ...more >>

Format Problem
Posted by Manfred Huber at 2/15/2004 2:33:30 AM
Hello, I'm using VC++ 7.0 .NET. It seems that the "%d" and "%f" format parameters are not supported anymore. Following code does not work: StatusLabel->Text = String::Format ("Reading %d bytes (%0.1f Kb/s)", __box(lBytes), __box (dTransferRate)); If I used this code with VC++ 6.0 and MFC ...more >>


DevelopmentNow Blog