← Back to Patent Explorer
US6167565A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and system of custom marshaling of inter-language parameters

Assignee: Microsoft Technology Licensing LLC
•
Filing: 1998-01-08
•
Granted: 2000-12-26
•
Expires: 2018-01-08
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A computer-based custom marshaling method and system for custom marshaling of parameters during invocation of functions implemented in a second language by computer programs implemented in an first language. The parameter to be custom marshaled has a first type in the first language and a second type in the second language. The custom marshaling system receives code for converting a parameter of the first type to a parameter of the second type and for converting a parameter of the second type to a parameter of the first type. The custom marshaling system monitors the execution of a computer program implemented in the first language that invokes a function implemented in the second language. The invocation passes a parameter of the first type, and the function expects a parameter of the second type. The custom marshaling system intercepts the invocation of the function implemented in the second language. After intercepting the invocation, the custom marshaling system executes the received code for converting the passed parameter of the first type to a parameter of the second type. The custom marshaling system then invokes the function implemented in the second language passing the parameter converted to the second type. The invoked function returns a parameter of the second type. After invocation of the function, the custom marshaling system executes the received code for converting the returned parameter of the second type to a parameter of the first type and returns the converted parameter of the first type when returning from the intercepted invocation of the function.

Inventors

  • 👤 Atsushi Kanamori

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-06 20:23
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/46; G06F9/54; G06F9/547; Y; Y10; Y10S; Y10S707/00; Y10S707/99941; Y10S707/99944

Claims Analysis

