birch2002
驱动牛犊
驱动牛犊
  • 注册日期2003-01-16
  • 最后登录2003-05-12
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:5637回复:9

#pragma alloc_text是什么意思啊,

楼主#
更多 发布于:2003-02-19 10:25
#pragma alloc_text是什么意思啊,MSDN里看的不是很懂啊,谢谢
win32fan
驱动牛犊
驱动牛犊
  • 注册日期2008-03-30
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分6分
  • 威望39点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2008-12-29 09:20
这个论坛人气不行呀,第一二贴间隔了多长时间...
best10080
驱动牛犊
驱动牛犊
  • 注册日期2007-09-07
  • 最后登录2007-11-06
  • 粉丝0
  • 关注0
  • 积分30分
  • 威望4点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2007-11-02 09:24
在驱动程序中看到这样一个函数DeviceSetDeviceParameter(...),整个程序中从未调用过这个函数,而只在这里被用到了。
不明白是什么意思?它的作用又是什么呢?
例如:
#pragma alloc_text(PAGE, DeviceSetDeviceParameter)

谢谢回答............
dionysus77
驱动小牛
驱动小牛
  • 注册日期2006-11-15
  • 最后登录2011-12-18
  • 粉丝0
  • 关注0
  • 积分27分
  • 威望392点
  • 贡献值0点
  • 好评度177点
  • 原创分0分
  • 专家分0分
地板#
发布于:2007-11-01 22:12
引用第6楼best10080于2007-11-01 17:05发表的  :
这样做有什么作用呢?谢谢回答..........

同问
best10080
驱动牛犊
驱动牛犊
  • 注册日期2007-09-07
  • 最后登录2007-11-06
  • 粉丝0
  • 关注0
  • 积分30分
  • 威望4点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2007-11-01 17:05
这样做有什么作用呢?谢谢回答..........
shema
驱动牛犊
驱动牛犊
  • 注册日期2007-08-17
  • 最后登录2007-08-30
  • 粉丝0
  • 关注0
  • 积分90分
  • 威望10点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2007-08-30 09:25
学习了
zw10435
驱动牛犊
驱动牛犊
  • 注册日期2007-07-31
  • 最后登录2007-08-30
  • 粉丝0
  • 关注0
  • 积分170分
  • 威望18点
  • 贡献值0点
  • 好评度17点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2007-08-24 12:00
AllenZh
驱动老牛
驱动老牛
  • 注册日期2001-08-19
  • 最后登录2015-11-27
  • 粉丝19
  • 关注10
  • 积分1316分
  • 威望2387点
  • 贡献值7点
  • 好评度321点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2004-10-25 17:24
alloc_text
#pragma alloc_text( "textsection", function1, ... )

Names the code section where the specified function definitions are to reside. The pragma must occur between a function declarator and the function definition for the named functions.

The alloc_text pragma does not handle C++ member functions or overloaded functions. It is applicable only to functions declared with C linkage ― that is, functions declared with the extern "C" linkage specification. If you attempt to use this pragma on a function with C++ linkage, a compiler error is generated.

Since function addressing using __based is not supported, specifying section locations requires the use of the alloc_text pragma. The name specified by textsection should be enclosed in double quotation marks.

The alloc_text pragma must appear after the declarations of any of the specified functions and before the definitions of these functions.

Functions referenced in an alloc_text pragma should be defined in the same module as the pragma. If this is not done and an undefined function is later compiled into a different text section, the error may or may not be caught. Although the program will usually run correctly, the function will not be allocated in the intended sections.

Other limitations on alloc_text are as follows:

It cannot be used inside a function.


It must be used after the function has been declared, but before the function has been defined.
1,承接Windows下驱动/应用开发 2,本人原创虚拟鼠标/键盘,触摸屏,虚拟显卡,Mirror驱动,XP无盘的SCSI虚拟磁盘驱动等 3,windows下有尝技术服务(包括BUG调试,员工培训等) 欢迎深圳和海外企业联系.msn:mfczmh@sina.com
xbzjackey
驱动小牛
驱动小牛
  • 注册日期2002-12-27
  • 最后登录2016-01-07
  • 粉丝0
  • 关注0
  • 积分5分
  • 威望34点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
8楼#
发布于:2004-10-20 15:37
指定一个代码段,用来存放函数。
该定义必须在函数的声明之后定义之前。
回答好的不要忘了给分哦。。。
petz
禁止发言
禁止发言
  • 注册日期2001-03-23
  • 最后登录2015-12-19
  • 粉丝0
  • 关注0
  • 积分-22276分
  • 威望15点
  • 贡献值0点
  • 好评度4点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2003-02-19 11:16
用户被禁言,该主题自动屏蔽!
游客

返回顶部