General information
Category:
COM/DCOM and OLE Automation
Try increasing the BitsPerPixel. That may or may not help.
Also, in the past, I have converted to type 4 (.BMP format). I got an error on the same line as you, but the converted image was properly created anyway. I never figured out what the error was, but I just ignored it becasue I had a good conversion.
Let me know if I can help further.
Guy
>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
Previous
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