Calling Dll Problem

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

    Calling Dll Problem

    I'm having a problem calling a .dll file from asp. Here is the
    situation:

    I'm creating a web enabled mp3 app that uses windows messaging to control
    winamp. To this end I've made a dll that controls the basic functions of
    winamp that works fine out of VB6, but seems to freeze any asp web app
    that tries to call it.

    When I create the .DLL file it compiles and registers just fine. In VB6
    I use the following code to call it and it seems to work great.

    Dim test As New WinampControl.C ommands
    Private Sub Command1_Click( )
    test.Play
    End Sub

    Private Sub Command2_Click( )
    test.StopPlayin g
    End Sub

    Private Sub Command3_Click( )
    test.Pause
    End Sub

    Using ASP, I'm using code snippets like this:
    <%
    set Winamp = server.createOb ject ("WinampControl .commands")
    Winamp.play()
    %>
    .....HTML stuff follows

    When I hit the web page it tries to load forever and doesn't start
    playing or otherwise control winamp. In my testing, it seems to freeze
    on the "Winamp.pla y" line of code, so it seems to recognize the .dll, but
    not any of the commands. In theroy, it should start playing winamp on my
    local webserver.

    I would like this app to be web enabled so I can control my jukebox via
    any computer in my house, or even via a wireless pda. Can anyone tell me
    what might be going on?




    --
  • Alex G

    #2
    Re: Calling Dll Problem

    I haven't got a clue at what the problem could be, but i would suggest
    adding a simple function to the dll to test if the ASP page is
    recognizing it properly. The only other thing I would check is that
    "Play" isn't some sort of reserved word or something.

    Barry Sanderson <lordbear@email .com> wrote in message news:<Xns9467ED 3D2DBFClordbear emailcom@198.16 1.157.145>...[color=blue]
    > I'm having a problem calling a .dll file from asp. Here is the
    > situation:
    >
    > I'm creating a web enabled mp3 app that uses windows messaging to control
    > winamp. To this end I've made a dll that controls the basic functions of
    > winamp that works fine out of VB6, but seems to freeze any asp web app
    > that tries to call it.
    >
    > When I create the .DLL file it compiles and registers just fine. In VB6
    > I use the following code to call it and it seems to work great.
    >
    > Dim test As New WinampControl.C ommands
    > Private Sub Command1_Click( )
    > test.Play
    > End Sub
    >
    > Private Sub Command2_Click( )
    > test.StopPlayin g
    > End Sub
    >
    > Private Sub Command3_Click( )
    > test.Pause
    > End Sub
    >
    > Using ASP, I'm using code snippets like this:
    > <%
    > set Winamp = server.createOb ject ("WinampControl .commands")
    > Winamp.play()
    > %>
    > ....HTML stuff follows
    >
    > When I hit the web page it tries to load forever and doesn't start
    > playing or otherwise control winamp. In my testing, it seems to freeze
    > on the "Winamp.pla y" line of code, so it seems to recognize the .dll, but
    > not any of the commands. In theroy, it should start playing winamp on my
    > local webserver.
    >
    > I would like this app to be web enabled so I can control my jukebox via
    > any computer in my house, or even via a wireless pda. Can anyone tell me
    > what might be going on?
    >
    >
    >
    >
    > --[/color]

    Comment

    • Mark Schupp

      #3
      Re: Calling Dll Problem

      Is the component intended to control winamp on the web-server or on the
      client's system?

      --
      Mark Schupp
      Head of Development
      Integrity eLearning



      "Barry Sanderson" <lordbear@email .com> wrote in message
      news:Xns9467ED3 D2DBFClordbeare mailcom@198.161 .157.145...[color=blue]
      > I'm having a problem calling a .dll file from asp. Here is the
      > situation:
      >
      > I'm creating a web enabled mp3 app that uses windows messaging to control
      > winamp. To this end I've made a dll that controls the basic functions of
      > winamp that works fine out of VB6, but seems to freeze any asp web app
      > that tries to call it.
      >
      > When I create the .DLL file it compiles and registers just fine. In VB6
      > I use the following code to call it and it seems to work great.
      >
      > Dim test As New WinampControl.C ommands
      > Private Sub Command1_Click( )
      > test.Play
      > End Sub
      >
      > Private Sub Command2_Click( )
      > test.StopPlayin g
      > End Sub
      >
      > Private Sub Command3_Click( )
      > test.Pause
      > End Sub
      >
      > Using ASP, I'm using code snippets like this:
      > <%
      > set Winamp = server.createOb ject ("WinampControl .commands")
      > Winamp.play()
      > %>
      > ....HTML stuff follows
      >
      > When I hit the web page it tries to load forever and doesn't start
      > playing or otherwise control winamp. In my testing, it seems to freeze
      > on the "Winamp.pla y" line of code, so it seems to recognize the .dll, but
      > not any of the commands. In theroy, it should start playing winamp on my
      > local webserver.
      >
      > I would like this app to be web enabled so I can control my jukebox via
      > any computer in my house, or even via a wireless pda. Can anyone tell me
      > what might be going on?
      >
      >
      >
      >
      > --[/color]


      Comment

      • Barry Sanderson

        #4
        Re: Calling Dll Problem

        Its supposed to control winamp on the server. I'll have my speakers and
        everything set up on the server. I'll only be connecting through my local
        intranet in my house, so this should work fine.


        "Mark Schupp" <mschupp@ielear ning.com> wrote in news:OwNP33H1DH A.2528
        @TK2MSFTNGP09.p hx.gbl:
        [color=blue]
        > Is the component intended to control winamp on the web-server or on the
        > client's system?
        >[/color]

        Comment

        • Carl Revell

          #5
          Re: Calling Dll Problem

          Yes, initially you need to ensure that you are able to correctly instantiate
          and call the DLL from ASP so add a simple Test method that returns a string
          maybe and display it from your ASP page just to check that side of things is
          working.

          "Barry Sanderson" <lordbear@email .com> wrote in message
          news:Xns9468EA3 54430Alordbeare mailcom@198.161 .157.145...[color=blue]
          > Its supposed to control winamp on the server. I'll have my speakers and
          > everything set up on the server. I'll only be connecting through my local
          > intranet in my house, so this should work fine.
          >
          >
          > "Mark Schupp" <mschupp@ielear ning.com> wrote in news:OwNP33H1DH A.2528
          > @TK2MSFTNGP09.p hx.gbl:
          >[color=green]
          > > Is the component intended to control winamp on the web-server or on the
          > > client's system?
          > >[/color]
          >[/color]


          Comment

          • Mark Schupp

            #6
            Re: Calling Dll Problem

            could you re-post your code?

            --
            Mark Schupp
            Head of Development
            Integrity eLearning



            "Barry Sanderson" <lordbear@email .com> wrote in message
            news:Xns9468EA3 54430Alordbeare mailcom@198.161 .157.145...[color=blue]
            > Its supposed to control winamp on the server. I'll have my speakers and
            > everything set up on the server. I'll only be connecting through my local
            > intranet in my house, so this should work fine.
            >
            >
            > "Mark Schupp" <mschupp@ielear ning.com> wrote in news:OwNP33H1DH A.2528
            > @TK2MSFTNGP09.p hx.gbl:
            >[color=green]
            > > Is the component intended to control winamp on the web-server or on the
            > > client's system?
            > >[/color]
            >[/color]


            Comment

            • Barry Sanderson

              #7
              Re: Calling Dll Problem

              Sure. Here it is:

              This is the dll call from VB6 (which works fine)

              Dim test As New WinampControl.C ommands
              Private Sub Command1_Click( )
              test.Play
              End Sub

              Private Sub Command2_Click( )
              test.StopPlayin g
              End Sub

              Private Sub Command3_Click( )
              test.Pause
              End Sub

              And here it is from ASP (which doesn't work).
              <%
              set Winamp = server.createOb ject ("WinampControl .commands")
              Winamp.play()
              %>

              I can post the DLL code, but its much larger, and I'm fairly certain
              thats not where the problem is since it works in VB.


              "Mark Schupp" <mschupp@ielear ning.com> wrote in news:OUK4KCU1DH A.2456
              @TK2MSFTNGP12.p hx.gbl:
              [color=blue]
              > could you re-post your code?
              >[/color]

              Comment

              • Alex G

                #8
                Re: Calling Dll Problem

                or you could just use one of these

                Winamp builds tools that empower artists to manage their music and revenue, while delivering a player that offers a seamless listening experience. Discover our products!


                Barry Sanderson <lordbear@email .com> wrote in message news:<Xns9469EF D19EC75lordbear emailcom@198.16 1.157.145>...[color=blue]
                > Sure. Here it is:
                >
                > This is the dll call from VB6 (which works fine)
                >
                > Dim test As New WinampControl.C ommands
                > Private Sub Command1_Click( )
                > test.Play
                > End Sub
                >
                > Private Sub Command2_Click( )
                > test.StopPlayin g
                > End Sub
                >
                > Private Sub Command3_Click( )
                > test.Pause
                > End Sub
                >
                > And here it is from ASP (which doesn't work).
                > <%
                > set Winamp = server.createOb ject ("WinampControl .commands")
                > Winamp.play()
                > %>
                >
                > I can post the DLL code, but its much larger, and I'm fairly certain
                > thats not where the problem is since it works in VB.
                >
                >
                > "Mark Schupp" <mschupp@ielear ning.com> wrote in news:OUK4KCU1DH A.2456
                > @TK2MSFTNGP12.p hx.gbl:
                >[color=green]
                > > could you re-post your code?
                > >[/color][/color]

                Comment

                • Mark Schupp

                  #9
                  Re: Calling Dll Problem

                  Probably your component requires that a window exist in order to work. This
                  generally won't work from ASP.

                  --
                  Mark Schupp
                  Head of Development
                  Integrity eLearning



                  "Barry Sanderson" <lordbear@email .com> wrote in message
                  news:Xns9469EFD 19EC75lordbeare mailcom@198.161 .157.145...[color=blue]
                  > Sure. Here it is:
                  >
                  > This is the dll call from VB6 (which works fine)
                  >
                  > Dim test As New WinampControl.C ommands
                  > Private Sub Command1_Click( )
                  > test.Play
                  > End Sub
                  >
                  > Private Sub Command2_Click( )
                  > test.StopPlayin g
                  > End Sub
                  >
                  > Private Sub Command3_Click( )
                  > test.Pause
                  > End Sub
                  >
                  > And here it is from ASP (which doesn't work).
                  > <%
                  > set Winamp = server.createOb ject ("WinampControl .commands")
                  > Winamp.play()
                  > %>
                  >
                  > I can post the DLL code, but its much larger, and I'm fairly certain
                  > thats not where the problem is since it works in VB.
                  >
                  >
                  > "Mark Schupp" <mschupp@ielear ning.com> wrote in news:OUK4KCU1DH A.2456
                  > @TK2MSFTNGP12.p hx.gbl:
                  >[color=green]
                  > > could you re-post your code?
                  > >[/color]
                  >[/color]


                  Comment

                  Working...