Hi Mark, This Is What I Did
Hi Mark,
this what I did.
1) I created a new exe Project with form1
2) I added a listbox
then...
Code:
Option Explicit
Private Declare Function LoadString Lib "user32" Alias "LoadStringA" (ByVal hInstance As Long, ByVal wID As Long, ByVal lpBuffer As String, ByVal nBufferMax As Long) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Sub FillClassNameList(FileName As String)
' Get the list of classnames contined with a component from the components
' resource data.
' Set the error handler
'On Error GoTo GetClassNameListErr
Dim ModuleHandle As Long
Dim ClassNames() As String
ModuleHandle = LoadLibrary(FileName)
' Start by getting the number of classnames
Dim StringLength As Integer
Dim Buffer As String
Dim Length As Long
Dim NumClassNames As Long
Length = 255
Buffer = String(Length, vbNullChar)
StringLength = LoadString(ModuleHandle, 2, Buffer, Length)
NumClassNames = Val(Left(Buffer, StringLength))
' Create the storage space
ReDim ClassNames(NumClassNames)
' Loop thorugh all the class names adding them to the array
Dim Counter As Long
For Counter = 0 To NumClassNames - 1
Buffer = String(Length, vbNullChar)
StringLength = LoadString(ModuleHandle, Counter + 3, Buffer, Length)
'ClassNames(Counter) = Left(Buffer, StringLength)
List1.AddItem Left(Buffer, StringLength)
Next Counter
' Free the module
FreeLibrary ModuleHandle
End Sub
Private Sub Form_Load()
Call FillClassNameList("C:\Omar\MyTemp\vbSendMail.dll")
End Sub