FaxStartPrintJob broke down again

S

samjost

We use FaxStartPrintJob on an AD network with Windows Server 2003.

Last week it was working, this week it's broken, and no one's got a
clue why. Tested sending from three client computers (windows xp) in
combination with two servers (SBS2003 and WS2003), neither one works
anymore, all give a 'procedure not found' error.

No changes had been made in software or installation other then
installing whatever bugfixes came from MS - well, at least everybody
claims there had been no changes :)

My question is: anybody else got this problem, too? Or am I the only
one using the old DC rendering way to send a fax?

Sam (reading Com Fax docs now...)
 
R

Raghavendra R [MSFT]

What's the exact error code you are getting? GetLastError should give you
this? Is your program an independent application or some NT service? Are you
trying to print to local printer or remote shared fax printer? In either
case are you able to send faxes using that printer from 'Fax Send Wizard'?

Also check you event log for any error/warning events when the failure
happens.

--
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.'
 
S

Sam Jost

The error code of GetLastError after calling FaxStartPrintJob is 127
(text is something like procedure not found)

My app is standalone, no service. I get the error on shared fax printer
both on SBS 2003 and Windows Server 2003 that did work just fine two
weeks ago.

The Fax Send Wizard does work, as does the fax COM component.

There are no fancy event logs on failure, but I just found a warning I
never seen before on boot-up-time regarding fax:
EventID 32068 (I could append the german error message but I dont think
it would help you much - it's something about rule for outgoing faxes
not existing. Funny, thats a new one).

Well, so maybe this event log entry got something to do with it, but
where do I change the setting for outgoing traffic? On the server?

Sam
 
R

Raghavendra R [MSFT]

I don't think the event log entry should have anything to do with the
FaxStartPrintJob problem. But I am not 100% sure. To solve the issue
reported by the event log I need more information about the log entry

The log will look like this
The outgoing routing rule is not valid because it cannot find a valid
device. Check the routing rule configuration.
Country/region code: '%1'
Area code: '%2'

What are the values for %1 & %2 that you see in event viewer? Depending on
that identify the corresponding routing rule in Fax Service Manager
(fxsadmin.msc) & see if the rule's target device or device group has all
valid device(s). A value of '*' for %1 & %2 refers to the default outbound
routing rule.

About the FaxStartPrintJob failure ... what's the PrinterName parameter you
are passing to FaxStartPrintJob?

--
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.'
 
S

Sam Jost

There are two event log entries about fax happening every boot. Since I
use a localized xp they are completely different, but just as useful :)

I just copied these from this mornings boot log:
--
32026
Fehler beim Initialisieren der zugewiesenen Faxgeräte (virtuell oder
TAPI) durch den Faxdienst. Es können keine Faxe gesendet werden, bis
ein Faxgerät installiert ist.
--
32068
Die ausgehende Verteilerregel ist nicht gültig, weil kein gültiges
Gerät gefunden werden kann. Ausgehende Faxe, die diese Regel
verwenden, werden nicht weitergeleitet. Stellen Sie sicher, dass das
angezielte Gerät bzw. die angezielten Geräte angeschlossen, korrekt
installiert und angeschaltet sind. Stellen Sie außerdem sicher, dass
die Gruppe korrekt konfiguriert ist, falls die Weiterleitung an eine
Gruppe von Geräten erfolgen soll. Landes-/Regionskennzahl: "*"
Ortskennzahl: "*"
--


About FaxStartPrintJob, the printer name is \\holm\fax (holm is the
server name, fax the share name).

Sam
 
R

Raghavendra R [MSFT]

The two event log entries mean there is no Fax Device on your machine. You
should install a modem & make sure it's shown up in the list of Modems in
Fax Configuration Wizard or Fax Service Manager.

As such I still don't think the event log entries should be the reason for
FaxStartPrintJob failure. By the way are you running the program on machine
'holm' it-self or is it run on a client machine which has a printer
connection to \\holm\fax? Does your program run if the printer name is
specified as NULL to mean local fax printer?

--
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.'

There are two event log entries about fax happening every boot. Since I
use a localized xp they are completely different, but just as useful :)

I just copied these from this mornings boot log:
--
32026
Fehler beim Initialisieren der zugewiesenen Faxgeräte (virtuell oder
TAPI) durch den Faxdienst. Es können keine Faxe gesendet werden, bis
ein Faxgerät installiert ist.
--
32068
Die ausgehende Verteilerregel ist nicht gültig, weil kein gültiges
Gerät gefunden werden kann. Ausgehende Faxe, die diese Regel
verwenden, werden nicht weitergeleitet. Stellen Sie sicher, dass das
angezielte Gerät bzw. die angezielten Geräte angeschlossen, korrekt
installiert und angeschaltet sind. Stellen Sie außerdem sicher, dass
die Gruppe korrekt konfiguriert ist, falls die Weiterleitung an eine
Gruppe von Geräten erfolgen soll. Landes-/Regionskennzahl: "*"
Ortskennzahl: "*"
--


