Exemplo n.º 1
0
void* getFieldValue(int location, int type) {
    char buffer[8];
    long retval = 0;
    switch(type) {

        case INT:
            dread(buffer, location, 2);
            retval = (long) getSignedInt(buffer);
            break;

        case UINT:
            dread(buffer, location, 2);
            retval = (long) getUnsignedInt(buffer);
            break;

        case ULINT:
            dread(buffer, location, 3);
            retval = getUnsignedLong(buffer);
            break;

        case DATE:
            dread(buffer, location, 5);
            //printf("DEBUG: getFieldValue DATE[%04x] - %d %d %d %d %d\n", location, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
            retval = (long) strDate(buffer);
            break;

        case CHAR:
        default:
            dread(buffer, location, 1);
            retval = (long) buffer[0];
            break;
    }
    return (void*) retval;
}
Exemplo n.º 2
0
unsigned long ExfFile::getLoadAddressFromFile(void) throw(ExfFileInvalidException)
{
	return getUnsignedLong(0);
}