Answer the question
In order to leave comments, you need to log in
When compiling undefined reference to?
Hello
, I am trying to find out the address of a function from an NtDLL module:
pOrigMBAddress_1 = (pNtCreateFile)
GetProcAddress(GetModuleHandle("NtDLL.dll"), // get address of original
"NtCreateFile");
С:\Users\...main.cpp:(.text+0x394): undefined reference to 'NtCreateFile'
collect2.exe: error: id returned 1 exit status
pOrigMBAddress_2 = (pMoveFileExW)
GetProcAddress(GetModuleHandle("Kernel32.dll"), // get address of original
"MoveFileExW");
Answer the question
In order to leave comments, you need to log in
Here is this piece of code in the MyNtCreateFile function:
retValue = NtCreateFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, AllocationSize, FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength); // get return value of original function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question