Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with com dll 1

Status
Not open for further replies.

MEGUIA

Programmer
Sep 26, 2001
62
PR
Hi

I've created an dll based on tapi api configuration and pardon my question in advance, I created an ASP page with this vbscript code (tapi.clsconn is my dll):

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>
<%
Option Explicit

dim p_pass1
dim outpostDB

p_pass1 = Request.form(&quot;p_name&quot;)
p_pass1 = &quot; & p_pass1 & &quot;

response.write(p_pass1)
set outpostDB = createObject(&quot;TAPI.CLSCONN&quot;)


outpostDB.StartsSecc Request.form(&quot;p_name&quot;)


Sub Down
outpostDB.KillSecc
set outpostDB = nothing
End Sub

%>

This asp recieve a telephone number and my dll dial the number but I want to create a button in this asp to call the subroutine down and terminate the phone call. I really don't know how to call this routine, I've try the onclick event but it doesn't work. Please help me. Thank You
 
The code you have posted runs at the server, and any button or onclick event would be running in the client browser.

your only way to complete this is to store outpostDB in a session variable
set Session.contents(&quot;outpostDB&quot;) = createObject(&quot;TAPI.CLSCONN&quot;)

Session.contents(&quot;outpostDB.StartsSecc&quot;) Request.form(&quot;p_name&quot;)

%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM ID= etc Action=&quot;ClosePhoneCall.asp&quot;>
<INPUT TYPE=&quot;SUBMIT&quot; Value=&quot;Drop call&quot;>
</FORM>
</BODY>
</HTML>



ClosePhoneCall.asp - new page

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>
<%
Option Explicit

Session.contents(&quot;outpostDB&quot;).KillSecc
set Session.contents(&quot;outpostDB&quot;) = nothing

Response.Redirect &quot;Somewhere else&quot;

' Or stream some HTML saying the call has been dropped.

%>



your only safe guard with this whole mechanism not leaving phone calls up all the time will be session timeouts I think.
 
Hi

I've created an dll based on tapi api configuration and pardon my question in advance, I created an ASP page with this vbscript code (tapi.clsconn is my dll). This part was created with the help of simpleton(programmer of tek-tips:

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>
<%
Option Explicit

set Session.Contents(&quot;outpostDB&quot;) = createObject(&quot;TAPI.CLSCONN&quot;)

Session.Contents(&quot;outpostDB.StartsSecc&quot;) Request.form&quot;p_name&quot;)

%>

<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM ID= etc Action=&quot;ClosePhoneCall.asp&quot;>
<INPUT TYPE=&quot;SUBMIT&quot; Value=&quot;Drop call&quot;>
</FORM>
</BODY>
</HTML>
-------------------------------------------------

But the dial.asp page gave this error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/DIAL.asp, line 7, column 41
Session.Contents(&quot;outpostDB.StartsSecc&quot;) Request.form(&quot;p_name&quot;)

I've verify my code but I don't see the problem. Any ideas.
Thank You
 
Session.Contents(&quot;outpostDB.StartsSecc&quot;) Request.form&quot;p_name&quot;)

Should be (i think)

Session.Contents(&quot;outpostDB.StartsSecc&quot;) Request.form(&quot;p_name&quot;)
 
I wish you could edit these :)

Session.Contents(&quot;outpostDB.StartsSecc&quot;) Request.form&quot;p_name&quot;)

Should actually be

Session.Contents(&quot;outpostDB&quot;).StartsSecc Request.form(&quot;p_name&quot;)

d'oh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top