|
When a DLL is loaded in, its automatic variables (ie globals) will be constructed during its initialisation phase.
Unfortunately, the leak checking code runs before these globals are destroyed by the system, so any dynamic allocation made by objecs within these are reported as memory leaks.
Possible solution:
If you control the source for the DLL, remove the globals and instanciate these dynamically in the DllMain() when dwReason == DLL_PROCESS_ATTACH and destroy them when dwReason == DLL_PROCESS_DETACH
If you vote me down, my score will only get lower
|
|
|
|
|
I have an richedit control.i set its multiline,vertical scroll property but while i scroll the mouse the text rich edit scroll does not scroll while on clicking of vertical bar text gets scrolled.but i want to scroll text in rich edit control on mousewheel command.
|
|
|
|
|
Use the MSH_MOUSEWHEEL event and wParam....
There are some macros in order to handle the roation:
zDelta = (int) wParam; // wheel rotation
xPos = LOWORD(lParam); // horizontal position of pointer
yPos = HIWORD(lParam); // vertical position of pointer
|
|
|
|
|
Hai Friends .
Anybody Plz tell me
Multithreading
COM
ATL in vc++....
Can u plz send me a sample code if possible...
Best Regard's
Mathy's
|
|
|
|
|
Please read the guidelines[^]
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hello sir ;
am a beginner of vc++
so that am not using the following future's
Multithreading
COM
ATL in vc++....
so Can you plz guied me with samples... or any related things...
Best Regard's
Mathy's
|
|
|
|
|
No.
There is enough information in codeproject and in www. Google can be a very good friend for you as well.
Start searching and learning, when you have concrete questions then you will have concrete answers.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Hi to All,
Could anyone please help me to make an simple dll in VC++6, to export a class pointer
...where i have one more project(console based application) in the same workspace, and I need to get a class pointer of the dll, using which I want to access all the functions of that class in the dll.
thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
hai ........
I thing the URL is helping to u
//http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9855/#more
Best Regard's
Mathy's
|
|
|
|
|
This is basically a repost of your question below. Try some of the things that have been suggested there before asking further questions. If you have some code that does not work correctly then you may post that with specific questions.
|
|
|
|
|
Hi to All
Could anyone please give me some links or docs or any hints for the following
I am trying to learn to design a project. Say I have 5 modules...I want to interact each module from every module by means of messages(class objects)....
Till now I was planning to make all the 4 modules as a dll and get the methods dynamically from the main modules...But thats just an imagination, and this may not be efficient too. I have not implemented anything yet....Could anyone give me some tips or hints to do the same.
Also if there is any other methodology to do so...
Basically I am trying to design a project with several modules...Its just for my self learning...
thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
Based on what those "modules" could possibly mean, and how they are related to each other, you may decide upon the way they would communicate with each other.
If you could give some precise information (read this post[^]), someone may be able to suggest you something suitable.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
thanks Rajesh
I guess my idea was very generic....
About the communicating with each another, I guess I have mentioned that I want to communicate with classes....say message1 message2...
I was looking for some common approach to design the modules in a project in VC++, where the modules communicate by any means....(may be class messages, or anything u want)...
Please do let me know for further clarification, if any.
-----------------------------
I am a beginner
|
|
|
|
|
hrishiS wrote: I guess my idea was very generic....
That's the problem.
If you ask a specific question like "How can two windows objects communicate with each other", I'll say "Post or send registered window messages".
But to a generic question, only a 'generic' answer can be given. Narrow down your query, say me what exactly are those objects that needs to communicate with one another. And for God's sake what can a "module" possibly mean?! You seem to be using that term very frequently.
Please be specific.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
thanks
Modules are again different projects....(whose output can be dlls)
By objects, I mean simple objects of some classes...eg:
class Message1
{
....
}
Message1 *objPtr= newMessage1();
This Objptr, i should be able to pass with another modules
-----------------------------
I am a beginner
|
|
|
|
|
Your post is again blunt.
hrishiS wrote: This Objptr, i should be able to pass with another modules
Please read Hooks and DLLs by Dr. Joseph Newcomer[^]
I recommend that you read up on the articles related to DLLs for beginners. There's plenty on CP, please do a search.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Please be clear whether you want to know about the class level design i.e Detailed design or component level design, i.e Architecture design.
I hope you are looking for both then please have look at
Design patterns, please check this, either study with Eric Gamma's text or just check [^]
These topics will surely help you.
Величие не Бога может быть недооценена.
|
|
|
|
|
thanks a lot for your reply...I will look in thorough all these
I was looking something like class desing....
example, make all modules as a dll....export a class pointer ...get the handle and get the functions of that module....etc etc
-----------------------------
I am a beginner
|
|
|
|
|
Hello Sir ..
How to Insert a String on a Image .?
Please Respond me!
Thanks
Failure is Success If we learn from it!!
|
|
|
|
|
|
Thanks Mr. Rajesh ...
Failure is Success If we learn from it!!
|
|
|
|
|
Welcome, and feel free to use the search option.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
raju_Code wrote: How to Insert a String on a Image .?
Like this, perhaps?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I've got MFC/C++ based code.
I've wrapped it in static lib (C++/MFC also) providing in .h file e.g. single function that does call to the code.
The lib wrapper .h file contains only single function declaration without any hints to C++ or MFC
int DoSomeTask();
I added that lib with .h file to C console application without MFC support using only standard win libs
I can compile project without problems but I've got unresolved externals during linkage. What is the problem?
error LNK2001: unresolved external symbol _DoSomeTask() main.obj
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: unresolved external symbol _DoSomeTask() main.obj
If this function is in the C++ library then its exported name will be in the 'decorated' format - I can't remember the exact rules for this. You will need to find the name from the lib file and use that in your linker options to map to the correct exported name. You could also check the LIB options to see if you can export the undecorated name from there.
|
|
|
|