LoadLibrary falha com o código de erro 193

Estou preso por que não consigo carregar minha "interface" da dll usando o LoadLibrary. Parece estar falhando ao carregar uma dependência, mas não sei por que.

Aqui está o código:

AfxMessageBox(L"before load library");
HMODULE interfacDll = LoadLibrary(TEXT("C:\\QA\\Pcdlrn\\Win32\\Release\\INTERFAC.DLL"));
if (!interfacDll)
  DWORD dw = GetLastError(); // returns 0xc1 (193)
AfxMessageBox(L"after load library");

E aqui está a saída dos snaps do carregador do gflags (x86):

18a0:2a40 @ 06858973 - LdrGetDllHandleEx - ENTER: DLL name: ntdll.dll DLL path: NULL
18a0:2a40 @ 06858973 - LdrGetDllHandleEx - INFO: Locating DLL ntdll.dll in path C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows
18a0:2a40 @ 06858989 - LdrpFindLoadedDll - ENTER: DLL name: ntdll.dll DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows
18a0:2a40 @ 06858989 - LdrpFindLoadedDll - RETURN: Status: 0x00000000
18a0:2a40 @ 06858989 - LdrGetDllHandleEx - RETURN: Status: 0x00000000
18a0:2a40 @ 06858989 - LdrGetProcedureAddressEx - INFO: Locating procedure "KiUserExceptionDispatcher" by name
18a0:2a40 @ 06858989 - LdrLoadDll - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\syste
18a0:2a40 @ 06858989 - LdrpLoadDll - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\syst
18a0:2a40 @ 06858989 - LdrpLoadDll - INFO: Loading DLL C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL from path C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\sys
18a0:2a40 @ 06858989 - LdrpFindOrMapDll - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows
18a0:2a40 @ 06858989 - LdrpSearchPath - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\s
18a0:2a40 @ 06858989 - LdrpResolveFileName - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL
18a0:2a40 @ 06858989 - LdrpResolveFileName - RETURN: Status: 0x00000000
18a0:2a40 @ 06858989 - LdrpResolveDllName - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL
18a0:2a40 @ 06858989 - LdrpResolveDllName - RETURN: Status: 0x00000000
18a0:2a40 @ 06858989 - LdrpSearchPath - RETURN: Status: 0x00000000
18a0:2a40 @ 06859036 - LdrpMapViewOfSection - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL
'CNCServer.exe': Loaded 'C:\QA\Pcdlrn\Win32\Release\INTERFAC.dll', Symbols loaded.
18a0:2a40 @ 06859098 - LdrpMapViewOfSection - RETURN: Status: 0x40000003
18a0:2a40 @ 06859098 - LdrpRelocateImage - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL
18a0:2a40 @ 06859098 - LdrpProtectAndRelocateImage - RETURN: Status: 0x00000000
18a0:2a40 @ 06859098 - LdrpRelocateImage - RETURN: Status: 0x00000000
18a0:2a40 @ 06859098 - LdrpFindOrMapDll - RETURN: Status: 0x00000000
18a0:2a40 @ 06859098 - LdrpHandleOneOldFormatImportDescriptor - INFO: DLL "C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL" imports "PCDLRN.exe"
18a0:2a40 @ 06859098 - LdrpLoadImportModule - ENTER: DLL name: PCDLRN.exe DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\W
18a0:2a40 @ 06859098 - LdrpFindOrMapDll - ENTER: DLL name: PCDLRN.exe DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windo
18a0:2a40 @ 06859098 - LdrpFindKnownDll - ENTER: DLL name: PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpFindKnownDll - RETURN: Status: 0xc0000135
18a0:2a40 @ 06859098 - LdrpSearchPath - ENTER: DLL name: PCDLRN.exe DLL path: C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows
18a0:2a40 @ 06859098 - LdrpResolveFileName - ENTER: DLL name: C:\QA\Pcdlrn\CNCSERVER\Win32\Release\PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpResolveFileName - RETURN: Status: 0xc0000135
18a0:2a40 @ 06859098 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\system32\PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpResolveFileName - RETURN: Status: 0xc0000135
18a0:2a40 @ 06859098 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\system\PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpResolveFileName - RETURN: Status: 0xc0000135
18a0:2a40 @ 06859098 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpResolveFileName - RETURN: Status: 0xc0000135
18a0:2a40 @ 06859098 - LdrpResolveFileName - ENTER: DLL name: .\PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpResolveFileName - RETURN: Status: 0x00000000
18a0:2a40 @ 06859098 - LdrpResolveDllName - ENTER: DLL name: .\PCDLRN.exe
18a0:2a40 @ 06859098 - LdrpResolveDllName - RETURN: Status: 0x00000000
18a0:2a40 @ 06859098 - LdrpSearchPath - RETURN: Status: 0x00000000
18a0:2a40 @ 06859098 - LdrpMapViewOfSection - ENTER: DLL name: C:\QA\Pcdlrn\Win32\Release\PCDLRN.exe
'CNCServer.exe': Loaded 'C:\QA\Pcdlrn\Win32\Release\PCDLRN.exe', Symbols loaded.
18a0:2a40 @ 06859597 - LdrpMapViewOfSection - RETURN: Status: 0x40000003
'CNCServer.exe': Unloaded 'C:\QA\Pcdlrn\Win32\Release\PCDLRN.exe'
18a0:2a40 @ 06859597 - LdrpFindOrMapDll - RETURN: Status: 0xc000007b
18a0:2a40 @ 06859597 - LdrpLoadImportModule - ERROR: Loading DLL PCDLRN.exe from path C:\QA\Pcdlrn\CNCSERVER\Win32\Release;C:\Windows\system32;C:\Windows\system;C:\Windows;.;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\windows\system32;C:\windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:
18a0:2a40 @ 06859597 - LdrpLoadImportModule - RETURN: Status: 0xc000007b
18a0:2a40 @ 06859597 - LdrpHandleOneOldFormatImportDescriptor - ERROR: Loading "?????" from the import table of DLL "C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL" failed with status 0xc000007b
18a0:2a40 @ 06859613 - LdrpUnloadDll - INFO: Unmapping DLL "C:\QA\Pcdlrn\Win32\Release\INTERFAC.DLL"
'CNCServer.exe': Unloaded 'C:\QA\Pcdlrn\Win32\Release\INTERFAC.dll'
18a0:2a40 @ 06859613 - LdrpLoadDll - RETURN: Status: 0xc000007b
18a0:2a40 @ 06859613 - LdrLoadDll - RETURN: Status: 0xc000007b

