JustasMasiulis / lazy_importer

library for importing functions from dlls in a hidden, reverse engineer unfriendly way
Apache License 2.0
1.65k stars 222 forks source link

Not working #3

Closed sb0sse closed 6 years ago

sb0sse commented 6 years ago

Hi

The basic hello world test doesn't work, fails with access violation https://i.imgur.com/ocvhP80.png

VS 2017 basic console application

If I call the function (MessageBoxA) normally before, then it works.

There is also this strange thing I noticed: https://i.imgur.com/nEtIF1m.png

Thanks

Mecanik commented 6 years ago

This library is not for scriptkids. You can’t even make a message box work, and you just joined github... you should let it go honestly.

JustasMasiulis commented 6 years ago

You do not have the dll from which MessageBoxA is exported loaded. By calling MBA without lazy importer it gets added to the imports of your executable so the appropriate dll is loaded during the startup of your process. To solve this problem you can LoadLibraryA all the dependencies manually.

If the issue persists please reopen the issue.

sb0sse commented 6 years ago

This library is not for scriptkids. You can’t even make a message box work, and you just joined github... you should let it go honestly.

It's not that I can't get it working or investigate myself, it's that I valued using the community as a tool rather than unnecessarily wasting time. Also, I'm pretty sure there is no limitation on using any library on GitHub regardless of how complicated it may or may not be, so take your high horse and shove it up your arse. What does my registration date have to do with this?

You do not have the dll from which MessageBoxA is exported loaded.

Well, what I didn't show was that I did import. It seems like the export was optimized out by MSVC (haven't experienced that before), anyway I upgraded to the latest version and this seems to have resolved the problem, I believe it was likely a combination of compile flags that caused that oddity which Microsoft have probably fixed in the latest version.

Now, the other problem that I mentioned (with LI_GET), that may very well be my misunderstanding, but from a quick look at the actual source, there does seem to be a conflict in the definition and your example. Obviously I could have taken the time and instead reported an invalid example, but I thought you'd connect the dots and not just assume my incompetence.

I'd like to say that in the future I'll make sure to word my issues as though I'm facing a horde of autists that can't help but assume the worse from the get go, but it's likely I'll continue to write them in the casual fashion from which my thoughts originate.

Nice library, by the way.

Mecanik commented 6 years ago

So now you are able to write a story about your self esteem ? Your initial question proven that you are out of your league, and your reply to my assumption is somewhat showing otherwise.

If you write a really dumb question ( without even trying to debug ), what do you expect people to assume ? Your question will be assumed "automatically" that you are script-kid. Don't blame the reader, blame the writer.

With that being said, you are now probably paying more attention to your questions and maybe, just maybe you will improve your future questions to reflect a better intelligence about yourself.