Acessing 64 bit registry view from 32 bit application running on Windows 2003 SP1

Discussion in 'Windows 64bit' started by Rupesh_Khetawat, Aug 21, 2006.

  1. Hi,

    To access 64 bit registry view from 32 bit application on Windows 2003 SP1,
    Microsoft has introduced KEY_WOW64_64KEY.
    Example:
    ::RegOpenKeyEx( regkeyRemoteComputer.m_hkey, strSubKey, 0, KEY_WOW64_64KEY |
    KEY_QUERY_VALUE, &regSubkey.m_hkey );

    I would like to confirm if KEY_WOW64_64KEY flag can create any problems
    dealing with 32 bit registry views.

    My Observation is:
    While testing the remote registrty access code containing the function
    metioned above, I've realized that KEY_WOW64_64KEY flag does not create any
    problem accessing 32 bit registry and 64 bit registry view from 32
    application runinng on OS other than Windows 2003 SP1. I mean, I could read
    few 32 bit registry keys inspite of using this flag and that too on Windows
    XP SP1 box.

    I think KEY_WOW64_64KEY is bit mask, it will be used only if 64 bit OS
    registry is accessed. For other OS (32 bit), it would not give any error and
    work as expected. Please correct me if I am wrong.

    My goal is to see if I can write registry access code with out checking
    remote computer machine and OS version(32 bit\ 64 bit). I am worried if
    there are any situations (like accessing security related things) where
    KEY_WOW64_64KEY can behave wrong for 32 bit registry view.

    Please lets us know.

    Regards,
    Rupesh
     
    Rupesh_Khetawat, Aug 21, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.