|
Steve S wrote: Patience is a virtue, and virtue brings it's own reward.
I am so sorry 4 posting the same twice..It happend accidently.
Thanks for the reply.
Can you provide me some link,which explains the steps in detail ??
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
No I can't, although there's probably an MSDN article on it somewhere.
But then, you could use the Star Wars technique to find out ("Use the source, Luke").
Use find in files from the IDE to look for ::CWinApp in the MFC source folder, and that should take you to step#1.
From there, you can simply work your way through the code, checking out the various bits of code as you go.
There's a book called "MFC Internals" which is probably out of print, not to mention being out of date (I have a copy at home, ~140 miles away, so I can't check the last MFC version it covered).
Apart from academic curiosity, why would you want to know?
Steve S
Developer for hire
|
|
|
|
|
I've posted a question about my aplication blocking because it reads the com continuesly and I got the answer of using threads. But reading about it i found out that: "The thread remains active as long as the thread's function is executing" so I don't see how that helps. My thread will remain active forever because i'm using a function wich has a while loop to listen to the com port, a while loop which never ends. I want to be able to acces the menu of my aplication so I can put a menu comand like stop listening. Am I wrong or isn't a worker thread the answer for me?
|
|
|
|
|
How u created the thread.
Is it CreateThread API ?
rgds
aneesh
|
|
|
|
|
I use AfxBeginThread. Shouldn't I use a separate process that deals with the reading of the COM?
-- modified at 3:15 Wednesday 26th July, 2006
|
|
|
|
|
See Here[^] maybe it is some helpful to you
|
|
|
|
|
Typically, your thread will loop continuously, with checks to see if (a) the current read has timed out, in which case you continue, or (b) an event was trggered (See CreateEvent in the API docs), in which case the thread exits. That way, you can trigger the event in your main thread when you want to quit the app, and then wait in the main thread for the comms thread to exit.
You can combine the two by using COMMS events and waiting until either a received character is available or the other event was triggered, and acting accordingly.
P.J.Naughter has written some excellent classes, one of which deals with comms ports, so check that out in the MFC/C++ libraries section here on CP.
Steve S
Developer for hire
|
|
|
|
|
Did you read this article from your last COM-related post? It goes into detail on how threads can be used for reading (and writing). Now your main UI thread can remain responsive.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi, does anybody know how 2 add a 3DS object in VC++.
When the goin gets tough then tough gets going
|
|
|
|
|
|
It is not that easy. You have two solutions (that I see): either you go for yourself and write everything yourself. Everything means from loading the file (so, you have to know its format and everything) to displaying it.
This will be really long and difficult (and even more if you don't have experience).
Another option is to use a 3D engine (the ones that are used for free 3D games). But I don't know which ones support 3DS format, you'll have to search on google and compare some of them.
|
|
|
|
|
I might have a copy of the Max SDK lying around and some code that loaded models and processed them, it wasn't that hard. What are you trying to do?
|
|
|
|
|
Hello,
Who can tell me "How to call Microsoft C# module in the COM component (C++)"
Thanks a lot!
|
|
|
|
|
you can make the c# module alos a com component
Sudeesh
|
|
|
|
|
Would you give me a example? thanks a lot!
|
|
|
|
|
|
Hi, Sudeesh
Thank you very much. You are so kind.
Best Regards,
|
|
|
|
|
How Event Logging works? Which component of the Windows continuesly keeps checking whether any Event has occured or not?? Which is that component that does this activity??
|
|
|
|
|
joshiprashant wrote: not?? Which is that component that does this activity?
type eventvwr at your run command
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Thanks for ur opinion..
But what I want to knkow is "Which Kernel Component is behind the scene for Event Logging process"? I mean how we can come to know that an event has occured without using the Event Viewer or using NotifyChangeEventLog() API?
|
|
|
|
|
Event Logging in Windows is works as a Windows Service. Run Services from Admin tool/control panal; U can see all services currently running in system. U can see a service called "Event Log", which write the events for windows.
See MSDN
BackupEventLog Saves the specified event log to a backup file.
ClearEventLog Clears the specified event log, and optionally saves the current copy of the logfile to a backup file.
CloseEventLog Closes a read handle to the specified event log.
DeregisterEventSource Closes a write handle to the specified event log.
GetEventLogInformation Retrieves information about the specified event log.
GetNumberOfEventLogRecords Retrieves the number of records in the specified event log.
GetOldestEventLogRecord Retrieves the absolute record number of the oldest record in the specified event log.
NotifyChangeEventLog Enables an application to receive notification when an event is written to the specified event logfile.
OpenBackupEventLog Opens a handle to a backup event log.
OpenEventLog Opens a handle to an event log.
ReadEventLog Reads a whole number of entries from the specified event log.
RegisterEventSource Retrieves a registered handle to an event log.
ReportEvent
|
|
|
|
|
Thanks for ur reply..
But I want to know how this mechanism of Event Logging is implemented internally in Windows Kernel? I dont want to use Event Viewer or NotifyChangeEventLog() API which helps me to identify when certain event occurs. Is there any way by which I can come to know about occurance of an Event??
|
|
|
|
|
How to execute a process virtually? That means without running an application i want to notify to OS that certain process is executed?
|
|
|
|
|
How would this help? I don't believe any windows os keeps any tracking info on if a program has ran so what would this add?? Please correct me if I am wrong...
John
|
|
|
|
|
Thanks for reply..
Certain applications & Processes logs events to respective logs like Application, System and Security logs. So is there any way that without executing certain application, we can log the event on behalf of that particular application.
I know there APIs available for this task, but they dont allow to write in SECURITY LOGS, and my task is to write in Security Logs. So how can this be solved??
|
|
|
|