Re-Using Plugin's in Visual Basic
Moderators: Hacker, petermad, Stefan2, white
Re-Using Plugin's in Visual Basic
This may sound like a cheeky post......
I'm in the process of writting a VB application that extract's information from an EPOC SIS file.
- Whilst doing some research I came across a 'Total Commander' freeware plugin called SISVIEW
As the WCX (and other plugin's) are simply renamed DLL's I thought GREAT - I could reuse the dll/function's to do the work for me and not re-invent the wheel....
I've already done some work on calling DLL's from VB, But I've hit a problem.
My previous work used calls to documented functions, but I can't seem to turn the C++ WCX definition back into usable code.
This is what i've got so far, but firstly it it's not passing the filelocation to the DLL.
Can anybody help?
Private Declare Function OpenArchive Lib "sisview" (ByRef ArcName As String) As Long
Private Declare Function CloseArchive Lib "sisview" (ByVal hArcData As Long) As Long
Private Declare Function ReadHeader Lib "sisview" (ByVal hArcData As Long, ByRef HeaderData As String) As String
a$ = "c:\a.sis"
a = OpenArchive(a$)
b= ReadHeader(a, 1)
c = CloseArchive(a)
I'm in the process of writting a VB application that extract's information from an EPOC SIS file.
- Whilst doing some research I came across a 'Total Commander' freeware plugin called SISVIEW
As the WCX (and other plugin's) are simply renamed DLL's I thought GREAT - I could reuse the dll/function's to do the work for me and not re-invent the wheel....
I've already done some work on calling DLL's from VB, But I've hit a problem.
My previous work used calls to documented functions, but I can't seem to turn the C++ WCX definition back into usable code.
This is what i've got so far, but firstly it it's not passing the filelocation to the DLL.
Can anybody help?
Private Declare Function OpenArchive Lib "sisview" (ByRef ArcName As String) As Long
Private Declare Function CloseArchive Lib "sisview" (ByVal hArcData As Long) As Long
Private Declare Function ReadHeader Lib "sisview" (ByVal hArcData As Long, ByRef HeaderData As String) As String
a$ = "c:\a.sis"
a = OpenArchive(a$)
b= ReadHeader(a, 1)
c = CloseArchive(a)
Last edited by phantasm on 2003-05-23, 15:45 UTC, edited 1 time in total.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
You can find detailed documentation help files of the plugin interfaces on our plugins page:
http://www.ghisler.com/plugins.htm
Please note that there are 3 different plugin types, and each has a separate documentation help file:
- packer plugins
- file system plugins
- lister plugins
The sisview plugin is a packer plugin. The delclarations are in C, but it shouldn't be difficult to convert them to VB.
http://www.ghisler.com/plugins.htm
Please note that there are 3 different plugin types, and each has a separate documentation help file:
- packer plugins
- file system plugins
- lister plugins
The sisview plugin is a packer plugin. The delclarations are in C, but it shouldn't be difficult to convert them to VB.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
While at it, since you are working on the *.sis files, maybe after reading the plugins documentation you have some spare time to develop a plugin for the TC to be able to correctly view the files inside a sis pack.
The reason behind this is when for instance you try to see the content of a *.txt file that is packed in a *.sis pack, it shows some coded content, not the actually text file you would normally see on your PDA's screen.
Well, not to mention a FSPlugin to manage your PDA's drives like any other usual drive. That would be greater, even.
Good luck!
The reason behind this is when for instance you try to see the content of a *.txt file that is packed in a *.sis pack, it shows some coded content, not the actually text file you would normally see on your PDA's screen.
Well, not to mention a FSPlugin to manage your PDA's drives like any other usual drive. That would be greater, even.
Good luck!
Well, in Visual Basic, strings must always be passed to API functions using ByVal, not ByRef. So test it again and post another message if it's not working.This is what i've got so far, but firstly it it's not passing the filelocation to the DLL.
Can anybody help?
Private Declare Function OpenArchive Lib "sisview" (ByRef ArcName As String) As Long
Private Declare Function CloseArchive Lib "sisview" (ByVal hArcData As Long) As Long
Private Declare Function ReadHeader Lib "sisview" (ByVal hArcData As Long, ByRef HeaderData As String) As String
Byez!
I've read archive plugin's documentation. The OpenArchive function does expect a User Defined Type as parameter, not a string containing the .sis filename.
This is the way for calling this function:
Public Type tOpenArchiveData
ArcName as string
OpenMode as integer
OpenResult as integer
CmtBuf as string
CmtBufSize as integer
CmtSize as integer
CmtState as integer
End Type
Public Declare Function OpenArchive _
lib "sisview.wcx" alias "OpenArchive" ( _
byval ArchiveData as tOpenArchiveData)
You must first fill the data of tOpenArchiveData structure as said in plugin reference documentation, then call the function OpenArchive.
You can read the rest of the VERY GOOD documentation downloading the plugin reference guide from ghisler website, in the Addons -> Plugins section.
This is the way for calling this function:
Public Type tOpenArchiveData
ArcName as string
OpenMode as integer
OpenResult as integer
CmtBuf as string
CmtBufSize as integer
CmtSize as integer
CmtState as integer
End Type
Public Declare Function OpenArchive _
lib "sisview.wcx" alias "OpenArchive" ( _
byval ArchiveData as tOpenArchiveData)
You must first fill the data of tOpenArchiveData structure as said in plugin reference documentation, then call the function OpenArchive.
You can read the rest of the VERY GOOD documentation downloading the plugin reference guide from ghisler website, in the Addons -> Plugins section.