Reading Registry Io interference

Hi 
I got a problem which is not making sense.
I got a program which takes a bin file which is a program and downloads it via the parallel port to a device to simulator the program.
The problem is that my program doesnt download vai the parallel port correctly if i acces the registry.
Why could this be ?
if i comment those registry functions it downloads correctly.
I get the correct information from the registry functions and no errors.
Here is an example for my registry functions:
HKEY hKey;
LONG openres;
DWORD res;
DWORD type =REG_SZ;
DWORD cbData =1024;
openres=RegOpenKeyEx(HKEY_CURRENT_USER,"SOFTWARE\\Winzapper\\General",0,KEY_QUERY_VALUE,&hKey);
if(openres!=ERROR_SUCCESS)
MessagePopup("","Error Opening Registry Key");
else
res=RegQueryValueEx(hKey,"EpromTypeIndex", NULL, &type, buffer, &cbData);
if(res!=ERROR_SUCCESS)
MessagePopup("","Error reading value");
else
Config.iEpromType=atoi(buffer);
SetCtrlIndex (MainPnl, MAINPANEL_EPROM_TYPE, Config.iEpromType);
res=RegCloseKey(hKey);
if(res!=ERROR_SUCCESS)
MessagePopup("","Error closing registry key");
Help share your knowlegde

I found my the problem.
I was sending some incorrect information and by commenting out the registry functions set the program to my default values which were correct.
The actual registry functions were not a problem.
Help share your knowlegde

