Documentation about user32.dll and advapi.dll












0















I try to decompile an executable which is something like key-logger, and it references these 2 dlls in which I cannot drill down:



enter image description here



Any idea/help please of where to find more information/documentation about these? I mean their api contracts.



UPDATE:



It is difficult to identify which methods of it are called, because in the decompiled code there is code like that:



[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Auto)]
public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
public void Start()
{
if (hKeyboardHook == 0)
{
this.KeyboardHookProcedure = new HookProc(this.KeyboardHookProc);
hKeyboardHook = SetWindowsHookEx(13, this.KeyboardHookProcedure, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
if (hKeyboardHook == 0)
{
this.Stop();
throw new Exception("SetWindowsHookEx ist failed.");
}
}
}


Take a look at the following line:
Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0])



It does not have the method name explicitly...



That is why I am trying to guess










share|improve this question




















  • 1





    File path: "C:WindowsSystem32advapi32.dll". Which information do you want to know?

    – Biswapriyo
    Jan 28 at 16:09











  • Thank you @Biswapriyo, actually I mean the api documentation (the methods of it, signatures etc). What i am trying to do is to verify that this "utility" does not do any malicious work (like sending my data somewhere out there)

    – cnom
    Jan 29 at 8:51













  • OMG! So, your question is toooo broad. There is a whole website docs.microsoft.com for your answer.

    – Biswapriyo
    Jan 29 at 8:54











  • sorry about that, I made it more specific, I need their microsoft documentation

    – cnom
    Jan 29 at 9:00











  • I updated the question. Is it a little bit more clear now?

    – cnom
    Jan 29 at 9:16


















0















I try to decompile an executable which is something like key-logger, and it references these 2 dlls in which I cannot drill down:



enter image description here



Any idea/help please of where to find more information/documentation about these? I mean their api contracts.



UPDATE:



It is difficult to identify which methods of it are called, because in the decompiled code there is code like that:



[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Auto)]
public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
public void Start()
{
if (hKeyboardHook == 0)
{
this.KeyboardHookProcedure = new HookProc(this.KeyboardHookProc);
hKeyboardHook = SetWindowsHookEx(13, this.KeyboardHookProcedure, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
if (hKeyboardHook == 0)
{
this.Stop();
throw new Exception("SetWindowsHookEx ist failed.");
}
}
}


Take a look at the following line:
Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0])



It does not have the method name explicitly...



That is why I am trying to guess










share|improve this question




















  • 1





    File path: "C:WindowsSystem32advapi32.dll". Which information do you want to know?

    – Biswapriyo
    Jan 28 at 16:09











  • Thank you @Biswapriyo, actually I mean the api documentation (the methods of it, signatures etc). What i am trying to do is to verify that this "utility" does not do any malicious work (like sending my data somewhere out there)

    – cnom
    Jan 29 at 8:51













  • OMG! So, your question is toooo broad. There is a whole website docs.microsoft.com for your answer.

    – Biswapriyo
    Jan 29 at 8:54











  • sorry about that, I made it more specific, I need their microsoft documentation

    – cnom
    Jan 29 at 9:00











  • I updated the question. Is it a little bit more clear now?

    – cnom
    Jan 29 at 9:16
















0












0








0








I try to decompile an executable which is something like key-logger, and it references these 2 dlls in which I cannot drill down:



enter image description here



Any idea/help please of where to find more information/documentation about these? I mean their api contracts.



UPDATE:



It is difficult to identify which methods of it are called, because in the decompiled code there is code like that:



[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Auto)]
public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
public void Start()
{
if (hKeyboardHook == 0)
{
this.KeyboardHookProcedure = new HookProc(this.KeyboardHookProc);
hKeyboardHook = SetWindowsHookEx(13, this.KeyboardHookProcedure, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
if (hKeyboardHook == 0)
{
this.Stop();
throw new Exception("SetWindowsHookEx ist failed.");
}
}
}


Take a look at the following line:
Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0])



It does not have the method name explicitly...



That is why I am trying to guess










share|improve this question
















I try to decompile an executable which is something like key-logger, and it references these 2 dlls in which I cannot drill down:



enter image description here



Any idea/help please of where to find more information/documentation about these? I mean their api contracts.



UPDATE:



It is difficult to identify which methods of it are called, because in the decompiled code there is code like that:



[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Auto)]
public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
public void Start()
{
if (hKeyboardHook == 0)
{
this.KeyboardHookProcedure = new HookProc(this.KeyboardHookProc);
hKeyboardHook = SetWindowsHookEx(13, this.KeyboardHookProcedure, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
if (hKeyboardHook == 0)
{
this.Stop();
throw new Exception("SetWindowsHookEx ist failed.");
}
}
}


Take a look at the following line:
Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0])



