|
when i was writing a filter a while back, after each build i'd rename the dll eg filter002.dll. Install that, and remove the config for the old ones in IIS. it still has a file lock on the old ones, but doesn't process them.
Then, every now and again you can reboot and clean up all the old versions.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Is there any way i can make a CDialog based dialog fade in/out??? (under win98).
Or maybe even keep them partially transparent?
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
There is no API functions for doing that on Win98, you need Win2k or WinXP for doing that.
I guess you could do it by manually, by taking a "screenshot" of the dialog, using bitblt(), and then draw it transparently with GDI+...
But then the the controls on the dialog would not work when you draw it transparent, because it's only an image of the dialog, not the real dialog...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
It should be possible though with the standard GDI functions. Get a CRect of the dialog's size and position, then take a screenshot of that area as it stands (before displaying the dialog). Now load a bitmap of the dialog's initial state. Then, manipulate a bitmap structure in a loop to gradually fade the screengrab and bitmap together. Ok, it would be slow as hell, but it could work
Simon
"Does the room have a CView?"
Sonork ID 100.10024
|
|
|
|
|
i want to close my app while some of the threads are using socket connection. how can i stop these threads and clean
the memory used in the threads?
i had tried to add the codes following in the DestoryWindow() of the MainFrame:
while (m_MailThreadManager.GetThreadNum()>0)
{
CMailThread* pMailThread = m_MailThreadManager.RemoveHead();
pMailThread->PostThreadMessage(WM_MSG_ACTION_STOP_THREAD,0,0);
if (WaitForSingleObject(pMailThread->m_hThread, INFINITE) == WAIT_OBJECT_0)
{
CloseHandle(pMailThread->m_hThread);
}
else
{
TerminateThread(pMailThread->m_hThread, -1);
CloseHandle(pMailThread->m_hThread);
}
delete pMailThread;
}
but i found that the threads will cause windows exception
after the SOCKET connection even if ExitThread had been execcuted.
i don't know why since i had executed the ExitThread, the thread still exist and caused that SOCKET exception. and how
can i terminat them safely?
please help me!
- Anthony Chen
|
|
|
|
|
Why cannot anyone help me?
- Anthony Chen
|
|
|
|
|
You need to pass the Socket handle to the thread that you want to
use to terminate the thread that is waiting on it.
Use the "Thread Parameter" or other way.
When you close the socket from a different thread, the thread
that was waiting on "accept(...)" will return INVALID_SOCKET, so you will
know that if fail.
Hope this information helps
- Greatest invention : "The Microchip!"
|
|
|
|
|
If I understand well, you want a thread to tell a second thread to stop waiting on a socket, and you don't know how to do that because the second thread is blocking on the socket call?
If this is your problem, make the second thread use select() [See MSDN for complete description] to see if the socket is ready.
If i am right, and want more information, just tell me
Michel
|
|
|
|
|
Yeah, you are absolutely right! what you say is what i really mean.
i have checked the MSDN about select(), which is used to determine
the status of one or more sockets.
now would you mind telling me:
1. what should i do to terminate a thread which has been blocked on a socket saftly.
2. what should i do to terminate a thread which has a socket (no blocking) saftly.
thanks a lot. hoping more help.
- Anthony Chen
|
|
|
|
|
Hi Guys,
Is it possible to change the Dialog Border Style ???
Best Regards
Sonu
|
|
|
|
|
Use ModifyStyle/ModifyStyleEx
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Uh hello, i have to program an application which uses an access database. I started in Visual C++ but suddenly i remembered Visual Studio also offered Foxpro. Allthough i have no idea what you can use Foxpro for exactly i know it has something to do with databases... Should i use Foxpro for my application instead?
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
Stick with Access.
I think they've abandoned Foxpro now
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I personally like Foxpro, but i'm not huge into DB programming but haven't heard much of Foxpro lately, so you should probably take the advice of Nish.
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
You are who i got that quote from...god thats been bothering me for a while now.
Finally an excuse for all of MAN kind...
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
FoxPro is very good for writing applications that interact with databases, that is it's primary function. The latest version 7, (just out recently) is pretty impressive with support for COM and Active X and XML. There is no .NET support yet but it is promised.
Michael
|
|
|
|
|
Hi, all you happy coders
I Hope somebody can help me with this problem I am having:
In my program i try to allocate about 500KB (in smaller pieces) with the new operator,
but it hangs in some function called '__sbh_alloc_block'...
Is this because I can't get more memory from windows...?
Thanks in advance,
Erik Hammar
|
|
|
|
|
Erik Hammar wrote:
i try to allocate about 500KB (in smaller pieces)
From that sentence I assume you have a loop of some kind where you repeatedly call new till you get 500 KB is several smaller blocks [or so we assume]
Now are you sure your loop is looping the right number of times. perhaps it's a sort of endless loop!
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
No it's not a loop...
I create instances of about 5 classes, which each allocate one or two blocks of memory...
|
|
|
|
|
After how many sucessful 'new's do you get the error?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I get it after 5 times...
...
byte *bmpdata = new byte[256*240];
memsize 1 > 128KB
class1 = new CClass1(memsize1)
(inside CClass1's constructor)
data = new byte[memsize1]
memsize 2 > 128KB
class2 = new CClass2(memsize2)
(inside CClass2's constructor)
data = new byte[memsize2]
class3 = new CClass3 - this is where it crashes (before the actual constructor of CClass3)
...
Seems really strange to me, that this hangs the program, and not only gives me a NULL pointer!
|
|
|
|
|
Well I cant even make any guesses from that.
But try creating the CClass3 object first and then create CClass1 and CClass2. Now if it still gives an error when you create the CClass3 the problem must be with something you are doing in the CClass3 constructor, but if the trouble happens with the third new then we are again nowhere
Try this out anyway. And if possible post the CClass1/2/3 constructor code as well. Also how is the data member-variable defined in these classes?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Strange... moving the class3 creation code to the top, seems to eliminate the problem. That's strange, because the class3 doesn't even touch the class1 and class2
Anyway, Thanks for your concern!
|
|
|
|
|
Erik,
I think you should not be complacent about the error being removed. We still don't know why it crashed before. A bug that has been hidden but not removed can be very deadly.
Good luck.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
how can i make an instance of a CRecordSet class execute a more complex query (for example one with an inner select, as shown below)
e.g.
select name, street
from Customers
where name not in
(select name from Uninteresting_Customers
where ....)
the m_strFilter attribute off the CRecordSet class doesn't accept the more complex queries, quite obviously because it was only intended to contain the where-clause of the query....any help would be greatly appreciated...
bye
Jonas
|
|
|
|
|
I think for this case you should use ADO API functions:
check these:
http://lnrpc2.irb.hr/ebooks/0672313502/ch04/ch04.htm
http://lnrpc2.irb.hr/ebooks/0672313502/ch06/ch06.htm
|
|
|
|