|
please send the code ....
There is a Software Behind Everything
Renjith PDLM
|
|
|
|
|
See here
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks. Support the class transaction ?
Wiizi
|
|
|
|
|
What do you call Transaction, Stored Procedures?...;)
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Update datas in database on server
Wiizi
|
|
|
|
|
Yes, you can do that...
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
we have been interrupted by the class private/public/protected static variables not getting initialized before control reaches main, when those variables initialization has been placed in the other dependent libraries instead of the current project.
It seem to us that, placing all the initialization statements in some header file say 'myheader.h' and adding this header to the main project, is better solution at the moment.
But, this activity is consuming large amount of time.
Can anyone inform us if we can initialize the class static variables in the other dependent libraries using other better way?
We know the following.
1) All global data including global static variables must be initialized before control reaches main function.
2) All local static variables will be initialized when the control calls the respective function for the first time.
What about class static variable? They have class scope. But they have program life time. Therefore, we guess our program is not proceeding further just because the class static variables in other dependent libraries are not getting initialized?
Is our assuption correct?
Any help in this regard would be highly appreciated.
Thanks in advance,
-Sarma
|
|
|
|
|
Static class data behave as global data in this respect. So, when the control hits main , these data must have been initialized. Possible reasons for the observed fiasco:- These static data are placed in a static library but the corresponding compilation unit is stripped out by the linker (because no symbol from that unit is explicitly linked from the program.)
- The data depends on initialization on other static data in a different
.cpp . As C++ does not guarantee any special order in the initialization of static data in each compilation unit, it could be that the dependent static data get initialized before the depended on data, thus resulting in strange results.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello Friend,
In our case we have several static libs which are dependent on .exe. while running the .exe we want all the class static variables in the static libraries initialized before control reaches main. In Linux C++ compiler it is properly happening? How to make it happen in windows2000.
Any reply would be grateful.
Thanks,
-Sarma
|
|
|
|
|
Well, I'm afraid little more can be said with that information alone. As I said before, first you'd have to determine the cause of the problem (lib stripped out, interdependcy among static data initialization across several .cpp s, other.) If you could tell us something about the structure of your project or post some of the code of the offending library, that'd help a lot.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Link your program with a map file option. Then search to see if the .CPP file that contains the initialial values is included in the image.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hey, that's a powerful tool! Didn't know about it. How does one examine the image after building with this option?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Just look for a .MAP file in your build directory.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
How would I prevent my MFC app from trying to open a URL as a local document. I parse out the command line parameters, and it comes up with the url, but then the program throws an error about its attempt to try to open it as a document. I have tried Aborting Serialization, I have also tried changing the parameter to do FileNothing.
-Steven
|
|
|
|
|
Can't you override the code in the CDocument::OnNewDocument or which ever function is being called for the open document (its late and I can't remember the name - something like OnOpenDocument)
Michael
|
|
|
|
|
Does anyone know what the system stress test tool is called in Visual Studio 6. Used it a while ago, and can't remember what it was called or where to find it?
Thanks,
Giles
|
|
|
|
|
You can use my product MemWatcher to simulate low memory conditions during stress testing. It works on Win9x/ME/NT/2K/XP.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks Ravi, will take a look.
Giles
|
|
|
|
|
Maybe you are remembering the Win16 "Stress" tool? For Win32 there simply is no such thing, you'd have to use all available virtual memory (or exhibit some NT kernel "bugs"/limits :->) to get what you want.
For GDI I recommend you create a "bunch" of small bitmaps (large bitmaps are put in another kind of memory) to watch even "system" menus go "System (Bold)" on you.
I think you can screw up the whole user(32) subsystem by messing around with window messages, but then your whole workstation would grind to a halt (been there, done that, MS refuses to acknowledge problems). You could however easily overflow both GDI and USER in Win9x by just creating ~32K objects.
For memory constrained uses, you could actually just SetProcessWorkingSetSize in your app to a reasonabley small value to see how your app crashes when it's out of memory.
Hope this helps. :->
|
|
|
|
|
I'm sure there was a tool, to perform different background taks such as heavy disk IO, or processor usage, on which you could turn up the notch.
Ah well.
Giles
|
|
|
|
|
I have made an MFC Application that works against a SQL Server using ODBC with the CRecorset classes. But when I hav made a workable setup program and runs this on another computer(that does not have visual studio) the installation works fine but when i try to run the exe file i get a VC++ Runtime library Error! Abnormal program termination. What have I've done wrong ..please Help..
Best regards
Henrik
|
|
|
|
|
use the 'depends' tool to see what dll's ur app requires and make sure they are in the package u dist
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
I would but I'm running VS . net and the dependencies shows up on a prpertysheet.. it only says that it depends on 2 dll's mfc70*..... Are there any other way?
If not...
Thank you for your reply anyway
|
|
|
|
|
HenrikO wrote:
I have made an MFC Application that works against a SQL Server using ODBC with the CRecorset classes. But when I hav made a workable setup program and runs this on another computer(that does not have visual studio) the installation works fine but when i try to run the exe file i get a VC++ Runtime library Error! Abnormal program termination. What have I've done wrong ..please Help..
What type of error are you receiving when you try to run your app? Does the PC you are trying to set up your app on have all the MFC runtime libraries installed? You should read through this part of the C++ FAQ. It deals with a problem that sounds similar (if not exactly the same) to yours. Hope this helps.
-Mike Zinni
Software Engineer
email: mzinni@rimail.com
AIM: zin9999
|
|
|
|
|
Try using Installshield . it actually does the job of searching for dll's and required ocx's required .
or
While building the code , check the project settings. Try including all the dll's during compilation.
or
if u know the dlls required , copy them in the new pc and register theses Dll's using regsvr32.exe
|
|
|
|