|
Typically you use an unnamed event to communicate between two threads in the same process. In this case, you only call CreateEvent once, storing the event handle in some well known location.
You can also use DuplicateHandle to open a new handle to a handle you do know about that lives in another process. You might use some form of interprocess communications (window messaging, shared memory, RPC) to tell one process about the other process's event handle.
However, you can never reopen an existing unnamed event object using CreateEvent - you always get a new one for each call.
|
|
|
|
|
a handle is only valid in the process context, which created it!
so there are 2 ways to handle that.
send the app, which didn't create the event the handle, and use duplicatehandle, or give the event a name and let the other app open it!
Don't try it, just do it!
|
|
|
|
|
I'm trying to creat a new thread so I can call a function that has no user interaction and just processes some files. The process takes a long time so I want to use a thread so I can update its status on the main dialog window.
I tried AFXBeginThreat(func.cpp) nada!
Any help or direction much appriciated!
Thanks,
Jim
|
|
|
|
|
or just use CreateThread() function.
search the function in samples of VC CD, there are lots examples there and very easy to be used.
includeh10
|
|
|
|
|
Or, in fact, don't.
CreateThread does not set up the C runtime library correctly. You may get away with it in a project that uses the DLL version of the CRT, because the CRT DLL's DllMain does mostly sort it out.
If you're not using MFC, create a new thread with _beginthreadex . If you are using MFC, use AfxBeginThread , because again, some initialisation is required for the new thread.
|
|
|
|
|
For a good article read here![^]
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
jimNLX wrote:
I tried AFXBeginThreat(func.cpp) nada!
Threatening a function is no way to get it to behave! The first parameter to AfxBeginThread() is not a filename, but a controlling function for the thread. It has a signature of:
UINT MyThreadProc( LPVOID pParam );
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hi,
my isp has a dtl (data transfer limit) so i would like to write an app that monitors my adsl connection.There is a checksite but it is pretty annoying you have to login each time you wanna check that.And there is no "remember me" checkbox
however i got no idea howto this what i mean is
get my download speed
get my upload speed
get the amount of sended/received bytes
i know the iphelper is the solution but i can't figure out howto get what i want :s
does anybody know a semilair opensource project please to learn from please ? that would be great
|
|
|
|
|
get a modern online counter
Don't try it, just do it!
|
|
|
|
|
Hi guys
Is there an easy way to export data in a List Control to Excel?
Talking about to export to excel, Is there another easy way to export any data in my app (supose data are in an array) to excel?
Best Regards
Doc
|
|
|
|
|
For very simple tables without special formatting I use CSV. CSV is a very simple database format which can be opened by Excel. All values are enclosed by "" and separated by commas. For a more detailed description see http://www.wotsit.org[^] and search for CSV.
Hope that helps
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
In addition to Dominik's suggestion, you might also want to look at Excel Automation.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
HI all
i am currently using visual studio .net 2003
and have installed office 2003 pro on my machine this morning
now though when ever i create a new project or try to view an existing
project, i am unable to access my resource view
the is a red exclamation mark displayed saying "Opened in another editor"
and it wont allow me to view any of my dialogs, or to add any resouces on, or to view them
does ne1 have ne ideas i dont know how to get my resoucre view back
thanks
si
|
|
|
|
|
heyho, i need some1 to tell me how to code and add custom task bar toolbars... does someone know any source of information about that?
thx
Don't try it, just do it!
|
|
|
|
|
|
thx for the quick answer, it's very useful for my software!
Don't try it, just do it!
|
|
|
|
|
Can someone please guide me to some avi programming tutorials, articles. Reading, playing, playing certain parts of the avi, play by frames etc.
Thank you!
|
|
|
|
|
|
hello,
you can open avi's, edit them and play them frame by frame with visual c++ 6.0....i tried it once and opened a porn or something in there and played it frame by frame.
theres a tool thats included in visual studio called "AVI Editor".
|
|
|
|
|
Hello,
I'm developing a program that sets the SAMBA passwords in a LDAP-directory. I'm now wondering if there are some classes in MFC (Or any other c++ class) that can make these hashes.
I've been checking out the mkntpwd, and I want a similar class that does the same thing:
$ mkntpwd password
E52CAC67419A9A224A3B108F3FA6CB6D:8846F7EAEE8FB117AD06BDD830B7586C
(Lanmanager:NT)
..
Like (something simple like this)
CLanmangerPassword a("cleartextpassword");
CString sLanmgrpwd = a.GetHash();
|
|
|
|
|
i've never heard about such a class!
Don't try it, just do it!
|
|
|
|
|
Hi,
Is there anybody working with DirectShow.
Pls tell me how can I create my own Audio Source Filter.
I have to use my own custom filter and will be providing inputs by filling data in buffer variables.
I can not use the custom filters already provided by DirectShow.
Regards,
Saurabh
|
|
|
|
|
there are some filter sources on the web... i think OGG vorbis has one
Don't try it, just do it!
|
|
|
|
|
Hi
I use Microsoft (R) Segmented Executeble Linker Version 5.60.339.
I just need newer version but I didn't found anything on Web.
Where can I find it?
Code Red
|
|
|
|
|
There'll be an updated one in the Platform SDK.
Big download just for one exe though....
Steve S
|
|
|
|