#import

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • perspolis

    #1

    #import

    Hi all
    I want to use an Activex dll that has written with vb.
    I use @import to imprt that..I don't have any errors at compile time..
    but at run time I get an error..
    How can I use a dll in my application..
    I'm using and Win application without using MFC.
    thanks in advance


  • William DePalo [MVP VC++]

    #2
    Re: #import

    "perspolis" <rezarms@hotmai l.com> wrote in message
    news:OiGMjy7qFH A.464@TK2MSFTNG P15.phx.gbl...[color=blue]
    > I want to use an Activex dll that has written with vb.
    > I use @import to imprt that..I don't have any errors at compile time..
    > but at run time I get an error..
    > How can I use a dll in my application..
    > I'm using and Win application without using MFC.
    > thanks in advance[/color]

    The first step is to show a _short_ snippet of what you have tried and the
    exact text of the error message you get when it fails.

    Regards,
    Will


    Comment

    • a

      #3
      Re: #import

      ts
      "perspolis" <rezarms@hotmai l.com> дÈëÏûÏ¢ÐÂÎÅ:Oi GMjy7qFHA.464@T K2MSFTNGP15.phx .gbl...[color=blue]
      > Hi all
      > I want to use an Activex dll that has written with vb.
      > I use @import to imprt that..I don't have any errors at compile time..
      > but at run time I get an error..
      > How can I use a dll in my application..
      > I'm using and Win application without using MFC.
      > thanks in advance
      >[/color]


      Comment

      • Perspolis

        #4
        Re: #import

        #import "c:\\myExampled ll.dll"


        MyNameSpace.MyC lassptr mc=new MyNameSpace.Myc lassptr();

        at this line when I new an instance of that class at run time I get 'com
        error' message ..

        "a" <a@a> wrote in message news:#54o7e$qFH A.3096@TK2MSFTN GP15.phx.gbl...[color=blue]
        > ts
        > "perspolis" <rezarms@hotmai l.com>[/color]
        дÈëÏûÏ¢ÐÂÎÅ:Oi GMjy7qFHA.464@T K2MSFTNGP15.phx .gbl...[color=blue][color=green]
        > > Hi all
        > > I want to use an Activex dll that has written with vb.
        > > I use @import to imprt that..I don't have any errors at compile time..
        > > but at run time I get an error..
        > > How can I use a dll in my application..
        > > I'm using and Win application without using MFC.
        > > thanks in advance
        > >[/color]
        >
        >[/color]


        Comment

        • William DePalo [MVP VC++]

          #5
          Re: #import

          "Perspolis" <rezarms@hotmai l.com> wrote in message
          news:egl71AArFH A.3216@TK2MSFTN GP12.phx.gbl...[color=blue]
          > MyNameSpace.MyC lassptr mc=new MyNameSpace.Myc lassptr();[/color]

          Hmm. I don't claim to know much about COM, but I would have thought that
          you'd create an object with CoCreateInstanc e() or by calling the
          CreateInstanceM ethod() of a smart pointer class.
          [color=blue]
          > at this line when I new an instance of that class at run time I get 'com
          > error' message ..[/color]

          That's it? No text? Did you remember to initialize the COM library by
          calling CoInitialize[Ex]()?

          Regards,
          Will


          Comment

          Working...