About FaxStartPrintJob, the printer name is \\holm\fax (holm is the
server name, fax the share name).

Sam
 
S

Sam Jost

Do I need to install a modem on my client comp (name him Tang) to use
the shared fax on my SBS 2003 server Holm? I thought if I use a shared
fax I dont need to install a modem and stuff for every comp on my
network?


The program does not run on the server (Holm), it's running on some
client on the network named Tang (XP with all patches)
The program does still fail with the same problem even when I use NULL
instead of the shared name.

I tried uninstalling the fax stuffin software, but it didnt help either
:(

pity is, sending a file with com does work, but I got no way to make a
file from the stuff I need to fax :(

Sam
 
S

Sam Jost

Something odd: I've got two different sets of the fax dll's on the
client comp, in my case:
dir c:\WINDOWS\fxsapi.dll /s /p
Verzeichnis von c:\WINDOWS\system32
04.08.2004 14:00 452.096 fxsapi.dll
Verzeichnis von c:\WINDOWS\system32\dllcache
04.08.2004 14:00 452.096 fxsapi.dll
Verzeichnis von c:\WINDOWS\system32\spool\drivers\w32x86\3
24.03.2005 17:56 467.456 FXSAPI.DLL

Maybe it's kind of 'dll-hell'-Problem?

But how do I get rid of one of them?

Sam
 
R

Raghavendra R [MSFT]

It could be, but please do not delete any files. All of them are required.
The one under system32 is used by all Fax Applications. DllCache one is a
backup which is present for any system file. The last one is used by Fax
Printer Driver files & that one is typically copied from the machine hosting
the shared fax printer (holm in your case).

I'll follow-up on this problem on your other thread. Let's close this one
unless you have additional questions regarding these copies ...

--
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.'
 
R

Raghavendra R [MSFT]

You don't need to install modems on local machine if you are only connecting
to remote shared fax printers. The event log entries you posted earlier are
from the server machine (holm) right?

I just wrote a test app & tried to repro it. But it works fine for me if I
run it from any location except from
%windir%\system32\spool\drivers\w32x86\3 directory. Are you running your app
from this location by any chance?

--
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.'

Do I need to install a modem on my client comp (name him Tang) to use
the shared fax on my SBS 2003 server Holm? I thought if I use a shared
fax I dont need to install a modem and stuff for every comp on my
network?


The program does not run on the server (Holm), it's running on some
client on the network named Tang (XP with all patches)
The program does still fail with the same problem even when I use NULL
instead of the shared name.

I tried uninstalling the fax stuffin software, but it didnt help either
:(

pity is, sending a file with com does work, but I got no way to make a
file from the stuff I need to fax :(

Sam
 
R

Raghavendra R [MSFT]

On further investigation I found that if fxsapi.dll from spooler directory
(%windir%\system32\spool\drivers\w32x86\3) is already loaded into your
process this error would arise. The reason being
%windir%\system32\winfax.dll is incompatible with fxsapi.dll present in
spooler directory. %windir%\system32\winfax.dll will only work well with
%windir%\system32\fxsapi.dll. I believe this is what is happening in your
case. If you call any print related APIs fxsapi.dll from spooler directory
would get into your process. After this any call on winfax.dll will fail
with this error. There is a problem with winfax.dll on XP machines. The
workaround would be for your application to do an explicit LoadLibrary of
%windir%\system32\fxsapi.dll on startup & keep the module handle returned
until exit. This way when winfax.dll does LoadLibrary of fxsapi.dll it will
the pick the one from %windir%\system32 & things would work fine.

Please let me know if this solves your problem. I tried it & it did work for
me!!

--
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.'
 
S

Sam Jost

Raghavendra said:
You don't need to install modems on local machine if you are only connecting
to remote shared fax printers. The event log entries you posted earlier are
from the server machine (holm) right?

No, the log entries are from the client. The Server has no such log
entries.
I just wrote a test app & tried to repro it. But it works fine for me if I
run it from any location except from
%windir%\system32\spool\drivers\w32x86\3 directory. Are you running your app
from this location by any chance?

Thats not my working directory, no - but for some funny reason my
program loads the fxs*dlls from
%windir%\system32\spool\drivers\w32x86\3:
'bmed.exe':
'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\GdiPlus.dll'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\MSCTF.dll' geladen, Keine Symbole
geladen.
Der Thread '_threadstart' (0xa30) hat mit Code 0 (0x0) geendet.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\mdigraph.dll'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\msvcp60.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\msimg32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\msi.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\mdiui.dll'
geladen, Keine Symbole geladen.
Der Thread '_threadstart' (0xe7c) hat mit Code 0 (0x0) geendet.
Der Thread '_threadstart' (0xd54) hat mit Code 0 (0x0) geendet.
Der Thread '_threadstart' (0xf5c) hat mit Code 0 (0x0) geendet.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSUI.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\netapi32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSWZRD.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\version.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\tapi32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\rtutils.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\winmm.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\imm32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSRES.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSAPI.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\winfax.dll' geladen, Keine Symbole
geladen.


I'd guess there is some api call I make prior to using fax that will
load these wrong dll's, or somehow switch some temporal path to this
wrong one, and once they are loaded they'll be used - and this does
ring a bell, I think I remember it broke down quite some time ago for
the very same reason.

I'll check out loading the other dll's somehow and come back once I
know more of this.

Side note: Ain't there a way to uninstall the unneeded drivers so the
program cant load the wrong ones?

thanks for the help!
Sam
On further investigation I found that if fxsapi.dll from spooler directory
(%windir%\system32\spool\drivers\w32x86\3) is already loaded into your
process this error would arise. The reason being
%windir%\system32\winfax.dll is incompatible with fxsapi.dll present in
spooler directory. %windir%\system32\winfax.dll will only work well with
%windir%\system32\fxsapi.dll. I believe this is what is happening in your
case. If you call any print related APIs fxsapi.dll from spooler directory
would get into your process. After this any call on winfax.dll will fail
with this error. There is a problem with winfax.dll on XP machines. The
workaround would be for your application to do an explicit LoadLibrary of
%windir%\system32\fxsapi.dll on startup & keep the module handle returned
until exit. This way when winfax.dll does LoadLibrary of fxsapi.dll it will
the pick the one from %windir%\system32 & things would work fine.

Please let me know if this solves your problem. I tried it & it did work for
me!!

--
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:
You don't need to install modems on local machine if you are only
connecting to remote shared fax printers. The event log entries you posted
earlier are from the server machine (holm) right?

I just wrote a test app & tried to repro it. But it works fine for me if I
run it from any location except from
%windir%\system32\spool\drivers\w32x86\3 directory. Are you running your
app from this location by any chance?

--
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.'

Do I need to install a modem on my client comp (name him Tang) to use
the shared fax on my SBS 2003 server Holm? I thought if I use a shared
fax I dont need to install a modem and stuff for every comp on my
network?


The program does not run on the server (Holm), it's running on some
client on the network named Tang (XP with all patches)
The program does still fail with the same problem even when I use NULL
instead of the shared name.

I tried uninstalling the fax stuffin software, but it didnt help either
:(

pity is, sending a file with com does work, but I got no way to make a
file from the stuff I need to fax :(

Sam
The two event log entries mean there is no Fax Device on your machine.
You
should install a modem & make sure it's shown up in the list of Modemsin
Fax Configuration Wizard or Fax Service Manager.

As such I still don't think the event log entries should be the reason
for
FaxStartPrintJob failure. By the way are you running the program on
machine
'holm' it-self or is it run on a client machine which has a printer
connection to \\holm\fax? Does your program run if the printer name is
specified as NULL to mean local fax printer?

--
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.'

There are two event log entries about fax happening every boot. Since I
use a localized xp they are completely different, but just as useful :)

I just copied these from this mornings boot log:
--
32026
Fehler beim Initialisieren der zugewiesenen Faxgeräte (virtuell oder
TAPI) durch den Faxdienst. Es können keine Faxe gesendet werden, bis
ein Faxgerät installiert ist.
--
32068
Die ausgehende Verteilerregel ist nicht gültig, weil kein gültiges
Gerät gefunden werden kann. Ausgehende Faxe, die diese Regel
verwenden, werden nicht weitergeleitet. Stellen Sie sicher, dass das
angezielte Gerät bzw. die angezielten Geräte angeschlossen, korrekt
installiert und angeschaltet sind. Stellen Sie außerdem sicher, dass
die Gruppe korrekt konfiguriert ist, falls die Weiterleitung an eine
Gruppe von Geräten erfolgen soll. Landes-/Regionskennzahl: "*"
Ortskennzahl: "*"
--


About FaxStartPrintJob, the printer name is \\holm\fax (holm is the
server name, fax the share name).

Sam


Raghavendra R [MSFT] schrieb:
I don't think the event log entry should have anything to do with the
FaxStartPrintJob problem. But I am not 100% sure. To solve the issue
reported by the event log I need more information about the log entry

The log will look like this
The outgoing routing rule is not valid because it cannot find a valid
device. Check the routing rule configuration.
Country/region code: '%1'
Area code: '%2'

What are the values for %1 & %2 that you see in event viewer? Depending
on
that identify the corresponding routing rule in Fax Service Manager
(fxsadmin.msc) & see if the rule's target device or device group has
all
valid device(s). A value of '*' for %1 & %2 refers to the default
outbound
routing rule.

About the FaxStartPrintJob failure ... what's the PrinterName parameter
you
are passing to FaxStartPrintJob?

--
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.'

The error code of GetLastError after calling FaxStartPrintJob is 127
(text is something like procedure not found)

My app is standalone, no service. I get the error on shared fax
printer
both on SBS 2003 and Windows Server 2003 that did work just fine two
weeks ago.

The Fax Send Wizard does work, as does the fax COM component.

There are no fancy event logs on failure, but I just found a warning
I
never seen before on boot-up-time regarding fax:
EventID 32068 (I could append the german error message but I dont
think
it would help you much - it's something about rule for outgoing faxes
not existing. Funny, thats a new one).

Well, so maybe this event log entry got something to do with it, but
where do I change the setting for outgoing traffic? On the server?

Sam
 
S

Sam Jost

Oh, how I hate it to repeat an error I already solved once - I found my
old post where I first had this problem:

http://groups.google.de/group/microsoft.public.win2000.fax/msg/1482c5a4e36f026b?dmode=source&hl=de

Checked it, a coworker made a change to the lib I used to the effect
that again DocumentProperties is called before FaxStartPrintJob - I
should have documented the problem in the source, my mistake.

Now he's loading the dll's like this, and it is working again:

'bmed.exe': 'C:\WINDOWS\system32\MSCTF.dll' geladen, Keine Symbole
geladen.
Der Thread '_threadstart' (0x1fc) hat mit Code 0 (0x0) geendet.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\mdigraph.dll'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\msvcp60.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\msimg32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\msi.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\mdiui.dll'
geladen, Keine Symbole geladen.
Der Thread '_threadstart' (0xb54) hat mit Code 0 (0x0) geendet.
Der Thread '_threadstart' (0x620) hat mit Code 0 (0x0) geendet.
Der Thread '_threadstart' (0x2ac) hat mit Code 0 (0x0) geendet.
'bmed.exe': 'C:\WINDOWS\system32\winfax.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\fxsapi.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSUI.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\netapi32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSWZRD.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\version.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\tapi32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\rtutils.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\winmm.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\imm32.dll' geladen, Keine Symbole
geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSRES.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSAPI.DLL'
geladen, Keine Symbole geladen.
'bmed.exe': 'C:\WINDOWS\system32\spool\drivers\w32x86\3\FXSDRV.DLL'
geladen, Keine Symbole geladen.

Thanks again for the help!

Sam
 
R

Raghavendra R [MSFT]

Correct, even I saw your post while searching on the net. I couldn't quite
figure it's the same source we are talking about. Anyway a good long term
solution would be to load %windir%\system32\fxsapi.dll during startup &
unload it during termination. This way you need not live with artificial
restrictions like not calling GDI/Print APIs.

As such there are no unwanted drivers in the picture. A fresh XP box starts
with the same fxsapi.dll both under %windir%\system32 & under
%windir%\system32\spool\drivers\w32x86. %windir%\system32\winfax.dll is
compatible with this fxsapi.dll. However when XP machine adds a connection
to Shared Fax Printer on Windows Server 2003 or SBS Server 2003, the driver
files are copied to spool directory on XP machine. Now fxsapi.dll under
spool directory is of Windows Server 2003's. This happens for any printer &
it's completely by design & expected. But because of an issue in winfax.dll,
it is incompatible with Windows Server 2003's fxsapi.dll. The correct fix
would be in winfax.dll - it should load the library (fxsapi.dll) explicitly
from %windir%\system32 instead of just specifying the DLL name fxsapi.dll in
a call to LoadLibrary Win32 API. The work-around would be for the app to
load fxsapi.dll from %windir%\system32 & keep it in the process virtual
address space, so that winfax.dll's LoadLibrary call on fxsapi.dll will use
the loaded one with which it is compatible with. In this setting even if
fxsapi.dll from spool directory gets loaded later down the line, winfax.dll
is using fxsapi.dll that's loaded first from %windir%\system32.

Let me know if you have any questions.

--
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.'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top