开发者

Long Pointer to Constant Wide String, what's the function of the Long here?

When you 开发者_如何转开发have a LPCWSTR, why is it a Long Pointer? There's no Long in it's definition, as far as I know.

Can anybody explain?


'Long' is a leftover from Windows-16-bit. In the old days, on DOS and Windows 3.x, most apps were 16 bits and had 16-bit pointers. 32-bit pointers were 'long' and had to be specially declared, and used (in some DOS cases) selectors and not the flat address space.


On 32-bit or greater machines, a long pointer is the same as any other pointer. The difference appears on machines with smaller native word sizes where you might have a 16-bit pointer and a 32-bit pointer type, for example. Usually they are called near and far pointers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