FaxStartPrintJob error on XP

S

Sam Jost

I used the fax service api for quite some time now, but on windows xp
FaxStartPrintJob() always returns an error 127 (proc not found?)

Had there been changes to the fax service api in windows XP????

my source:

FAX_PRINT_INFO faxprintinfo;
memset( &faxprintinfo, 0, sizeof(faxprintinfo));
faxprintinfo.SizeOfStruct= sizeof( faxprintinfo);
faxprintinfo.DocName= "Description";
faxprintinfo.RecipientName= "Name";
faxprintinfo.RecipientNumber= "25205";
faxprintinfo.SenderName= "B-soft Faxprint";
uint32 FaxJobId;
FAX_CONTEXT_INFO faxcontextinfo;
memset( &faxcontextinfo, 0, sizeof(faxcontextinfo));
faxcontextinfo.SizeOfStruct= sizeof( faxcontextinfo);
if (!pFaxStartPrintJob( "fax", &faxprintinfo, &FaxJobId,
&faxcontextinfo))

thanks for any help!
Sam
 
R

Raghavendra R [MSFT]

This API will work on XP. Can you please make sure FaxStartPrintJob is shown
as one of the exports for winfax.dll present under %windir%\system32. You
can either use the tool 'depends.exe winfax.dll' or 'dumpbin /all
winfax.dll' to view the exports. These tools should be downloadable from
internet (Check our sysinternals.com)

--
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 R said:
This API will work on XP. Can you please make sure FaxStartPrintJob is shown
as one of the exports for winfax.dll present under %windir%\system32. You
can either use the tool 'depends.exe winfax.dll' or 'dumpbin /all
winfax.dll' to view the exports. These tools should be downloadable from
internet (Check our sysinternals.com)

depends.exe was installed, so I used it do check, and I got
FaxStartPrintJobA as 54 (entry 1e57)
and
FaxStartPrintJobW as 55 (entry 1e69)

strange though the winfax.dll is dated 18.08.2001, quite old I think.
Oh, and sending faxes via printing them to the fax printer and using
the fax wizard does work, only the FaxStartPrintJob() does give this
error.

I just searched my local hdd for other winfax.dll and found the one in
system32 and the same in system32\dllcache, no other so it cant be the
wrong winfax.dll I load I'd say.

Funny, we got some other comp here with xp home where it does work.

*sigh* I think I'll try and reinstall the whole comp as soon as I find
time...

Sam
 
R

Raghavendra R [MSFT]

Strange. Most likely your program is loading the DLL from incorrect place (I
know you asserted that you don't have any other copy). But still, to be
sure, you can run the program through debugger and see where winfax.dll is
getting loaded from. You should start your application from the debugger -
during the initialization all the dependent DLLs are shown along with the
paths from which they are obtained.

--
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 R said:
Strange. Most likely your program is loading the DLL from incorrect place (I
know you asserted that you don't have any other copy). But still, to be
sure, you can run the program through debugger and see where winfax.dll is
getting loaded from. You should start your application from the debugger -
during the initialization all the dependent DLLs are shown along with the
paths from which they are obtained.

Now even after installing the most recent SDK's it still wont send.

I tried the SDK sample app "PrintSDI", it does not work, too. But it
gives an error code 1801, I got no idea what this might mean.

Sam
 
S

Sam Jost

Sam Jost said:
Now even after installing the most recent SDK's it still wont send.

I tried the SDK sample app "PrintSDI", it does not work, too. But it
gives an error code 1801, I got no idea what this might mean.

Sam

I got the printSDI sample to run by changing the default fax (NULL) to
the path to my fax.

So I'll compare what the PrintSDI does different then me and try to
change my app.

Hope's rising :)
Sam
 
S

Sam Jost

Raghavendra R said:
Strange. Most likely your program is loading the DLL from incorrect place (I
know you asserted that you don't have any other copy). But still, to be
sure, you can run the program through debugger and see where winfax.dll is
getting loaded from. You should start your application from the debugger -
during the initialization all the dependent DLLs are shown along with the
paths from which they are obtained.

No luck so far. I extracted my code into a smaller app to narrow down
the code to look into, and it does work there :(

I debugged a working version and the not working version, they sure
load the same dll, they jump to the same address in memory and they
even execute the same assembler code for quite some time.

I shortly disgressed into changing the order in which the dll's are
loaded so winfax.dll is loaded early (didnt work) or late to break my
working source (did still work). No success there.

More assembler...

well, more debugging. Now at least I can tell where the breaking copy
does something other then the working one: at EIP 72251895 it calls a
routine at 7225152C that does give a zero as result, and this makes
the routine return with an error. Maybe I should try and get debug
symbols for my version of windows so I can put these in words. But
first I will check my parameters again, just to make sure!!

I'd guess this might be some kind of loader stub I was debugging in.
On a suspicion I search for winfax.lib, maybe I linked against an old
one.
But I got only the one from the recent SDK, no luck there.


Alas, I got no idea where to look now. I checked every Parameter loads
of times, in assembler like in source, I changed order, I changed dll
loading order, I changed parameter sets.
I reinstalled the driver, windows xp, everything: no change.

I really love debugging riddles, but this one seems to be tough!

I'll go and fetch me some debug symbols for windows now!

Sam
 

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