PC Review


Reply
Thread Tools Rate Thread

How to Detect file opening / close

 
 
nuttynibbles
Guest
Posts: n/a
 
      21st Feb 2010
Hi,

Is there a way to detect file opening / close.

When a file is clicked to open, before the mobile phone launch the
respective application (e.g. word doc, window media player, etc etc), my
system will need to do an operation.

Same thing for file close. When the file is completely close, do something
to the file.

I did a bit of research.

Firstly, IMessageFilter won't work because it only detect mouse event on the
form. Opening a file in \My Documents or anywhere else outside the form would
not trigger the PreFilterMessage

Secondly, Event Hook in CF does not support mouse event. It only work with
Keyboard.

I am sure there is a solution out there.
 
Reply With Quote
 
 
 
 
nuttynibbles
Guest
Posts: n/a
 
      22nd Feb 2010
is this feasible? is there a way around this??

"nuttynibbles" wrote:

> Hi,
>
> Is there a way to detect file opening / close.
>
> When a file is clicked to open, before the mobile phone launch the
> respective application (e.g. word doc, window media player, etc etc), my
> system will need to do an operation.
>
> Same thing for file close. When the file is completely close, do something
> to the file.
>
> I did a bit of research.
>
> Firstly, IMessageFilter won't work because it only detect mouse event on the
> form. Opening a file in \My Documents or anywhere else outside the form would
> not trigger the PreFilterMessage
>
> Secondly, Event Hook in CF does not support mouse event. It only work with
> Keyboard.
>
> I am sure there is a solution out there.

 
Reply With Quote
 
Chris Tacke, MVP
Guest
Posts: n/a
 
      22nd Feb 2010
You have to write a file system filter. It has to be done in C.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"nuttynibbles" <(E-Mail Removed)> wrote in message
news:19790F8F-430D-4434-B0B4-(E-Mail Removed)...
> Hi,
>
> Is there a way to detect file opening / close.
>
> When a file is clicked to open, before the mobile phone launch the
> respective application (e.g. word doc, window media player, etc etc), my
> system will need to do an operation.
>
> Same thing for file close. When the file is completely close, do something
> to the file.
>
> I did a bit of research.
>
> Firstly, IMessageFilter won't work because it only detect mouse event on
> the
> form. Opening a file in \My Documents or anywhere else outside the form
> would
> not trigger the PreFilterMessage
>
> Secondly, Event Hook in CF does not support mouse event. It only work with
> Keyboard.
>
> I am sure there is a solution out there.


 
Reply With Quote
 
badzio
Guest
Posts: n/a
 
      22nd Feb 2010
On 22 Lut, 19:11, "Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com>
wrote:
> You have to write a file system filter. *It has to be done in C.


Any hint, link to documentation/example?
 
Reply With Quote
 
nuttynibbles
Guest
Posts: n/a
 
      23rd Feb 2010
If it's done in C, can i integrate to c#??

"Chris Tacke, MVP" wrote:

> You have to write a file system filter. It has to be done in C.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
> "nuttynibbles" <(E-Mail Removed)> wrote in message
> news:19790F8F-430D-4434-B0B4-(E-Mail Removed)...
> > Hi,
> >
> > Is there a way to detect file opening / close.
> >
> > When a file is clicked to open, before the mobile phone launch the
> > respective application (e.g. word doc, window media player, etc etc), my
> > system will need to do an operation.
> >
> > Same thing for file close. When the file is completely close, do something
> > to the file.
> >
> > I did a bit of research.
> >
> > Firstly, IMessageFilter won't work because it only detect mouse event on
> > the
> > form. Opening a file in \My Documents or anywhere else outside the form
> > would
> > not trigger the PreFilterMessage
> >
> > Secondly, Event Hook in CF does not support mouse event. It only work with
> > Keyboard.
> >
> > I am sure there is a solution out there.

>

 
Reply With Quote
 
Chris Tacke, MVP
Guest
Posts: n/a
 
      23rd Feb 2010
Here's a good start:
http://blogs.msdn.com/ce_base/archiv...01/499052.aspx

Platform Builder ships with a reasonable sample.

-Chris


"badzio" <(E-Mail Removed)> wrote in message
news:b2076ee3-4514-4d91-987d-(E-Mail Removed)...
On 22 Lut, 19:11, "Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com>
wrote:
> You have to write a file system filter. It has to be done in C.


Any hint, link to documentation/example?

 
Reply With Quote
 