Similar Messages

  • Webutil, read registry with defaut entry?

    webutil, read registry not working well?
    Hi,
    I cannot read the default value for an entry in the registry.
    if I read another value, it works fine.
    On metalink, a note was giving an exemple that was doing that... but it doesn't work when I try it....
    Doc ID:      Note:121909.1
    Subject:      How to Open a File with its Associated Program from Forms ?
    Here is my code, the first block works, but the others don't work. Could somebody explain me how do I do to access the default value?
    PROCEDURE P_TEST IS
    lv_valeur_retour1 VARCHAR2(255);
    BEGIN
    BEGIN
    -- this works fine
    lv_valeur_retour1 :=
    CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
    ('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows',
    'Device',
    TRUE);
    message(lv_valeur_retour1);
    pause;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :F_RETOUR := '10';
    END;
    pause;
    BEGIN
    -- this doesn't work
    lv_valeur_retour1 :=
    CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
    ('HKEY_CLASSES_ROOT\' || '.doc',
    NULL,
    TRUE);
    message(lv_valeur_retour1);
    pause;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :F_RETOUR := '11';
    END;
    pause;
    BEGIN
    -- this doesn't work
    lv_valeur_retour1 :=
    CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
    ('HKEY_CLASSES_ROOT\' || '.doc',
    'Default',
    TRUE);
    message(lv_valeur_retour1);
    pause;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :F_RETOUR := '12';
    END;
    pause;
    BEGIN
    -- this doesn't work
    lv_valeur_retour1 :=
    CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
    ('HKEY_CLASSES_ROOT\' || '.doc',
    '(Default)',
    TRUE);
    message(lv_valeur_retour1);
    pause;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :F_RETOUR := '15';
    END;
    pause;
    BEGIN
    -- this doesn't work
    lv_valeur_retour1 :=
    CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
    ('HKEY_CLASSES_ROOT\' || '.doc',
    '0',
    TRUE);
    message(lv_valeur_retour1);
    pause;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :F_RETOUR := '14';
    END;
    pause;
    BEGIN
    -- this doesn't work
    lv_valeur_retour1 :=
    CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
    ('HKEY_CLASSES_ROOT',
    '.doc',
    TRUE);
    message(lv_valeur_retour1);
    pause;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :F_RETOUR := '13';
    END;
    END;

    I had to customize the webutil.pll to get this to work. I modified the WEBUTIL_C_API.ADD_PARAMETER_WU function so it did not always consume null string parameters. The change follows.
    FUNCTION ADD_PARAMETER_WU (paramList IN ParameterList, parameterType IN PLS_INTEGER,
    inOut IN PLS_INTEGER, str IN VARCHAR2, strmaxlen IN PLS_INTEGER) RETURN ParameterHandle IS
    paramHnd ParameterHandle;
    BEGIN
         IF (str = 'mjpNULLmjp') THEN
                        WebUtil_Core.SetProperty(WebUtil_Core.WUL_PACKAGE,'WUL_PARAM_PROPERTIES', 'B|' -- indicate Bind
              || TO_CHAR(paramList.hnd) || '|'
              || TO_CHAR(parameterType) || '|'
              || TO_CHAR(inOut) || '|'
              || TO_CHAR(strmaxlen) || '|'
              || '',false);
         ELSE
              IF str IS NULL THEN
              WebUtil_Core.SetProperty(WebUtil_Core.WUL_PACKAGE,'WUL_PARAM_PROPERTIES', 'B|' -- indicate Bind
              || TO_CHAR(paramList.hnd) || '|'
              || TO_CHAR(parameterType) || '|'
              || TO_CHAR(inOut) || '|'
              || TO_CHAR(strmaxlen) || '|'
              || '(null)',false);
         ELSE          
              WebUtil_Core.SetProperty(WebUtil_Core.WUL_PACKAGE,'WUL_PARAM_PROPERTIES', 'B|' -- indicate Bind
              || TO_CHAR(paramList.hnd) || '|'
              || TO_CHAR(parameterType) || '|'
              || TO_CHAR(inOut) || '|'
              || TO_CHAR(strmaxlen) || '|'
              || str,false);
         END IF;
         END IF;
         paramHnd.hnd := TO_NUMBER(WebUtil_Core.GetProperty(WebUtil_Core.WUL_PACKAGE,'WUL_ADD_PARAMETER'));
         RETURN paramHnd;
    EXCEPTION
    when WebUtil_Core.BEAN_NOT_REGISTERED then
    WebUtil_Core.Error(15,WebUtil_Core.getImplClass(WebUtil_Core.WUF_PACKAGE));               
    RAISE FORM_TRIGGER_FAILURE;
    when WebUtil_Core.PROPERTY_ERROR then
    RAISE FORM_TRIGGER_FAILURE;
    END ADD_PARAMETER_WU;
    Here is an example call to get the default registry entry:
    reg_val := CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE','mjpNULLmjp',FALSE);

  • Can't read registry entry AppPath... - My solution

    Good news! For me, there was a simple solution when I got this error message. (Some background: We just upgraded Office to 2007 and RoboHelp 8 from RoboHelp 5.) Today when I tried to open RoboHelp for Word (version 8) for the first time, I received this error message:
    "Can't read registry entry AppPath. RoboHelp may not be installed properly.
      Re-install RoboHelp if you continu to get this message."
    Actually, I didn't need to do anything major to successfully open RoboHelp for Word. The solution seemed to be simply to open RoboHelp for Word BEFORE opening Word. (Apparently, in my original attempt, I already had Word open.) So I rebooted my PC, and opened RoboHelp-for-Word first, and (Yeah!), RoboHelp for Word opened just fine.
    Perhaps this will help someone else.

    This forum is maintained by users of RoboHelp, not by Adobe, so your comments will not be seen by them.
    You say you are dissappointed with the Adobe RoboHelp team but you don't say if you have been to Support and what they suggested.
    I'm not sure what the problem is but I do know you cannot have more than one version of RoboHelp for Word installed on one PC. Maybe that is the cause.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Unable to read registry key for log4net configuration location

     I am getting this error "Unable to read registry key for log4net configuration location." 
    Regards Ravin

    Thanks for reply.
    I m using log4net in Biztalk server 2010. I wrote code in my orchestration  like
    // Create the logger using the ProjectName property value
    from the .btdfproj
    logger = log4net.Ext.Serializable.SLogManager.GetLogger("MyProjectName",
    log4net.helpers.CallersTypeName.Name);
    // Configure the logger by referencing the registry key written
    during the deployment process
    logger.RegistryConfigurator();
    // Set some properties in the PropertiesCollectionEx object
    logProps.Set("InstanceId", MyOrchestration(Microsoft.XLANGs.BaseTypes.InstanceId));
    // Write a debug level entry to Log4Net including the properties
    object
    logger.Debug(logProps, "Received top level request...");
    After successfully Deploying solution. Im getting this error.
    I think problem is with  the " log4net 64bit".
    Regards Ravin

  • Problem Read Registry

    Hi all,
    I try to read registry using Class CL_GUI_FRONTEND_SERVICES Methods REGISTRY_GET_VALUE.
    I would like to read Key:ExcelWorksheet\protocol\StdFileEditing\server.
    I got nothing on the output, I know it's from the computer and not from the user, but can found out the solution. I disable the Windows Firewall, nothing happen.
    Any idea on what can block the reading?
    Thanks

    try calling
    call method cl_gui_cfw=>flush
          exceptions
            cntl_system_error = 1
            cntl_error        = 2
            others            = 3.
    after the registry_get_value method call

  • Read Registry Keys and store it in Inventory DB

    Hallo together,
    I am looking for a program to extract some Registry keys into the ZENworks 7 inventory database.
    I know I need to create a CUSTOM.INI and fill it with values. When I create the CUSTOM.INI by hand I got it to work to store the values in the inventory database.
    But I need a program to read the Registry values and store them in the CUSTOM.ini file with the correct syntax.
    A Script or any other small program would be helpful. I know how I could read the Registry values with REG.exe but I do not know how to store the values in the correct syntax in CUSTOM.ini?
    I found zRegScan but I did not get it to work. I found out that the Program is called by the Inventory process (it appears in the TaskManager for a short time). When I run zRegScan by hand (or with a manual launched ZfDInvScanner.exe) I get the following error windows:
    Title: zRegScan.exe - Common Language Runtime Debugging Services
    Warning: Application has generated an exception that could not be handled. Process id=0x814, Thread id=0xf14
    When I click "Cancel" I receive a 2nd Window:
    Title: zRegScan.exe - No debugger found.
    Warning: Registered JIT debugger is not available. An atempt to launch a JIT debugger with ...
    I tried for several hours to get it operational - with no success.
    The zRegScan.log does not show anything helpful.
    I have WinXP SP2 and SP3 machines and ZfD7ir3a.
    Thanks for your help
    Klaus

    BachmannK,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Adobe Reader registry keys gone when upgrading to 9.1; Need help finding

    I had a couple of registry values disappear after the install of 9.1
    Disable JavaScriopt in Adobe:
    HKCU\Software\adobe\Acrobat Reader\9.0\JSPrefs  (I can no longer find this key)
    "bEnableJS"dword:00000000
    Disable the displaying of pdf documents in web browser
    HKCU\Software\adobe\Acrobat Reader\9.0\Originals (I can no longer find this key)
    "BrowserIntergration"=dword0000000
    I am fully aware of finding the options that turn on/off the options above through the adobe  edit > preferences> Javascript and Internet options.  However I want to make a script that makes these changes. I no longer know the path to these key values.
    I tried a file comparison between current and and modified registry to see if I could pin-point those paths I mentioned above.  They do not exist to my knowledge unless Adobe renamed the keys.
    Has anyone else ran into the same problem?

    Strange, not showing up in 9.1.0.  Guess I need to update to 9.1.1 first and see...
    Thanks

  • Read registry value with ProcessBuilder

    Hi all,
    I am using the following to read the ProductID from the registry (64bit windows):
    List<String> command = new ArrayList<String>();
    command.add("\"C:\\Users\\User1\\reg64.exe\"");
    command.add("query");
    command.add("\"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\"");
    command.add("/v");
    command.add("ProductID");
    command.add("/reg:64");
    productID = execute(command);
    static private String execute(List<String> command) throws IOException, InterruptedException {
    ProcessBuilder pb = new ProcessBuilder(command);
    Process process = pb.start();
    StreamReader reader = new StreamReader(process.getInputStream());
    StreamReader errReader = new StreamReader(process.getErrorStream());
    reader.start();
    errReader.start();
    process.waitFor();
    reader.join();
    errReader.join();
    return reader.getResult();
    This should basically produce the following query
    "C:\Users\User1\reg64.exe" query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductID /reg:64
    When this query is run directly in the command prompt it yields the desired result:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
    ProductID REG_SZ 0032-0RM-89989898989-12334
    However, the result via the processBuilder is an empty string.
    If I try the processBuilder with the following:
    command.add("reg"); instead of command.add("\"C:\\Users\\User1\\reg64.exe\"");
    then the result is non-empty: the same as from the command prompt. However, then the ProductID is missing.
    I tried the following variants of the argument:
    - with and without the full path to reg64.exe
    - with and without quotation marks around the path
    - with and without setting the working directory for the processBuilder
    but I was always getting an empty string as a result of the query.
    Any fresh ideas would be appreciated :)

    EJP wrote:
    When trying with the reg32.exe the error stream is non-empty indeed: ERROR: The system was unable to find the specified registry key or value. (The same error appears when trying the query from the command prompt)Did you consider trying it with a valid key? It's all pretty pointless until then.
    HKLM is definitely wrong. That's a common shorthand for something like HOST_KEY_LOCAL_MACHINE.My idea was to make sure that I correctly check the error stream.
    Now I tried with a valid key using the reg32.exe:
    "C:\Users\User1\reg32.exe" "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\LanguagePack" /v OpenType
    With the proces builder the input stream of the process contains the expected result. Also the exit code is 0.
    Here is the query I try with the reg64.exe:
    "C:\Users\User1\reg64.exe" "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\LanguagePack" /v OpenType /reg:64
    With the process builder the input and error streams are empty and the exit code is 1.

  • Read registry value

    Hi
    I've been looking into this for a number of days now and have hit a brick wall.
    I am sure that a java application can read the JavaSoft/Prefs Hkey value on the windows registry, I recall seeing such a comment from another thread (unfortunately can't find the thread anymore).
    Is my assumption correct and if so can anyone point me to a tutorial or give any advice.
    Thanks
    GB

    EJP wrote:
    When trying with the reg32.exe the error stream is non-empty indeed: ERROR: The system was unable to find the specified registry key or value. (The same error appears when trying the query from the command prompt)Did you consider trying it with a valid key? It's all pretty pointless until then.
    HKLM is definitely wrong. That's a common shorthand for something like HOST_KEY_LOCAL_MACHINE.My idea was to make sure that I correctly check the error stream.
    Now I tried with a valid key using the reg32.exe:
    "C:\Users\User1\reg32.exe" "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\LanguagePack" /v OpenType
    With the proces builder the input stream of the process contains the expected result. Also the exit code is 0.
    Here is the query I try with the reg64.exe:
    "C:\Users\User1\reg64.exe" "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\LanguagePack" /v OpenType /reg:64
    With the process builder the input and error streams are empty and the exit code is 1.

  • Reading Registry entry from Java

    Dear experts,
    I need to read the registry entry's value "HKEY_CURRENT_USER\Control Panel\International\sShortDate"
    from Java.
    Will anybody help?
    Thanks for future response
    Unique

    Do you really think it is a good idea to tie a program written in a language whose main
    strong point is being platform-independent to a specific platform just to get a date format ?
    You might want to take a look at http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html
    regards
    Holger

  • Webutil reading registry entries.

    I have the following program unit that works in forms 6i using the win_api_environment.read_registry program unit.
    l_filetype := WIN_API_ENVIRONMENT.Read_Registry
    ('HKEY_CLASSES_ROOT\'||l_extension, null, TRUE);
    -- Get associated OPEN command e.g.
    -- 'c:\win32app\msoffice\winword\winword.exe "%1"'
    l_command := WIN_API_ENVIRONMENT.Read_Registry
    ( 'HKEY_CLASSES_ROOT\' || l_filetype
    ||'\shell\open\command'
    , null, TRUE);
    However, when I converted this to work with webutil by adding client_ to the win_api_environment, I get a no_data_found error.
    In 6i, this returns the (default) value in the registry, if I change the null in both commands to '(default)', I still get no_data_found. If I insert a string value in the key I am looking at, it will return that key.
    Basically, my question is how do I get the (default) value returned?
    Thanks
    Stephen

    From my understanding of the source code of Client_win_api_environment.read_registry you need to explicitly pass the RegEntry as the second parameter to that function.
    l_command := client_WIN_API_ENVIRONMENT.Read_Registry ( 'HKEY_CLASSES_ROOT\',l_filetype ||'\shell\open\command', TRUE);
    (Because of the following line in Client_win_api_environment.read_registry, see webutil.pll:
    vcRoot := upper(substr(RegPath,1,instr(RegPath,'\')-1));
    RegPath is trimmed to the first appearance of '\')
    Hope this helps
    Gerald Krieger

  • Re: ZEnworks f. Desktops 4.01 Inventory - Reading Registry?

    Dreamsleeper,
    that's a feature of ZENworks 6.5 - for ZfD4, you'd have to write your own customer scanner - http://www.novell.com/documentation/...s.html#agx81ss
    Shaun Pond

    Lahzoh,
    It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at http://support.novell.com in both the "free product support" and "paid product support" drop down boxes.
    - You could also try posting your message again. Make sure it is posted in the correct newsgroup. (http://support.novell.com/forums)
    If this is a reply to a duplicate posting, please ignore and accept our apologies and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • How to read and update Registry keys on Windows?

    I nedd to be able to read registry as well as DACL
    to set permissions on WinNT File System.
    I did that in VB, but need to do it in Java.
    Any help would be appriciated.

    I'm not sure if there is any freely available API for reading the registry. I'm really not very knowledgeable with any of the MS Windows operating sytems. I would imgaine the registry keys are compiled- that you can not access them via some plain text file, correct? Is there a DOS command for displaying the results of a particular registry query? This solution would be a hack, but if such a command exists, you could run it via the RunTime class and then parse the output. I would suggest using a search engine, if you have not all ready tried. I am sure that some API exists for reading the registry, but it might be a commerical package.... .... If you find an answer post it. I believe this question has arisen before, but I'm not sure if an answer was posted.

  • Provide any exapmle which reads data from registry

    Hi
    I have gone through samples provided for plug_in.
    I wanted any example or any link to read registry data ,so that i can some icons disabled or enabled by reading registry data.
    Kindly help regarding this.
    Thanks in advance
    Santosh

    For the access of the registry look at the documentation of the Windows API.

  • Registry Read

    Hello All,
    I wonder, is there any way to read registry entry using Oracle Stored Procedure?
    Oracle DB: 11g R1
    Regards,
    Prazy

    PrazY wrote:
    For some of them I have googled and gone through Tom's post.
    DWORD - BINARY_INTEGER
    LPCTSTR - VARCHAR2
    LPDWORD - BINARY_INTEGER
    LONG - is it LONG in here too??
    HKEY - ??
    PVOID - ??? hkey = A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. Typically handles in Win32 are long (4 byte) int as far as I recall.
    Pointer to a struct that can receive the data returned by the call. Should be a long pointer.
    Unsure how to map these to PL/SQL types... You will need to experiment. PL/SQL itself does not explicitly support pointers. It does however have 2 pointer types. Cursors/ref cursors and LOB locators. But there is no pointer operations involved such as dereferencing for example. And you cannot really define a pointer to a string variable in PL/SQL.
    However, I would expect that if you make an external proc call, all the parameters that are out values (returning data from the external call) will need to be long pointers as the ext proc interface will have to copy the return values to those memory addresses indicated by the PL/SQL variables intended to receive them.
    It may be simpler though to wrap this Win32 call into a custom DLL that does the complex stuff. Opening the registry, dealing with the C data types and pointers, and in turn exposes a PL/SQL data type friendly interface that you can call via ext proc.
    Writing such a DLL should be a fairly trivial exercise as this is not really a series of complex calls that need to be made, requiring complex data handling.

Maybe you are looking for

  • Error on Startup any project (New or Saved)

    Guys, Please, i need a help. Everey time i try to open any project or create a new project the premere returns this message: http://prntscr.com/5mtx3d "Premiere Pro has encountered an error [c:\cloudroom\releases\2014.09\shared\adobe\mediacore\mediaf

  • Lack of performance in Final Cut Pro

    As I am pretty new to the whole video editing scene on the Mac, I have a performance question for those who are somewhat more familiar with FCS(2). I have a MBP Core Duo 2Ghz with 2GB of ram and 100GB@7200rpm (around 8GB free), and I am experiencing

  • How can i share a video via email?

    how can i share a video from iMovie 09 (8.0.6) via email? I have tried saving to desktop and attaching by even my 1 minute clip will not go through.

  • Stuck with wireless internet, want wired dsl

    I got a buddy in Eagle River, WI, that is stuck in a contract for many months with a verizon wireless internet plan with only 5GB of data, but he desperately needs to get a wired plan such as DSL or cable. He generally runs out of data within a week

  • How to use SearchService WSDL of IPM in Bpel

    Hi All, I am using Search Service WSDL in my bpel to execute the saved search in IPM, but how do i map my input type variable to the search argument of that Search Service. For eg :- If i need to get the saved search associated with the argument as I