# US 2008/0307446 A1 · Interoperable Managed and Unmanaged Code in a Document Environment

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0307446 A1
- Document ID: US20080307446A1
- Status: Published application
- Kind: A1
- Application number: 11/760,529
- Filed: 2007-06-08
- Published: 2008-12-11
- Earliest claimed: 2007-06-08
- Assignees: Microsoft Corporation
- Inventors: Iouri B Simernitski
- Web page: https://patentgrep.com/patent/US20080307446A1

## CPC

- G06F 9/4484: {Executing subprograms}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Managed and unmanaged code may operate in a document environment by enabling managed code to be called by unmanaged code. The managed code may make functions available to unmanaged code by creating a type library and loading the type library into a running object table using a filename identifier. The filename identifier may be used by the unmanaged code to locate the type library and thereby call managed code functions.

## Claims

### Claim 1

A method comprising:
defining an identifier for a first group of managed code;
defining a callable function within said first group of managed code;
defining a type library for said callable function;
adding said identifier to a second group of unmanaged code, said second group of unmanaged code adapted to:
search for said type library using said identifier;
finding said identifier in said running object table;
loading said type library from said running object table; and
calling said callable function.

### Claim 2 (depends on 1)

The method of claim 1, said identifier comprising a filename.

### Claim 3 (depends on 1)

The method of claim 1, said identifier comprising a GUID.

### Claim 4 (depends on 1)

The method of claim 1, said identifier being hardcoded within said second group of unmanaged code.

### Claim 5 (depends on 1)

The method of claim 1, said managed code and said unmanaged code being callable from a document environment.

### Claim 6 (depends on 1)

A computer readable medium comprising computer executable instructions adapted to perform the method of claim 1.

### Claim 7

A method comprising:
detecting that a document has been opened, said document comprising managed and unmanaged code adapted to be executed within a document environment;
executing said managed code, said managed code comprising an identifier and a type library; and
executing said unmanaged code, said unmanaged code adapted to:
search for said type library using said identifier; and
call at least a portion of said managed code using said type library.

### Claim 8 (depends on 7)

The method of claim 7, said managed code being adapted to load said type library in a running object table.

### Claim 9 (depends on 7)

The method of claim 7, said type library being located in a file.

### Claim 10 (depends on 9)

The method of claim 9, said identifier comprising a directory path for said file.

### Claim 11 (depends on 7)

The method of claim 7, said identifier comprising a GUID.

### Claim 12 (depends on 7)

The method of claim 7, said calling comprising identifying an instance of said document from which said at least a portion of said managed code is being called.

### Claim 13 (depends on 7)

The method of claim 7, said managed code being adapted to detect that said unmanaged code is adapted to call said managed code.

### Claim 14 (depends on 7)

A computer readable medium comprising computer executable instructions adapted to perform the method of claim 7.

### Claim 15

A method comprising:
receiving an identifier for a type library within an unmanaged code environment, said type library comprising a reference to a managed code environment;
searching for said type library using said identifier;
finding said type library in a running object table; and
making a call to said managed code environment from said unmanaged code environment using said type library.

### Claim 16 (depends on 15)

The method of claim 15, said identifier comprising a file name.

### Claim 17 (depends on 15)

The method of claim 15, said identifier comprising a GUID.

### Claim 18 (depends on 15)

The method of claim 15, said managed code environment and said unmanaged code environment being called from within a document environment.

### Claim 19 (depends on 18)

The method of claim 18, said making a call comprising an instance identifier for said document environment.

### Claim 20 (depends on 15)

A computer readable medium comprising computer executable instructions adapted to perform the method of claim 15.
