-
July 16th, 2016, 01:12 AM
#1
How to link undocumented windows apis?
For example,
there is an api in windows called SHCreateDesktop,
It is located in shell32.dll, but Microsoft keeps this symbol private,
so using shell32.lib won't link in the api to the executable.
If I really want to use it, how do I call this api in my vc++ program?
Thanks
Jack
-
July 16th, 2016, 04:17 AM
#2
Re: How to link undocumented windows apis?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 16th, 2016, 01:45 PM
#3
Re: How to link undocumented windows apis?
Originally Posted by lucky6969b
For example,
there is an api in windows called SHCreateDesktop,
It is located in shell32.dll, but Microsoft keeps this symbol private,
so using shell32.lib won't link in the api to the executable.
If I really want to use it, how do I call this api in my vc++ program?
Thanks
Jack
Kind of wondering why some folks tend to gravitate toward undocumented winapi's. Can you explain why you think it's a good idea?
-
July 16th, 2016, 05:11 PM
#4
Re: How to link undocumented windows apis?
Originally Posted by Arjay
Kind of wondering why some folks tend to gravitate toward undocumented winapi's. Can you explain why you think it's a good idea?
Kind of self-affirmation?
Victor Nijegorodov
-
July 17th, 2016, 02:17 AM
#5
Re: How to link undocumented windows apis?
Hello,
I am also wondering why some apis live in the area around 0x7xxxxxxxxx
but it is just in the user space area. but in 32bit windows environment, the kernel space actually starts at 0x80000000
When those user modules are loaded, they stay in a fixed address, only thunks can call them
I am looking into ways to load windows xp explorer in windows 7. But The thunks are one problem,
I can hook them, but what about the internal data structures? like pointers, that might call an absolute address in the same module or another module. So what is the minimum address that would be regarded as the
"kernel", or "user executvie" area?
Not just to prove myself, but as you know, windows xp user executives just can adapt in windows 7 environment,
they are different animals, I have to spawn a separate explorer.exe on another desktop out, I have to get rid of
all the out-of-range internal calls and thunk calls.
Thanks
Jack
Last edited by lucky6969b; July 17th, 2016 at 02:23 AM.
-
July 17th, 2016, 07:50 AM
#6
Re: How to link undocumented windows apis?
There have been major changes to the underlying OS architecture between XP and Windows 7 via Vista. Why are you expending so much effort trying to get XP explorer to work with Windows 7?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 17th, 2016, 11:52 AM
#7
Re: How to link undocumented windows apis?
Originally Posted by lucky6969b
For example,
there is an api in windows called SHCreateDesktop,
It is located in shell32.dll, but Microsoft keeps this symbol private,
so using shell32.lib won't link in the api to the executable.
If I really want to use it, how do I call this api in my vc++ program?
Thanks
Jack
Did you ever hear about dynamic linking? How much you know about dlls? How much you know about import libraries and creating those? We need to know this to understand where to start explaining.
Best regards,
Igor
-
January 1st, 2021, 06:34 AM
#8
Re: How to link undocumented windows apis?
Try this to link undocumented Windows API
Reflection. Here you get an object and ask it to reveal information about itself, like methods, properties etc.
With the right options (depending on language) you can reveal information that isn't "public".
Decompilation. This regenerates (a version) of the source used to create the binary. Again this might reveal non public parts of the API.
Let me know if this works for you or not!
Tim Paine
-
January 1st, 2021, 09:43 AM
#9
Re: How to link undocumented windows apis?
Why the quest for using undocumented APIs? Is writing fragile, unsupported code a 'thing'? Given 2020 wasn't all that great, let's kick off 2021 in the right direction - let's try to color inside the lines in 2021 and only use documented APIs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|