HOW TOs

ASP_COVER - See your currently playing cover using a web browser

PARTY_GUI - Use Party GUI with HASE (no more DCOM!)


View the currently playing cd cover, or show the cover in your own application over HTTP

ASP_COVER.ZIP

1. Setup a webserver - IIS, PWS, etc. (The sample code here is ASP)

2. Create a vroot that points to your cover image directory

example: http://myserver/covers = c:\program files\nirvis\album covers

3. Create another vroot (or you can use the same one if you want) that has execute permissions

4. Create a global.asa file in the new vroot's directory

5. Place the following text in the global.asa file:

<OBJECT RUNAT=Server SCOPE=session ID=Hasex

PROGID="hasexcontrol.hasex">

REM Object Script

</OBJECT>

6. Place the following text in a file named cover.asp:

<%@Language=VBScript %>

<html>

 

<head>

<meta http-equiv="REFRESH" content="10;">

</head>

 

<body bgcolor="#99CCFF" text="#000000" >

 

<%

hasex.winsock_connect "localhost",12111  'Change the servername and port to point to the slink-e socket server

 

coverpath = "//myserver/covers/"         'URL pointing to your album covers directory

fullfn = hasex.command("COVERFILENAME")  'get the filename WITH the path

 

if fullfn <> "" and fullfn <> "-1" then    'If there is no cover, just return a blank HTML page

fn_parts = split(fullfn, "\")         'break into parts

coverfn = fn_parts(Ubound(fn_parts)) 'get the last part

 

'Output the link to the image

response.write "<img src=" & chr(34) & "http:" & coverpath & coverfn & chr(34) & " ALT=" &chr(34) & coverfn & chr(34) & ">" & "</img>"

 

end if

%>

</body>

</html>

7. Navigate a browser to http://myserver/covers/cover.asp - you should see the cover of the playing CD

 

NOTES:

   1. Slink-e Socket Server must receive a "cdjr:playing" message to know the cover filename

   2. If the currently playing CD doesn't have a cover, you should get a blank HTML page

   3. HASEx MUST be installed on the PC acting as the webserver

   4. The client machine must have access to BOTH vroots

   5. The COVERFILENAME feature wasn't added until 11/25/2000, so you'll need a HASE version released after 11/25/2000

   6. The WebBrowser control in VB is a VERY easy way to display the cover image in your VB application

   7. This is designed to replace the HTTP cover server built into Slink-e Socket Server. That feature HAS BEEN removed.


PARTY_GUI - Use Party GUI with HASE (no more DCOM!)

Download the HASE_PG Code Module

1) Add HASEX control to form as HASEx1
2) Delete SlinkX control from form
3) Add the hase_pg module to the application
4) Search & Replace "slinkx.send" with "slinkx_send" ' Note, this might get the sendex line too...
5) Search & Replace "slinkx.sendex" with "slinkx_sendex"
6) Search & Replace "slinkx.AddDevice" with "slinkx_AddDevice"
7) Search & Replace "slinkx.AddDeviceText" with "slinkx_AddDeviceText"
8) Add a hasex1.winsockconnect(addr,port) in the form load prior to any calls
9) Copy the HASEx1_DeviceEvent procedure from the HASE_PG module and paste in the fullwin form code


 

Want to see more HOW TOs? Just let us know what you'd like to see :>)