Partager via


iwcall (Windows CE 5.0)

Send Feedback

The iwcall declspec allows the programmer to select which function calls are interworking, regardless of whether the ARM or THUMB compiler is used.

Using iwcall allows you to avoid link-time generation of interworking thunking routines.

Note   iwcall has no effect unless it is used on a function prototype visible to the caller.

The iwcall declspec does not cause the associated function to have an interworking return. To make an interworking return, use the -/QRinterwork-return - Enable Interworking flag.

You can use __declspec(iwcall) on the prototype of the user-supplied function to enable the library to handle either case.

The following code example shows how to use of iwcall declspec to enable a user-supplied function myfunction().

__declspec(iwcall) int myfunction();
int main()
{
  return myfunction();
}

The following listing shows the code generated from this declspec when compiled with /QRarch - Specify Target Architecture.

  str       lr, [sp, #4]!
  ldr       r3, [pc, #8]
  mov       lr, pc
  bx        r3
  ldmia     sp!, {pc}
  DCD       |myfunction|

The following listing shows the code generated with the ARM compiler using the /QRthumb option.

  push      {lr}
  ldr       r3, [pc, #0x2]
  mov       r12, r3
  bl        __r12_indirect
  pop       {pc}
  DCD       |myfunction|

See Also

Declspecs | iw16 | iw32 | /QRinterwork-return - Enable Interworking | /QRarch - Specify Target Architecture

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.