Chris Tacke, MVP
Guest
Posts: n/a
 
      23rd Feb 2010
Sure. I'd write a filter and have it raise named system events, which you
could catch in your C# app. If you need to interact with the filter you
might need to use more complex IPC comms between the filter and your app
like a point-to-point queue.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"nuttynibbles" <(E-Mail Removed)> wrote in message
news:E9CF561E-9E3B-4F19-806E-(E-Mail Removed)...
> If it's done in C, can i integrate to c#??
>
> "Chris Tacke, MVP" wrote:
>
>> You have to write a file system filter. It has to be done in C.
>>
>>
>> --
>>
>> Chris Tacke, Embedded MVP
>> OpenNETCF Consulting
>> Giving back to the embedded community
>> http://community.OpenNETCF.com
>>
>> "nuttynibbles" <(E-Mail Removed)> wrote in message
>> news:19790F8F-430D-4434-B0B4-(E-Mail Removed)...
>> > Hi,
>> >
>> > Is there a way to detect file opening / close.
>> >
>> > When a file is clicked to open, before the mobile phone launch the
>> > respective application (e.g. word doc, window media player, etc etc),
>> > my
>> > system will need to do an operation.
>> >
>> > Same thing for file close. When the file is completely close, do
>> > something
>> > to the file.
>> >
>> > I did a bit of research.
>> >
>> > Firstly, IMessageFilter won't work because it only detect mouse event
>> > on
>> > the
>> > form. Opening a file in \My Documents or anywhere else outside the form
>> > would
>> > not trigger the PreFilterMessage
>> >
>> > Secondly, Event Hook in CF does not support mouse event. It only work
>> > with
>> > Keyboard.
>> >
>> > I am sure there is a solution out there.

>>


 
Reply With Quote
 
nuttynibbles
Guest
Posts: n/a
 
      24th Feb 2010
Tks chris. this gives me an insight on my proj =)

"Chris Tacke, MVP" wrote:

> Sure. I'd write a filter and have it raise named system events, which you
> could catch in your C# app. If you need to interact with the filter you
> might need to use more complex IPC comms between the filter and your app
> like a point-to-point queue.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
>
> "nuttynibbles" <(E-Mail Removed)> wrote in message
> news:E9CF561E-9E3B-4F19-806E-(E-Mail Removed)...
> > If it's done in C, can i integrate to c#??
> >
> > "Chris Tacke, MVP" wrote:
> >
> >> You have to write a file system filter. It has to be done in C.
> >>
> >>
> >> --
> >>
> >> Chris Tacke, Embedded MVP
> >> OpenNETCF Consulting
> >> Giving back to the embedded community
> >> http://community.OpenNETCF.com
> >>
> >> "nuttynibbles" <(E-Mail Removed)> wrote in message
> >> news:19790F8F-430D-4434-B0B4-(E-Mail Removed)...
> >> > Hi,
> >> >
> >> > Is there a way to detect file opening / close.
> >> >
> >> > When a file is clicked to open, before the mobile phone launch the
> >> > respective application (e.g. word doc, window media player, etc etc),
> >> > my
> >> > system will need to do an operation.
> >> >
> >> > Same thing for file close. When the file is completely close, do
> >> > something
> >> > to the file.
> >> >
> >> > I did a bit of research.
> >> >
> >> > Firstly, IMessageFilter won't work because it only detect mouse event
> >> > on
> >> > the
> >> > form. Opening a file in \My Documents or anywhere else outside the form
> >> > would
> >> > not trigger the PreFilterMessage
> >> >
> >> > Secondly, Event Hook in CF does not support mouse event. It only work
> >> > with
> >> > Keyboard.
> >> >
> >> > I am sure there is a solution out there.
> >>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect macro in excel file without opening it Boss Microsoft Excel Programming 6 28th Apr 2010 04:03 PM
close a file ater opening with GetOpenFileName Forum Freak Microsoft Excel Programming 2 9th Jun 2008 06:42 PM
detect explorer close Felix González Microsoft ASP .NET 1 3rd Apr 2008 10:54 AM
Windows MM has encountered problem (opening file) and must close =?Utf-8?B?Qmx1ZVBocm9n?= Windows XP MovieMaker 0 10th Oct 2005 05:06 AM
Opening a file causes Excel to close Stuart Microsoft Excel Programming 1 12th Mar 2004 11:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:42 AM.