Главная страница | назад





Article #27593: Error "Unsupported calling convention: REGISTER" in SOAP Application.

QUESTION:


Why am I getting the following Debugger Exception Notification: "Project Client.exe raised exception class Exception with message 'Unsupported calling convention: REGISTER'. Process stopped. Use step or run to continue." after creating a SOAP application and attempting to run the client?


ANSWER:


This problem occurs because the stdcall calling convention was not used in the function declaration in the server. Include stdcall at the end of the function definition and the problem will be resolved. In the Server Interface file and in the Server Implementation file the function definition should look similar to this:
function Foo: String; stdcall;

The reason stdcall must be used is that the default calling convention is Register which passes parameters from left to right; that is, the leftmost parameter is evaluated and passed first and the rightmost parameter is evaluated and passed last. In Windows, the operating system API's use stdcall which pass parameters from right to left.

Last Modified: 14-AUG-01