Fax Module ActiveX DLL Server 2003
Posted on 2006-11-12
We have a legacy ASP web app that we have migrated to server 2003 STD. All has gone well minus the fact that the fax module DLL does not work properly. We have the source code and I realized it was using the old fax com object that is now the extended fax com object under 2003. I have rebuilt the DLL a couple of times now using the extended com object but have had no luck. I think it may also have to do with the fact that
1: I am coding the new DLL under VS2005 (.NET v2)
2: I'm not sure if there is anytthying in particular I have to do to make a DLL an ActiveX DLL.
It has been years since I have coded in any language and even then I wasn't really doing anything worth mentioning. ;) Any help would be greatly appreciated. I am going to post the source from the original as maybe I am just going about this all the wrong way.
Function SendDocByFax(FDoc, FServer, FNumRecip, FRecip, FNumSend, FCov, _
FFNumSend, FComp, FAddr1, _
FAddr2, FAddr3, FSend, _
FSubj, FNote) As String
On Error GoTo Ferr
Dim FaxServer As Object
Dim FaxDoc As Object
Dim faxStatus As String
Set FaxServer = CreateObject("FaxServer.FaxServer")
faxStatus = "Create Object"
faxStatus = "FaxServer.Connect"
Set FaxDoc = FaxServer.CreateDocument(FDoc)
faxStatus = "CreateDocument"
If FCov = True Then 'Decide if a coverpage will be sent
FaxDoc.SendCoverpage = 1
FaxDoc.SendCoverpage = 0
If FAddr1 <> "" Then 'Iterate to send up to three address lines
FaxDoc.SenderAddress = FAddr1 & Chr(13)
If FAddr2 <> "" Then
FaxDoc.SenderAddress = FaxDoc.SenderAddress & FAddr2 & Chr(13)
If FAddr3 <> "" Then
FaxDoc.SenderAddress = FaxDoc.SenderAddress & FAddr3
FaxDoc.ServerCoverpage = 1 'Coverpage on server rather than client
FaxDoc.CoverpageName = "OMS.cov"
faxStatus = "Coverpage"
FaxDoc.SenderCompany = FComp
FaxDoc.SenderFax = FFNumSend
FaxDoc.SenderOfficePhone = FNumSend
FaxDoc.SenderName = FSend
FaxDoc.CoverpageSubject = FSubj
FaxDoc.CoverpageNote = FNote
FaxDoc.RecipientName = FRecip
FaxDoc.FaxNumber = FNumRecip
faxStatus = "Send"
Set FaxDoc = Nothing
Set FaxServer = Nothing
SendDocByFax = "OK"
SendDocByFax = Err.Description & " " & faxStatus