Patent ID: 7680762

Claim:
A computer implemented system that facilitates communications between managed and unmanaged code, comprising a memory having stored therein the following executable components and a processor that executes the computer executable components: a code component that is managed code and includes a calling function, wherein managed code is allocated from a heap within a managed software environment and is not responsible for removing itself from memory as managed code objects are automatically removed from memory when no longer being accessed; a caller component that enables the calling function to invoke a function that is unmanaged code remote from the code component via an in-lined stub, wherein unmanaged code is allocated from a standard operating system heap and is responsible for removing itself from memory as unmanaged code objects are not automatically removed from memory when no longer being accessed, and wherein the in-lined stub facilitates communications with the function and utilizes direct calls and returns within the calling function without invoking an external stub procedure, such that the managed code of the code component communicates with the unmanaged code of function of the caller component; and a stack marker that is separated from within a code loop associated with the caller component to facilitate code execution during communications with the function.