Calling Dll Problem

Discussion in 'ASP General' started by Barry Sanderson, Jan 6, 2004.

  1. 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.Commands
    Private Sub Command1_Click()
    test.Play
    End Sub

    Private Sub Command2_Click()
    test.StopPlaying
    End Sub

    Private Sub Command3_Click()
    test.Pause
    End Sub

    Using ASP, I'm using code snippets like this:
    <%
    set Winamp = server.createObject ("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.play" 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?




    --
     
    Barry Sanderson, Jan 6, 2004
    #1
    1. Advertising

  2. Barry Sanderson

    Alex G Guest

    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 <> wrote in message news:<Xns9467ED3D2DBFClordbearemailcom@198.161.157.145>...
    > 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.Commands
    > Private Sub Command1_Click()
    > test.Play
    > End Sub
    >
    > Private Sub Command2_Click()
    > test.StopPlaying
    > End Sub
    >
    > Private Sub Command3_Click()
    > test.Pause
    > End Sub
    >
    > Using ASP, I'm using code snippets like this:
    > <%
    > set Winamp = server.createObject ("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.play" 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, Jan 6, 2004
    #2
    1. Advertising

  3. Barry Sanderson

    Mark Schupp Guest

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

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "Barry Sanderson" <> wrote in message
    news:Xns9467ED3D2DBFClordbearemailcom@198.161.157.145...
    > 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.Commands
    > Private Sub Command1_Click()
    > test.Play
    > End Sub
    >
    > Private Sub Command2_Click()
    > test.StopPlaying
    > End Sub
    >
    > Private Sub Command3_Click()
    > test.Pause
    > End Sub
    >
    > Using ASP, I'm using code snippets like this:
    > <%
    > set Winamp = server.createObject ("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.play" 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?
    >
    >
    >
    >
    > --
     
    Mark Schupp, Jan 6, 2004
    #3
  4. 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" <> wrote in news:OwNP33H1DHA.2528
    @TK2MSFTNGP09.phx.gbl:

    > Is the component intended to control winamp on the web-server or on the
    > client's system?
    >
     
    Barry Sanderson, Jan 7, 2004
    #4
  5. Barry Sanderson

    Carl Revell Guest

    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" <> wrote in message
    news:Xns9468EA354430Alordbearemailcom@198.161.157.145...
    > 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" <> wrote in news:OwNP33H1DHA.2528
    > @TK2MSFTNGP09.phx.gbl:
    >
    > > Is the component intended to control winamp on the web-server or on the
    > > client's system?
    > >

    >
     
    Carl Revell, Jan 7, 2004
    #5
  6. Barry Sanderson

    Mark Schupp Guest

    could you re-post your code?

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "Barry Sanderson" <> wrote in message
    news:Xns9468EA354430Alordbearemailcom@198.161.157.145...
    > 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" <> wrote in news:OwNP33H1DHA.2528
    > @TK2MSFTNGP09.phx.gbl:
    >
    > > Is the component intended to control winamp on the web-server or on the
    > > client's system?
    > >

    >
     
    Mark Schupp, Jan 7, 2004
    #6
  7. Sure. Here it is:

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

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

    Private Sub Command2_Click()
    test.StopPlaying
    End Sub

    Private Sub Command3_Click()
    test.Pause
    End Sub

    And here it is from ASP (which doesn't work).
    <%
    set Winamp = server.createObject ("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" <> wrote in news:OUK4KCU1DHA.2456
    @TK2MSFTNGP12.phx.gbl:

    > could you re-post your code?
    >
     
    Barry Sanderson, Jan 8, 2004
    #7
  8. Barry Sanderson

    Alex G Guest

    or you could just use one of these

    http://www.winamp.com/plugins/browse.php?search=yes&filter=C&query=remote control lan

    Barry Sanderson <> wrote in message news:<Xns9469EFD19EC75lordbearemailcom@198.161.157.145>...
    > Sure. Here it is:
    >
    > This is the dll call from VB6 (which works fine)
    >
    > Dim test As New WinampControl.Commands
    > Private Sub Command1_Click()
    > test.Play
    > End Sub
    >
    > Private Sub Command2_Click()
    > test.StopPlaying
    > End Sub
    >
    > Private Sub Command3_Click()
    > test.Pause
    > End Sub
    >
    > And here it is from ASP (which doesn't work).
    > <%
    > set Winamp = server.createObject ("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" <> wrote in news:OUK4KCU1DHA.2456
    > @TK2MSFTNGP12.phx.gbl:
    >
    > > could you re-post your code?
    > >
     
    Alex G, Jan 8, 2004
    #8
  9. Barry Sanderson

    Mark Schupp Guest

    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
    www.ielearning.com


    "Barry Sanderson" <> wrote in message
    news:Xns9469EFD19EC75lordbearemailcom@198.161.157.145...
    > Sure. Here it is:
    >
    > This is the dll call from VB6 (which works fine)
    >
    > Dim test As New WinampControl.Commands
    > Private Sub Command1_Click()
    > test.Play
    > End Sub
    >
    > Private Sub Command2_Click()
    > test.StopPlaying
    > End Sub
    >
    > Private Sub Command3_Click()
    > test.Pause
    > End Sub
    >
    > And here it is from ASP (which doesn't work).
    > <%
    > set Winamp = server.createObject ("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" <> wrote in news:OUK4KCU1DHA.2456
    > @TK2MSFTNGP12.phx.gbl:
    >
    > > could you re-post your code?
    > >

    >
     
    Mark Schupp, Jan 8, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,871
  2. Andrew Connell
    Replies:
    3
    Views:
    2,814
    Andrew Connell
    Oct 22, 2003
  3. Replies:
    0
    Views:
    560
  4. Capsule

    calling c# dll from c++ dll

    Capsule, Oct 18, 2005, in forum: C++
    Replies:
    3
    Views:
    973
    Victor Bazarov
    Oct 18, 2005
  5. H. Simpson
    Replies:
    4
    Views:
    308
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page