Answer Questions
JustPlayingAround System.Timers.Timer not elapsing
I have a two timers in my service that will be reset after some work gets completed. The problem comes in if the service is left running for a few days, the timers will reset but then not elapse. The problem is that without the timers elapsing no work gets accomplished. Any ideas I don't think anyone can make a decent guess with the information you've provided. Perhaps you could show some code, describe more of the code context etc. I don't think that's the problem since I'm only experiencing this in one environment but in all others I'm not. Is there something that will be able to determine what is causing the problem since nothing is written in the event log. v ...Show All
sunrunner Question about const_cast
Here's round two of my silly questions. How come this compiles: ---------------------------------- int main (int argc, char * argv[]) { const int test1 = 5; const int test2 = const_cast<const int &> (test1); return 0; } ---------------------------------- But this does not. ---------------------------------- int main (int argc, char * argv[]) { const int test1 = 5; const int test2 = const_cast<const int> (test1); return 0; } ---------------------------------- Error 1 error C2440: 'const_cast' : cannot convert from 'const int' to 'int' j:\test\main.cpp 4 ---------------------------------- I definitely have the latest version of VC++ Express Edition this time. einaros w ...Show All
Manhattan How to include the System namespace?
Hi, I'm trying to use the String.Contains method which is under the System namespace. without including the System namespace. It complains there's no such method, but if I try to include the System namespace as using namespace System; It complains there's no such namespace. Any suggestions thanks in advance! What kind of project do you have Is it managed Is it unmanaged If so, is it MFC based You can do that in an unmanaged project with STL. std::string has a method called find_first_of() that does just that. Can you explain what are you actually trying to do It seems to me that you only want to take String out of System What kind of project s this The error message I recieve ...Show All
Dipendra error LNK2019 when compiling C++ app
Hi, My problem seems to be with compiling my C++ app into an exe file. I can build the files fine. But, when I use debug to make the .exe file, it comes back with some errors (at end). What's weird is these are all methods being implemented or calling a method, nothing else, which leads me to believe that there is some option that I have to set. This error is something I have never seen before. Here is some source: status = RpcStringBindingCompose( NULL, // UUID to bind to. ( unsigned char *)( "ncacn_ip_tcp" ), // Use TCP/IP protocol. ( unsigned char *)( "192.168.1.100" ), // TCP/IP network, the same machine as server ( unsigned char *)( "9191" ), // TCP/IP port to use. ...Show All
MartinMalek C++/CLI Compile Error
Hi, I have some code that compiles and works fine in C++. I am in the process of attempting to use this same code in a C++/CLI project. Been working through various compile issues. This one is pointing me into the map, do not want to mess around with that code. Anyways, the error I get is, C3699: '&': cannot use this indirection on type xmlDictionary::DictionaryData. My class that I am working with is named xmlDictionary. DictionaryData is a struct, ref struct DictionaryData{ std::string value;// error here also ValueType type; }; The offending line of code is, std::map<std::string, DictionaryData> m_data; I am thinking it is STL related. Any direction would be appreciated. Thanks Jeff ...Show All
emcee atlcom.h errors
Hi. I am trying to compile a project and the compiler returns the following errors: ------ Build started: Project: Server, Configuration: Debug Win32 ------ Compiling... MyServer.cpp C:\Program Files\Microsoft Visual Studio 8\VC\include\atlcom.h(3242) : error C2065: '_Module' : undeclared identifier C:\Program Files\Microsoft Visual Studio 8\VC\include\atlcom.h(3242) : error C2228: left of '.Lock' must have class/struct/union type is ''unknown-type'' C:\Program Files\Microsoft Visual Studio 8\VC\include\atlcom.h(3244) : error C2228: left of '.Unlock' must have class/struct/union type is ''unknown-type'' C:\Program Files\Microsoft Visual Studio 8\VC\include\atlcom.h(3366) : error C2228: left of '.CreateInstance' m ...Show All
Maarten Zaagman Number of threads known only at runtime
I'd like my app to take advantage of multiple cores as they become more numerous in the future. I'd like to determine, at runtime, the number of cores and based on this launch the appropriate number of threads. I may also need to be able to access the threads individually from the UI. Is storing references to threads in a collection container such as Array or Map a good approach Unfortunately Environment::ProcessorCount is not always useful on a hyper-threading enabled machine where each logical processor (or core) that has hyper-threading enabled appears as two processors instead of one. If you are running 2003 on up you could use GetLogicalProcessorInformation to better interrogate the processor and ...Show All
dwloeb77 This application has failed to start because the application configuration is incorrect
Hi, I am just starting programming using Visual C++ 2005 Express Edition. I have had some limited practice in other languages and older versions of C++, so I have some idea whats going on but not much... Anyway I made a short program which perfroms a bubble sort on an array of numbers which the user enters (I know its nothing to write home about but its a start), it works fine on my PC and when I sent it to a freind who also had VC++ 2005 Express Edition it worked fine for him. However I then sent it to a freind without it (in a fairly poor attempt to persuade him to download it) , and my program didn't work on his PC giving the error: "This application has failed to start because the application configuration is incorrect". I was wo ...Show All
Ludo Versweyveld "unresolved external symbol _main"
I am getting this error after I try to compile a visual C++ dll file. It compiles OK but when I try to build it I get the error. If you add to your CPP file a fragment like void main() { } then maybe the linker error will disappear, but I do not think the resulting file will meet expectations. Maybe you should re-start from a basic DLL project, generated by Visual Studio’s Wizard Hello Re: "unresolved external symbol _main" Posted twice: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=988423&SiteID=1 deleting this thread, OTP Thanks Damien THE THREAD SO GOOD... IT HAD TO BE POSTED TWICE ...Show All
Simon FERQUEL More conversion from VC6 to VC 2005 errors
Hello, VC 2005 express is complaining about MessageBox, IsWindow, SendMessage commands did these go away or have been changed Thanks. No, I will proceed. However downloading the PSDK appears to have hung up. I've included <windows.h> There errors are as follows: : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "int __cdecl SCPDLL_SR_Connect(void)" ( SCPDLL_SR_Connect@@YAHXZ) error LNK2019: unresolved external symbol __imp__IsWindow@4 referenced in function "int __cdecl SCPDLL_XCP_Connect(struct HWND__ *,char const *)" ( SCPDLL_XCP_Connect@@YAHPAUHWND__@@PBD@Z) error LNK2019: unr ...Show All
-M- Is MFC in VC++ difficult? how long will it take to learn basics?
dfffd Add this to your list as well: http://www.functionx.com/visualc/ depend on : 1. knowledge of Windows SDK 2. knowledge of c++ 3. knowledge of Windows basics if all 3 are 'yes' it will take you no time , but will drive you mad with limitations. hi, some links are going to usefull for you http://freecomputerbooks.com http://www.sureshkumar.net from this you may get help to learn basics ...Show All
naiveinVB DumpBin can't find mspdb80.dll
When I try to start DumpBin, either from the command prompt, or by clicking the filename in Windows Explorer, I get the message "The application has failed to start because mspdb80.dll was not found..." DumpBin is in C:\Program Files\Microsoft Visual Studio 8\VC\bin, and mspdb80.dll is in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE, and also in C:\Program Files\Common Files\Microsoft Shared\VSA\8.0\VsaEnv. What do I have to do to get DumpBin to operate could you please give me the complete output and the command line you have given When I open a VS command window (View/Other Windows/Command Window) and type "dumpbin.exe" I get "Command dumpbin.exe is ...Show All
DQM CRichEditCtrl Problem
Hi, This is done in VC++ MFC I have created a vector vector<CRichEditCtrl*>RichEditBox; CRichEditCtrl *r1 = new CRichEditCtrl; r1->Create(WS_CHILD|WS_VISIBLE|ES_AUTOVSCROLL, CRect(x1,y1,x2,y2), p, 1); r1->SetEventMask(ENM_CHANGE | ENM_SELCHANGE ); RichEditBox.push_back(r1); With the above code I get n cricheditboxes on a window . How do I navigate within these boxes using Up Down Arrow Keys Pritha Pritha, as I specified in this thread , this question is off-topic. Please use the newsgroup linked in that thread for UI questions such as yours and reserve this forum for questions on the C++ language itself. Thanks, Brian Hi, I think you ...Show All
michielmertens How do I compile c++ code into a EXE file
I am new with MS Visual Studio, a beginer if you will, I hope somebody can help me with this problem, I need to know how to make regular c++ without the visual part, code into an EXE file Simple Samples wrote: einaros wrote: You should have a batch file such as "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat", which initializes all environment variables you need to compile your source file(s) such as Bite Qiu proposes. Isn't that the old way In VS 2005 I have a "Visual Studio Command Prompt" that apparently executes the vcvars32.bat file. My guess is that the question is asking how to create a console application rather than how to compile us ...Show All
KrisK RT_RCDATA error in msvs2003 resource editor?
hello, i found bug in msvs2003 resource editor, steps to reproduce the bug: - just add any rcdata to resources - save project - close project - delete .aps file - open project - re-save resources and try to rebuild solution, it can't be compiled here is same problem but didn't solved: http://www.thescripts.com/forum/post1134110-1.html my question is will be this bug fixed I'm not able to reproduce this in VS2005 so perhaps it was fixed. As for VS2003 did you tried with service pack 1 I possible solution may be to add the RCDATA resource in a secondary resource file that you don't edit using the designer. Something like MFC does with a .rc2 resource file. Mike Danes wrote: I'm not a ...Show All
