Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ExtCreateRegion Win9x Problem

ExtCreateRegion Win9x Problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsstutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nemo
    wrote on last edited by
    #1

    I have run into an issue with ExtCreateRegion on windows 9X machines. I use getregiondata to get the data and then use ExtCreateRegion data to recreate the region. Everything works fine on 2000/XP and on 9x machines when the region is less than 64K but on the 9x machines when the region is larger than 64K it fails. The MS documentation says 64K is not longer a limitation on 9x but my tests seem to elude to a different answer. The code is pretty simple: int LastTestRgnSize = GetRegionData(TempRgn, 0, 0); // get the rgn size unsigned char* LastTestRgn = new unsigned char[LastTestRgnSize]; memset( LastTestRgn, 0x00, LastTestRgnSize ); int size = GetRegionData(TempRgn, LastTestRgnSize, (RGNDATA*)LastTestRgn); HRGN Rgn = ::ExtCreateRegion(NULL, RgnSize, (RGNDATA*)Temp); The ::ExtCreateRegion function will fail when the region size is above 64K on 9x but not on 2000/XP. Does anyone have a work-around for this or any ideas on how to correct the problem. Thanks in Advance :-) nemo

    M 1 Reply Last reply
    0
    • N nemo

      I have run into an issue with ExtCreateRegion on windows 9X machines. I use getregiondata to get the data and then use ExtCreateRegion data to recreate the region. Everything works fine on 2000/XP and on 9x machines when the region is less than 64K but on the 9x machines when the region is larger than 64K it fails. The MS documentation says 64K is not longer a limitation on 9x but my tests seem to elude to a different answer. The code is pretty simple: int LastTestRgnSize = GetRegionData(TempRgn, 0, 0); // get the rgn size unsigned char* LastTestRgn = new unsigned char[LastTestRgnSize]; memset( LastTestRgn, 0x00, LastTestRgnSize ); int size = GetRegionData(TempRgn, LastTestRgnSize, (RGNDATA*)LastTestRgn); HRGN Rgn = ::ExtCreateRegion(NULL, RgnSize, (RGNDATA*)Temp); The ::ExtCreateRegion function will fail when the region size is above 64K on 9x but not on 2000/XP. Does anyone have a work-around for this or any ideas on how to correct the problem. Thanks in Advance :-) nemo

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      nemo wrote: The MS documentation says 64K is not longer a limitation on 9x I'd like to see where it says that. Everything in User and GDI on 9x has 16-bit limitations because much of that code is 16-bit code for Win16 compatibility. [Eg, list boxes can't hold more than 32K items, 32K is the max value of a 16-bit signed int; 9x can't handle more than 16K window handles, 16K*4 bytes = 64K bytes, 4 bytes being sizeof(HWND)] --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0! | RightClick-Encrypt If my rhyme was a drug, I'd sell it by the gram.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups