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

  • SEARCH
  • Home
  • 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 6676637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:00:53+00:00 2026-05-26T04:00:53+00:00

I have a third party application that allows you to call C functions from

  • 0

I have a third party application that allows you to call C functions from DLL files. Provided sample to this app shows you can call MessageBoxW from user32.dll. It also allows you to call C functions from your DLL files.

I’ve did a DLL from a file.h file like this:

_declspec (dllexport) void example(int);

and file.c like this:

#include <stdio.h>
#include "file.h"

_declspec (dllexport) void example(int s1)
{
    printf("dsa");    
}

And compile it with C/C++ Compiler Version 15 from Windows SDK like this:

cl file.c /DLL /LD

And i get proper compilation with DLL file. In DLL functions examiner I see my function. I drop this file into System32 folder and call it from this third party application.

Application finds the file, but is unable to find the function.

I think the cause of the problem is that i declare (or compile) my DLL in other fashion/way/standard that Windows libraries (like user32.dll) because user32.dll works fine.

I’ve found that the third party app uses this kind of calling functions in DLL:

winapi_abi Used for calling Windows system functions. These are
declared as stdcall on Windows, but do not have mangled names.

So my question is: how to prepare and compile DLL file in the user32.dll fashion (stdcall?) so it will work with third party app?

  • 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-26T04:00:54+00:00Added an answer on May 26, 2026 at 4:00 am

    The easy answer is:

    __declspec(dllexport) void __stdcall example(int);
    

    And the same in the implementation, of course.

    If you look into windows.h and friends you’ll see:

    #define WINUSERAPI __declspec(dllexport)
    #define WINAPI __stdcall
    

    And then:

    WINUSERAPI int WINAPI MessageBoxW(HWND,LPCWSTR,LPCWSTR,UINT);
    

    But if you just define a few functions there is no need for the macros.

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

Sidebar

Related Questions

Say I have a third party Application that does background work, but prints out
I have to create a user in a third party application that stores its
I have a WinForms application with a bunch of third party references. This makes
I have a third-party app that creates HTML-based reports that I need to display.
I have a third-party product, a terminal emulator, which provides a DLL that can
I have a third party application that requires a 'POP 3 connection string'. I'd
We have a third party application that accept calls using an XML RPC mechanism
I have an application that I am writting that communicates with a third-party program
Question I have a third-party DLL that throws an unhandled exception when attempting to
I have a third party application that invokes a vsbscript file for certain operations.

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.