Hmm, that was a bit unexpected.
![Smile :)](images/smilies/icon_smile.gif)
I just wanted to explain the details, which have changed over the last couple releases, needed to reproduce this DLL loading
error in Sandboxie. Error -- I don't consider it simply an "issue" that I'm doing something
wrong, etc. I haven't really gone around searching for DLLs to load, so I don't know what else might do that (ret FALSE)... Didier Stevens'
LoadDLLViaAppInit (code included), et al. is about all I've looked at. These normal, nothing-to-do-with-a-sandbox AppInit type DLLs I realized could simply be used with InjectDll, if desired, instead of system-wide with AppInit. That is, like I said, after originally thinking that InjectDll's
needed to be Sandboxie-specific, with InjectDllMain, Sbie*, etc. So I thought it was great that "normal" DLLs can be used also, but then I ran into this problem!
There seems to be some major DLL loading problems/weirdness in 4.01 (AppCompat Shims/
EMET and
ExploitShield), so I figure this might be related, and would be fixed when those issues are.
*I* don't understand why this is an issue either when InjectDll with anything seems to work perfect in 3.76.
![Smile :)](images/smilies/icon_smile.gif)
I don't understand why any of that loading code would change with 4.01. (So it's already
been "touched.") Isn't it just doing like LoadLibrary in the processes? So I don't get why Sandboxie is interfering or being messed up by that. The code and DLLs are legitimate, no? Why not return TRUE? Because I don't need to like I said -- the DLL doesn't need to stay loaded once it's done what it needs to do. And it's nice that 3.76 even unloads it too (if no InjectDllMain), like Windows.
Are you saying that this is an
intentional change in 4.01, not allowing valid DLLs to load, and 3.76 was somehow broken?
![Smile :)](images/smilies/icon_smile.gif)
And remember, returning FALSE
did work in 4.01/.02/03/04, so again, it was "touched" in .05 (I know, obviously for the Sandboxie-specific InjectDll failure I reported here). So then the bug was that for FALSE to not fail, it needed an export table (again, if that's the right term). Again, I don't understand that, since if SBIE would just do a normal LoadLibrary and then look for InjectDllMain, if present, there should be no problem, which is what 3.76 seems to do...
If you could go back to the .04 code, fix the need-an-export-table issue, and leave the OP InjectDll fix, that would be pretty good! e.g. functional with valid DLLs.
![Smile :)](images/smilies/icon_smile.gif)
Then the only thing would be that the DLL still remains loaded with FALSE in 4.01, but whatever..... Though it'd be nice to unload it like 3.76.
I guess it's not unexpected, but FWIW an "empty" DLL without an entry point (so nothing to return TRUE) even loads fine.
![Crying or Very sad :cry:](images/smilies/icon_cry.gif)
Just "void Dummy(void) { }" compiled with: cl /LD Test.c /link /NOENTRY