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

Unhandled exception at (netapi32.dll) #52

Closed romanholidaypancakes closed 11 months ago

romanholidaypancakes commented 1 year ago

win10 32bit exe

LPWSTR name = NULL;
NETSETUP_JOIN_STATUS    net;
LI_FN(NetGetJoinInformation)((LPCWSTR)NULL, &name, &net);
JustasMasiulis commented 1 year ago
  1. Is the exception an attempt to call null pointer.
  2. Is the dll that contains that function actually loaded.
  3. Did you enable forwarded import resolution & case insensitive comparison.
romanholidaypancakes commented 1 year ago

I'm using lazy_importer's default settings without changing any code

int main() {
    LPWSTR               name = NULL;
    NETSETUP_JOIN_STATUS net;
    NetGetJoinInformation((LPCWSTR)NULL, &name, &net);
    LI_FN(NetGetJoinInformation)((LPCWSTR)NULL, &name, &net);
    return 0;
}

image

JustasMasiulis commented 1 year ago

I'm using lazy_importer's default settings without changing any code

So... Did you try enabling forwarded import resolution and case insensitive comparison?

romanholidaypancakes commented 1 year ago

I'm using lazy_importer's default settings without changing any code

So... Did you try enabling forwarded import resolution and case insensitive comparison?

i have tried

#define LAZY_IMPORTER_CASE_INSENSITIVE
#define LAZY_IMPORTER_RESOLVE_FORWARDED_EXPORTS
JustasMasiulis commented 11 months ago

Most likely an api-set export. Won't be fixed unless there is large demand for this.