FaxSendDocument API failing in windows 2003


D

deeps

hi
i am facing a problem while sending the fax in windows 2003 version

the following code i am using


if (!FaxConnectFaxServer(NULL,&hFax))
{
_tprintf( TEXT("FaxConnectFaxServer failed, ec = %d\n"),
GetLastError() );
return -1;
}

assert (hFax != NULL);

hCompletionPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE,NULL,0,
0);

if (!hCompletionPort)
{
_tprintf( TEXT("CreateIoCompletionPort failed, ec = %d\n"),
GetLastError() );
FaxClose( hFax );
return -1;
}

if (!FaxInitializeEventQueue(
hFax,
hCompletionPort,
0,
NULL,
0
))
{
_tprintf( TEXT("FaxInitializeEventQueue failed, ec = %d\n"),
GetLastError() );
FaxClose( hFax );
return -1;
}

FaxCompleteJobParams(&JobParam,&CoverpageInfo);
JobParam->RecipientNumber = Number;
if (!FaxSendDocument( hFax, Document, JobParam, NULL , &JobId) )
{
_tprintf( TEXT("FaxSendDocument failed, ec = %d \n"),
GetLastError() );
FaxClose( hFax );
CloseHandle( hCompletionPort );
FaxFreeBuffer(JobParam);
FaxFreeBuffer(CoverpageInfo);
return -1;
}


when i run the sample code i am sample exe application i am getting the error
code as 997 and 4312..

i had also implemented the same code in a COM component that time i am
getting the error code as 183

but the same code is working fine in windows 2000 and XP
can any give me the solution....
 
Ad

Advertisements


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