Linker Error Unresolved external

pierrelaurent62 Messages postés 1 Date d'inscription lundi 13 août 2007 Statut Membre Dernière intervention 13 août 2007 - 13 août 2007 à 23:49
cs_juju12 Messages postés 966 Date d'inscription samedi 3 avril 2004 Statut Membre Dernière intervention 4 mars 2010 - 14 août 2007 à 00:03
Bonjour à tous,

J'ai un problème de compréhension que certains n'auront pas de mal à m'expliquer.

L'erreur est la suivante :

[Linker Error] Unresolved external '__stdcall NtOpenSection(void * *, unsigned long, _OBJECT_ATTRIBUTES *)' referenced from C:\PROJETS\WINKDUMP\WINKDUMP.OBJ
[Linker Error] Unresolved external '__stdcall NtMapViewOfSection(void *, void *, void * *, unsigned long, unsigned long, _LARGE_INTEGER *, unsigned long *, _SECTION_INHERIT, unsigned long, unsigned long)' referenced from C:\PROJETS\WINKDUMP\WINKDUMP.OBJ
[Linker Error] Unresolved external '__stdcall NtUnmapViewOfSection(void *, void *)' referenced from C:\PROJETS\WINKDUMP\WINKDUMP.OBJ
[Linker Error] Unresolved external '__stdcall NtClose(void *)' referenced from C:\PROJETS\WINKDUMP\WINKDUMP.OBJ

Dans le repertoire en question, j'utilise le fichier winkdump.cpp kmem.h et ntdll_bc.lib.
j'ai bien fait #include "kmem.h" dans le cpp et j'ai bien les éléments suivants dans le .h

J'utilise C++Builder 6

#pragma comment(lib, "NTDLL_BC.LIB")
#define IMP_SYSCALL __declspec(dllimport) NTSTATUS _stdcall



IMP_SYSCALL
NtMapViewOfSection(HANDLE SectionHandle,
                   HANDLE ProcessHandle,
                   PVOID *BaseAddress,
                   ULONG ZeroBits,
                   ULONG CommitSize,
                   PLARGE_INTEGER SectionOffset,
                   PSIZE_T ViewSize,
                   SECTION_INHERIT InheritDisposition,
                   ULONG AllocationType,
                   ULONG Protect);




IMP_SYSCALL
NtUnmapViewOfSection(HANDLE ProcessHandle,
                     PVOID BaseAddress);




IMP_SYSCALL
NtOpenSection(PHANDLE SectionHandle,
              ACCESS_MASK DesiredAccess,
              POBJECT_ATTRIBUTES ObjectAttributes);

Pourquoi ai je cette erreur ?
Merci pour votre aide.
Pierre

1 réponse

cs_juju12 Messages postés 966 Date d'inscription samedi 3 avril 2004 Statut Membre Dernière intervention 4 mars 2010 4
14 août 2007 à 00:03
D'après Platform SDK Windows Server 2003 :there is no import library for this function, you must use <?XML:NAMESPACE PREFIX MSHelp NS "http://msdn.microsoft.com/mshelp" /??><mshelp:link tabindex="0" keywords="_win32_GetProcAddress" xmlns:mshelp="http://msdn.microsoft.com/mshelp">GetProcAddress</mshelp:link>.
0
Rejoignez-nous