Answer Questions
Info_Peter missing msvcr80.dll
Hi, I made a small program (consoll) because I'm learning C++. I use Visual C++ Express Eition 2005. When all is done and I want to compile I get the warning that msvcr80. dll is missing and I can't run the program. Anyone know how to solve this issue. The file is on my HD, and I also repaired V_C++ through the net. But still the same problem. Hi again, This is my last input for this issue. I tried to FAT32 workaround when VC++ stoped working, and it worked perfectly. Thanks. Thanks everone for your support. It helped me alot. Best Regards, Lars. Hi, Don't have ZoneAlarm. I have Trend PCillin. I'll check the FAT32 work-around. But I made a couple of small projects - and there's no ...Show All
Peter Cwik Expanding struct/union (VARIANT exemple)
Hi guys, I'm trying to understand how the struct/union of the VARIANT type is done. See file <oaidl.h> for VARIANT definition. I want to implement a more simple VARIANT type for my application, but I want the same behavior, i.e. if my variable name is var (VARIANT var), I want to be able to achieve both var.vt = VT_I4 and vt.iVal = 0. My problem is that if I do a struct like this, struct MYVARIANT { int vt; union { int iVal; long lVal; double dVal; } __MYVARIANT1; }; var.vt will be visible but not iVal nor lVal nor dVal ... how can I acheive the same implementation as the VARIANT type Thanks, P.A. iVal and the rest are still visible ...Show All
paso It seems that ping program runs different in wireless network and cable network, please tell me what is the difference between t
I want to use ping to detect if the internet connection is connected or not , I need a good sample program .please give me a good sample program to do this. I appreciate your help. It seems that ping program runs different in wireless network and cable network, please tell me what is the difference between two of them. I appreciate your help. Hello Re: I want to use ping to detect if the internet connection is connected or not , need a good sample program Such questions are outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 For such issues please use the newsgroups at ht ...Show All
winprock how to return a array in a function?
i write a function like this : void firstScan(int bitmapArray[][],Bitmap*bitmap1) { int bitmapArray [640][480]; int greyRangeMax; int greyRangeMin; System::Drawing::Color tmpColor1; for(int inty=0;inty<480;inty++) { for(int intx=0;intx<640;intx++) { //get pixel color tmpColor1 = bitmap1->GetPixel(intx, inty); //calculate grey color range int temp = Math::Max((int)tmpColor1.R, (int)tmpColor1.G); greyRangeMax = Math::Max(temp,(int)tmpColor1.B); greyRangeMin = greyRangeMax-20; //calculate skin color range double I = (Math::Log(tmpColor1.R) + Math::Log(tmpColor1.B) + Math::Log(tmpColor1.G)) / 3; double Rg = Math::Log(tmpColor1.R) - Math::Log(tmpColor1.G); double By = Math::Log(tmpC ...Show All
nabeelfarid finding the root path
Hi, i am working in VC ++ 6.0. i have some problem in hardcoding the path saving the files. My application saves the log files on hard drive (exception handling). for the time being i have hardcoded the path (e.g : c:\programfiles\abc\log) i don't want to hardcode the exact path. i want that my application should save the log files automatically in a folder (application root folder). wherever user installs the application either it should be c:\program files\abc or d:\program files\abc, my log file should automatically pick the root path and save the files in log folder in that root path. Pls help me in doing this. Yes, it is working properly. Thanks a lot, Munish G ...Show All
oulisee number negative?
hi, I have a little question: how can I check if a double variable represents a negative or a positive number.. I looked in the MSDN if there exists a function for that but I didn't find anything...:( lg matti You can always try comparing it to zero double d = 3.14; if (d > 0.0) { // ... } Or did I misunderstand your question I beleive something like this can work: if ( d < 0.0 ) { // d is negative } ...Show All
Montse Shellexecute?
Hiya all, i'm kinda new too this and need some help, i thought this would be the best place to ask so here goes.. i'm trying to get shellexecute to run something, just say i wanted to run/open a old text document "C:\test.txt" i would use this ShellExecute(handle, open,"C:\test.txt", NULL, NULL, SW_SHOWNORMAL); or ShellExecute(handle, open,"C:\test.exe", NULL, NULL, SW_SHOWNORMAL); correct if so it doesn't work.... it complains about the handle part... i'm new to this command so dont know what your meant to put in "handle" Any help would be great. Steve One of these should work: ShellExecute( NULL, NULL, "c:\\test.txt", NULL, "c:\\", SW_SHOWNORMAL); ShellExecute( NULL, "open", "c:\\test.txt", NULL, " ...Show All
Zuchman multiple libraries problem
i am attemoting to use multiple libraries for my program since i need to use a library created by an outside party which contains functions i need in my proram. the problem is when i add this library to my Additional Dependencies this is the error messages i get (the include/sources/etc paths also already changed to include the new funcations) Linking... LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll) LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR80D.dll) LIBC.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR80D.dll) LIBC.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR80D.dll) LIBC.li ...Show All
MichaelEaton Performance of malloc and free in VC++ 2005
Hi all, Whne I port VC++ 6 project to VC++ 2005, I find malloc a small piece of memory in a big loop and free them later in other loop has very very bad performance then VS++ 6. For comparation, VC++ 6 spends 12 seconds and VC++2005 spends 60 seconds in a same stress testing. :( I have check the compile options and find nothing. Could you please point out the reason Or give some advices. Thanks in adv. Best Regards, DeepNight Hello, The problem is that you use the Single Thread Runtime Librarry in VC 6.0 and when you port your code to VS 2005 there is Multi Thread Runtime Lib by default. And there is no Single Thread at all. If you choose Multi Thread in VC 6.0 you will ...Show All
R.K.S. About the C4430 Error
Hi! I got these 2 function declarations in Visual C++ 2005 Express Edition CODEC_API extern AWC_decodeSwaths(AWC_Tag *tag, AWC_Image *buffer, int regionIndex, int stride, char **ptr, int *copyFunction( void )) ; CODEC_API extern AWC_encodeSwaths(AWC_Tag *tag, AWC_Image *buffer, int *regionIndex, int imageWidth, int imageHeight, int lines, int reuse_flag, int stride, char **ptr, int (*copyFunction)( void ) , int rate_flag, int goalbits); Athough all seems to be ok, the C++ compiler gives me the next error code: C4430: missing type specifier - int assumed. Note: C++ does not support default-int I know It's about the marked code, but i can't solve the problem. I hope someone can help m ...Show All
mrotoloni Calling .Net delegate from C++/CLR
Hi, I am writing a managed wrapper arount native C++ code and I need to call C# delegates. The way I do it is to call the Marshal::GetFunctionPointerForDelegate function and get a pointer to the managed method, which I can call later on. This is with VS2005, my question is how to get the pointer with VS2003 and .Net v1.1 since the Marshal::GetFunctionPointerForDelegate function is available only under .Net v2.0 Thanks in advance. Thanks for the reply, but I tried the __raise keyword and it calls the delegate without any further effor. With great difficulty, apparently. It looks like you need to create two adapter classes--the first of which will marshal the .NET side of things (delegates), and a second class which will thunk ...Show All
Eagleguy125 Making vcredist_x86.exe run silently
Hi I am putting a software installer together, and one step I need to take is running this app to ensure certain dlls are present on the users system. At the moment, I am placing the exe in a temp folder, running it, then deleting it. I am using the NSIS installer scripting tool, so Exec "C:\temp\vcredist_x86.exe" is the line that does the business. Is there an argument I can pass to vcredist_x86.exe in order to make it run silently (ie without bringing up any popups about what it is doing ) Curiously, I cannot run the exe from a DOS prompt. Thanks How do you build your installer VS setup projects should allow you to check prerequisites like the c runtime to be included in the setup as a merge module. Have a look at h ...Show All
dsimms69cody CFile usage performance question
VC++ 2005 Unmanaged code: My system makes heavy use of the CFile object to read and write lots of files. We're talking 100s of threads talking to 10,000s of files. It commonly does either a open, read entire file, close Or an open, append, close to the file. In general, one pool of threads opens the files and pass it to another pool of threads that then reads or writes the data and passes it to another pool of threads that simply closes the files. By doing this, we can make slower operations, like closing a file, be run on a low-priority thread. This also reduces thrashing the same file since we can detect that a file is in a waiting to close queue and grab it instead of opening a new CFile. To try to increase performance, we cha ...Show All
Shawn Rheal Extract text from Word Document on runtime
hi there, From many days i am trying to extract the text of Word document just like any spy program which watch the word document and if it found then extract the current page's text, for this purpose i have read few articles but they were not that much helpful. If some one has a code to obtain the text of runtim doc then please let me have it, i will be very greatful for it...or any tips , guidence will also help me for it... thanks in advance regards For such issues, the newsgroups at http://msdn.microsoft.com/newsgroups is a more proper place. OTP Thanks, Ayman Shoukry VC++ Team i think you are looking for Word Automation .have alook on the Following Link this Will also help you to get more Info ab ...Show All
Rob Ainscough Access a __declspec(dllexport) method gives Access Violation
Hi, I'm having a problem accessing a __declspec(dllexport) method from a .exe file. The compiling and linking runs OK, but when I run the debugger, it tells me that I have an "Unhandled exception at 0x00376dfc (UserLogin.exe) in ProcMonSvc.exe: 0xC0000005: Access violation reading location 0x0043524c." I've been importing and exporting methods to and from DLLs and it worked fine. Why did the access violation happen and how can I bypass it Hi, just to update. I've read articles and many of them refer exporting to exporting from DLLs only. Can exporting classes and methods be from EXE files ...Show All
