Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
635 B

  1. //***************************************************************************
  2. // delay load code ripped from shell\lib\dllload.c
  3. //***************************************************************************
  4. #include "precomp.h"
  5. HINSTANCE g_hinstShell32 = NULL;
  6. void _GetProcFromDLL(HMODULE* phmod, LPCSTR pszDLL, FARPROC* ppfn, LPCSTR pszProc)
  7. {
  8. // If it's already loaded, return.
  9. if (*ppfn) {
  10. return;
  11. }
  12. if (*phmod == NULL) {
  13. *phmod = LoadLibraryA(pszDLL);
  14. if (*phmod == NULL) {
  15. return;
  16. }
  17. }
  18. *ppfn = GetProcAddress(*phmod, pszProc);
  19. }