It does not have the method name explicitly...



That is why I am trying to guess







dll c# decompile






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 29 at 9:32







cnom

















asked Jan 28 at 14:34









cnomcnom

1086




1086








  • 1





    File path: "C:WindowsSystem32advapi32.dll". Which information do you want to know?

    – Biswapriyo
    Jan 28 at 16:09











  • Thank you @Biswapriyo, actually I mean the api documentation (the methods of it, signatures etc). What i am trying to do is to verify that this "utility" does not do any malicious work (like sending my data somewhere out there)

    – cnom
    Jan 29 at 8:51













  • OMG! So, your question is toooo broad. There is a whole website docs.microsoft.com for your answer.

    – Biswapriyo
    Jan 29 at 8:54











  • sorry about that, I made it more specific, I need their microsoft documentation

    – cnom
    Jan 29 at 9:00











  • I updated the question. Is it a little bit more clear now?

    – cnom
    Jan 29 at 9:16
















  • 1





    File path: "C:WindowsSystem32advapi32.dll". Which information do you want to know?

    – Biswapriyo
    Jan 28 at 16:09











  • Thank you @Biswapriyo, actually I mean the api documentation (the methods of it, signatures etc). What i am trying to do is to verify that this "utility" does not do any malicious work (like sending my data somewhere out there)

    – cnom
    Jan 29 at 8:51













  • OMG! So, your question is toooo broad. There is a whole website docs.microsoft.com for your answer.

    – Biswapriyo
    Jan 29 at 8:54











  • sorry about that, I made it more specific, I need their microsoft documentation

    – cnom
    Jan 29 at 9:00











  • I updated the question. Is it a little bit more clear now?

    – cnom
    Jan 29 at 9:16










1




1





File path: "C:WindowsSystem32advapi32.dll". Which information do you want to know?

– Biswapriyo
Jan 28 at 16:09





File path: "C:WindowsSystem32advapi32.dll". Which information do you want to know?

– Biswapriyo
Jan 28 at 16:09













Thank you @Biswapriyo, actually I mean the api documentation (the methods of it, signatures etc). What i am trying to do is to verify that this "utility" does not do any malicious work (like sending my data somewhere out there)

– cnom
Jan 29 at 8:51







Thank you @Biswapriyo, actually I mean the api documentation (the methods of it, signatures etc). What i am trying to do is to verify that this "utility" does not do any malicious work (like sending my data somewhere out there)

– cnom
Jan 29 at 8:51















OMG! So, your question is toooo broad. There is a whole website docs.microsoft.com for your answer.

– Biswapriyo
Jan 29 at 8:54





OMG! So, your question is toooo broad. There is a whole website docs.microsoft.com for your answer.

– Biswapriyo
Jan 29 at 8:54













sorry about that, I made it more specific, I need their microsoft documentation

– cnom
Jan 29 at 9:00





sorry about that, I made it more specific, I need their microsoft documentation

– cnom
Jan 29 at 9:00













I updated the question. Is it a little bit more clear now?

– cnom
Jan 29 at 9:16







I updated the question. Is it a little bit more clear now?

– cnom
Jan 29 at 9:16












1 Answer
1






active

oldest

votes


















1














Both advapi32.dll and user32.dll are completely standard DLLs that come with Windows. And both export a great many functions.



In general Microsoft does not document their APIs by grouping them by DLL; rather, in the documentation for each API, the DLL that exports it will be mentioned, along with the .lib file and the .h file.



For example, see this reference for the MessageBox function (from User32), or this one for GetUserNameA from AdvApi32.



