Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Visibility and invisibility within class modules


Message #1 by peterfrb2@y... on Sat, 26 Oct 2002 00:44:33
> Sub WriteMessage(iFreeFile As Integer, strAnnounce As String)
>    Print #iFreeFile, strAnnouncee
> nd Sub

Peter, 

you cannot make this call from a dll because you cannot pass 
a file number. The file reference is just a number in your
application, and therefore you can only use it within the
project that creates it. Think of it as the index of an
internal array.
The dll, even though is running in the same memory space, has its
only list of files. The correct way to do it is to open the file
in the dll itself. So the dll interface should look like:

Sub OpenFile(byval sFile as String)
property get FileName() as string
property get IsOpen() as Boolean
Sub WriteVariant(ptr as Variant) '' add all the write(s) you want
Sub CloseFile()

I leave it to you the error handling process.

Marco

  Return to Index