开发者

Is it possible to allocate a segment using the Windows API?

I am wondering if it is possible for a Windows program to allocate a segment descriptor within the process' local descriptor table. Is there a Windows API function that can 开发者_开发问答install a new segment descriptor to the running process' LDT using a provided linear offset, segment length, and combination of flags (RWX)?


It's possible using undocumented NT API, specifically NtSetLdtEntries. Note that Windows x86-64 does not set up an LDT so this only works on x86.

Here's some code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