|
Hi Dave
I did not find any place to set the export the library. Could you tell me where I can set?
Thanks
|
|
|
|
|
transoft wrote: Hi Dave
Did you mean Nave?
The lib file will be created automatically when you export a class or function from a dll. See the article Dlls are Simple. Part 1[^] if you want to know about exporting functions/class
|
|
|
|
|
Sorry Nave. That is my typo.
Thank you so much for answering my question.
|
|
|
|
|
Hi Nave
Thank you for your guidance. I realized that I did not add "__declspec(dllexport)" these statement in my software. Actually I tried to build firebird database API into a DLL. I created a empty Win32 DLL using VS2005. It builds just fine. I can see a dll generated.
So I just need to add "__declspec(dllexport)" stuff to whatever I need, right?
Thanks
|
|
|
|
|
Yes.. infront of all functions you wnat to export..
|
|
|
|
|
I have an application that creates several threads. One of these threads creates a (second) Window. When that thread goes away, the window it created goes away also. However, the pointer to the class that represents the window is still valid. It is never freed.
I would like the window to stay up when the thread that created it goes away. Is there a reasonable way to do this?
Bob
P.S. – I am under the impression that there is not.
|
|
|
|
|
How'd you figure out that the pointer to the window was still valid?
|
|
|
|
|
Thanks for the response. I claim that the pointer is still valid because it was allocated by doing a new and it was never freeded. It is my understanding that a pointer allocated in one thread, is valid in all threads. Is that wrong?
Bob
|
|
|
|
|
BobInNJ wrote: I would like the window to stay up when the thread that created it goes away. Is there a reasonable way to do this?
No. The window requires its WndProc to be on the thread that created it. Each window's messages go via a message queue, which is a per-thread structure.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for the response.
Bob
|
|
|
|
|
Stuart,
Isn't message queue an application level data structure that's common to all its threads?
|
|
|
|
|
From this page[^]:
The system maintains a single system message queue and one thread-specific message queue for each graphical user interface (GUI) thread. To avoid the overhead of creating a message queue for nonGUI threads, all threads are created initially without a message queue. The system creates a thread-specific message queue only when the thread makes its first call to one of the User or Windows Graphics Device Interface (GDI) functions.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for correcting me!
|
|
|
|
|
hi
I made a dual function button with 2 hovers and two tooltips
the two actions are addition and subtraction on the same button but that did not work
The project is uploaded here
http://www.4shared.com/file/105379147/23d04050/dualactionmfcbutton.html
[^]
here is the code to check whether the mouse clicked the right half oor right side
When i Clicked the button it perform no action?!
Can you help me in fixing this problem?
|
|
|
|
|
plz anyone help me on a c (graphics / algorithm ) code on peephole optimization(compiler).
|
|
|
|
|
Are you developing a graphic compiler?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
just need the code in C....how three address code is optimized by peephole optimization.
|
|
|
|
|
Looks like your school book was lost. An example here [^] (sorry no C code).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You're not going to get code - the code depends on the AST representation, or whatever intermediate form you're using. This page[^] might help.
BTW - are you currently studying a compile construction course @ college...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
actually i need a C prog which takes 3 address byte code as an input(manually) and optimize the given input by Peephole technique.
|
|
|
|
|
The classic book on Compiler Contruction is Compilers by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman. A more modern (and more advance book) is Advanced Compiler Design Implementation by Steven S. Muchnick. The first book talks about all aspects of developing a compiler. The second book just talks about code generation and optimization. Both books I feel are quite good.
I am also wondering why you are doing this. Is it part of a compiler? Feel free to ask a follow up question.
Bob
|
|
|
|
|
yup...its a part of compiler...gotta develop a college project on it...(peephole optimization)
|
|
|
|
|
Then I would try to read the book: Compilers by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman. I
also wondering what kind of optimizations are you trying to do. For example, contstant folding,
strength reduction and copy propagation come to mind.
Bob
|
|
|
|
|
i need all the methods - Redundant-instruction elimination, Flow-of control optimization, Algebraic simplification and Use of machine Idioms to be applied on 3 address byte code. thanks...
|
|
|
|
|
I believe the first book I mentioned tells you what you need. The flow of control optimization is
elminiating jumps that go to other jumps. That seems straight forward to me. If you are looking
for some code to download where all this is implemented, I do not know of any such code.
Bob
|
|
|
|