|
your given code is working fine but now the problem is i am starting various number of same threads together(for example if i have to find html code of 20 websites same thread will be run together for 20 websites and i am synchronising them using critical section). so if i end my 1st thread in 2nd thread all processing will stop at once and i will not get output of left sites....So how to deal with it.
|
|
|
|
|
yah, got your problem.
then you must change your architecture, in such a way, that, the timeout monitor thread is not common for all the threads.
so implement as follows.
thread1()//this thread may be having somany instances
{
create thread2();//which monitors the thread 1 for the timeout value.
-------
------
--------
flag=1;
api1;
flag=0;
--------
}
thread2()
{
you try to frame this logic.
}
here, for each thread1, a child thread(thread2) is created, which monitors its parent's(thread1's) timeout, and kills it if it is not responding in a specified timeout, and also terminates itself.
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
got it?
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
i am still trying the method problem is not solved yet...
|
|
|
|
|
Hi,
I'm developing an application that displays for 96 dpi perfectly fine.
But it doesn't get automatically adjusted on an 480 x 640 TFT LCD.
There must be an easy way of including an API that can convert my current program to
support the high dpi without much effort.
I would appreciate if someone can provide a helping hand.
Additional info:
I have extracted some lines of code below from the stdafx.h :
#if defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)
#ifndef _DEVICE_RESOLUTION_AWARE
#define _DEVICE_RESOLUTION_AWARE
#endif
#endif
#ifdef _DEVICE_RESOLUTION_AWARE
#include "DeviceResolutionAware.h"
#endif
ttarantula
|
|
|
|
|
ttarantula wrote: I'm developing an application that displays for 96 dpi perfectly fine.
But it doesn't get automatically adjusted on an 480 x 640 TFT LCD.
Whats the Problem?
As a side note, Windows is completely broken and incapable to cope with higher resolution. (fixed-size icons, fixed-size system-font, font rendering works only for 96dpi etc)
Maybe you simply experience the brokenness of Windows here?
Complain to Microsoft and tell them to fix that in Vista2
(and while you're at it, also tell them to drop the DRM forcing people to stay with XP or even W2K)
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
The image I wish to display on Pocket PC LCD screen, appears in the middle of the screen.
And to be exact it takes up only half of the Pocket PC LCD screen width.
-- modified at 5:56 Friday 12th October, 2007
|
|
|
|
|
HAi .,
In my application i have included mq.h header file ...and also windows.h header file...but when i am compiling its throwing follwing Error
c:\program files\microsoft visual studio\vc98\include\mq.h(139) : error C2501: 'PROPID' : missing storage-class or type specifiers
I think some of the header files need to add...!
is any one knows pls reply me...
Born to win...!
|
|
|
|
|
Have you used "Include file to project..."?? Just putting the #include header.h may not be enough.
Greetings.
--------
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
|
|
|
|
|
Ya..Already..i have included..Include in project under this menu
tools->options->directories...
Born to win...!
|
|
|
|
|
I think you may need to add
#include wtypes.h
#include objidl.h
#include winerror.h
to your files....
Contract Me: lihaoa@hotmail.com
I love My USTC forever.
|
|
|
|
|
Hai..Michel_Huang,
Thanks for ur help...i used the header files...now its working...Thank u so much..
Born to win...!
|
|
|
|
|
Hi,
I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that?
I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found.
Is there any seeting which I have missed to do it? or something else..
So,plz help me if u have any idea.
Thanks in advance.
Ashish
|
|
|
|
|
ummmm.... The only thing that immediately comes to mind is perhaps you haven't included the .cpp or .h files (or whatever types of files you're using) in your project.
Make sure you've included the files and then you shouldn't have any other problems otherwise give me the exact error message and I'll see what I can do.
Good luck and cheers mate,
Michael
|
|
|
|
|
Hi,
Thanks For very Quick reply.As u told me to include .h or .cpp files that i have already done it.
And still i am getting that error. And also when i see its (function's)definition than it points to that project also.
I am using the function SetHook(....) in my existing project and this function is in the new added project. And error gives like below......
1>d:\testing_and_download\testing\testrtmp_working\testrtmp\rtmpdesk.cpp(665) : error C3861: 'SetHook': identifier not found
I am using this function in the RTMPDesk.cpp file in that i have included new project's .h file.
And what is the issue of this .lib file??? As i have got reply
Plz reply me.
Thanking u.
Ashish
|
|
|
|
|
i am not sure but
just give the full path of your .h file.
SetHook( ) is member function or global function.????/
hiren
|
|
|
|
|
Hi hiru,
In my workspace i have project TestRTMP exist ok.
And i have included another project in the solution VNCHooks. IN this new project I have .cpp file VNCHooks.cpp file in that SetHook() function is available (it is global there is no any class available in this file) . it is declared in the VNCHooks.h file.
And in my Project dependancy window (and in tab of depends on..) i have only one projrct(my orignal) there is new added project available.
Thanks.
Ashish
|
|
|
|
|
The second project will need to be a library. You'll need to reference the appropriate header file in the new project and link against its .lib file. google will help
|
|
|
|
|
Have you included the respective header file and or implementation file?
Regards,
Paresh.
|
|
|
|
|
ashishbhatt wrote: I want to add new existing project into that project.
You cannot add a project into another project. You can add a new project into an existing workspace.
ashishbhatt wrote: But when I use the method of that new added project it gives error like this(function name) identifier not found.
Make the second project a Dll or a static lib and then link to the dll/lib from the first project. Output for projects in a workspace are independent of each other. Order in which the projects are compiled is important, in your case the second should be compiled first, since it's a DLL output type project hence the first project will be using it. So set a dependency for the first project on the second project and of course link to the second project.
Nibu thomas
MVP For VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|
|
How can i link this dll file or lib file with my project???
|
|
|
|
|
|
Still I am getting problems. I have added its .lib file and also dll file but still i am getting error as i described above in the descussion.
Plz reply me if u have solution.
|
|
|
|
|
ashishbhatt wrote: still i am getting error as i described above in the descussion.
Now you need to include the header file. Specify relative path to the header file while including...
For eg:
#include "./../MyProject/MyFile.h"
Another option is to specify include path in project properties, it's something like "Additional include directories" in the C++ tab. In this case you won't need to specity full path to include a file.
Nibu thomas
MVP For VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|
|
As you told me to include header files i have already included it. And also i tried that "Additional include directories" and include that project directory path, but taht still not working. That gives me the same error.
Thanks for taking interest.
Ashish
|
|
|
|