SDK PrintSDI sample won't work on W2000

  • Thread starter Thread starter Sam Jost
  • Start date Start date
S

Sam Jost

I'm trying to send a fax from a win32 program using FaxStartPrintJob()
using a shared fax from windows server 2003.

Windows XP clients can fax well, but when I try to send a fax with
Windows 2000 I always get Error 1801 (Invalid Printername).

I used the PrintSDI sample from the February SDK with the latest MS VS
IDE from MSDN.

From google I know others had these problems, too, but I never found a
solution anywhere - anybody out there got some hints for me whats
running wrong?

thanks for help,
Sam
 
Are you able to 'Add Printer' that shared fax server & send faxes using
that? Please try this & let us know.

Also please share your code or send us the link to the sample if your
programs is exactly same as in sample.

--
Raghavendra R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
 
Raghavendra R said:
Are you able to 'Add Printer' that shared fax server & send faxes using
that? Please try this & let us know.

Yup, I have connected the printer and can send a fax via printing it and
typing in the phoneno in the fax assistent.
Also please share your code or send us the link to the sample if your
programs is exactly same as in sample.

I used the Microsoft Platform SDK from February. The path to the fax samples
in the SDK is
C:\Program files\Microsoft SDK\Samples\netds\fax\PrintSdi
and
C:\Program files\Microsoft SDK\Samples\netds\fax\SampleSend
from the platform SDK downloadable at
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

I just opened the dsp and compiled the samples with the most recent Visual
Studio.
The PrintSDI sample shows "FaxStartPrintJob failed, ec = 1801" (but it can
print nicely, using the fax assistant again)
SampleSend, using another technique to fax, returns "FaxConnectFaxServer
failed, ec = 997"

Both programs do work nicely on Windows XP, so it seems the fax client is
broken for Windows 2000?

If you need more information feel free to ask.

greetings,
Sam
 
How are you sending the fax using the PrintSDI sample? Are you using
File->Fax or File->Print, because if you are using File->Fax then you are
actually using the local printer to send the fax and not the remote printer.
So check if your local printer is present or not. If is present try printing
a document to the loca printer and see if it works fine.

--
Chandrasekar R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'
 
I use File->Fax, as I do on Windows XP where it does work (with the same
server and the same fax printer on the server).

The remote fax is visible and connected in my printer settings, so it is
installed local I'd say, it just uses the server to send the fax (the client
has no fax hardware installed).

So windows 2000 does use a remote fax printer different from windows xp, or
do I misunderstand what you are saying?

And printing the document does work nicely anywhere, remote or local. Only
using File->Fax does not work on windows 2000, while it works nicely on
windows xp (both using the same windows 2003 server shared fax printer).

So this is a bug in windows 2000 that it can't use shared fax printers
anymore? Will this be fixed or do I have to tell our customers they need to
migrate to windows xp to use the fax feature of the OS?

thanks for the reply!
Sam Jost
 
Please see inline....

--
Chandrasekar R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'

Sam Jost said:
I use File->Fax, as I do on Windows XP where it does work (with the same
server and the same fax printer on the server).

File->Fax is used only to send faxes using the "local" printer only, for
which u need a modem installed on the local system. Use File->Print
and then print it to the desired remote printer that u have shared locally
to send faxes using the remote printer. Hope u get me.
The remote fax is visible and connected in my printer settings, so it is
installed local I'd say, it just uses the server to send the fax (the client
has no fax hardware installed).

So windows 2000 does use a remote fax printer different from windows xp, or
do I misunderstand what you are saying?

I dont really understand what you are trying to ask here. What do you mean
when u say remote printers are different??
And printing the document does work nicely anywhere, remote or local. Only
using File->Fax does not work on windows 2000, while it works nicely on
windows xp (both using the same windows 2003 server shared fax printer).
Even on windows xp File->Fax will fail if you delete the local fax printer
from the printer&faxes folder.
So this is a bug in windows 2000 that it can't use shared fax printers
anymore? Will this be fixed or do I have to tell our customers they need to
migrate to windows xp to use the fax feature of the OS?

There is no bug. Use File->Print for faxing using remote servers and
File->Fax for faxing using local printer and everything will work fine.
I have tried this locally and everything works fine.
 
Chandrasekar said:
File->Fax is used only to send faxes using the "local" printer only, for
which u need a modem installed on the local system. Use File->Print
and then print it to the desired remote printer that u have shared locally
to send faxes using the remote printer. Hope u get me.

Uh, yes, sorry, it been some time since I asked that question, so I forgot I
made one small but significant change to the PrintSdi sample:
In PrintSdiVw.cpp I changed the line 166 from
if (!FaxStartPrintJob(NULL,&FaxPrintInfo,&JobId,&FaxContextInfo) ) {
to
if
(!FaxStartPrintJob("\\\\myserver\\fax",&FaxPrintInfo,&JobId,&FaxContextInfo)
) {

so it points to my shared fax instead of trying to use the default fax.

I just tried again, this changed PrintSDI does work like charm on Windows XP
pro.

Using Windows 2000 (same domain, same user, using the same shared fax) it
does not work but print the error message
"FaxStartPrintJob failed, ec = 1801"
I dont really understand what you are trying to ask here.

Sorry for the confusion, since it has been about two months ago when I last
asked this question I had to look up the facts again, retry all my samples,
check the source to get back into the problem.
There is no bug. Use File->Print for faxing using remote servers and
File->Fax for faxing using local printer and everything will work fine.
I have tried this locally and everything works fine.

Ok, but now with the change I made to PrintSdi so it knows the shared name
of the fax it does work very nice on windows XP, but it does not work on
Windows 2000.

Both systems are connected to the same Windows 2003 Server, both systems do
not have a local modem or any other fax device, on both systems I have "add
printer" on the shared fax from the windows 2003 server.

I really hope I described my settings and my problem better now?

thanks for help!
Sam
 
Unfortunately, faxing using the remote server using the APIs was not meant
to be supported on Win2k. However, you can programmatically print your
documents to the fax printer the only problem being that the send fax wizard
will pop up. Hence, while you can use win2k for remote faxing, there is no
API support for win2k that is capable of doing remote faxing.

If you can tell me what exactly are the operations (or scenarios) that you
want to do (like i want to send faxes automatically or i just want to send
faxes but not necessarily automatically etc), i can give you suggestions on
how to go about doing it.

Thanks,
--
Chandrasekar R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'
 
Chandrasekar said:
Unfortunately, faxing using the remote server using the APIs was not meant
to be supported on Win2k. However, you can programmatically print your
documents to the fax printer the only problem being that the send fax wizard
will pop up.

Well, that exactly is *the* problem.
If you could point me to some microsoft statement saying this kind of fax is
not supported with windows 2000 as client it might help me so I can point my
customers to this statement.
Hence, while you can use win2k for remote faxing, there is no
API support for win2k that is capable of doing remote faxing.

Well, the API is there, it just does not work.
If you can tell me what exactly are the operations (or scenarios) that you
want to do (like i want to send faxes automatically or i just want to send
faxes but not necessarily automatically etc), i can give you suggestions on
how to go about doing it.

Our customers send order faxes from our application, and since our
application does know the faxno for orders they do not want to enter the no
again in the fax wizard (copy&paste).
It is just inconvenient for them, but they nag us about it quite often, and
that is inconvenient for us.

So if you got any other suggestion how to get the rigth faxno into the
faxwizard I'd be glad to hear about it.

regards,
Sam
 
Back
Top