1. 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.