1.

Solve : New to VB Express How do i work with Dll's?

Answer»

1. but how do i find out what usb port # its on?It won't be port 1, i'm not sure what that is, i was just using an example. I don't actually know, nor do I know how to find out... maybe someone ELSE knows how to find out?ok i change the number to many TIMES and still i get the same error message.Code: [Select]Imports LEGOVPBrickLib

Public Class Form1
Const MyPort As Integer = 1 'change this to your usb port

Private Sub SendBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendBtn.Click
Static LegoThing As New LEGOVPBrickLib.VPBrick '*new* was needed
Try
LegoThing.Open(MyPort.ToString)
LegoThing.Download(SendTxtBox.Text)
Catch ex As Exception
MsgBox("Error: " & ex.Message, MsgBoxStyle.Critical, "An error has occured.")
End Try
End Sub
End Class
I tried this on my computer but I believe your dll needs a heck of a lot of code to interface with it as it was returning a COMException and an InnerException, which means I need to dissassemble the dll to know what to send to it, which takes a very LONG time and is incredibly difficult. I could try, but
1: without the mindstorms set I have no way of testing it and
2: it would take me at least 2 weeks, probably 3 to write the code.

Is there a manual that comes with your mindstorms set which tells you how it can work? Or a ReadMe that came with the dll? Anything at all that came that can give me a headstart?the help file that came with the dll is to LARGE can i send it to u by email?Feel free. I will PM you my email.I'm very sorry, but It just won't work, no matter what I do. Do you know anybody who has SUCCESSFULLY communicated with the set? You may have to ask them how its done.

I even tried and online "example" - it returned 57 errors.

Here is a link to a sample I found - its VB6, however

http://news.lugnet.com/robotics/?n=23464

Once again, I am very sorry.its ok thank you for trying.



Discussion

No Comment Found