Archive for September, 2005

InitTTSCaptureStream of object ITTSSTream failed

It’s very rarely, that you type an error message into google and get 0 results. It’s extremly discouraging to realize you are the only person in the world who has encountered this bug before. – Or at least the only person to take the time to talk about it on the web.
I’m stuggling with a Telephony application, Trying to use TAPI in .NET. I had it mostly working on a voice modem, making calls, playing audio, etc. But due to the limitations in the unimodem TSP – which are well documented, I decided to invest in some professional Telephony equipment, namely a Dialogic D/4PCI. It gets around the pitfalls of the voice modem TSP, but – the audio is scewed up.
I’m using code as follows:



//Create a playlist with the file sent as parameter


Object[] playList = { String.Format(@"{0}TestWave.wav",Application.StartupPath) };



// //Assign terminal to call and starts playing


// … Then after the call is accepted…

ITMediaPlayback playback;


Object[] playList = { fileName };


ITMediaControl mediaControl;




The audio quality is terrible, with stuttering, and excessive echo. I think, it’s something to do with the half-duplex nature of the 4/PCI. But to be honest I don’t know.


I even had a crack at working with some of the TAPI examples in the SAPI SDK – modifying the code to use my Dialogic card rather than the H323 line.


But I got stuck when I hit the error InitTTSCaptureStream of object ITTSSTream failed

And there is no information whatsoever on the net about it.


Categories: Uncategorized

Resurecting WinMX

One of the beauties of P2P, I believed was that the network was supposed to be decentralized. And now, with the RIAA sueing WinMX, the entire network goes down. I would have thought, with so many people with WINMX (limeware/bearshare) installed that each copy of the client software would have built up a cache of other peers on the network it could connect to.
I believe, that all it will take is somebody to develop a pure P2P application, wthout this "single point of failure" in order to indefinitely defeat the music licensing industry.
Of course, I’m not advocating copyright piracy, after all, if you’re buying a CD, need I recommend
Categories: Uncategorized

Printer error 482

Murphys law. You write a cool application which works fine on your development environment,
you install it on your client’s machine, and you get some obscure vague error. In my case "Printer error 482".
Something to do with printing a document when the printer is on a network share. (I’m using VB6). And for the life of me I can’t re-create it at home.
Has anyone ever come accross this error before?, Or is there an alternative way to print from VB6?
Like spawing another application such as IE or paint to do the printing for it? (ok that’s a hack solution – but I’m desperate)
Categories: Uncategorized

Ebay phishing scam

I actually fell for this one, feel rather stupid.

Dear eBay member,

Hey are you going to buy the item from the auction that you won, why dont you answer to my emails, if you dont Respond Now I will contact ebay safeharbor and I will report you !  I am not a fool !


If you get this email, just delete it.

Categories: Uncategorized

RETURN statements in scalar valued functions must include an argument.

Ever get one of those vague error messages back from SQL server, for once, I decided to throw a bit of light on this gem "RETURN statements in scalar valued functions must include an argument."
It occurs when you omit the brackets after a return statement in a User defined function i.e
create function fn_something(@something float)
returns float
 select  @something + 10  
gives you:
Server: Msg 1075, Level 15, State 1, Procedure fn_something, Line 5
RETURN statements in scalar valued functions must include an argument.
but this works
create function fn_something(@something float)
returns float
 return ( select  @something + 10  )
Categories: Uncategorized

XSL stylesheet for displaying serialized datasets

A utility I wrote some time ago for increasing SQL server (repeat) performance using XML caching used XMLSerializer to create XML files which were serialized versions of Datasets returned from SQL server.
I was looking for an easy way to display the contents of these files, without sifting through XML. I decided to have a look at writing a generic XSL style sheet to view these serialized datasets. First, I add a line to the top of the xml file:
<?xml-stylesheet type="text/xsl" href="dataset.xsl"?>
where dataset.xsl is:
<?xml version=’1.0′?>
<xsl:stylesheet version="1.0" xmlns:xsl=""
<xsl:template match="/">
    <xsl:for-each select="DataSet/xs:schema/xs:element/xs:complexType/xs:choice/xs:element/xs:complexType/xs:sequence/xs:element">
         <td><b><xsl:value-of select="@name"/></b></td>   
    <xsl:for-each select="/DataSet/diffgr:diffgram/NewDataSet/*">
    <xsl:for-each select="*">
         <td><xsl:value-of select="." /></td>   
Categories: Uncategorized

Mcisendstring in .NET for recording audio

Just found out how to record and playback audio. Really easy.

Private Declare Function mciSendString Lib "Winmm.dll" Alias "mciSendStringA" _


ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _

ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long


Public Sub recordToWave(ByVal filename As String)

mciSendString("open new type waveaudio alias capture", vbNullString, 0, 0)

mciSendString("record capture", vbNullString, 0, 0)

blnIsRecording =


While blnIsRecording


End While

mciSendString("save capture " + filename, vbNullString, 0, 0)

mciSendString("close capture", vbNullString, 0, 0)

End Sub

Public Sub playWave(ByVal filename As String)

mciSendString("Play waveaudio!" + filename, vbNullString, 0, 0)

End Sub

Categories: Uncategorized

RentACoder Rants

I have developed a personal hatred for, after they asked me for $100 up-front for a programming project, then cancelled my account as soon as I paid.
Whatever their excuse is, I lost $100, and have nothing to show for it. So avoid them like the plague.
Here is a good alternative GetaFreelancer (RSS feed)
Categories: Uncategorized
%d bloggers like this: