Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5976885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:17:30+00:00 2026-05-22T21:17:30+00:00

I have a SOAP Data Module that exports this function function MyFunction(MyParam1, MyParam2): boolean;

  • 0

I have a SOAP Data Module that exports this function

function MyFunction(MyParam1, MyParam2): boolean; stdcall;

I can use this function from another exe. Everything works.

Now I want to use the same function from inside the same project it’s in. I added its unit to the uses clause but it didn’t recognise it (I got Undeclared Identifier). Then I added an overload but I can’t get it to work.

function MyFunction(MyParam1, MyParam2): boolean; stdcall; overload;
function MyFunction(MyParam1, MyParam2): boolean; overload;

I get “field definitions not allowed…”

I want to be able to access the function from outside using stdcall, but also internally like common library function calls. Does anyone know how I can achieve that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:17:31+00:00Added an answer on May 22, 2026 at 9:17 pm

    Your problem has nothing to do with the calling convention.

    A few things to notice:

    A silly bug

    First,

    function MyFunction(MyParam1, MyParam2): boolean; stdcall;
    

    is a syntax error. You have forgotten to specify the types of MyParam1 and MyParam2.

    Visibility

    Consider the unit

      unit Unit1;
    
      interface
    
      uses
        Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
        Dialogs;
    
      function Func1(MyParam1, MyParam2: integer): boolean;
    
      implementation
    
      function Func1(MyParam1, MyParam2: integer): boolean;
      begin
        ShowMessage('Func1');
      end;
    
      function Func2(MyParam1, MyParam2: integer): boolean;
      begin
        ShowMessage('Func2');
      end;
    
      end.
    

    Only Func1 will be visible to other units, because only Func1 is declared in the interface section. And the interface is what other units see.

    Calling conventions

    You can use stdcall inside your own project. That isn’t a problem at all. You will probably not even notice that the function has an ‘unusual’ calling convention.

    Overloaded functions

    A pair of overloaded functions (procedures) is a pair of functions (procedures) with the same name but with different parameter lists, as in

    function Add(A, B: integer): integer; overload;
    function Add(A, B: real): real; overload;
    

    Two functions cannot have the same name and parameter lists, even if they are overloaded. Indeed, if that was allowed, then how in the world would the compiler know what function you want to call?!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to use several SOAP messages to get data from a web service.
I have web service written that generates some data...can I call the web service
We currently have a SOAP based web service that our in house applications use
How can we use OCR web service in android application I have use this
I have an XML/Soap file that looks like this: <?xml version=1.0 encoding=utf-8?> <soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope
I have a temporary file with data that's returned as part of a SOAP
We have SOAP web services in production that are relying on SOAP Headers (containing
I have a SOAP client in Ruby that I'm trying to get working with
I have a SOAP request that is known to work using a tool like,
I have a SOAP result set that the nuSoap extension has turned into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.