mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.2 KiB
66 lines
1.2 KiB
/*++
|
|
|
|
Copyright (c) 1993 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
jeterror.c
|
|
|
|
Abstract:
|
|
|
|
Contains:
|
|
DWORD MapJetError( IN JET_ERR JetError)
|
|
|
|
Author:
|
|
|
|
Vladimir Z. Vulovic (vladimv) 19 - November - 1993
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
|
|
#include "local.h"
|
|
|
|
//
|
|
// BUGBUG ERROR_RPL_JET_ERROR should be a part of winerr.h
|
|
// Although RPL apis follow NET convention, they really use WINDOWS error
|
|
// codes. This is somewhat inconsistent.
|
|
//
|
|
#define ERROR_RPL_JET_ERROR 0x7777 // BUGBUG arbitrary value for now
|
|
|
|
|
|
DWORD MapJetError( IN JET_ERR JetError)
|
|
/*++
|
|
|
|
Routine Description:
|
|
|
|
This function maps the Jet database errors to Windows error.
|
|
|
|
Arguments:
|
|
|
|
JetError - an error JET function call.
|
|
|
|
Return Value:
|
|
|
|
Windows Error.
|
|
|
|
--*/
|
|
{
|
|
if( JetError == JET_errSuccess ) {
|
|
return( ERROR_SUCCESS);
|
|
} else if ( JetError < 0) {
|
|
DWORD Error;
|
|
switch( JetError ) {
|
|
case JET_errNoCurrentRecord:
|
|
Error = ERROR_NO_MORE_ITEMS;
|
|
break;
|
|
|
|
case JET_errRecordNotFound: // record not found
|
|
default:
|
|
Error = ERROR_RPL_JET_ERROR;
|
|
}
|
|
return(Error);
|
|
} else {
|
|
return( ERROR_SUCCESS);
|
|
}
|
|
}
|