2014-10-02 22:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbwin/win_prn2.c
    + save LastError value in win_PrintDataRaw() and win_PrintFileRaw()
      so user can access it using wapi_GetLastError()
This commit is contained in:
Przemysław Czerpak
2014-10-02 22:55:36 +02:00
parent 4121935b58
commit 22d694e0a9
2 changed files with 28 additions and 0 deletions

View File

@@ -10,6 +10,11 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2014-10-02 22:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/win_prn2.c
+ save LastError value in win_PrintDataRaw() and win_PrintFileRaw()
so user can access it using wapi_GetLastError()
2014-10-02 22:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/sddsqlt3/core.c
* decalre default size for numeric, blob and any fields

View File

@@ -427,25 +427,38 @@ HB_FUNC( WIN_PRINTFILERAW )
if( nWritten < nRead )
break;
}
hbwapi_SetLastError( GetLastError() );
hb_fsClose( fhnd );
hb_xfree( pbyBuffer );
}
else
{
hbwapi_SetLastError( hb_fsOsError() );
nResult = -6;
}
EndPagePrinter( hPrinter );
}
else
{
hbwapi_SetLastError( GetLastError() );
nResult = -4;
}
EndDocPrinter( hPrinter );
}
else
{
hbwapi_SetLastError( GetLastError() );
nResult = -3;
}
ClosePrinter( hPrinter );
hb_strfree( hDocName );
}
else
{
hbwapi_SetLastError( GetLastError() );
nResult = -2;
}
hb_strfree( hDeviceName );
}
#endif
@@ -492,19 +505,29 @@ HB_FUNC( WIN_PRINTDATARAW )
break;
nResult += dwWritten;
}
hbwapi_SetLastError( GetLastError() );
EndPagePrinter( hPrinter );
}
else
{
hbwapi_SetLastError( GetLastError() );
nResult = -4;
}
EndDocPrinter( hPrinter );
}
else
{
hbwapi_SetLastError( GetLastError() );
nResult = -3;
}
ClosePrinter( hPrinter );
hb_strfree( hDocName );
}
else
{
hbwapi_SetLastError( GetLastError() );
nResult = -2;
}
hb_strfree( hDeviceName );
}
#endif