|
Is this of any help? Also, does the folder you're watching contain any symbolic links?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm not sure - it might do and I'll give it a whirl in a couple of days time. However it is not running across a network but on the other hand I guess there are pretty much always going to be other processes that have a notification on if you happen to have a Windows Explorer open on that folder. Unfortunately when we have an explorer open to that folder is exactly when it seems to work correctly - ho hum!!!!
There are no symbolic links set up at all - very simple folder set up indeed.
As I say I'll probably get a chance to have a try in a coupld days.
Thanks.
Mike
|
|
|
|
|
OK I've had more time to work on this and though I haven't got anything conclusive, I think the problem was at my end (it usually is!). We discovered the problem only occurred with files copied in by Canon cameras, other cameras had no problems - leading me to suspect a timing problem.
After some digging I determeined that there was a function call doing considerable work between receiving the response from WaitForSingleObject and the following call to FindNextChangeNotification. I now make that call almost immediately and the problem now seems to be sorted (fingers crossed). The problem is that Canon copy a small temporary file before copying the main image file and I suspect the main image file was coming in before the call to FindNextChangeNotification and so it was being missed.
Thanks again for your help.
|
|
|
|
|
is a driver (sys file) a com program?
Zo.Naderi-Iran
|
|
|
|
|
No[^].
Software Zen: delete this;
|
|
|
|
|
I'm not a C++ guy, but I've been reading today about how multiple inheritance isn't supported in C#. Most commentators (say Jesse Liberty) say something like "I never needed to use multiple inheritance" etc.
It left me curious to know what problems folks have solved using multiple inheritance?
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
martin_hughes wrote: Most commentators (say Jesse Liberty) say something like "I never needed to use multiple inheritance" etc.
I've never had to do it either.
martin_hughes wrote: It left me curious to know what problems folks have solved using multiple inheritance?
Most classes do not require more than one "is a" relationship. With MFC, the problem that occurs is when the derived class has two CObject -related classes as parents. The framework does not know which is the "real" (cause only one of them can be) parent.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Multiple inheritence is typical in COM objects when the objects implement multiple interfaces.
I also use it in a utility library. For example, I've got dialog and property page classes that derive from CDialog and CPropertyPage , respectively, along with a layout manager class that is shared between them.
Software Zen: delete this;
|
|
|
|
|
Gary R. Wheeler wrote: For example, I've got dialog and property page classes that derive from CDialog and CPropertyPage...
Why?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Our UI's are touch-screen driven. The derived classes provide services specific to that environment, along with enhancements that the base classes don't provide. Touch-screen services include automatic subclassing for certain types of controls (such as on-screen popups for edit controls), layout handling, and so on. The enhancements include a modest 'skinning' facility.
In case your 'why?' was directed at our use of MFC, that's simple. When we started the series of products that came from this code base, it was 1999. .NET wasn't available. At this point we have a mature and robust toolset that meets our needs.
We'll look at VS2008, especially when we start thinking about targeting Vista and its associated eye-candy.
Software Zen: delete this;
|
|
|
|
|
I was just curious since CPropertyPage is already derived from CDialog . Was there are point in time that this was not so?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: CPropertyPage is already derived from CDialog .
AFAIK, that's been the case at least since VC6/MFC4.2.
I had to create classes derived from both, since I wanted to make services transparently available to both dialog and property page handlers. There isn't a simple way to inject your code into the inheritance chain between CPropertyPage and CDialog . For that reason, I've got this:
class GalaxyUI_Dialog: public CDialog, GalaxyUI_Form {
};
class GalaxyUI_PropertyPage: public CPropertyPage, GalaxyUI_Form {
}; where the GalaxyUI_Form class has the common elements.
The only thing that's a little odd-looking are the message handlers. For example:
void GalaxyUI_Dialog::OnSize(UINT nType,int cx,int cy)
{
CDialog::OnSize(nType,cx,cy);
GalaxyUI_Form::OnSize(nType,cx,cy);
} Sometimes the derived classes call their 'base' class only, the form class only, or both.
Software Zen: delete this;
|
|
|
|
|
See here[^].
My favorite quotation: People quite correctly say that you don't need multiple inheritance, because anything you can do with multiple inheritance you can also do with single inheritance. You just use the delegation trick I mentioned. Furthermore, you don't need any inheritance at all, because anything you do with single inheritance you can also do without inheritance by forwarding through a class. Actually, you don't need any classes either, because you can do it all with pointers and data structures. But why would you want to do that? When is it convenient to use the language facilities? When would you prefer a workaround? I've seen cases where multiple inheritance is useful, and I've even seen cases where quite complicated multiple inheritance is useful. Generally, I prefer to use the facilities offered by the language to doing workarounds.
|
|
|
|
|
I've worked on projects that make use of multiple inheritance, and, like any tool, it can be or a good and a bad thing depending on the context. Probably the most common usage in C++ is in implementing interfaces: in C++ you need to use multiple inheritances to implement multiple interfaces or even to implement one if you’re also deriving from another class in addition to implementing the interface. In C# you don’t use multiple inheritance to implement interfaces so this is not an issue. Another common use of multiple inheritance is to use mixins[^].
Steve
|
|
|
|
|
MI is nice for implementing functionality where the the "is a" or "has a" relationship doesn't really exist, it's more like "I can do this and this is how I do it" type relationship.
I've used it quite a bit in programming custom controls, to let objects describe various aspects of themselves, like how they paint themselves, resize, move, etc. There's a lot of internal handshaking, but MI is a very powerful tool in this respect.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Steve Echols wrote: MI is nice for implementing functionality where the the "is a" or "has a" relationship doesn't really exist, it's more like "I can do this and this is how I do it" type relationship.
A nice description. These are called mixins but the way you've explained it is more useful than name-dropping.
Steve
|
|
|
|
|
What you dewscribe here ist exactly how I have always used Multiple Inheritance (only seldom) apart from inheriting pure abstract interfaces.
It is about the same thing Stephen Hewitt mentions as 'mixins'. MI is how it is done in C++ and just because Java (and Microsofts second implementation of it, C#) give it a different name, it is not wrong.
I don't understand the wailing of the Java-Fanboys about C++ using this feature.
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
|
|
|
|
|
I'm trying to find a solution to a little problem that involves being able to decode any type of media and save it into a wave-file.
Of course, this is done through DirectShow. I've actually tried this, but it doesn't seem to work.
I have a simple AVI-source, which I convert to matroska using mkvmerge.
Anyway, the file contains a video tracks and a audio track (MP3).
So I use Haali's Media Splitter, FFDShow, WavDest and File Writer, in that order. But the output audio file seems corrupted since it won't play!
Connecting an audio rendered after FFDShow plays the audio perfectly fine and clear.
I have no idea what can be wrong here, so if anyone has any idea or an alternative suggestion, please indulge me.
Thanks.
|
|
|
|
|
Hi,
During the setup of my application (using wise installation system) I am installing several files to c:\ProgramData.
During the runtime of the application I have to make changes to the content of those files - however for some reason it can be done only if I run the application as administrator.
Strangley though if I delete those files and install them again - this time not as an administrator - the problem disappear. However those files must be installed during the application setup (which runs with administrator priviliges)
I will appriciate any comments regarding this issue.
Eran
|
|
|
|
|
You are creating the files as an administrator but trying to modify the content as a normal user?
Under Vista's file security scheme, each file/folder is assigned an ACL, from your installer you need to make sure that you add users to the ACL's as the default would be for administrators. Luckily, vista has a tool to do this for you, "icacls.exe".
I will leave you to find out how to use it.
Waldermort
|
|
|
|
|
Thanks Waldermort, you have been a great help!
|
|
|
|
|
Sorry for distrubing all.
i have to create communication Between modem and Pc through RS-232.
1)i created a port along with activeX(microsoft Communication control, version 6.0)control.it works well and opened the serial port.
2)my dialoge box is having all port configaration controls(like hyperterminal) and after that two edit boxes one for commands to modem,after that submit button.
next there will edit box for responces for Modem.
3)iam not able to create thread for communication b/w pc and modem. which fuctions i have to call.pls anybody help
4)iam successfully completed the communication B/w two sys by RS-232 port.
here is the thread where i used in Communication b/w in two sys
<code>
UINT ReaderThread(LPVOID lParam)
{
CString strCount;
VARIANT vtResult;
CString str,str1;
CSerialcomDlg* m_wnd = (CSerialcomDlg*)lParam;
while(1)
{
int nCount = m_wnd->m_CommControl.GetInBufferCount();
if(nCount > 0)
{
strCount.Format("%d",nCount);
for(int i = 0; i< nCount;i++)
{
vtResult = m_wnd->m_CommControl.GetInput();
str.Format("%s",(LPCSTR)(_bstr_t)vtResult);
str1 = str;
}
m_wnd->m_edtrecvdata.SetWindowText(str1);
}
}
return TRUE;
}
</code>
|
|
|
|
|
I suggest using the search[^] page here on Code Project, and enter 'serial' as the keyword.
Software Zen: delete this;
|
|
|
|
|
krishna Vuppala wrote: 3)iam not able to create thread for communication b/w pc and modem. which fuctions i have to call.
To get started with multithreading and avoid common pitfalls, read this[^]. In my opinion the very best starting point for multithreading.
When you've read the article above and understood it, you'll face a new problem: since you're using an ActiveX control and want to access it from different threads, you need to know how to cross apartment boundaries the right way using marshalling. Read Lim Bio Liong's excellent article series starting here[^].
Writing the serial communication part by yourself, not using the MSComm control, isn't that hard really.
Have a look at Joe Newcomer's article here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Dear All
In one multi threaded program an unknown bug is detected merely which results in program exit.
We use Dr Watson to catch the reason of this exception but no reson is logged in Dr Watson log file.
any way
do you know :
1. What kind of exceptions is not detectable by Dr.Watson program ?
2. Do you know any other reason for program exit by windows ?
3. Do you know any third party program which can help us to detect the reason of this failure.
some points about our program :
1.Our program is a Server program which works with USB port to read and write voice data from a hardware.
2. This program sends and receives data on a LAN to other computers.
3. We use windows 2K sp4 OS.
4. Some DLLs of program is written with msvc 6 but main program is written with msvc 7.
If you have any idea please let me know.
Thanks in advance
Monhi
|
|
|
|