Click here to Skip to main content
15,921,169 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Help About String Matching Pin
extraful24-Apr-06 5:17
extraful24-Apr-06 5:17 
Questionplz help me.. this is the fifth time ... Pin
Mr kilany22-Apr-06 3:37
Mr kilany22-Apr-06 3:37 
GeneralRe: plz help me.. this is the fifth time ... Pin
Guffa22-Apr-06 4:50
Guffa22-Apr-06 4:50 
GeneralRe: plz help me.. this is the fifth time ... Pin
Dave Kreskowiak22-Apr-06 6:27
mveDave Kreskowiak22-Apr-06 6:27 
AnswerRe: plz help me.. this is the fifth time ... Pin
Steve Pullan22-Apr-06 17:11
Steve Pullan22-Apr-06 17:11 
Questionplz help me Pin
Sweety Shah22-Apr-06 1:07
Sweety Shah22-Apr-06 1:07 
AnswerRe: plz help me Pin
Dave Kreskowiak22-Apr-06 6:33
mveDave Kreskowiak22-Apr-06 6:33 
QuestionHow to run a DLL method dynamically from a VB6 code. I have the DLL name, Class name, Method name, parameters and the respective values from an XML. Pin
Davis Augustine22-Apr-06 0:55
Davis Augustine22-Apr-06 0:55 
Hi all,

I have a requirement where I need to create a scheduler, which will do

1) Browse and select a DLL (ActiveX DLL) from the file system.
2) Show all the classes from the DLL on a drop down.
3) if we selected a particular class from the drop down then show another drop down with all the public methods in that class
4) If we select a method from the drop down then show all the parameters.

Now allow the user to input the values for the parameters. and set a time a date to run.
All these stuff goes to an XML.

UP TO THIS I HAVE MANAGED TO DO Smile | :)

And the scheduler will read this and run the selected method for the selected class for the selected dll using the given values for the method parameters.

Basically I would like to know how to run a DLL method dynamically from a VB6 code. Remember I am getting DLL name, Class name, Method name, parameters and the respective values from an XML as strings. How we can execute this in VB6? if not possible in VB6, is it possible in VB.NET? how?

Following are the sample code I used to read Tlb stuff from the given dll to form the xml for my scheduler... Please help me Smile | :) thanks!


-----------------------------------------------------------
Dim objtlb As New TLI.TLIApplication
Dim objTlbInf As TLI.TypeLibInfo
Dim objSearch As TLI.SearchResults
Dim objMemberInfo As TLI.MemberInfo
Dim Ob As Object
Dim tliApp As TLI.TLIApplication
Dim tliIrf As TLI.InterfaceInfo
Dim tliMI As TLI.MemberInfo
Dim sDLLFileName As String


Private Sub cmbDLLCoClassesList_Click()
On Error GoTo err:
Set tliApp = New TLI.TLIApplication
Dim tliMI As TLI.MemberInfo

Set Ob = CreateObject("MYTEST." & cmbDLLCoClassesList.Text)

Set tliIrf = tliApp.InterfaceInfoFromObject(Ob)
cmbDLLMethodsList.Clear
lstParam.Clear
For i = 1 To tliIrf.Members.Count
cmbDLLMethodsList.AddItem tliIrf.Members(i).Name


Next i
cmbDLLMethodsList.ListIndex = 0
lstParam.Clear
For j = 1 To tliIrf.Members(1).Parameters.Count
lstParam.AddItem tliIrf.Members(1).Parameters.Item(j).Name
Next j
lstParam.ListIndex = 0




Set Ob = Nothing
Exit Sub
err:
cmbDLLMethodsList.Clear
lstParam.Clear

End Sub



Private Sub cmbDLLMethodsList_Click()
lstParam.Clear

For j = 1 To tliIrf.Members(cmbDLLMethodsList.ListIndex + 1).Parameters.Count
lstParam.AddItem tliIrf.Members(cmbDLLMethodsList.ListIndex + 1).Parameters.Item(j).Name
Next j

End Sub



Private Sub cmdLoad_Click()
sDLLFileName = "D:\MYTEST.dll"
Set objTlbInf = objtlb.TypeLibInfoFromFile(sDLLFileName)

Set objSearch = objTlbInf.GetMembersWithSubString("")
cmbDLLCoClassesList.Clear
For i = 1 To objTlbInf.CoClasses.Count
cmbDLLCoClassesList.AddItem objTlbInf.CoClasses.Item(i)
Next
cmbDLLCoClassesList.ListIndex = 0
End Sub
-----------------------------------------------------------------------------------



Davis
AnswerRe: How to run a DLL method dynamically from a VB6 code. I have the DLL name, Class name, Method name, parameters and the respective values from an XML. Pin
mr_1234522-Apr-06 4:41
mr_1234522-Apr-06 4:41 
GeneralRe: How to run a DLL method dynamically from a VB6 code. I have the DLL name, Class name, Method name, parameters and the respective values from an XML. Pin
Davis Augustine3-May-06 2:45
Davis Augustine3-May-06 2:45 
Questionhyperlink in crystalreport Pin
Sweety Shah22-Apr-06 0:53
Sweety Shah22-Apr-06 0:53 
QuestionMail application Pin
D.N.21-Apr-06 23:42
D.N.21-Apr-06 23:42 
AnswerRe: Mail application Pin
CWIZO22-Apr-06 0:32
CWIZO22-Apr-06 0:32 
Questioncombobox in datagrid Pin
bony_baba21-Apr-06 22:23
bony_baba21-Apr-06 22:23 
QuestionError : in Javascript query string Pin
Amit Agarrwal21-Apr-06 22:15
Amit Agarrwal21-Apr-06 22:15 
AnswerRe: Error : in Javascript query string Pin
mr_1234522-Apr-06 4:36
mr_1234522-Apr-06 4:36 
AnswerRe: Error : in Javascript query string Pin
Dave Kreskowiak22-Apr-06 6:36
mveDave Kreskowiak22-Apr-06 6:36 
QuestionDisplay Form Pin
contact ajo21-Apr-06 22:14
contact ajo21-Apr-06 22:14 
AnswerRe: Display Form Pin
mr_1234522-Apr-06 4:34
mr_1234522-Apr-06 4:34 
QuestionApplication Path Pin
Vikrant Badhai21-Apr-06 22:05
Vikrant Badhai21-Apr-06 22:05 
AnswerRe: Application Path Pin
mr_1234522-Apr-06 4:27
mr_1234522-Apr-06 4:27 
GeneralApplication Path Pin
Vikrant Badhai22-Apr-06 21:07
Vikrant Badhai22-Apr-06 21:07 
AnswerRe: Application Path Pin
mr_1234523-Apr-06 4:43
mr_1234523-Apr-06 4:43 
Questionhow to use select command using to condition Pin
Swiss Mantoro21-Apr-06 17:51
Swiss Mantoro21-Apr-06 17:51 
AnswerRe: how to use select command using to condition Pin
Naveen22-Apr-06 0:48
Naveen22-Apr-06 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.