I l @ ve RuBoard |
Mixing managed and unmanaged code is quite simple, but it must follow some specific guidelines. To create (or maintain) a block of unmanaged code in your programs, you need to bracket the code with the #pragma unmanaged and #pragma managed directives as needed. For example, Listing 1.4.3 shows a function in unmanaged code. Listing 1.4.3 Using #pragma unmanaged#pragma unmanaged void timestwo(int* pToMultiply) { *pToMultiply*=2; } #pragma managed As you can see, the timestwo function multiplies the integer pointed to by the pToMultiply pointer and is specifically implemented as unmanaged code because of the use of the #pragma unmanaged directive. |
I l @ ve RuBoard |