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. Helppp Access Violation in throw stmt

Helppp Access Violation in throw stmt

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++comsysadmintutorial
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.
  • B Offline
    B Offline
    Bill Wilson
    wrote on last edited by
    #1

    I have an NT service program that seems to get a lot of access violations. In trying to track them down, I've found all sorts of odd things going on. Here is one of them. In this example this piece of code is called from a OnTimer callback routine. The timer was started from the COM object that the ATL wizard makes when you ask it to build a serice. e.g. Service -> IEntry.StartProcess -> SetTimer LONG OdysseyLog::GetRegStrValue(const TCHAR szSubKey[], const TCHAR szValueName[], TCHAR *pszReturnVal[], unsigned int *uiLen){ LONG lRes = ERROR_SUCCESS; DWORD dwType; DWORD dwSize; HKEY hKey; try { dwType = REG_SZ; lRes = RegOpenKeyEx( HKEY_LOCAL_MACHINE, szSubKey, 0, KEY_READ, &hKey); if (lRes != ERROR_SUCCESS) { throw true; } I get an Access Violation from the throw statement! How can that happen? The access violation is in Kernel32.dll at 0xE06D7363. running NT 4.0 with latest SPs (don't know the number, but the admin guys assure me this server is up to date). Thanks for the help, Bill

    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