Results 1 to 4 of 4

Thread: How do I connect to a COM interface?

Threaded View

  1. #2
    Fanatic Member
    Join Date
    Sep 2009
    Location
    Lakewood, Colorado
    Posts
    621

    Re: How do I connect to a COM interface?

    When you say that "it does not work," what does that mean? Is that your only code?

    Did you add a reference to the Com library? If not, Go to Project/References. Click the Browse button, and select the dll that exposes the COM reference. Click OK after you have selected it. If if already appears in the References dialog (it may), then all you need to do is to check the box next to it to add it to your project.

    Create an instance of the object, say:

    Private WithEvents streamer as HRStream.Streamer 'you don't need to make the Public, at least in general

    in you code somewhere,

    streamer.Open 'this is VB, afterall

    Does this generate an error? If not, then proceed. If so... More work is needed




    Dick
    Last edited by DickGrier; May 5th, 2011 at 01:13 PM.
    Richard Grier, Consultant, Hard & Software
    Microsoft MVP (Visual Basic)

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width