Which VB are you doing this in, it looks like it needs VB .net as it requires .NET 2.0
2007 Chrysler PT Cruiser TE
Car PC Progress:
Planning.......[---------X-] 95%
Parts...........[---------X-] 90%
Fabrication...[---------X-] 90%
RR Skin........[---------X-] 95%
View my
Worklog
Road Runner Skins
Website
Favorite thread EVER!
Which VB are you doing this in, it looks like it needs VB .net as it requires .NET 2.0
I added the .dll as a resource, but it still couldn't find the entry point to register it...
I'm using the free Visual Basic 2008 Express Edition with the .net 3.5 framework...
Also, Visual C# 2008 Express Edition, since the API was done in c#.
------------------------------------------------------------
I think I've got the beginnings of the plugin started:
So theoretically, if this were all I needed for codes, In RR, I could use this:Code:Option Strict Off Option Explicit On <System.Runtime.InteropServices.ProgId("RRExtension_NET.RRExtension")> Public Class RRExtension Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String Select Case LCase(LBL) Case "psuBATT_V" ReturnLabel = "P2140.P2140Board.cbP2140.Batt_V" Case "psuBATT_C" ReturnLabel = "P2140.P2140Board.cbP2140.Batt_C" End Select End Function
with the "X,PSUmonitoRR" extension referenced in menu.skinCode:L01,20,429,101,33,#FRed#,#FGreen#,#FBlue#,20,"BankGothic Md BT","psuBATT_V","CENTER" L01,20,489,101,33,#FRed#,#FGreen#,#FBlue#,20,"BankGothic Md BT","psuBATT_C","CENTER"
Right?
Is thein the right syntax? or should it have a $ in front of the p2140? and with or without quotes?Code:ReturnLabel = "P2140.P2140Board.cbP2140.Batt_C"
Sorry if that's a noob question, but I've so far had about 30 minutes of experience with VB and/or C# etc...Code:ReturnLabel = "$P2140.P2140Board.cbP2140.Batt_C"
2007 Chrysler PT Cruiser TE
Car PC Progress:
Planning.......[---------X-] 95%
Parts...........[---------X-] 90%
Fabrication...[---------X-] 90%
RR Skin........[---------X-] 95%
View my
Worklog
Road Runner Skins
Website
Favorite thread EVER!
You're in the right track... I have never tried to make an extension plugin with VS2008, but it should be possible.
You don't have to add the DLL to the references of the project, instead, you add the TLB you made and it should give you access to the classes/objects of the DLL -- so you'll be able to create the objects defined in the class to read the data from the PSU.
Ride Runner RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
shouldnt need the $, and definitely no quotes. Quotes are only used for strings not variables. That all looks like it should work aside from that. Test it. Run it in RR with debug=TRUE and see what error message if any you get. If you get the activeX message your .dll is not communicating with RR .. probably because of the issue we discussed (cant register COM in the free version). If u'd like i can send you a source of RRFusion done in VB2008 so u can see the proper formatting.. but it looks like u've got a good grasp of it all.
NOVA, MD, DC Monthly Meets Here
Ride Runner and Centrafuse 3 plugin creator
mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
Find my plugins on the MP3Car App Store!
Follow Me on Twitter or Facebook
Live mp3Car Facebook Chat
When I try, I get the error:
I added the .dll as a reference and it seems it reads it.A reference to 'C:\P2140API.tlb' could not be added.
The ActiveX type library 'C:\P2140API.tlb' was exported from a .NET assembly and cannot be added as a reference.
Add a reference to the .NET assembly instead.
I tried it without the quotes, and it "squiggly-blue-underlined" the "P2140.P2140Board.cbP2140.Batt_V" meaning some syntax is missing.
2007 Chrysler PT Cruiser TE
Car PC Progress:
Planning.......[---------X-] 95%
Parts...........[---------X-] 90%
Fabrication...[---------X-] 90%
RR Skin........[---------X-] 95%
View my
Worklog
Road Runner Skins
Website
Favorite thread EVER!
that means either that func in the dll is not public SHARED or its typed wrong. If you erase and type the first few characters the tooltip should appear to complete the rest of the line. Does that happen?
NOVA, MD, DC Monthly Meets Here
Ride Runner and Centrafuse 3 plugin creator
mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
Find my plugins on the MP3Car App Store!
Follow Me on Twitter or Facebook
Live mp3Car Facebook Chat
"Reference to a non-shared member requires an object reference"
2007 Chrysler PT Cruiser TE
Car PC Progress:
Planning.......[---------X-] 95%
Parts...........[---------X-] 90%
Fabrication...[---------X-] 90%
RR Skin........[---------X-] 95%
View my
Worklog
Road Runner Skins
Website
Favorite thread EVER!
Bookmarks