Thread: _go32_info_block.size_of_transfer_buffer

  1. #1
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Cape Town


    I have been going through a few graphics tutorials which I found @

    If you have done the same tuts, then maybe you can help me.

    I have aproblem with the following function in that it always fails because the sizeof(inf) is always less than _go32_info_block.size_of_transfer_buffer.

    void get_svga_modeinfo (int mode, modeinfo& inf) {
        // Retrieve data for the screenmode and stuff it in the modeinfo struct.
        __dpmi_regs r;
        assert(sizeof(inf) < _go32_info_block.size_of_transfer_buffer);
    = 0x4F01; // Mode info retrieval function. = mode;
        r.x.di = __tb & 0x0F; = (__tb >> 4) & 0xFFFF;
        __dpmi_int(0x10, &r);
        dosmemget(__tb, sizeof(inf), &inf);
        // Save some info to avoid redundant calculations.
        maxx = inf.XResolution;
        maxy = inf.YResolution;
        bits_per_pixel = inf.BitsPerPixel;
        bytes_per_pixel = bits_per_pixel * 8;
        wingranularity = inf.WinGranularity;
    I printed the values for both and this is what I get :
    sizeof( inf ) = 256
    _go32_info_block.size_of_transfer_buffer = 16384

    What could it be?

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Plano, Texas, United States
    hmm...i dont know whats wrong...but i do know this....that is one horrible variable name....
    My Website

    "Circular logic is good because it is."

Popular pages Recent additions subscribe to a feed