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. problem with atlbase

problem with atlbase

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++
7 Posts 4 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.
  • J Offline
    J Offline
    Junyor
    wrote on last edited by
    #1

    hello, well I have the following problem...in my MFC project I am using atlbase.h, because I am working with CRegKey class. On my computer the .exe works just fine, but on a friend's of mine, it doesn't...and I created this project as a statically linked project... this is the error :wtf: after the first error, this is what appears

    P T 2 Replies Last reply
    0
    • J Junyor

      hello, well I have the following problem...in my MFC project I am using atlbase.h, because I am working with CRegKey class. On my computer the .exe works just fine, but on a friend's of mine, it doesn't...and I created this project as a statically linked project... this is the error :wtf: after the first error, this is what appears

      P Offline
      P Offline
      P Rex
      wrote on last edited by
      #2

      maybe he is not allowed to enter the registry or the key is not found where you are looking for it!?

      J 1 Reply Last reply
      0
      • J Junyor

        hello, well I have the following problem...in my MFC project I am using atlbase.h, because I am working with CRegKey class. On my computer the .exe works just fine, but on a friend's of mine, it doesn't...and I created this project as a statically linked project... this is the error :wtf: after the first error, this is what appears

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        Junyor wrote: this is the error These type of error occcur, when there is problem of permission,have you done proper error handlling for registry code. like.

        CRegKey key;
        if(key.Open(HKEY_LOCAL_MACHINE,"Software\\cp")==ERROR_SUCCESS)
        {
        ................
        key.Close();
        }else
        {
        MessageBox("Faliure in opening registry");
        }

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta

        J 1 Reply Last reply
        0
        • P P Rex

          maybe he is not allowed to enter the registry or the key is not found where you are looking for it!?

          J Offline
          J Offline
          Junyor
          wrote on last edited by
          #4

          P-Rex wrote: maybe he is not allowed to enter the registry or the key is not found where you are looking for it!? well the key is the same on every computer...adk he said he is allowed :)

          1 Reply Last reply
          0
          • T ThatsAlok

            Junyor wrote: this is the error These type of error occcur, when there is problem of permission,have you done proper error handlling for registry code. like.

            CRegKey key;
            if(key.Open(HKEY_LOCAL_MACHINE,"Software\\cp")==ERROR_SUCCESS)
            {
            ................
            key.Close();
            }else
            {
            MessageBox("Faliure in opening registry");
            }

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta

            J Offline
            J Offline
            Junyor
            wrote on last edited by
            #5

            well I tried this and still, on my computer works, on a friend's computer works, but on 2 other friend's of mine it shows the same error If you have a dream, follow it, because it might just become true. :)

            T F 2 Replies Last reply
            0
            • J Junyor

              well I tried this and still, on my computer works, on a friend's computer works, but on 2 other friend's of mine it shows the same error If you have a dream, follow it, because it might just become true. :)

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              Junyor wrote: but on 2 other friend's of mine it shows the same error I believe, You are not checking CRegKey State before Writing or reading data. I too using CregKey from Long time, and this type is error usually arise due to permission or Security

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta

              1 Reply Last reply
              0
              • J Junyor

                well I tried this and still, on my computer works, on a friend's computer works, but on 2 other friend's of mine it shows the same error If you have a dream, follow it, because it might just become true. :)

                F Offline
                F Offline
                FlyingTinman
                wrote on last edited by
                #7

                That ASSERT is only invoked in atlbase.h when you try to delete a subkey or value, close a subkey or set a value in a subkey where the subkey is still null. In other words somewhere you tried to create or open a subkey which failed and you ignored the failure and proceded to try to set, delete or close that subkey. There is no other explanation. IF you are really checking the success of opening the subkey before setting the value then you are probably still trying to close or delete the invalid key somewhere later. Steve T

                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