Devo mencionar que estou usando janelas de 64 bits, mas todo o meu código executável é direcionado para x86 (c #) ou win32 (c ++).

Como eu resolvo esse problema?

Todas as sugestões serão muito apreciadas. Muito obrigado.

p.s. Aqui está a saída do walker de dependência:

p.p.s. Aqui está uma captura de tela mostrando que minhas DLLs são x86:

p.p.p.s. aqui estão as entradas do vinculador para interfac.dll:

Editar. Aqui está a saída do dumpbin:

Microsoft (R) COFF/PE Dumper Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file pcdlrn.exe

File Type: EXECUTABLE IMAGE

Section contains the following exports for PCDLRN.exe

00000000 characteristics
5796AD2A time date stamp Mon Jul 25 20:22:02 2016
    0.00 version
       1 ordinal base
    5784 number of functions
    5784 number of names

ordinal hint RVA      name

     1    0 0029CDF0 ??0?$CArray@V?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@V12@@@QAE@XZ = ??0?$CArray@V?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@V12@@@QAE@XZ (public: __thiscall CArray<class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >,class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > >::CArray<class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >,class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > >(void))
...
5783 1696 02593550 ?zoomOutFine@VisionTargetControls@UIEvents@@YAXXZ = ?zoomOutFine@VisionTargetControls@UIEvents@@YAXXZ (void __cdecl UIEvents::VisionTargetControls::zoomOutFine(void))
5784 1697 02593640 ?zoomOutMaximum@VisionTargetControls@UIEvents@@YAXXZ = ?zoomOutMaximum@VisionTargetControls@UIEvents@@YAXXZ (void __cdecl UIEvents::VisionTargetControls::zoomOutMaximum(void))

Summary

  2C0000 .data
    1000 .fnp_dir
    1000 .fnp_mar
  AFA000 .rdata
   1B000 .rsrc
 2E7A000 .text
   E5000 .textidx
    1000 .tls

questionAnswers(2)

yourAnswerToTheQuestion