Newsgroup: it.comp.programmare.win32
Titolo: DLL e funzioni di Callback su NT

 
          Ciao a tutti,
vi descrivo il mio problema:
una mia applicazione in VB6 utilizza una libreria che ho scritto con VC++ 6.
Questa libreria è una DLL
che ho creato con come progetto MFC AppWizard (dll) in VC++.
Tale libreria esporta un metodo con il quale è possibile passare alcuni
puntatori a funzioni di callback
definite nell'applicazione VB.
Nell'applicazione VB passo i puntatori alla libreria tramite l'operatore
AddressOf.
Il problema è che il tutto funziona regolarmente su Win XP e Win 2000 ma su
NT non vuole saperne.
Lanciando in debug la libreria (in VC++) viene segnalato un errore di
"Access violation".
Credo che il problema sia dovuto alla riallocazione della libreria (o di
alcuni componenti dell'applicazione: ocx vari).
Infatti il debugger di VC mi segnala parecchi messaggi di "Automatic DLL
Relocation".
Qualcuno sa dirmi che problema è e come posso risolvere il problema?
Grazie.
Qualche stralcio di messaggi del debugger:
*************************************************************************************
*************************************************************************************
LDR: avlserver.exe bound to MSVBVM60.DLL
LDR: Loading (STATIC) D:\WINNT.SBS\System32\MSVBVM60.DLL
Loaded 'D:\WINNT.SBS\system32\msvbvm60.dll', no matching symbolic
information found.
LDR: KERNEL32.dll used by MSVBVM60.DLL
Loaded symbols for 'D:\WINNT.SBS\system32\kernel32.dll'
LDR: KERNEL32.dll bound to ntdll.dll
LDR: KERNEL32.dll has stale binding to ntdll.dll
LDR: Stale Bind ntdll.dll from KERNEL32.dll
LDR: Snapping imports for MSVBVM60.DLL from KERNEL32.dll
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlLeaveCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlEnterCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlDeleteCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlAllocateHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlFreeHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlUnwind
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlReAllocateHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlSizeHeap
LDR: USER32.dll used by MSVBVM60.DLL
Loaded 'D:\WINNT.SBS\system32\USER32.DLL', no matching symbolic information
found.
LDR: USER32.dll bound to ntdll.dll
LDR: USER32.dll has correct binding to ntdll.dll
LDR: USER32.dll bound to KERNEL32.dll
LDR: USER32.dll has stale binding to KERNEL32.dll
LDR: USER32.dll bound to ntdll.dll via forwarder(s) from KERNEL32.dll
LDR: USER32.dll has correct binding to ntdll.dll
LDR: Stale Bind KERNEL32.dll from USER32.dll
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlReAllocateHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlSizeHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlFreeHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlAllocateHeap
LDR: USER32.dll bound to GDI32.dll
Loaded 'D:\WINNT.SBS\system32\GDI32.DLL', no matching symbolic information
found.
LDR: GDI32.dll bound to ntdll.dll
LDR: GDI32.dll has correct binding to ntdll.dll
LDR: GDI32.dll bound to KERNEL32.dll
LDR: GDI32.dll has stale binding to KERNEL32.dll
LDR: Stale Bind KERNEL32.dll from GDI32.dll
LDR: GDI32.dll bound to USER32.dll
LDR: GDI32.dll has correct binding to USER32.dll
LDR: GDI32.dll bound to ADVAPI32.dll
Loaded 'D:\WINNT.SBS\system32\ADVAPI32.DLL', no matching symbolic
information found.
LDR: ADVAPI32.dll bound to ntdll.dll
LDR: ADVAPI32.dll has correct binding to ntdll.dll
LDR: ADVAPI32.dll bound to KERNEL32.dll
LDR: ADVAPI32.dll has stale binding to KERNEL32.dll
LDR: ADVAPI32.dll bound to ntdll.dll via forwarder(s) from KERNEL32.dll
LDR: ADVAPI32.dll has correct binding to ntdll.dll
LDR: Stale Bind KERNEL32.dll from ADVAPI32.dll
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlEnterCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlDeleteCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlLeaveCriticalSection
LDR: ADVAPI32.dll bound to USER32.dll
LDR: ADVAPI32.dll has correct binding to USER32.dll
LDR: ADVAPI32.dll bound to RPCRT4.dll
Loaded 'D:\WINNT.SBS\system32\RPCRT4.DLL', no matching symbolic information
found.
LDR: RPCRT4.dll bound to ntdll.dll
LDR: RPCRT4.dll has correct binding to ntdll.dll
LDR: RPCRT4.dll bound to KERNEL32.dll
LDR: RPCRT4.dll has stale binding to KERNEL32.dll
LDR: RPCRT4.dll bound to ntdll.dll via forwarder(s) from KERNEL32.dll
LDR: RPCRT4.dll has correct binding to ntdll.dll
LDR: Stale Bind KERNEL32.dll from RPCRT4.dll
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlLeaveCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlEnterCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlDeleteCriticalSection
LDR: RPCRT4.dll bound to ADVAPI32.dll
LDR: RPCRT4.dll has correct binding to ADVAPI32.dll
LDR: ADVAPI32.dll has correct binding to RPCRT4.dll
LDR: GDI32.dll has correct binding to ADVAPI32.dll
LDR: USER32.dll has correct binding to GDI32.dll
LDR: USER32.dll bound to ADVAPI32.dll
LDR: USER32.dll has correct binding to ADVAPI32.dll
LDR: Snapping imports for MSVBVM60.DLL from USER32.dll
LDR: GDI32.dll used by MSVBVM60.DLL
LDR: Snapping imports for MSVBVM60.DLL from GDI32.dll
LDR: ADVAPI32.dll used by MSVBVM60.DLL
LDR: Snapping imports for MSVBVM60.DLL from ADVAPI32.dll
LDR: ole32.dll used by MSVBVM60.DLL
Loaded 'D:\WINNT.SBS\system32\OLE32.DLL', no matching symbolic information
found.
LDR: ole32.dll bound to RPCRT4.dll
LDR: ole32.dll has correct binding to RPCRT4.dll
LDR: ole32.dll bound to GDI32.dll
LDR: ole32.dll has correct binding to GDI32.dll
LDR: ole32.dll bound to KERNEL32.dll
LDR: ole32.dll has stale binding to KERNEL32.dll
LDR: ole32.dll bound to NTDLL.DLL via forwarder(s) from KERNEL32.dll
LDR: ole32.dll has correct binding to NTDLL.DLL
LDR: Stale Bind KERNEL32.dll from ole32.dll
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlDeleteCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlLeaveCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlEnterCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlReAllocateHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlSizeHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlFreeHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlAllocateHeap
LDR: ole32.dll bound to USER32.dll
LDR: ole32.dll has correct binding to USER32.dll
LDR: ole32.dll bound to ADVAPI32.dll
LDR: ole32.dll has correct binding to ADVAPI32.dll
LDR: ole32.dll bound to NTDLL.DLL
LDR: ole32.dll has correct binding to NTDLL.DLL
LDR: Snapping imports for MSVBVM60.DLL from ole32.dll
LDR: OLEAUT32.dll used by MSVBVM60.DLL
Loaded 'D:\WINNT.SBS\system32\OLEAUT32.DLL', no matching symbolic
information found.
LDR: OLEAUT32.dll bound to ole32.dll
LDR: OLEAUT32.dll has stale binding to ole32.dll
LDR: Stale Bind ole32.dll from OLEAUT32.dll
LDR: OLEAUT32.dll bound to USER32.dll
LDR: OLEAUT32.dll has stale binding to USER32.dll
LDR: Stale Bind USER32.dll from OLEAUT32.dll
LDR: OLEAUT32.dll bound to GDI32.dll
LDR: OLEAUT32.dll has stale binding to GDI32.dll
LDR: Stale Bind GDI32.dll from OLEAUT32.dll
LDR: OLEAUT32.dll bound to KERNEL32.dll
LDR: OLEAUT32.dll has stale binding to KERNEL32.dll
LDR: OLEAUT32.dll bound to NTDLL.DLL via forwarder(s) from KERNEL32.dll
LDR: OLEAUT32.dll has stale binding to NTDLL.DLL
LDR: Stale Bind KERNEL32.dll from OLEAUT32.dll
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlSizeHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlReAllocateHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlUnwind
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlLeaveCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlEnterCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlDeleteCriticalSection
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlAllocateHeap
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlFreeHeap
LDR: OLEAUT32.dll bound to ADVAPI32.dll
LDR: OLEAUT32.dll has stale binding to ADVAPI32.dll
LDR: Stale Bind ADVAPI32.dll from OLEAUT32.dll
LDR: Snapping imports for MSVBVM60.DLL from OLEAUT32.dll
LDR: avlserver.exe has correct binding to MSVBVM60.DLL
LDR: Refcount MSVBVM60.DLL (1)
LDR: Refcount KERNEL32.dll (1)
LDR: Refcount USER32.dll (1)
LDR: Refcount KERNEL32.dll (2)
LDR: Refcount GDI32.dll (1)
LDR: Refcount KERNEL32.dll (3)
LDR: Refcount USER32.dll (2)
LDR: Refcount ADVAPI32.dll (1)
LDR: Refcount KERNEL32.dll (4)
LDR: Refcount USER32.dll (3)
LDR: Refcount RPCRT4.dll (1)
LDR: Refcount KERNEL32.dll (5)
LDR: Refcount ADVAPI32.dll (2)
LDR: Refcount ADVAPI32.dll (3)
LDR: Refcount GDI32.dll (2)
LDR: Refcount ADVAPI32.dll (4)
LDR: Refcount ole32.dll (1)
LDR: Refcount RPCRT4.dll (2)
LDR: Refcount GDI32.dll (3)
LDR: Refcount KERNEL32.dll (6)
LDR: Refcount USER32.dll (4)
LDR: Refcount ADVAPI32.dll (5)
LDR: Refcount OLEAUT32.dll (1)
LDR: Refcount ole32.dll (2)
LDR: Refcount USER32.dll (5)
LDR: Refcount GDI32.dll (4)
LDR: Refcount KERNEL32.dll (7)
LDR: Refcount ADVAPI32.dll (6)
LDR: Real INIT LIST
     D:\WINNT.SBS\system32\KERNEL32.dll init routine 77f01000
     D:\WINNT.SBS\system32\RPCRT4.dll init routine 77e186bf
     D:\WINNT.SBS\system32\ADVAPI32.dll init routine 77dc1000
     D:\WINNT.SBS\system32\USER32.dll init routine 77e781d7
     D:\WINNT.SBS\system32\ole32.dll init routine 77b24d6e
     D:\WINNT.SBS\system32\OLEAUT32.dll init routine 6534d03b
     D:\WINNT.SBS\System32\MSVBVM60.DLL init routine 66001ae8
LDR: KERNEL32.dll loaded. - Calling init routine at 77f01000
LDR: RPCRT4.dll loaded. - Calling init routine at 77e186bf
LDR: ADVAPI32.dll loaded. - Calling init routine at 77dc1000
LDR: USER32.dll loaded. - Calling init routine at 77e781d7
LDR: ole32.dll loaded. - Calling init routine at 77b24d6e
LDR: OLEAUT32.dll loaded. - Calling init routine at 6534d03b
LDR: LdrGetDllHandle, searching for kernel32.dll from
LDR: LdrGetProcedureAddress by NAME - IsTNT
LDR: LdrGetDllHandle, searching for KERNEL32.dll from
LDR: LdrGetProcedureAddress by NAME - IsProcessorFeaturePresent
LDR: LdrGetProcedureAddress by NAME - SetCriticalSectionSpinCount
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlSetCriticalSectionSpinCount
LDR: LdrGetProcedureAddress by NAME - SetCriticalSectionSpinCount
LDR: LdrLoadDll, loading NTDLL.dll from
LDR: LdrGetProcedureAddress by NAME - RtlSetCriticalSectionSpinCount
LDR: MSVBVM60.DLL loaded. - Calling init routine at 66001ae8
LDR: LdrGetProcedureAddress by NAME - IsTNT
******************************************************************************
LDR: Automatic DLL Relocation in avlserver.exe
LDR: Dll zip32.dll base 10000000 relocated due to collision with
D:\WINNT.SBS\System32\NTSVC.ocx
******************************************************************************
LDR: Loading (DYNAMIC) D:\WINNT.SBS\System32\asycfilt.dll
LDR: Automatic DLL Relocation in avlserver.exe
LDR: Dll asycfilt.dll base 653c0000 relocated due to collision with
D:\WINNT.SBS\system32\OLEAUT32.dll
--------------------------------
Inviato via 
http://arianna.libero.it/usenet/



Forse la Visual Basic Virtual Machine su Windows NT funziona diversamente
che su WinXP/2000. Tu il programma per farlo girare su WinNT l'hai
ricompilato lģ sopra oppure hai passato direttamente l'eseguibile da un
sistema operativo all'altro?
Altra cosa: quei messaggi da quale debugger provengono, Visual Basic o
Visual C++?
-- 
questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news
 segnala gli abusi ad 
ab...@newsland.it