Once an EsEntryPoint is created, send it the message address to bind it. The address can be passed to an external language function that requires a function pointer. For example, to get the address of the WindowProc callback described above:External functions calling Smalltalk using EsEntryPoint must run in the same thread as Smalltalk.All available EsEntryPoint addresses are in use.The EsEntryPoint is using an unsupported calling convention.There is insufficient memory to allocate a LargeInteger for the return value of the function or to allocate internal support structures.When the address of an EsEntryPoint is called by the external language, there is always the possibility of failure. It may not be possible to allocate the necessary objects required for the conversion to Smalltalk objects. The return value from Smalltalk may be invalid and unconvertable.EsEntryPoint instances contain a fail address that defaults to 0. When the callback fails for any reason, this address is checked. If it is 0, 0 is returned from the callback. If it is not 0, it must be the address of a function that has exactly the same prototype as the EsEntryPoint. Upon failure, this function is called.This code causes DefWindowProc to be called when the Smalltalk WindowProc fails. When an EsEntryPoint unbinds, the fail address is reset to 0.
|