[comp.os.os2] Read only segments

robd@vax.SPD.3Com.Com (Robert Dickinson) (04/10/90)

alistair@microsoft.UUCP (Alistair BANKS) writes:

>In article <1827@neon.siesoft.co.uk> steve@siesoft.co.uk () writes:
>>
>>    Does anyone know how to allocate a read only segment (like the segment
>>returned by DosGetInfoSeg) ?

>This is not a feature of 1.x, but is added to os/2 2.0

>Alistair Banks
>OS/2 Group
>Microsoft

Yes, you can consider this a cheap kludge, but if you really need to make a 
segment read-only, then you might consider doing a DosGetCSAlias for it.
This creates a selector (normally considered to runable code) which enforces
the read only property for that segment. You should consider, however, if 
there are any additional repurcussions of doing this that might be prohibitive.

Not knowing what your usage is, this might present an alternative until
OS/2 2.0 comes out with a clean solution.

  Rob Dickinson
  Distributed Systems Division
  3Com Corporation