Problems with MS FaxServer COM object...  
Author Message
AttorneyProgrammer





PostPosted: Visual FoxPro General, Problems with MS FaxServer COM object... Top

Hi!  Hopefully somebody has seen this and knows the answer.

Using any version of VFP from 6 to 9, using the FaxServer COM object provided by Windows to send out faxes.  A simple code snippet is as follows:

lo_f = createobject("faxserver.faxserver")
lo_f.connect("")
lo_d = lo_f.createdocument("test.pdf")
lo_d.faxnumber = "9999999999"
lo_d.send

All PCs are either running W2K or XP, have FAXCOM.DLL present, and the MS Shared Fax Printer Driver installed.   This code works on some of the XP PCs, but not all, and on none of the W2K PCs.

The FaxServer object can be created on all PCs.  However, on the PCs on which the code fails, when the Connect command is issued, I receive an OLE Error 0x80004005 Unspecified Error.

There appears to be no rhyme or reason to it.  I have looked at registry settings and all of the PCs look identical.  I have tried putting in the name of the fax server in the Connect and leaving it blank.

Any ideas would be appreciated.

Thanks!

Curt

 


 

 



Visual FoxPro1  
 
 
dni





PostPosted: Visual FoxPro General, Problems with MS FaxServer COM object... Top

You may check this:

http://support.microsoft.com/kb/134215



 
 
AttorneyProgrammer





PostPosted: Visual FoxPro General, Problems with MS FaxServer COM object... Top

DNI,

Thanks for the response!  I was not subclassing the FaxServer object.

Through my own experimentation, I finally found this evening that the issues are likely due to security settings, at least on W2K.  Once I logged in as Admin on the W2K boxes, the code worked.  I have yet to try this solution on the XP boxes given the impending holiday, but I surmise it should work as well. 

So far, my web research has found no satisfactory answer in any language.  I have seen many posts regarding this error in multiple programming languages such as VB, ASP, .NET, and C.  One would think that Microsoft would want to publicize a FAQ on what to check if using the FaxServer object, especially since they suggest its use over API calls.   Any MS moderators, please take note.

Have a great Thanksgiving all!

Curt