In general, User32 contains APIs that help an app create and implement the standard Windows GUI (i.e. a character-mode app, or service process, probably won't use many of these), and AdvApi32 contains "higher level" base API functions (the "lower level" being in kernel32.dll).



These DLLs do not export C# methods. They export functions callable from C/C++.



However, many C# methods will correspond, more or less directly, to these Windows APIs. In most such cases the C# method will call the corresponding C/C++ API to implement its function (after appropriate argument massaging, etc.).



If you want the complete list of what a DLL exports, I suggest you use one of several "dependency walker" tools that are available. Microsoft apparently stopped development of theirs around 2006; here is a more recent, open source alternative. If you just want to look things up, look here (but Geoff does not appear to have updated these lists since Windows 8).






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399278%2fdocumentation-about-user32-dll-and-advapi-dll%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Both advapi32.dll and user32.dll are completely standard DLLs that come with Windows. And both export a great many functions.



    In general Microsoft does not document their APIs by grouping them by DLL; rather, in the documentation for each API, the DLL that exports it will be mentioned, along with the .lib file and the .h file.



    For example, see this reference for the MessageBox function (from User32), or this one for GetUserNameA from AdvApi32.



    In general, User32 contains APIs that help an app create and implement the standard Windows GUI (i.e. a character-mode app, or service process, probably won't use many of these), and AdvApi32 contains "higher level" base API functions (the "lower level" being in kernel32.dll).



    These DLLs do not export C# methods. They export functions callable from C/C++.



    However, many C# methods will correspond, more or less directly, to these Windows APIs. In most such cases the C# method will call the corresponding C/C++ API to implement its function (after appropriate argument massaging, etc.).



    If you want the complete list of what a DLL exports, I suggest you use one of several "dependency walker" tools that are available. Microsoft apparently stopped development of theirs around 2006; here is a more recent, open source alternative. If you just want to look things up, look here (but Geoff does not appear to have updated these lists since Windows 8).






    share|improve this answer






























      1














      Both advapi32.dll and user32.dll are completely standard DLLs that come with Windows. And both export a great many functions.



      In general Microsoft does not document their APIs by grouping them by DLL; rather, in the documentation for each API, the DLL that exports it will be mentioned, along with the .lib file and the .h file.



      For example, see this reference for the MessageBox function (from User32), or this one for GetUserNameA from AdvApi32.



      In general, User32 contains APIs that help an app create and implement the standard Windows GUI (i.e. a character-mode app, or service process, probably won't use many of these), and AdvApi32 contains "higher level" base API functions (the "lower level" being in kernel32.dll).



      These DLLs do not export C# methods. They export functions callable from C/C++.



      However, many C# methods will correspond, more or less directly, to these Windows APIs. In most such cases the C# method will call the corresponding C/C++ API to implement its function (after appropriate argument massaging, etc.).



      If you want the complete list of what a DLL exports, I suggest you use one of several "dependency walker" tools that are available. Microsoft apparently stopped development of theirs around 2006; here is a more recent, open source alternative. If you just want to look things up, look here (but Geoff does not appear to have updated these lists since Windows 8).






      share|improve this answer




























        1












        1








        1







        Both advapi32.dll and user32.dll are completely standard DLLs that come with Windows. And both export a great many functions.



        In general Microsoft does not document their APIs by grouping them by DLL; rather, in the documentation for each API, the DLL that exports it will be mentioned, along with the .lib file and the .h file.



        For example, see this reference for the MessageBox function (from User32), or this one for GetUserNameA from AdvApi32.



        In general, User32 contains APIs that help an app create and implement the standard Windows GUI (i.e. a character-mode app, or service process, probably won't use many of these), and AdvApi32 contains "higher level" base API functions (the "lower level" being in kernel32.dll).



        These DLLs do not export C# methods. They export functions callable from C/C++.



        However, many C# methods will correspond, more or less directly, to these Windows APIs. In most such cases the C# method will call the corresponding C/C++ API to implement its function (after appropriate argument massaging, etc.).



        If you want the complete list of what a DLL exports, I suggest you use one of several "dependency walker" tools that are available. Microsoft apparently stopped development of theirs around 2006; here is a more recent, open source alternative. If you just want to look things up, look here (but Geoff does not appear to have updated these lists since Windows 8).






        share|improve this answer















        Both advapi32.dll and user32.dll are completely standard DLLs that come with Windows. And both export a great many functions.



        In general Microsoft does not document their APIs by grouping them by DLL; rather, in the documentation for each API, the DLL that exports it will be mentioned, along with the .lib file and the .h file.



        For example, see this reference for the MessageBox function (from User32), or this one for GetUserNameA from AdvApi32.



        In general, User32 contains APIs that help an app create and implement the standard Windows GUI (i.e. a character-mode app, or service process, probably won't use many of these), and AdvApi32 contains "higher level" base API functions (the "lower level" being in kernel32.dll).



        These DLLs do not export C# methods. They export functions callable from C/C++.



        However, many C# methods will correspond, more or less directly, to these Windows APIs. In most such cases the C# method will call the corresponding C/C++ API to implement its function (after appropriate argument massaging, etc.).



        If you want the complete list of what a DLL exports, I suggest you use one of several "dependency walker" tools that are available. Microsoft apparently stopped development of theirs around 2006; here is a more recent, open source alternative. If you just want to look things up, look here (but Geoff does not appear to have updated these lists since Windows 8).







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 11 at 4:45

























        answered Jan 29 at 10:40









        Jamie HanrahanJamie Hanrahan

        18.7k34279




        18.7k34279






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399278%2fdocumentation-about-user32-dll-and-advapi-dll%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

             ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