Share FileHandle
- From: Christoph Basedau <e_tonne@xxxxxxxxxxx>
- Date: Sun, 23 Oct 2005 02:04:22 +0200
Hi
I'd like to let my dll write into the clients logfile.
using this code:
'# client-side:
Private f%
Private mySrv As MyProj.MyCls
f = FreeFile(1)
Open "c:\data\test.log" For Append Access Write Shared As #f
Set mySrv = New MyProj.MyCls
mySrv.LogFileHandle = f
'# server-side, MyCls.cls
Private m_hndLogFile%
Public Property Let LogFileHandle(newHandle As Integer)
m_hndLogFile = newHandle
End Property
..
.
Print #m_hndLogFile, "some text"
Any Time i try to Print sth into the file, i get an error (5, invalid argument)
(or Err 52: invalid filename or number, if i use FreeFile(0))
I tried all different kinds of lock/share-modes also changed FreeFile(1) to
FreeFile(0) or a constant number, but with no luck.
it seems impossible to get write-access to the logfile from the dll-project.
The file itself has no attributes set. Any hints, work-arounds?
--
Gruesse, Christoph
Rio Riay Riayo - Gordon Sumner, 1979
.
- Follow-Ups:
- Re: Share FileHandle
- From: Tony Proctor
- Re: Share FileHandle
- Prev by Date: ActiveX control registration
- Next by Date: Re: ActiveX control registration
- Previous by thread: ActiveX control registration
- Next by thread: Re: Share FileHandle
- Index(es):