I am developing software which must log in to an Active Directory with the following credentials:
- Username
- Domain Name
- NTLM password
This is my code:
if (OpenProcessToken(process_infos.hProcess, TOKEN_READ | (is_impersonate ? TOKEN_DUPLICATE : 0), &handle_token))
{
if (GetTokenInformation(handle_token, TokenStatistics, &token_status, sizeof(token_status), &needed_size))
{
NtResumeProcess(process_infos.hProcess);
}
}
After successful authentication, it should run a process with the authenticated token. However, in the program, I wanted to use NtResumeProcess, but when I use it, the compiler gives me the following error:
Error LNK2019 unresolved external symbol "long __cdecl NtResumeProcess(void *)" (?NtResumeProcess@@YAJPEAX@Z) referenced in function "void __cdecl Dispatcher(void)" (?Dispatcher@@YAXXZ)
How should I resolve this problem?