Answer Questions
Tex Riddell Prefast and LoadString weirdness
Hello everyone, I am trying to compile my old C++ code with Whidbey Beta 2 and prefast turned on (/analysis for static code analysis, turn on "Enable code analysis for C/C++" in Advanced settings of C/C++ configuration properties). I get weird warnings with my use of the LoadString API that I cannot explain. I've boiled it down to two small functions foo() and bar() that should behave identical but the first one gives a prefast warning(C6386: b ...Show All
Mr.D.J.Webber strcpy_s / strcat_s / sprintf_s
I have found out the hard way that these functions pad the output buffer to its maximum extent with character 0xfd That's great, but could the documentation say something to make it clear this happens "anonymous@discussions.microsoft.com" <OneRing@discussions.microsoft.com> wrote in message news:7bb8da2f-2dd3-4f1a-97b0-3ea507fa09ba_WBRev1_@discussions.microsoft.com >> No. If you call memcpy, whether ...Show All
Hossam El-Deen Adding a property gives error LNK2022
Hi! In a pure C++/CLI application developed with VS 2005 Proff final, I get sometimes the next error: I add a property like property bool StatusbarVisible{ bool get(void){return layoutConfig->statusbarVisible;}void set(bool value){layoutConfig->statusbarVisible=value;} } Then the linker gives several times the next error Error 1 error LNK2022: metadata operation failed (80131187) : Inconsistent method declarations in duplicate ...Show All
CPRKris FOR Full Text Searching
hi, need to implement FULL TEXT SEARCHING (like windows application) plzz suggest me to implement this FTS.. how to use indexing,storing and querying Hi, I believe you can get better answers for such questions if posting on algorithms forums. Also, there are general books regarding sorting and searching in general, I did a quick look and found the following that could be useful: http://www.amazon.com/ex ...Show All
Doug (MSA) cli arrays(newer)
Hi, I am having a problem with cli::array's, here is an example of what I have. ref class A { private: Int32^ i; String^ s; public: A(String^ s2, Int32^ i2) { s=s2; i=i2; } }; ref class B { private: cli::array<A^ >^ a; public: ...Show All
loukia Lib Size difference
Hi, I have created a "Static Lib" using Visual Studio .NET 2003, as "Use of in a shared DLL" . Each and every time when i try to build this lib. i got different sizes. Plz find the following configuration settings that i have used during Lib creation: Configuration : DEBUG Runtime Library : Multi Threaded Debug DLL Precompiled Header: Use Precompiled Header Building the Lib in Machine A: 4,986,628 bytes Building the Lib in Ma ...Show All
jimadams how to stop an application like a messagebox does
hi there! i hope this is the right place for this post. i have the following problem: i am writing an adobe acrobat plugin in c++ with the visual studio.net 2003. i have another application with which i send data per mailslot to my plugin. the plugin displays a messagebox which is to be clicked when data is sent from the other application. if i try to implement the plugin without the messagebox the acrobat hangs because the plugin looks perm ...Show All
Perm preprocessor definition _VC80_UPGRADE=0x0710
Hi, I noticed that this definition is applied to projects upgraded from VC7.1, but there seems not to be any reference to it on MSDN2. So can anyone tell me what exactly it does I.e. does it also alter any compiler defaults I also searched the source files in the VC install dir, and the only reference there is in VC\atlmfc\include\afxres.h. So Im interested it it has any effect other than in that source file. Thanks. ...Show All
Lee Dumond DWORD_PTR
I checked and tried what you both said. The declaration of windows.h was ok. I tried to compile the simple app with only a declaration of a DWORD_PTR #include <windows.h> int main( int argc, char **argv) { DWORD_PTR i; return(0); } Here's the errors (i disabled the precompiled option (/p) for this list) Thanks again Output Window Compiling... StdAfx.cpp Note: including fi ...Show All
shi11 problem using CString::Format
Hi, I wrote the following code in my project: CString s; s.Format("%2d", num1); but it generates the following error message when compiling: d:\my documents\visual studio 2005\projects\pt24\pt24\expression.cpp(74) : error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [4]' to 'const wchar_t *' with [ BaseType=wchar_t ...Show All
PTS Problem including <windows.h>
Hi there. I've got two systems - a desktop and a laptop, both running VC2003. I start a new Windows Form project on the laptop ,add a button and include a call to System::Windows::Forms::MessageBox::Show( S"hello" ); and then place #include <windows.h> at the top of the page, I get these errors: i:\temp\test34\Form1.h(86): error C2039: 'MessageBoxA' : is not a member of 'System::Windows::Forms' i:\temp\test34\Fo ...Show All
mickey arnold Feb 2005 CTP: Are precompiled headers broken?
Use /Yc on one file (usually ill-named stdafx.cpp) to create the precompiled header file, then use /Yu on all other files to use the PCH file. If you haven't used a consistent 'stdafx.h' but were relying on /YX to automatically (re)build the PCH file as necessary, you'll have some pain to work through, and you'll also enjoy quite substantially improved compile times once you've done it. Hi, I have a similar pro ...Show All
Makarand_Keer Mixing C & C++: Linker / name-mangling problem
Hello, I am forced to mix C and C++ and ran into trouble compiling and linking the sources under Visual C++ 2005 Express Edition. I have provided a trivial example to illustrate the problem: The header file defines a struct type named MYSTRUCT, cpp-file.cpp declares a global variable of this type and c-file.c declares the same global externally and manipulates it in a function. The linker complains about an unresolved symbol ...Show All
Terry Heath Books about VC++ 2005
Does anyone know if there are any books for someone to learn about VC++ 2005, specifically with the new syntax I have the 2003 book, but I can't compile anyone of the programs in it because the language has gone through extensive changes. The MSDN library doesn't give really good tutorials with the new syntax. Thanks for the help. Here is another book on VC++ 2005 http://www.wrox.com/WileyCDA/WroxTi ...Show All
Albert Huang How can I get the CheckedListBox for a Com project?
Hi, I'm developing a in process COM server to add prooperty pages to Active Directory. i'm using V.S. 2005's C++ with only the standard library. When I create the GUI resource file for the property page, there is only standard listbox availble in the Toolbox. I know that checkedListBox is availble if I were developing a window application using VC++ from the toolbox. Does anyone know how I can get that added to my toolbox for this project ...Show All
