General information
Category:
COM/DCOM and OLE Automation
OK UTers, for those of you have might have worked with WinFax Pro before, below is a snippet of code that gets a "Function arguement value, type or count is invalid" error message. The real bogus part is that VB example that I have from the WinFax SDK works successfully. It is that example from which this snippet is created. I don't see the difference.
PROCEDURE TEST
LOCAL loWFConvert
LOCAL lcInputFile, lcOutputFile
* Create the file convertion object to convert a received
* fax to a TIF format.
loWFConvert = CreateObject("WinFax.SDKFXConverter")
* TIF format = 3.
loWFConvert.Format = 3
loWFConvert.BitsPerPixel = 1
* Set input and output files.
lcInputFile = "C:\Program Files\Symantec\WinFax\Data\1919001.fxr"
lcOutputFile = "C:\APS\Documents\TEST6.TIF"
IF NOT FILE(lcInputFile)
WAIT WINDOW "Input file not found."
RETURN
ENDIF
* Do the conversion.
lnSuccess = .F.
lnSuccess = loWFConvert.ConvertFromFX(lcInputFile, lcOutputFile)
IF lnSuccess = 0
wait window "Success"
ELSE
WAIT WINDOW "Whoops - success = " + allt(str(lnSuccess))
ENDIF
RELEASE loWFConvert
RETURN
***********************************
convertFormat is 3 (TIF)
cmbBitsPerPixel is 1
src & desc equate to the above lcInputFile & lcOutputFile
The VB variables are set via an example form.
' set the format
convertObj.Format = convertFormat
' set the bits per pixel
convertObj.BitsPerPixel = Val(cmbBitsPerPixel.Text)
' convert
src = lblFXFile.Caption
desc = lblOtherGraphicFile.Caption
If chkByPage.Value = 1 Then
result = convertObj.ConvertFromFXToPage(src, desc, Val(edtPageNum.Text))
Else
result = convertObj.ConvertFromFX(src, desc)
End If
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only