Answer Questions
Jay_Vora_b4843e How do you set the name of a thread in C++?
This is something that I've been able to do in linux development, but I have not figureed it out in Visual C++. I've noticed that the thread list contains names, however they are always the same and I cannot seem to find the way to name them. This is not an MFC application. Currently, I'm using _beginthreadex to create the thread. Does it work on the current thread (-1) See the following article: http://msdn.microsoft.com/library/default.asp url=/library/en-us/vsdebug/html/vxtsksettingthreadname.asp I've tried a few things here... 1. Immediately after CreateThread(...), call SetThreadName(...). This doesn't seem to have any effect. The name reverts back to the name of the supplied ThreadProc, so I'm assuming either the ...Show All
eland59 changing colour of a cell in grid
Hi, i am using grid (dialog box) having 4 rows and 3 columns (total 12 cells) in visual c++ 6.0. i want to change the colour of a particular cell at runtime for a particular value. how can i do it Thanks and Regards Munish Gupta Are you using MS Flex Grid Control I think it's basic control and it provides some basic services for the Grid. If there's no certain APIs you can modify it using the sources generated. else you can try some other grid controls like Chris Maunder's MFC Grid Control it has what all you need. Here is some more handy things which can be used with the above Grid control or any other customized grid controls A grid What kind of control i ...Show All
legojedi Explorer Runtime Error, preventing me from accessing Windows Updates, Disc Search, ect.
Hi! Everytime I try to launch Internet Explorer (Version 6.0, SP2), I get the following msg: Microsoft Visual C++ Runtime Library Runtime Error This application has requested Runtime to terminate it in an unusual way. I found threads on this error msg., with suggestions to remove Google Toolbar (which I don't have). I tried to reinstall IE 6.0, but I wasn't allowed to, because my existing IE is a more recent version. Furthermore, this is now preventing me from accessing Windows Update (I get a blank page when I visit it). Related to this, I am also having trouble accessing the Search function and the Help and Support function under my Control Panel. When I tried, it gives me the follwoing error msg. Exception: Automation Server Can't Cr ...Show All
cb1024 WHISHER - WiFi EveryWhere ??
whts that No hardware to purchase-it works with any WiFi device! It’s a software application that you install on your computer and helps you get free WiFi access all around the world. Additionally it offers a range of tools and services that will take your wireless experience to a new level. The Whisher network is powered by users sharing their WiFi. All WiFi networks registered through Whisher are protected and the owners (sharers) have full control on who and when can access them. More at www.whisher.com off topic :) There is a hot technology forum for casual conversation about cool things. ...Show All
Martyn775 Any interest in building an FAQ?
I'd like to propose that we put together an FAQ to address some of the issues that pop up regularly here. It seems like we have an awful lot of questions like: - "How can I call my C#/VB/FORTRAN routines from C++ " - "How do I compile and run my project " - "I've included the correct header files, so why am I getting LNK2019 errors " - "How on earth am I supposed to use destructors/finalizers/IDisposable " And of course these are all valid questions! But since they are common questions which tend to be answered in the same way from one thread to the next, I think it would be very helpful to have all (or at least most) of the common answers in one single place. This would be helpful both to aske ...Show All
creaturita First-chance exception... access violation... debugger winds up in malloc
Hello all, I keep getting an exception whenever calling 'new'. I'm implementing the singleton function and I have a static * p initialized to NULL. When the 'getInstance' method is called, if the static * p is still initialized to NULL, I call p = new P(); At that point I get a First-chance exception ... access violation message and my debugger tells me the problem is in this function: void * __cdecl _malloc_base (size_t size) { void *res = _nh_malloc_base(size, _newmode); RTCCALLBACK(_RTC_Allocate_hook, (res, size, 0)); return res; } at the line "void *res = _nh_malloc_size...." My program stops running at this point as well. I have error messages that will print just before the new call, but not at the beginning of the constructor ...Show All
daimaku does the sprintf work wrong?
for(int xx = 0;xx<50;xx++) { HRESULT hr; IPAddr ipAddr; ULONG pulMac[2]; ULONG ulLen; char ip[20] = {0}; int ret = sprintf(ip,"192.168.0.%d",xx); printf(ip); //if i delete this sentence,it will not get any MAC. ipAddr = inet_addr (ip); memset (pulMac, 0xff, sizeof (pulMac)); ulLen = 6; hr = SendARP (ipAddr, 0, pulMac, &ulLen); if( hr != NO_ERROR ) continue; ...... } through the code above,i can get all the MAC address of the local net. but when i delete the sentence:"printf(ip); " which i have marked above. it doesn't work well,why thanks any way! Can't repro this either. Please give us exactly the code you're using (rather than making us hunt for dependencies and compile code differently than you). ...Show All
Mehmet Erdogdu how can i turn off the "/gs" flag ?
i hope im in the right forum.. im using MSVC++6 and i want to turn off the /GS flag, how can i do this thanks ! Umh, I'm certain you know that already, but obviously /GS or /GS- are command line options that are passed to the compiler driver (cl.exe) on the command line. You can always look these up in the index of MSDN Library to find the corresponding setting in the IDE. So, it is nothing you would do in the source code. Are you sure you mean /GS (and not /Gs) There's probably a corresponding pragma for the latter. -hg I'm afraid I don't quite understand your question. Are you talking about the security checks feature I'm fairly certain, VC 6 didn't support it at all. So there's no ...Show All
Omar Fawzi I got the Microsoft Platform SDK March 2006 Edition... But, NOW What do I do to make it work with my C++ Codes, about the OpenGL
Hi, ... ... ... I just got the Microsoft Platform SDK March 2006 Edition... I installed it, but now WHAT... !!! ###&&&***@@@$$$%%% ^^^###, and #$%& Microsoft...!!! What do I do with it... I'm trying to build codes using the OpenGL " ... STUFFS ... ", but none of them are compiling at all ... I try the #include <windows.h> #include <GL/gl.h> #include <GL/glu.h> #include <cmath> and None of them are recognized by the Visual C++ Compiler... SO, WHAT'S GOING ON... !!!###$$$@@@%%% &&&***@@@###, DAMN MICROSOFT... THEY WON'T EVEN TELL ME JUST THE EXACT THING I NEED TO DO IN ORDER TO GET IT RIGHT...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ...Show All
sean_kirkpatrick converting tool from vc++ to c#.net
Hi Guys I had a code which is in VC++ Language.I want that code in the c# Language.Are there any tools which will directly convert VC++ code into c#.net. Thanks in Advance. I agree with Brian that It's nearly impossible to convert from C++ to C#, but it is certainly possible to convert very cleanly from C# to C++/CLI - we do that, for example (not that that's going to help you though). The rule of thumb with converters is that any conversion is possible if the syntax of the source language can be expressed (or nearly expressed) in the syntax of the target language. There are many areas of C++ that can't be adequately expressed in any of the simpler languages. That's w ...Show All
riverofsouls Dll can only be loaded when not moved from original output location
I have a solution which consists of a c# project and a c++ project. The c++ generates a dll which the c# loads through a class with external methods declared as " [ DllImport ( "VideoCard.dll" )]". It works fine... except... if my output path for the c++ dll is for example c:\long path\solutionname\projectname\bin\debug then the dll can _only_ be located and loaded if it is at that exact path. If I build the dll to the path in the example and then move it to for example c:\videoCard.dll and change my dllimport in the c# program to "[ DllImport ( "c:\\VideoCard.dll" )]" then it fails with an error stating that the dll could not be found. If the dll is moved to a directory on path, then it can st ...Show All
rcen How to add message map entry?
In MFC/VS2005, a dialog has an existing message map. How can I add more entries to the message map, other than by editing the files by hand This function used to be in ClassWizard, but now seems to have disappeared. I guess you have not read the above article. It is in the "To add a handler for a message" section. By trial and error, I discovered how to do it. Open the dialog containing the control, right click on the control, select Properties, then Messages icon. Cumbersome, but it works. Also, apparently is undocumented. ClassWizard and WizardBar were removed in Visual C++ .NET 2002. http://msdn2.microsoft.com/en-us/library/6761383e.aspx ...Show All
Rachel J C++ call to a Fortran subroutine (DLL) using multidimensionnal arrays as arguments
I am still trying to build a program that makes a call to a Fortran subroutine accessible in a .DLL. I currently can work calls (and manage the linking) to simple subroutines that use strings, integer and double types of arguments. I cannot however work around calling a subroutine that expect multidimensionnal arrays (by ref I expect ). I am aware that colum and row majors are inversed between Fortran and C++, but cannot find any clear examples anywhere. Here is an example that works. First the Fortran subroutine: SUBROUTINE FORTRANSUB (STRING1, VAR1) CHARACTER *(*) STRING1 REAL (KIND=8) VAR1 and the C++ function prototype and call: ... extern "C" void __stdcall FORTRANSUB1(char * string1, int string1 ...Show All
scribework Runtime error on screen saver
Hi Guys, I'm running Win XP Pro SP2, and encounter following problem whenever the screen saver self-activates Error Pop up "microsoft visual c++ runtime libary" "runtime error!" "program: c:\windows\system32\saver1.scr" "abnormal program termination" Any help is appreciated. Probably someone (or you) has created a custom screen saver which cannot work. I would suggest disabling it: go to Start --> Settings --> Control Panel --> Display --> Screen Saver and select a different screen saver. If you are the author of this screen saver and need to know why it does not work on other computers, maybe it is caused by some DLL files ...Show All
softwarejaeger VS2005 SP1 released
VS2005 SP1 is released. http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx If you have any trouble installing, be aware of http://support.microsoft.com/kb/925336 (that exact problem happened to me when I tried to install VS2005 SP1) i tried installing it but its saying the program for which updates are there cannot be found! i am bugged.any one got such an error Ted, The link to the KB aritcle (928957) comes up as missing. Is there a list of fixes somewhere Thanks, Paul I don't see a vcredist_x86 folder there, even though I have installed SP1. I was just told on another thread that it is not yet available for VC++ Express... Kumar ...Show All
