Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL to call a VB function

Status
Not open for further replies.

robert201

Programmer
Jul 18, 2007
80
TH
Hello,

VS 2008

I have created a C++ smart device DLL and added it to my project.

From my VB program I can call the functions successfully in the DLL. Using the code below
Code:
<DllImportAttribute("WIN32SmartDLL.dll")> _ 
Private Shared Function AddNumbers(ByVal a As Integer, ByVal b As Integer) As Integer 
End Function 

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) 
    Dim answer As Integer = AddNumbers(25, 25) 
    
End Sub
However, I need to be able to get the DLL to get information from the VB program.

Many thanks for any advice on this,

Steve
 
>I need to be able to get the DLL to get information from the VB program.

I assume you mean that you have to pass some sort of argument to your DLL. Can you explain in more detail?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top