Total Claims: 23
Claim 1
Independent Claim 256 words
A method in a computer system for marshaling of parameters during invocation of functions implemented in a second language by computer programs implemented in an first language, a parameter to be marshaled having a first type in the first language and a second type in the second language, the method comprising: executing a computer program implemented in the first language that invokes a function implemented in the second language, the invocation passing a parameter of the first type and the function expecting a parameter of the second type; intercepting the invocation of the function implemented in the second language; and after intercepting the invocation, determnining that the passed parameter requires custom marshaling; creating for the invoked function an in stub that invokes custom marshaling code for converting the passed parameter of the first type to a parameter of the second type and an out stub that invokes custom marshaling code for converting a returned parameter of the second type to a parameter of the first type; executing the in stub, thereby converting the passed parameter of the first type to a parameter of the second type; invoking the function implemented in the second language and passing the parameter converted to the second type, the invoked function returning a parameter of the second type; after invocation of the function, executing the out stub, thereby converting the returned parameter of the second type to a parameter of the first type; and returning the converted parameter of the first type when returning from the intercepted invocation of the function.
Claim 2
Independent Claim 256 words
A method in a computer system for marshaling of parameters during invocation of functions implemented in a second language by computer programs implemented in an first language, a parameter to be marshaled having a first type in the first language and a second type in the second language, the method comprising: executing a computer program implemented in the first language that invokes a function implemented in the second language, the invocation passing a parameter of the first type and the function expecting a parameter of the second type; intercepting the invocation of the function implemented in the second language; and after intercepting the invocation, determnining that the passed parameter requires custom marshaling; creating for the invoked function an in stub that invokes custom marshaling code for converting the passed parameter of the first type to a parameter of the second type and an out stub that invokes custom marshaling code for converting a returned parameter of the second type to a parameter of the first type; executing the in stub, thereby converting the passed parameter of the first type to a parameter of the second type; invoking the function implemented in the second language and passing the parameter converted to the second type, the invoked function returning a parameter of the second type; after invocation of the function, executing the out stub, thereby converting the returned parameter of the second type to a parameter of the first type; and returning the converted parameter of the first type when returning from the intercepted invocation of the function.
Claim 3
Dependent Claim 22 words
The method of claim 1 wherein the custom marshaling code is a custom marshaling class with member functions for converting the parameters.
Claim 4
Dependent Claim 21 words
The method of claim 1 wherein the first language is a Java-based language and the second language is a C-based language.
Claim 5
Dependent Claim 20 words
The method of claim 1 wherein the custom marshaling code may be for converting any arbitrary first and second types.
Claim 6
Independent Claim 193 words
A method in a computer system for marshaling of a parameter for inter-language invocation of functions between a first language and a second language, the parameter to be marshaled having a first type in the first language and a second type in the second language, the method comprising: when a computer program implemented in the first language invokes a function implemented in the second language, determining that a parameter being passed to the function requires custom marshaling; creating for the invoked function an in stub that invokes custom marshaling code for converting the passed parameter of the first type to a parameter of the second type and an out stub that invokes custom marshaling code for converting a returned parameter of the second type to a parameter of the first type; executing the in stub, thereby converting the passed parameter of the first type to a parameter of the second type; invoking the function implemented in the second language and passing the parameter converted to the second type; and after invocation of the function, executing the out stub, thereby converting the parameter of the second type to a parameter of the first type.
Claim 7
Independent Claim 193 words
A method in a computer system for marshaling of a parameter for inter-language invocation of functions between a first language and a second language, the parameter to be marshaled having a first type in the first language and a second type in the second language, the method comprising: when a computer program implemented in the first language invokes a function implemented in the second language, determining that a parameter being passed to the function requires custom marshaling; creating for the invoked function an in stub that invokes custom marshaling code for converting the passed parameter of the first type to a parameter of the second type and an out stub that invokes custom marshaling code for converting a returned parameter of the second type to a parameter of the first type; executing the in stub, thereby converting the passed parameter of the first type to a parameter of the second type; invoking the function implemented in the second language and passing the parameter converted to the second type; and after invocation of the function, executing the out stub, thereby converting the parameter of the second type to a parameter of the first type.
Claim 8
Dependent Claim 14 words
The method of claim 5 wherein the first language is the Java programming language.
Claim 9
Dependent Claim 14 words
The method of claim 5 wherein the first language is the C++ programming language.
Claim 10
Dependent Claim 18 words
The method of claim 5 wherein the custom marshaling code is implemented as member functions of a class.
Claim 11
Dependent Claim 23 words
The method of claim 5 wherein the custom marshaling code includes an indication of the size of a parameter of the second type.
Claim 12
Dependent Claim 26 words
The method of claim 5 wherein before invoking the function implemented in the second language, the parameter of the second type is allocated on a stack.
Claim 13
Dependent Claim 18 words
The method of claim 5 wherein the custom marshaling code for converting includes code for releasing allocated memory.
Claim 14
Dependent Claim 18 words
The method of claim 5 wherein the custom marshaling code is capable of converting arbitrary types of data.
Claim 15
Dependent Claim 215 words
A computer system for marshaling of a parameter for inter-language invocation of functions between a first language and a second language, the parameter to be marshaled having a type in the first language and another type in the second language, comprising: a storage component containing custom marshaling code for converting parameters of certain types to parameters of other types and for converting the parameters of the other types to parameters of the certain types; a component for receiving custom marshaling code and adding the received code to the storage component; and a marshaling component that when a computer program implemented in the first language invokes a function implemented in the second language, creates an in stub and an out stub; retrieves the custom marshaling code for converting the parameter based on the type of the parameter in the first and second languages and includes the code within the in stub and the out stub, executes the in stub, thereby converting the passed parameter of a first type to a parameter of a second type, invokes the function implemented in the second language passing the parameter converted to the second type, and after invocation of the function, executes the out stub, thereby converting the parameter of the second type to a parameter of the first type.
Claim 16
Dependent Claim 215 words
A computer system for marshaling of a parameter for inter-language invocation of functions between a first language and a second language, the parameter to be marshaled having a type in the first language and another type in the second language, comprising: a storage component containing custom marshaling code for converting parameters of certain types to parameters of other types and for converting the parameters of the other types to parameters of the certain types; a component for receiving custom marshaling code and adding the received code to the storage component; and a marshaling component that when a computer program implemented in the first language invokes a function implemented in the second language, creates an in stub and an out stub; retrieves the custom marshaling code for converting the parameter based on the type of the parameter in the first and second languages and includes the code within the in stub and the out stub, executes the in stub, thereby converting the passed parameter of a first type to a parameter of a second type, invokes the function implemented in the second language passing the parameter converted to the second type, and after invocation of the function, executes the out stub, thereby converting the parameter of the second type to a parameter of the first type.
Claim 17
Dependent Claim 14 words
The system of claim 13 wherein the first language is the Java programming language.
Claim 18
Dependent Claim 14 words
The system of claim 13 wherein the first language is the C++ programming language.
Claim 19
Dependent Claim 17 words
The system of claim 13 wherein the received code is implemented as member functions of a class.
Claim 20
Dependent Claim 170 words
A computer-readable medium containing instructions for causing a computer system to marshal a parameter for inter-language invocation of functions between a first language and a second language, the parameter to be marshaled having a first type in the first language and a second type in the second language, by: when a computer program implemented in the first language invokes a function implemented in the second language, determining that a parameter being passed to the function requires custom marshaling; creating for the invoked function an in stub that invokes custom marshaling code for converting the passed parameter of the first type to a parameter of the second type and an out stub that invokes custom marshaling code for converting a returned parameter of the second type to a parameter of the first type; executing the in stub, thereby converting the passed parameter of the first type to a parameter of the second type; and invoking the function implemented in the second language and passing the parameter converted to the second type.
Claim 21
Dependent Claim 170 words
A computer-readable medium containing instructions for causing a computer system to marshal a parameter for inter-language invocation of functions between a first language and a second language, the parameter to be marshaled having a first type in the first language and a second type in the second language, by: when a computer program implemented in the first language invokes a function implemented in the second language, determining that a parameter being passed to the function requires custom marshaling; creating for the invoked function an in stub that invokes custom marshaling code for converting the passed parameter of the first type to a parameter of the second type and an out stub that invokes custom marshaling code for converting a returned parameter of the second type to a parameter of the first type; executing the in stub, thereby converting the passed parameter of the first type to a parameter of the second type; and invoking the function implemented in the second language and passing the parameter converted to the second type.
Claim 22
Dependent Claim 15 words
The computer-readable medium of claim 17 wherein the first language is the Java programming language.
Claim 23
Dependent Claim 15 words
The computer-readable medium of claim 17 wherein the first language is the C++ programming language.

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2003-12-26 2004-06-26 2004-12-26 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2007-12-26 2008-06-26 2008-12-26 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2011-12-26 2012-06-26 2012-12-26 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag