阅读:5637回复:9
#pragma alloc_text是什么意思啊,
#pragma alloc_text是什么意思啊,MSDN里看的不是很懂啊,谢谢
|
|
沙发#
发布于:2008-12-29 09:20
这个论坛人气不行呀,第一二贴间隔了多长时间...
|
|
板凳#
发布于:2007-11-02 09:24
在驱动程序中看到这样一个函数DeviceSetDeviceParameter(...),整个程序中从未调用过这个函数,而只在这里被用到了。
不明白是什么意思?它的作用又是什么呢? 例如: #pragma alloc_text(PAGE, DeviceSetDeviceParameter) 谢谢回答............ |
|
地板#
发布于:2007-11-01 22:12
引用第6楼best10080于2007-11-01 17:05发表的 : 同问 |
|
地下室#
发布于:2007-11-01 17:05
这样做有什么作用呢?谢谢回答..........
|
|
5楼#
发布于:2007-08-30 09:25
学习了
|
|
6楼#
发布于:2007-08-24 12:00
![]() |
|
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. |
|
|
8楼#
发布于:2004-10-20 15:37
指定一个代码段,用来存放函数。
该定义必须在函数的声明之后定义之前。 |
|
|
9楼#
发布于:2003-02-19 11:16
用户被禁言,该主题自动屏蔽! |
|