On Fri Aug 5 17:49:42 2022 +0000, Nikolay Sivov wrote:
Right, I misspoke. Using IMPORTS is the right thing to do, IMPORTLIB is a name of import library. The "-import" flag means a different thing. For example in kernel32.spec there is `@ stdcall -import ActivateActCtx(ptr ptr)`, this line means that kernel32 will have an export called "ActivateActCtx", but its actual implementation is elsewhere (in this case it's in kernelbase). `-import` will create an actual stub function in kernel32, that would immediately call real one from kernelbase. This is different from forwarding that's also used in some modules. Forwarding syntax would be `@ stdcall ActivateActCtx(ptr ptr) kernelbase.ActivateActCtx`, and won't create an actual function in kernel32, so GetProcAddress(kernel32, ...) == GetProcAddress(kernelbase, ...). With `-import` GetProcAddress() will return different addresses.
Ah, thank you very much for clearing that up :)