|
never do your drawing with in threads other then the main thread!
use a post message to the main thread when ever an other thread wishes to change the drawings...
hope this helps you
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi,
I want to use "WMVideo9 Encoder DMO in my filter graph.; for that i want help.
What kind of filters can be connected to input & output pins of "WMVideo9 Encoder DMO" Filter?
Thanks in advance.
Aniket Salunkhe
|
|
|
|
|
Hi,
I want to use "WMVideo9 Encoder DMO in my filter graph.; for that i want help.
What kind of filters can be connected to input & output pins of "WMVideo9 Encoder DMO" Filter?
Thanks in advance.
Aniket
|
|
|
|
|
hi
i am implementing SMTP in MFC for sending mails.if i specify the correct mail server name(eg: mail.yahoo.com) i get the response from the server immediately.However if i specify invalid mail server name, the application hangs & control returns after 20 seconds.
ABC() //calls Connect function as given below
{
return Connect((SOCKADDR*)&sockAddr, sizeof(sockAddr));
}
BOOL CSMTPSocket::Connect(const SOCKADDR* lpSockAddr, int nSockAddrLen)
{
return (connect(m_hSocket, lpSockAddr, nSockAddrLen) != SOCKET_ERROR); //problem is while calling this Windows Socket function.
}
i need to reduce the time to check for invalid mail server name to less than 20 seconds.how is it possible??
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 5:22 Thursday 6th April, 2006
|
|
|
|
|
You can put that "connect(...)" method in a worker thread, and set an aditional timeout for that. I think that, when it's searching for an invalid server, it will always delay for several seconds. That's way it goes! Sorry! Good luck!
|
|
|
|
|
Hi there.
You could try using the gethostbyname function to validate the host name when it is entered. This way you could issue a warning if an ip address cannot be determined for the thost name and you would not be resolving hostnames during the connect call.
Cheers
|
|
|
|
|
I am using ScriptStringAnalyse which is a uniscribe function.
And I get linker error for this function.
Where will I find Usp10.lib file?
If it comes as a sdk package can anyone tell me the link.
I tried on the microsoft site but I see numerous downloads there for SDK.
Exactly which one should I download?
Can anyone tell me whats going wrong?
Thanks and Regards,
Arti Gujare
Arti Gujare
|
|
|
|
|
a) A C++ program that implements the Stacks ADT.
b) A C++ program that implements the Queue ADT using two stacks (make use of the Stacks ADT that you have implemented in a).
can anyone help me with these?
|
|
|
|
|
Hi ,
I have sent u Queue implemented using linked list. hope it will be helpfull for u.
#include<stdio.h>
struct node
{
int data;
struct node *link;
};
void insert_rear(struct node **,int);
int delete_front(struct node **);
void display(struct node *);
int count(struct node **);
main()
{
int size,k,ch,n;
struct node *p;
clrscr();
p=NULL;
printf("Enter the max size of the queue : ");
scanf("%d",&size);
while(1)
{
printf("\n\n1 to insert item in the queue");
printf("\n2 to delete item in the queue");
printf("\n3 to display elements of the queue");
printf("\n4 to count number of elements in the queue");
printf("\n0 to exit : \n");
printf("\nEnter ur choice : ");
scanf("%d",&ch);
switch(ch)
{
case 1:
if(count(&p)==size) {
printf("\nQueue full\n");
break;
}
else {
printf("enter the data to be inserted in the queue ");
scanf("%d",&n);
insert_rear(&p,n);
printf("item %d inserted in queue",n);
}
break;
case 2:
if(count(&p)==0) {
printf("queue empty");
break;
}
else {
k=delete_front(&p);
printf("deleted item from queue is %d",k);
}
break;
case 3:
printf("the values in the queue are\n");
display(p);
break;
case 4:
printf("the total number of elements in the queue are %d",count(&p));
break;
case 0:
exit(0);
default:
printf("wrong choice");
}
}
}
void insert_rear(struct node **q,int num)
{
struct node *temp,*r;
temp=*q;
if(temp==NULL)
{
temp=(struct node *)malloc(sizeof(struct node));
temp->data=num;
temp->link=NULL;
*q=temp;
}
else
{
while(temp->link!=NULL)
temp=temp->link;
r=(struct node *)malloc(sizeof(struct node));
r->data=num;
r->link=NULL;
temp->link=r;
}
}
int delete_front(struct node **q)
{
int k;
struct node *temp;
temp=*q;
k=temp->data;
*q=temp->link;
free(temp);
return k;
}
void display(struct node *q)
{
while(q!=NULL)
{
printf("%d\t",q->data);
q=q->link;
}
}
int count(struct node **q)
{
int c=0;
struct node *temp;
temp=*q;
while(temp!=NULL)
{
c++;
temp=temp->link;
}
return c;
}
|
|
|
|
|
do your homework yourself
|
|
|
|
|
KOOOSHA wrote: can anyone help me with these?
Yes probably.
|
|
|
|
|
i totally agree
|
|
|
|
|
Money is the magic word here...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
gimme gimme gimme
|
|
|
|
|
I'll search Google for just a few dollars :->
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote: few dollars
gud enuf
d'you want my paypal account to send ? lol
|
|
|
|
|
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Use std::queue and std::stack .
Steve
|
|
|
|
|
stephen, please don't help him for his homework...
people asking for such too general questions and that can't do the job they've been assigned to don't deserve a good answer
|
|
|
|
|
I didnt see Stephen do anything bad.
He just referred him to the STL, and if the guy works it out from there,
I believe that is OK.
Even we need pointers to references some times.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
yeah, i understand this point of view and i conccur somewhat.
but what i also observe - sadly - is that many people (newly registered to codeproject) come there to ask for one to make one's homework
they not only miss the point of what homeworks are beeing for (to learn and progress) but they ask their question a somewhat hurting way...
i can used to newbies that don't know the site, don't know where to ask, and don't really know where to start with their assignment, but i can't used to those guys that tell you : "do this, so that, the program has to output/compute this or this datas"... hey, we're not paid to do one's job. we can only help or link someone to a possible/best way to solve a specific point.
i've quoted this from Bjarne Stroustrup's FAQ yesterday :
"Will you help me with my homework?
No. Sorry. I don't do (other people's) homework. I get too many requests for help with homework and help with finding bugs in student programs to be able to find the time. Anyway, having a distant expert fix your programs is not the best way to learn. Try finding a local person with C++ experience that you can ask for guidance. A good mentor is the best help a student can have; maybe that's why they are not easy to find.
Also, no, I will not suggest "a good project for a student to work on". My experience is that learning enough about a student and his/her course to know what level of difficulty is required and what kind of project is of interst takes time. To think of a good project is then non-trivial, and to explain exactly what the project is and how to approach it can take several messages and several hours. I just don't have that kind of time. Remember, these request come at least weekly. Finally, some students seem to have the idea that if I suggest a project, I am morally obliged to provide quite detailed help in its completion. "
do you better understand why i reacted like that ?
|
|
|
|
|
dude chilllll maaan... i didnt ask for the whole program.. thanx for the asnwer but i just asked for tips thats it... u dont hv to make a freakin conspiracy out of it..
|
|
|
|
|
If the homework was to "implement" a stack or queue then I didn't do it, I pointed him at existing implementations. It's all very trendy at the CodeProject to harp on about homework, and I agree that you shouldn't do a students work for him: But you don't have to put him in "solitary confinement". I just pointed the dude in the right direction (or as I said, possibly the wrong direction if the alleged assignment was to implement it yourself).
Steve
|
|
|
|
|
KOOOSHA wrote: can anyone help me with these?
Yes, exactly what is it that you need help with?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|