#pragma AVRT_CODE_BEGIN - what does this mean?

I support some codes, there are lines like:

#pragma AVRT_CODE_BEGIN   
//some code
#pragma AVRT_CODE_END

I can’t understand them,
I googled, but received nothing but a code example: Click me
Do you know what AVRT_CODE_BEGIN and AVRT_CODE_END mean?

Please tell me. Many thanks.

+3
source share
1 answer

There are compiler directives for generating code in a specific linker segment instead of the default linker segment for processing audio in the AVRT library. This is an internal feature of Microsoft. Segments exist, probably for optimization or security. I found this header file that shows the value:

ftp://ns432777.ip-37-59-27.eu/Program%20Files%20%28x86%29/Windows%20Kits/8.0/Include/um/baseaudioprocessingobject.h

// These are copied out of the old AvRt.h file.
#define AVRT_CODE_BEGIN   code_seg( push, "RT_CODE" )
#define AVRT_DATA_BEGIN   data_seg( push, "RT_DATA" )
#define AVRT_BSS_BEGIN    bss_seg( push, "RT_BSS" )
#define AVRT_CONST_BEGIN  const_seg( push, "RT_CONST" )
#define AVRT_VTABLES_BEGIN AVRT_CONST_BEGIN
#define AVRT_CODE_END   code_seg( pop )
#define AVRT_DATA_END   data_seg( pop )
#define AVRT_BSS_END    bss_seg( pop )
#define AVRT_CONST_END  const_seg( pop )
#define AVRT_VTABLES_END AVRT_CONST_END
#define AVRT_DATA __declspec(allocate("RT_DATA"))
#define AVRT_BSS __declspec(allocate("RT_BSS"))
#define AVRT_CONST __declspec(allocate("RT_CONST"))
0