Copy link to clipboard
Copied
We have been using 32-bit ColdFusion 8 on a 32-bit Windows Server 2003 machine. Through this system, we have been able to send faxes by instantiating a FaxServer COM object via a cfobject call. Up until now, we have not had any problems with this.
Now, we are continuing on ColdFusion 8, but we are installing a 64-bit version of CF8 on a new box that has Windows Server 2008, also 64-bit. The problem is that we've learned that Windows Server 2008 64-bit does not support COM objects anymore, and therefore our previous cfobject calls can no longer be used to send out faxes. I must have spent a whole day researching the issue, and I have not been able to find a solution.
What would be the ideal method, object call, or 64-bit solution that can allow us to once again send a fax via our ColdFusion scripts through our Windows Server 2008 machine? Thanks!
Tony
Copy link to clipboard
Copied
We've made a little progress since this post, but I still need some help.
I'm using a cfobject call to a .NET assembly, and the file we are accessing is the FXSCOMEX.DLL. It is accessing it because we are not getting a .dll does not exist error. However, we are unable to see if the methods we are using are correct because we are getting an error at the cfobject call where the message is "DotNetExtension not installed".
We did a fresh install of ColdFusion, added the .Net Integration via the installation, have .Net Framework 3.5.1 running, and also have .Net Extensibilty installed too. What would we need to do to either insure that the DotNetExtension is installed or correctly call the .dll library via ColdFusion 64-bit?
Copy link to clipboard
Copied
I suspect that FXSCOMEX.DLL is not a .NET assembly. You might try one or more of the following options.
1) Create a .NET component which wraps the Fax component. Call the .NET component via cfinvoke or cfobject.
See: http://www.codeproject.com/Questions/260306/How-to-initialize-FAXCOMEXLib-FaxServer
http://stackoverflow.com/questions/3663338/sending-fax-through-net-c
2) Create a Visual Basic Script that can be invoked at the command line via cfexecute.
See: http://msdn.microsoft.com/en-us/library/ms692936.aspx
3) Use a third party web service such as Interfax ( www.interfax.net ).
Copy link to clipboard
Copied
First off, the DotNetExtension error is gone...for some reason the .NET integration was either not or not fully installed via our CF8 executable. We had to download and install the integration separately. Once, we did that and rebooted the server, no more DotNetExtension errors and we were able to access a dll.
Unfortunately, the error we have gotten now is "Can't load IA 32-bit .dll on a AMD 64-bit platform". So, the first question I now have is where can I get a 64-bit version of the FXSCOMEX.dll file?
With regards to #1 (#2 seemed self-explanatory), Bob could you elaborate a bit more on the .NET component? Are you talking about creating a method in a .NET file that calls the Fax Component and all the other methods of processing and sending a fax and after creating that .NET object via cfobject, we would use only one line of code that calls that specific method and all the parameters associated with it? If not, please help me understand.
Copy link to clipboard
Copied
My comment and possibly the error message you are reporting relates to the fact that not all DLLs are .NET assemblies. I suspect that FXSCOMEX.DLL is a COM component, and not a .NET assembly. In order to access the DLL's functionality you may need to create a .NET class that invokes the COM component. Googling ".net com wrapper" or a similar phrase should get you started in the right direction.
Copy link to clipboard
Copied
Bob,
Quick follow up - we are correctly trying to call an object via coldfusion, but the .dll does not contain an assembly class. So, I tried to do #1 in your list. I grabbed the tlbimp.exe file, was able to successfully regsvr32 the DLL file in our own directory, but as soon as we attempted the tlbimp executable in the same directory as the DLL, we get this error:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'TlbImp.TlbImp' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'TlbImpCode, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'TlbImpCode, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at TlbImp.TlbImp..cctor()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at TlbImp.TlbImp.Main(String[] aArgs)
Both the executable and DLL are in the same directory, so I do not see how it could not find the file. We are making progress, and I can't help but feel we are close, but can you help us figure out where we are going wrong with this or what more we need to do to make this work?
Copy link to clipboard
Copied
I still have not received nor found an answer to #1, but I found something with #2. I actually got it to work in VBScript, and have it send a fax to the Microsoft Fax Service on the Windows 2008 Server. However, I got it work via the command prompt, and when I try to do the same thing in ColdFusion via a cfexecute tag, it doesn't work. The operation appears to fail at the spot the FaxDocument object tries to connect to the fax server and submit the fax. The following is the working VBScript code, followed by the coldfusion code I'm using to call it:
Dim objFaxDocument
Set objFaxDocument = CreateObject("FAXCOMEX.FaxDocument")
Set objFaxServer = CreateObject("FAXCOMEX.FaxServer")
Dim JobID
objFaxServer.Connect("")
objFaxDocument.Body = "C:\*FAXPATH*\testfax.pdf"
objFaxDocument.DocumentName = "My First Fax"
objFaxDocument.Priority = "2"
objFaxDocument.Recipients.Add("4047559972")
objFaxDocument.AttachFaxToReceipt = True
const fcptNone = 0
objFaxDocument.CoverPageType = fcbtNone
objFaxDocument.CoverPage = "generic"
objFaxDocument.Note = "Here is the info you requested"
objFaxDocument.ReceiptAddress = "recipient@email.com"
objFaxDocument.Subject = "Today's fax"
objFaxDocument.Sender.Title = "Mr."
objFaxDocument.Sender.Name = "Name"
objFaxDocument.Sender.City = "Somewhere"
objFaxDocument.Sender.State = "FL"
objFaxDocument.Sender.Company = "CompanyName"
objFaxDocument.Sender.Country = "USA"
objFaxDocument.Sender.Email = "my@email.com"
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)
'MsgBox("The Job ID is :" & JobID(0))
objFaxServer.Disconnect()
The coldfusion code used is:
<cfexecute name="C:\Windows\System32\cscript.exe" arguments="C:\*VBSFAXPATH*\test.vbs"> </cfexecute>
Again, any help at this point is greatly appreciated!
Copy link to clipboard
Copied
In regards the command line issue:
1. Are any exceptions thrown when using CFEXECUTE? If so what are the error messages?
2. This might be a permissions issue. Does the account that the CF server runs as have sufficient rights to execute the vbs script and/or access the fax components?
In regards to the .NET issue, I'm afraid my experience using COM from a .NET assembly is limited. You might try a .NET specific forum for assistance with that issue.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more