Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. (Nt)Zw Registry calls

(Nt)Zw Registry calls

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminquestionworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dan Madden
    wrote on last edited by
    #1

    Hi, I created a class that uses the NtNative APIs found in the ntdll.dll. Everything works except the "Hive File" functions. Below is the "LoadKey" function: BOOL CKey::LoadKey(CString csHiveFilePathName, ULONG ulFlags /* 0x0000 */) { ASSERT(csHiveFilePathName != _T("")); ASSERT((m_csRootPath == _T("\\Registry\\User") || m_csRootPath == _T("\\Registry\\Machine"))); BOOL bSuccess = TRUE; HANDLE hRootKey = NULL, hHiveFile = NULL; NT::UNICODE_STRING usRootKeyName, usHiveFileName, usHiveFile; NT::OBJECT_ATTRIBUTES DestinationKeyName, RegHiveFileName, RegHiveFile; int n=0; // Make sure the filenames is setup correctly if (csHiveFilePathName.Left(4) != _T("\\??\\")) csHiveFilePathName.Insert(0,_T("\\??\\")); // Enable the restore privilege m_NtStatus = EnablePrivilege(SE_RESTORE_NAME, TRUE); if(!NT_SUCCESS(m_NtStatus)) { bSuccess = FALSE; goto end_it; } WCHAR wszHiveFile[1024]; for (n=0; n

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups