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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:30:36+00:00 2026-06-04T14:30:36+00:00

The scenario is the following: Lets say I have this application App that depends

  • 0

The scenario is the following:

Lets say I have this application “App” that depends on this Library “library.dll”. I would like to know the function calls “App” does while its running. Assume I don’t have access to the source code of “App” or “library.dll”, but I know the name and arguments of every function that exists is “library.dll”. Is there any way I can somehow find out which of the functions from “library.dll” are being called by “App”?

I saw a similar questions in stackoverflow: How to intercept dll method calls?

An answer my Mr. Ates Goral intrigued me, he mention writting a wrapperDLL that forwards function calls to the real DLL. I was hoping someone could provide me with some insight as to how this could be accomplished or point me to a place where were I could get information in the matter.

The two parts I am most interested in is having my application load my .dll and how to actually forward the function to the original “library.dll”

Thank You

  • 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-06-04T14:30:37+00:00Added an answer on June 4, 2026 at 2:30 pm

    The wrapper DLL works perfect – here is how it works:

    Let’s assume, the library.dll exports int somefunct(int i, void* o) – you now create your own DLL, with something like

    #include <windows.h>
    
    //Declare this for every function prototype
    typedef int (*int_f_int_pvoid)(int,void*);
    
    //Declare this for every function
    int_f_int_pvoid lib_somefunct
    
    
    //this snipplet goes into dllmain
    ...
    HINSTANCE hlibdll = LoadLibrary("X:\PATH\TO\renamed_library.dll");
    //For every function
    lib_somefunct=(int_f_int_pvoid)GetProcAddress(hlibdll,"somefunct");
    ...
    
    
    //Again for every function    
    int somefunct(int i, void* o)
    {
        //Log the function call and parameters
        //...
    
        //Call library.dll
        int result=lib_somefunct(i, o);
    
    
        //Log the result 
        //...
    
        return result;
    }
    

    Export your functions, name the resulting DLL library.dll after renaming the original to renamed_library.dll

    Now the target EXE will load (your) library.dll, which in turn will load the (original, but renamed) renamed_library.dll – and whenever the target program calls a function, it will run through your loggin code.

    Caveat: Your traget EXE might be multithreaded, so be prepared to have a thread-safe logging mechanism.

    I have successfully used this method to debug a strange MAPI issue.

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

Sidebar

Related Questions

So lets say I have the following scenario. http://website.com:8080 and http://website.com:8080/demo Is there any
I need to know the best approach for the following scenario lets say we
Referring to this question, let's say we have the following scenario - A model
I have following scenario: Lets say we have two different webparts operating on the
Please consider the following scenario. I have a Task, that returns an object, lets
Lets say i have the following scenario: public class A { public String createString(final
Consider following scenario: I have RESTful URL /articles that returns list of articles user
This seems like a reasonable (and maybe simple?) scenario, but how would you do
Lets say i have the following set of interfaces.... public interface IStart { void
Let's say I have the following scenario. A database of LocalLibrary with two tables

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.