Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35

Thread: Plug-in Worklog: PSUmonitoRR

  1. #21
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Quote Originally Posted by Enforcer View Post
    Have you

    1. registered te dll
    2. added it in Project --> references

    ?
    1. can not find entry point... i think, I'll have to check again,
    2. nope, will do...

    thanks....
    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!

  2. #22

  3. #23
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    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:

    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
    So theoretically, if this were all I needed for codes, In RR, I could use this:

    Code:
    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"
    with the "X,PSUmonitoRR" extension referenced in menu.skin

    Right?

    Is the
    Code:
    ReturnLabel = "P2140.P2140Board.cbP2140.Batt_C"
    in 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...
    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!

  4. #24
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    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."

  5. #25
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,114
    Blog Entries
    49
    Quote Originally Posted by monkeyracer View Post
    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:

    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
    So theoretically, if this were all I needed for codes, In RR, I could use this:

    Code:
    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"
    with the "X,PSUmonitoRR" extension referenced in menu.skin

    Right?

    Is the
    Code:
    ReturnLabel = "P2140.P2140Board.cbP2140.Batt_C"
    in 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...
    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.
    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

  6. #26
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Quote Originally Posted by guino View Post
    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.
    When I try, I get the error:
    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 added the .dll as a reference and it seems it reads it.

    Quote Originally Posted by Sonicxtacy02 View Post
    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.
    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!

  7. #27
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,114
    Blog Entries
    49
    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?
    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

  8. #28
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    "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!

  9. #29
    Maximum Bitrate jonessc's Avatar
    Join Date
    Nov 2006
    Location
    Wales, UK
    Posts
    787
    Quote Originally Posted by monkeyracer View Post
    a fellow forum member had an idea about solar panels


    That guys a legend
    CarPuter Progress:
    Planning:-----> [||||||||||] 100%
    Hardware Buying:-> [||||||||||] 100%
    Software:-----> [||||||||||] 100%
    Installing:-----> [||||||||||] 100%
    Current Project= Making skins in photoshop...

  10. #30
    Newbie rocsell's Avatar
    Join Date
    Mar 2008
    Posts
    40
    Any updates on this? How are you coming along??

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Plug and play but where
    By AJWatU in forum LCD/Display
    Replies: 4
    Last Post: 10-19-2007, 04:39 PM
  2. USB plug hard wired to glovebox
    By sky_lennard in forum Power Supplies
    Replies: 5
    Last Post: 09-29-2007, 11:52 PM
  3. Where to Buy 3 Contact DC Power Plug
    By tallyman in forum General MP3Car Discussion
    Replies: 0
    Last Post: 03-18-2007, 09:53 PM
  4. EPIA MII 10000 onboard USB plug help
    By guizai in forum General Hardware Discussion
    Replies: 5
    Last Post: 01-26-2007, 06:08 PM
  5. Replies: 5
    Last Post: 07-12-2003, 01:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •