I wanted to use NetFileEnum API which it is exported from netapi32. When I used loadlibrary to load this netapi32 and NetFileEnum, it gives me the access violation error.