revalNG / omnithreadlibrary

Automatically exported from code.google.com/p/omnithreadlibrary
0 stars 0 forks source link

DSiAddApplicationToFirewallExceptionList fails on Windows XP #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
DSiAddApplicationToFirewallExceptionList() raises exception "Unknown 
resolveConflict value 2" if called on Windows XP like this:

if DSiAddApplicationToFirewallExceptionList(
  'FirebirdSQL',            // entryName
  '',                       // applicationFullPath
  rcSkip,                   // resolveConflict
  'Firebird SQL Server',    // description
  '',                       // grouping
  '',                       // serviceName
  [fwProtoTCP],             // protocols
  '3050',                   // localPorts
  [fwProfilePrivate, fwProfilePublic, fwProfileDomain] // profiles
then...

This is due to a missing semicolon in the fallback-code 
DSiFindApplicationInFirewallExceptionListXP() just before the "else"-case:

function DSiAddApplicationToFirewallExceptionListXP(...
...
case resolveConflict of
  rcDuplicate:
    {nothing to do};
  rcOverwrite:
    DSiRemoveApplicationFromFirewallExceptionListXP(....
  rcSkip:
    if DSiFindApplicationInFirewallExceptionListXP(entryName, app, profile) then begin
      Result := true;
      Exit;
    end; <<< add semicolon!
  else
    raise Exception.CreateFmt('Unknown resolveConflict...'

Original issue reported on code.google.com by achim.ka...@gmail.com on 6 May 2011 at 11:59

GoogleCodeExporter commented 8 years ago
Fixed, thanks!

Original comment by gabr42 on 6 May 2011 at 12:09