Answer Questions
jdang Application Verifier and MFC app
I've just tested my application with the Microsoft Application Verifier 3.2 to see if it finds anything BoundsChecker doesn't find and to run the Standard User Analyzer. Actually the Application Verifier always throws an error when I quit my application. I've then created a new MDI application with VC6 and tested that one, and I got the same error. Then started VS2005 and created a new MDI project, and again, same error when I quit the application. The error occurs somewhere in ExitProcess of the CRT. Is this a problem of the Application Verifier or the CRT ======================================= VERIFIER STOP 00000301 : pid 0x3F0: Invalid TLS index used for current stack trace. FFFFFFFF : Invalid TLS index. 00 ...Show All
z-one operator overloading
ok, so im trying to cout a string, but i havent suceeded, this is what im trying to do: #include "stdafx.h" #include <string.h> #include <string> #include<iostream> #include<iostream.h> using std::string; class Person { public: string m_name; int age; }; class Student : public Person { public: int m_grade; }; class Worker :public Person { public: int m_wage; }; int main() { Worker MyWorker; cout << MyWorker.m_name << "\n."; //error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no acceptable conversion) ...Show All
Ray Dyce DLL Conflict
Hi there! I wrote an XLL(a user-defined function for Excel, using C++) that evaluates algebraic expressions using binary trees, stacks and so on. The good thing is, it works perfectly. But then I need to make it work using a cluster, that is, parts of the expression must be sent to the cluster’s master computer and it will send these parts to be calculated by some slave computers. Ok. However the thing is, I can’t even connect to the cluster. I’m using Microsoft Compute Cluster Pack. When I put together the code for my XLL, that was partially created by an application named XLLPlus, and the cluster-specific code, that uses COM, a DLL conflict happens. There is a double definition of a DLL’s entry-point, DLLMain. One of the DLLs is from XLL ...Show All
Frederic Buchet native C++ to CLI
I am having some code written in C++, I want the code to be managed though, or the interface managed at least. The author has no experience with CLI (I have no experience with either!) and I want to persuade him to go this route. It seems to me that if the /clr switch is set and because of “It just works”, then he can pretty much retain native style programming techniques. I am right about this If not is it that much of a learning curve to adopt CLI Thanks for you help in this matter Julian As long as you code your computational stuff in C++, you are getting the perf you need. What you want to minimize is the managed to unmanaged transistion. This means a ...Show All
Rey De Jesus error compiling C2061: identifier _CountofType
I have a complex application that we are porting to Visual Studio 8 and have run into this error with no solution so far. Note that the error producing code resides in the file: "D:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdlib.h This simple unit test demonstrates the problem as succinctly as possible I think // foo.cpp : Defines the entry point for the console application. // #include "stdafx.h" template < _CountofType, size_t _SizeOfArray> char (*__countof_helper( _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; int _tmain( int argc, _TCHAR* argv[]) { printf( "hello world\n" ); return 0; } 1>------ Buil ...Show All
markse linking problems (invalid or corrupt file)
Hello experts! I was testing compilation programs with dlls. So I have created simple dll with header: int sum(int size) { return size*2; } And I have compiled it. I have also created simple console application using this library. In project options I have added headers path and libs path, but I have linking errors: Linking... C:\Documents and Settings\Jacek\Moje dokumenty\Visual Studio 2005\Projects\mylib\release\mylib.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x278 Please help, I don't understand this error and I don't know what to do. Greetings Are you using Visual C++ 2003 or 2005. If 2005, try right clicking the mylib project in the solution explorer and selecting &quo ...Show All
cwinfough How to rebuild the C++ STL library for Visual Studio 2005?
I have made some changes to (to solve C2248 basic_ios problem) the VC8 STL library. How do I rebuild the C++ STL for Visual Studio 2005 Hi Einaros, I am currently in Cape Town South Africa . I will contact Microsoft tomorrow, but my guess is that it will take a while to get it (things are a little slower in Africa …). Would it be possible for you to email ( devilspeak2004@yahoo.com ) the patch to me I would greatly appreciate it. Just so I've got this clear. I followed the link and have to pay a couple of hundred bugs to get the patch for this Which of the following applies here : a) MS is ripping us off. b) I can't read the links properly. ...Show All
explode Won't jump to ErrorList when building
Hi, When building my C++ projects in VS2005 and having errors and warnings, the IDE will not jump to the ErrorList window when done, it stays on the output window. The ErrorList is docked together with the Ouput window (and some other windows). I've seen this work on other computers. Any ideas why it's not working on mine /Mikael That's it. Thanks. I've noticed that my settings differ from others in several ways. Don't know why though. But I was able to fix it by replacing my "CurrentSettings.vssettings" with one from another machine. /Mikael You can configure VS2005 to do this from the application options. 1) Open Tools-->Options from th ...Show All
KLankford Program closing right after opening
Hi all, I have tried to compile a program from the book C++: A Beginner's Guide by Herbert Schidt. The problem I encounter is when I try to run the program from the folder, that is the .exe file I believe located in: C:\Documents and Settings\Peter\My Documents\Visual Studio 2005\Projects\sample1\debug This simply closes after opening. Am I running it from the correct location I can't find an executable file anywhere else in the sample 1 folder. I believe it's a CLR project. I'm just wondering what I'm doing wrong. Thanks Just out of curiosity...I had the same problem and after the build, it tells me I have a warning. It says that "getch ();" is depecrated. (Adding those two lines of c ...Show All
rhinoishere error LNK2001
Hi, (I saw the post on same subject but it seems to be a little different. so I'll use some word from that post!) There is a project earlier written in VC++ 6.0. I opened the same project in VS. NET 2005 and I am trying to compile. The code compiles properly (with couple of warnings) but while linking I am getting unresolved external symbol errors like this: The linker seems to have problem with seeing .obj from files in program (which are in the debug directory). It doesn't seem that the /Zl switch or the /NODEFAULTLIB are on. 1>Linking... 1>Utm.obj : error LNK2001: unresolved external symbol _RTC_Shutdown 1>Zone.obj : error LNK2001: unresolved external symbol _RTC_Shutdown 1>Zones.obj ...Show All
Doan Duc Long C++ Windows Forms Project Header Files
Hi, Somewhat of a very basic question here. I am using C++/CLI. Why with a windows form project is all the code in the .h file Thanks Jeff Hi, thanks for the response. I have never really seen any explanation on MSDN or documentation that I have so I was not sure. Seems a bit strange though. Usually you just see class interfaces in the .h file and implementation in the .cpp file. Thanks Jeff To make it easy on the form designer. It only has to parse one file instead of two. ...Show All
TboneToo Fullscreen mode is not fullscreen, VC++2005
I've been using VC++2005 for about 4 months and am fairly happy with it on the whole, but it does annoy me that fullscreen mode is not fullscreen. I find it makes coding easier if I can see more code on the screen at the same time, because it puts what your doing into context. In VC6 fullscreen meant fullscreen, yet in VS2005 it doesn't. The menu bar, those dropdown function selecting boxes, the status bar, and those tabs remain on the screen - all stuff which can be accessed through keyboard. Anyway just a comment of mine, probably noone will agree lol. There are a few things you can do to maximize your real-estate though the options are not imediatly apparent. You can turn off the status bar ...Show All
tass_flint StgopenstorageEx
hr1 = ::StgOpenStorageEx(s.AllocSysString() , STGM_READ | STGM_SHARE_EXCLUSIVE , STGFMT_STORAGE, 0,0,0, IID_IPropertySetStorage , ( void **) &pPropSetStg); it gives result correct as S_OK but again i am trying to open that storage it gives share violation as useal but i want to open that storage again in read only mode .. can anyone help me how to write following code (Eg .correction in flags etc so that i will get S_OK) hr1 = ::StgOpenStorageEx(s.AllocSysString() , STGM_READ | STGM_SHARE_EXCLUSIVE |STGM_TRANSACTED , STGFMT_STORAGE, 0,0,0, IID_IPropertySetStorage , ( void **) &pPropSetStg); Thanks Viorel ,its working perfectly .also ST ...Show All
yonelay 16_bit windows program
hi when I tried to install some new softwares. The computer displayed a message "Can't run 16_bit windows program" "One of the library files needed to run D:\setup.exe is damaged.Please reinstall this application" These programs have been checked and run well when I bought them. Anybody could help me to solve this problem For general windows troubleshooting questions please use the newsgroups at http://msdn.microsoft.com/newsgroups/ Thanks and regards Sahir ...Show All
MerleN CScrollbar Question
I'm trying to find out where the scroll box is while it's being dragged. When I do a TRACE() using GetScrollPos() it returns the starting position. How do I get ahold of the position while I'm scrolling Ok well I got some scrolling positions coming out in my trace. I'm wondering why the nPos isn't updating with the correct position. It's scrolling between the max and min in negative and positive integers as so: Position = 0 Position = 3593 Position = 4790 Position = 9580 Position = 14371 Position = 19161 Position = 26346 Position = 32334 Position = -27214 Position = -21226 Position = -17634 Position = -11646 Position = -5658 Position = 330 Position ...Show All
