Answer Questions
Robert Hulme How do I mix buffer length macros?
I have got a function void foo( char p_b[], ptrdiff_t p_l = -01); I would like to express a prerequisite that: IF p_l == -01 THEN __in_z p_b ends with '\0' IF p_l > -01 THEN __in_ecount(p_l) p_b except that it may end with ' \0' earlier p_l >= -01 How can I declare it with static analysis macros Chris I am sorry to hear that. And how do I express the following assumptions: signed do6compa ...Show All
Albin how to fix a spawning 'resgen.exe' error?
Ok, I worked in a project coded in Managed C++ with Windows Forms. Then I paused it and I started coding on a simple Win32 (no .NET) screensaver in DirectX (so I installed the DirectX SDK). Then yesterday I restart to work on the first Managed C++ Project and when I've tried to compile it, I had a bad: MyManagedCppWinFormProject Error spawning 'resgen.exe' Also, all new template Windows Forms projects have the same error. What should I do Tnx. ...Show All
Nima Dilmaghani Visual C++ 2003 Standard -> how to upgrade
Hey, I'm really eger to buy Visual 2005. I'm using Standard version now and I want to ask which version should I buy to have the same features I'm afraid that there will be no Visual C++ 2005 Stardard for 150$. Do I have to choose between Visual C++ Express and Visual Studio Standard(including all the languages...) Yes: if you are upgrading from Visual C++ Standard then the choices are either Visual C++ Express Edition, which unlike the ...Show All
rkin005 inline function
I have a set of functions that I'd like to make inline using VC++ 2003. The functions are compiled sparately from the calling function. I've attempted by placing inline before the function name and in the prototype statement but the function is not found. Do I need to use IMPORT, extern or something like that I can't seem to find an example anywhere to emulate. Thanks, RON C FUNCTION: inline int index_4 ( int jstr, int ks ...Show All
will rpberts Changing opening brace position in C++ 2005
Hi, I create a new windows forms project, draw a button and double click it to edit the code for when it is clicked. I find that the code looks like this: private : System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { } I do not like this layout and would like the opening brace to appear on a new line. I can see all the options to make it happen in the C# editor but not in the C++ editor. I ...Show All
CrispinH A couple of questiones
Dear all, I am new to Visual C++ 2005 and I am Intended to write a network application and I am confused on how to start. I am looking for your apprecited help and directions that may lead me to the right way to achieve the goal. 1- What is the difference between CLR Consol Application and Win32 Consol Application 2- Is there a possibility to write a portable network application that depends on socket programming in Visual C++ 2005 that ...Show All
David Davis invoking cl.exe using CreateProcess
I have a program which uses the cpp to parse input files. It invokes cl.exe using CreateProcess. However, I get the errormsg about mspdb80.dll. I have run vvcvarsall.bat, and from the command line it works normally. I can sove the problem by copying all the necessary files of the C compiler into a different folder and adding that to the path. Is there perhaps a more elegant solution Thanks! By setting the ' ...Show All
Allen Jones Displaying Output problem
Hello all, I am trying to develop an MFC application from an existing c++ console program. The c++ source is very complicated and is as follows; [code] // Genetic programming code to solve the Santa Fe artificial ant problem // Copyright David Jackson 2005 #pragma hdrstop #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <memory.h> #include &l ...Show All
nikhil_dharap STL with VC71
Question regarding STL on VC7.1 (MSVisual C++ .NET 69586-335-0000007-18460) My challenge is a linker error when I attempt to use STL strings. I can define the string (e.g. std::string exStr;) without error, but can't assign it (e.g. exStr = "test string";). I've tried linking in libraries as suggested in other forum threads, including libcp.lib, libcpmt.lib, or msvcprt.lib, but to no avail. Here's the specific error: V ...Show All
Jesper P Running a very simple Win32 app on a comp without VC++ 2005 Express
Hi! I have installed VC++ 2005 Express and the Platform SDK according to the instructions on MSDN: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx Compiling and running the following program on the dev computer works like a charm: http://www.winprog.org/tutorial/simple_window.html I then changed to release-mode, turned off debugging in the project properties and copied the .exe to another computer without VC++ 2005 Exp ...Show All
Frankie Ai C++ MFC Project will not generate files. Vis. Studio 2005, Std. Edition
Hello... I loaded Visual Studio 2005, Standard Edition. I'm running Windows XP, SP2. I can build C# projects successfully but can NOT build C++ projects successfully. One symptom is an empty MFC project. I get folders but no generated files or classes. Any ideas as to what the problem might be I'm trying a reload sometime soon. Thanks. CFMtch Hi, I'm having the exact same problem with Vis ...Show All
Mark Traudt Interop with Struct
If I have following class in C++. How should I declare the unmanaged code in C# typedef void * MQISDPCH; /* Connection Handle */ /* Information required for MQIsdp server connection */ typedef struct struct_SVRS { long portNumber; char ipAddress[MQISDP_INET_ADDR_LENGTH]; } MQISDP_SVR; /* Connect parameters - fixed length portion*/ typedef struct struct_CP { long version; long strucLength; /* Fixed length plus variable ...Show All
microsoft_programmer Length cannot be less than zero. Parameter name: length
I am getting this error "Length cannot be less than Zero". After this error occured the application stops working and this same error messages gets displayed in all the pages. If i replace the dll files again then the application starts working again. I am pasting the complete error message below ------------------------- Length cannot be less than zero. Parameter name: length Description: An unhandled exception occurred during the execut ...Show All
Jdawson intellisense include path
What is the format for the intellisense include path I'm using vc++ express 2005 beta 2 and want to include boost, platform sdk, directx9 and my own source headers. I tried "C:\Path1";"C:\Path2";... and several other variations and none seemed to index properly (at best, only one of the header paths specified would be indexed by intellisense). Also, is there a way to use environment variables in this path I tried %FOO% and $(FOO) and neither wo ...Show All
Billy2005 Greyed out class member functions in wizard bar / Class View goes to .h
In VS2005 I'm finding that some (C++) class member functions are greyed out in the wizard bar (the horizontal toolbar at the top of the editor window with 2 dropdown lists, classes and class member functions). Also, if I double click on these ones in the Class View (tree control) I go to the declaration in the .h file rather than the definition in the .cpp file. Why is this I can't see anything too odd in my code layout and in VS2003 this wa ...Show All
