Mombu the Microsoft Forum

Go Back   Mombu the Microsoft Forum > Microsoft > Windows 2000 Server (TECHNET) > FaxSendDocument API failing in windows 2003
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 29th May 04:07
deeps
External User
 
Posts: 1
Default FaxSendDocument API failing in windows 2003


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....
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666