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 3612500
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:00:25+00:00 2026-05-18T22:00:25+00:00

I have a 3rd party DLL that I am trying to use in a

  • 0

I have a 3rd party DLL that I am trying to use in a win32 C++ application. The DLL alone is all that I have. I believe this library is written in C and I assume is not exposed to COM. Is LoadLibrary() the function must commonly used for this task in Windows? If so can someone provide me with an example of how it is used?

I created a blank win32 in VS so I don’t have any of the windows specific headers included etc.

Thanks!

UPDATE

I want to add that I am trying use the SDL Library which appears to be very widely used. It seems odd that the vendor would not provide more than the DLL if more is necessary.
Simple DirectMedia Layer

  • 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-18T22:00:26+00:00Added an answer on May 18, 2026 at 10:00 pm

    Assuming that you do have access to a header file or have documentation that identifies the function and their parameters – here is what it looks like

    Assume that the functions are as follows
    int Func1 (int i1, int i2);
    void Func2(void);

    Now what follows is the example code

    #include windows.h  
    #include stdio.h  
    // use either dumpbin or http://www.dependencywalker.com/ to confirm the functions  
    //Let us assume it has two functions with their prototypes known - Func1 & Func2  
    int Func1 (int i1, int i2);  
    void Func2(void);  
    typedef int (*FUNC1_PTR) (int, int);  
    typedef void (*FUNC2_PTR) (void);  
    const char NONAME_DLL[] = "some.dll";  
    int main(int argc, char *argv[]) {  
        FUNC1_PTR f1;  
        //FUNC2_PTR F2;  
        int i= 1, j = 2;  
        HMODULE hMod = LoadLibrary(NONAME_DLL);  
        if (!hMod) {  
            printf("LoadLibrary fails with error code %d \n", GetLastError());  
            return 1;  
        }  
        f1 = (FUNC1_PTR) GetProcAddress(hMod, "Func1");  
        if (f1) {  
            int ret = (*f1)(i, j);  
        }  
        FreeLibrary (hMod);  
        return 0;  
    }  
    

    If you do not have access to the header file or know the functions signature – there are perhaps few ways to proceed
    – Run a program which uses this function and break with a debugger when this function is called and see what it does.
    – Use interactive disassembler (for example, IDA Pro), it can show the signature elements such as how many parameters are passed into a function.
    – Disassembling the function to analyze its prologue and epilogue. Time consuming and not a trivial task, more so because of the different compilers, different calling conventions, optimized code packers, and so on.
    – I have heard people say that they have used winedump – you can check it out here http://www.winehq.org/docs/winedump – I have never used it though. Nirsoft.net’s DLL Export Viewer is perhaps another tool.
    – Also this is another tool- Visual dumpbin that uses UnDecorateSymbolName, the tool is available at http://code.entersources.com/f/Visual-Dumpbin-A-C–Visual-GUI-for-Dumpbin_2_1671_0.aspx. The DLL must be built by MS compiler. Check this link might give you some more clues, …

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

Sidebar

Related Questions

I have a 3rd party library that's written in C. It exports all of
We have a system that makes a use of 3rd party COM DLL written
I'm developing application using VC++ 6. I have a 3rd party DLL. This library
I have a 3rd party DLL that I need to use in my application.
We have a DLL that extends a 3rd party application. I would like to
I have an MFC DLL that is loaded by a 3rd party application. How
So, I have a 3rd party .dll written in C# 2.0 that needs to
I have a WCF service which references a 3rd party DLL. That DLL looks
I have a 3rd party web page screen capture DLL from http://websitesscreenshot.com/ that lets
I have a managed class library (say mylib.dll) and a 3rd party managed app

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.