Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    228

    Star need confirm if this is some bug or not

    hi all:

    I need to ask for confirmation if this is some kind of bug or is it incorrect my programmin:

    Code:
    acceso = Registry.GetAccess(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\services\\cdrom\\Enum", ACCESS_ALL);
    
    if acceso == true then
    
    kio = Registry.GetKeyNames(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\services\\cdrom\\Enum");
    
    tablero = Table.Concat(kio, "\r\n", 1, TABLE_ALL);
    
    
    Dialog.Message("Notice", tablero, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    
    
    
    end
    I can't get any info, it popup out message argument 1 must type table. What can I do in this issue?

    Thanks

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Use proper error checking and things should become clearer...

    Code:
    local acceso = Registry.GetAccess(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\services\\cdrom\\Enum", ACCESS_READ);
    
    if (acceso == true) then
      local kio = Registry.GetKeyNames(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\services\\cdrom\\Enum");
      if (kio ~= nil) then
        local tablero = Table.Concat(kio, "\r\n", 1, TABLE_ALL);
        if (tablero ~= "") then
          Dialog.Message("Notice", tablero, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
        else
          error = Application.GetLastError();
          Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
        end    
      else
        error = Application.GetLastError();
        if (error == 0) then
          Dialog.Message("Registry.GetKeyNames()", "No keys in HKLM\\SYSTEM\\CurrentControlSet\\services\\cdrom\\Enum", MB_OK, MB_ICONEXCLAMATION);
        else
          Dialog.Message("Registry.GetKeyNames()", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
        end
      end    
    else
      Dialog.Message("Error", "No read access to HKLM\\SYSTEM\\CurrentControlSet\\services\\cdrom\\Enum", MB_OK, MB_ICONEXCLAMATION);
    end
    Ulrich
    Last edited by Ulrich; 01-02-2012 at 11:23 AM.

  3. #3
    Join Date
    Dec 2005
    Posts
    228
    ah code checkin I completely forgot about it, thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts