Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Open files

44 views
Skip to first unread message

Gyorgy Camaszotisz (Developer SysOp 13)

unread,
May 20, 2005, 9:54:59 AM5/20/05
to
Hi,

Is it possible to "close" an open file on the server? Let me explain it: when my nlm is trying to update a file, but
other people has it opened, I'm clearing those connections using NWClearConnectionNumber, which in turn closes those
open file handles on the server. It would be nice to do the same without the need to clear the entire connection, to
minimize the impact on the user's current work.

Thanks,
Gyorgy

Roger Thomas, Dev SysOp 22

unread,
May 20, 2005, 7:59:26 PM5/20/05
to
I've not come across such an interface, but even if it does exist the results will be the same,
a user working with say word file is likely to lose all their work if either the connection or
just the file handle is disconnected at the server.

Roger

"Gyorgy Camaszotisz (Developer SysOp 13)" <dev...@novell.com> wrote in message news:428DEC3C...@novell.com...

Guenter Knauf, DevNet SysOp 32

unread,
May 21, 2005, 9:07:53 AM5/21/05
to
"Roger Thomas, Dev SysOp 22" <dev...@novell.com> wrote in
news:yRuje.23$mH...@prv-forum2.provo.novell.com:

> I've not come across such an interface, but even if it does exist the
> results will be the same, a user working with say word file is likely to
> lose all their work if either the connection or just the file handle is
> disconnected at the server.

but: if the user has also Excel and Access open files, these are also
affected when you kill the whole connection - I think this is what Gyorgy
wants to avoid....

Guenter.

Gyorgy Camaszotisz (Developer SysOp 13)

unread,
May 23, 2005, 5:15:39 AM5/23/05
to

Yeah, exactly. I'd like to keep all other applications working, by breaking only that single app which has the file
opened. I could even imagine a more sophisticated app being able to intelligently handle this situation, eg. by allowing
to save the work under a different file name.

Gyorgy

Guenter Knauf, DevNet SysOp 32

unread,
May 23, 2005, 11:04:15 AM5/23/05
to
Hi,

"Gyorgy Camaszotisz (Developer SysOp 13)" <dev...@novell.com> wrote in
news:42919F47...@novell.com:

> Yeah, exactly. I'd like to keep all other applications working, by
> breaking only that single app which has the file opened. I could even
> imagine a more sophisticated app being able to intelligently handle this
> situation, eg. by allowing to save the work under a different file name.

hmmm, but since the server itself must do something like looping through all
open files of a given connection if we kill it there must exist something at
least at server side (perhaps no xplat) which can force closing a file....
where are the hot tips of some undeocumented functions?
Just someone else asked in another forum for exactly the same - and BTW. I
also had already some situations where this would have helped a lot....
so lets make a request for a new function:
NWCloseFileForced()
or such....

Guenter.

David Mair

unread,
May 23, 2005, 10:58:17 AM5/23/05
to

This can be done. You can do it with NoRM and MONITOR I believe. FWIW, I
wrote a method that allows NSS to expose handles to another application
and that application can then close the handle with prejudice. I'm
pretty sure it's not published and I'm not about to publish it so
broadly but, in essence it is this pseudo-code:

Impersonate a connection
Iterate file handles
If current file handle is the one to kill
Close file handle and break
Repeat
Profit

--
Regards,
David.

***************
David A. Mair
DevNet SysOp 54

Roger Thomas, Dev SysOp 22

unread,
May 23, 2005, 2:24:13 PM5/23/05
to
My comment was more about the fact that any solution would break
something. Novell seems to have a strong policy only not directly
providing interfaces that can cause 'damage' to the environment. Saying
that it looks like David has put forward a solution.

Roger

"Gyorgy Camaszotisz (Developer SysOp 13)" <dev...@novell.com> wrote in message news:42919F47...@novell.com...

David Mair

unread,
May 23, 2005, 4:16:22 PM5/23/05
to
Roger Thomas, Dev SysOp 22 wrote:
> My comment was more about the fact that any solution would break
> something. Novell seems to have a strong policy only not directly
> providing interfaces that can cause 'damage' to the environment. Saying
> that it looks like David has put forward a solution.

I couldn't possibly comment...and I was never here.


> "Gyorgy Camaszotisz (Developer SysOp 13)" <dev...@novell.com> wrote in message news:42919F47...@novell.com...
>
>>Guenter Knauf, DevNet SysOp 32 wrote:
>>
>>>"Roger Thomas, Dev SysOp 22" <dev...@novell.com> wrote in
>>>news:yRuje.23$mH...@prv-forum2.provo.novell.com:
>>>
>>>
>>>
>>>>I've not come across such an interface, but even if it does exist the
>>>>results will be the same, a user working with say word file is likely to
>>>>lose all their work if either the connection or just the file handle is
>>>>disconnected at the server.
>>>
>>>but: if the user has also Excel and Access open files, these are also
>>>affected when you kill the whole connection - I think this is what Gyorgy
>>>wants to avoid....
>>
>>Yeah, exactly. I'd like to keep all other applications working, by breaking only that single app which has the file
>>opened. I could even imagine a more sophisticated app being able to intelligently handle this situation, eg. by
>
> allowing
>
>>to save the work under a different file name.
>>
>>Gyorgy
>
>
>

Guenter Knauf, DevNet SysOp 32

unread,
May 23, 2005, 5:11:42 PM5/23/05
to
Hi Roger,

"Roger Thomas, Dev SysOp 22" <dev...@novell.com> wrote in
news:hdpke.54$_w....@prv-forum2.provo.novell.com:

> My comment was more about the fact that any solution would break
> something. Novell seems to have a strong policy only not directly
> providing interfaces that can cause 'damage' to the environment. Saying
> that it looks like David has put forward a solution.

hehe - then they should take my view of things where a corrupt application
writes endlessly into a file, my NLM at the server even detects that it goes
bolow min vol limit, and cant close that file without having to close whole
connection....

Guenter.

Roger Thomas, Dev SysOp 22

unread,
May 24, 2005, 2:41:00 PM5/24/05
to
I remember in the long and distance Novell being attacked for providing
'useful' tools such as the one you are doing. The difference between yourself
and Novell is that you will have a targeted and maybe educated market,
while Novell ends up with the problems caused by 2 many sys-admin staff
just enabling the feature without understanding it correctly. After all one
person's corrupt application is another person's auditing tool :)

Roger

"Guenter Knauf, DevNet SysOp 32" <devf...@novell.com> wrote in message
news:iGrke.230$_w...@prv-forum2.provo.novell.com...

dave_bouchard

unread,
Jan 6, 2006, 10:29:40 AM1/6/06
to
David Mair wrote:


Hi,

Can I have the code for this pseudo-code?? I need to develop an
application for my organisation for close a file for graduate an
application.

Thank you

Dave
davebou...@hotmail.com


0 new messages