Browse Source

* jwa* now fully synced with Jedi as of yesterday.

git-svn-id: trunk@9631 -
marco 17 years ago
parent
commit
e3162d0af0
100 changed files with 5367 additions and 1210 deletions
  1. 3 0
      .gitattributes
  2. 380 0
      packages/base/winunits/JwaVista.pas
  3. 1409 0
      packages/base/winunits/JwaWinSta.pas
  4. 1 1
      packages/base/winunits/Makefile
  5. 1 1
      packages/base/winunits/Makefile.fpc
  6. 489 0
      packages/base/winunits/ModuleLoader.pas
  7. 1 1
      packages/base/winunits/buildjwa.pp
  8. 413 431
      packages/base/winunits/jedi.inc
  9. 74 5
      packages/base/winunits/jediapilib.inc
  10. 29 6
      packages/base/winunits/jwaObjsel.pas
  11. 29 8
      packages/base/winunits/jwaaccctrl.pas
  12. 32 5
      packages/base/winunits/jwaaclapi.pas
  13. 32 7
      packages/base/winunits/jwaaclui.pas
  14. 32 10
      packages/base/winunits/jwaactiveds.pas
  15. 27 7
      packages/base/winunits/jwaactivex.pas
  16. 21 1
      packages/base/winunits/jwaadsdb.pas
  17. 24 1
      packages/base/winunits/jwaadserr.pas
  18. 40 8
      packages/base/winunits/jwaadshlp.pas
  19. 22 1
      packages/base/winunits/jwaadsnms.pas
  20. 42 7
      packages/base/winunits/jwaadsprop.pas
  21. 21 2
      packages/base/winunits/jwaadssts.pas
  22. 138 88
      packages/base/winunits/jwaadstlb.pas
  23. 25 6
      packages/base/winunits/jwaadtgen.pas
  24. 21 3
      packages/base/winunits/jwaaf_irda.pas
  25. 24 3
      packages/base/winunits/jwaatalkwsh.pas
  26. 27 2
      packages/base/winunits/jwaauthif.pas
  27. 25 4
      packages/base/winunits/jwaauthz.pas
  28. 27 3
      packages/base/winunits/jwabatclass.pas
  29. 20 2
      packages/base/winunits/jwabits.pas
  30. 27 3
      packages/base/winunits/jwabits1_5.pas
  31. 21 3
      packages/base/winunits/jwabitscfg.pas
  32. 21 2
      packages/base/winunits/jwabitsmsg.pas
  33. 25 2
      packages/base/winunits/jwablberr.pas
  34. 147 5
      packages/base/winunits/jwabluetoothapis.pas
  35. 21 2
      packages/base/winunits/jwabthdef.pas
  36. 21 3
      packages/base/winunits/jwabthsdpdef.pas
  37. 28 3
      packages/base/winunits/jwabugcodes.pas
  38. 18 2
      packages/base/winunits/jwacarderr.pas
  39. 23 18
      packages/base/winunits/jwacderr.pas
  40. 27 6
      packages/base/winunits/jwacmnquery.pas
  41. 19 2
      packages/base/winunits/jwacolordlg.pas
  42. 24 4
      packages/base/winunits/jwacpl.pas
  43. 19 1
      packages/base/winunits/jwacplext.pas
  44. 22 5
      packages/base/winunits/jwacryptuiapi.pas
  45. 24 3
      packages/base/winunits/jwadbt.pas
  46. 23 21
      packages/base/winunits/jwadde.pas
  47. 25 5
      packages/base/winunits/jwadhcpcsdk.pas
  48. 52 10
      packages/base/winunits/jwadhcpsapi.pas
  49. 25 3
      packages/base/winunits/jwadhcpssdk.pas
  50. 27 17
      packages/base/winunits/jwadlgs.pas
  51. 25 5
      packages/base/winunits/jwadsadmin.pas
  52. 27 5
      packages/base/winunits/jwadsclient.pas
  53. 40 7
      packages/base/winunits/jwadsgetdc.pas
  54. 24 6
      packages/base/winunits/jwadskquota.pas
  55. 23 3
      packages/base/winunits/jwadsquery.pas
  56. 23 5
      packages/base/winunits/jwadsrole.pas
  57. 23 5
      packages/base/winunits/jwadssec.pas
  58. 27 4
      packages/base/winunits/jwaerrorrep.pas
  59. 22 17
      packages/base/winunits/jwaexcpt.pas
  60. 22 3
      packages/base/winunits/jwafaxdev.pas
  61. 27 2
      packages/base/winunits/jwafaxext.pas
  62. 27 3
      packages/base/winunits/jwafaxmmc.pas
  63. 27 3
      packages/base/winunits/jwafaxroute.pas
  64. 29 8
      packages/base/winunits/jwagpedit.pas
  65. 19 5
      packages/base/winunits/jwahherror.pas
  66. 21 2
      packages/base/winunits/jwahtmlGuid.pas
  67. 36 10
      packages/base/winunits/jwahtmlhelp.pas
  68. 27 3
      packages/base/winunits/jwaiaccess.pas
  69. 20 3
      packages/base/winunits/jwaiadmext.pas
  70. 23 5
      packages/base/winunits/jwaicmpapi.pas
  71. 24 5
      packages/base/winunits/jwaiiscnfg.pas
  72. 34 4
      packages/base/winunits/jwaimagehlp.pas
  73. 30 6
      packages/base/winunits/jwaimapi.pas
  74. 30 6
      packages/base/winunits/jwaimapierror.pas
  75. 28 5
      packages/base/winunits/jwaime.pas
  76. 28 3
      packages/base/winunits/jwaioevent.pas
  77. 22 3
      packages/base/winunits/jwaipexport.pas
  78. 49 9
      packages/base/winunits/jwaiphlpapi.pas
  79. 27 2
      packages/base/winunits/jwaipifcons.pas
  80. 28 3
      packages/base/winunits/jwaipinfoid.pas
  81. 27 3
      packages/base/winunits/jwaiprtrmib.pas
  82. 27 3
      packages/base/winunits/jwaiptypes.pas
  83. 28 2
      packages/base/winunits/jwaisguids.pas
  84. 25 2
      packages/base/winunits/jwaissper16.pas
  85. 51 14
      packages/base/winunits/jwalm.pas
  86. 21 25
      packages/base/winunits/jwalmaccess.pas
  87. 22 22
      packages/base/winunits/jwalmalert.pas
  88. 20 25
      packages/base/winunits/jwalmapibuf.pas
  89. 19 6
      packages/base/winunits/jwalmat.pas
  90. 20 25
      packages/base/winunits/jwalmaudit.pas
  91. 44 20
      packages/base/winunits/jwalmconfig.pas
  92. 28 17
      packages/base/winunits/jwalmcons.pas
  93. 21 5
      packages/base/winunits/jwalmdfs.pas
  94. 23 17
      packages/base/winunits/jwalmerr.pas
  95. 19 27
      packages/base/winunits/jwalmerrlog.pas
  96. 13 21
      packages/base/winunits/jwalmjoin.pas
  97. 21 21
      packages/base/winunits/jwalmmsg.pas
  98. 19 25
      packages/base/winunits/jwalmremutl.pas
  99. 19 22
      packages/base/winunits/jwalmrepl.pas
  100. 20 25
      packages/base/winunits/jwalmserver.pas

+ 3 - 0
.gitattributes

@@ -1442,8 +1442,11 @@ packages/base/sqlite/sqlitedb.pas svneol=native#text/plain
 packages/base/sqlite/test.pas svneol=native#text/plain
 packages/base/sqlite/test.pas svneol=native#text/plain
 packages/base/sqlite/testapiv3x.README -text
 packages/base/sqlite/testapiv3x.README -text
 packages/base/sqlite/testapiv3x.pp -text
 packages/base/sqlite/testapiv3x.pp -text
+packages/base/winunits/JwaVista.pas svneol=native#text/plain
+packages/base/winunits/JwaWinSta.pas svneol=native#text/plain
 packages/base/winunits/Makefile svneol=native#text/plain
 packages/base/winunits/Makefile svneol=native#text/plain
 packages/base/winunits/Makefile.fpc svneol=native#text/plain
 packages/base/winunits/Makefile.fpc svneol=native#text/plain
+packages/base/winunits/ModuleLoader.pas svneol=native#text/plain
 packages/base/winunits/activex.pp svneol=native#text/plain
 packages/base/winunits/activex.pp svneol=native#text/plain
 packages/base/winunits/buildjwa.pp svneol=native#text/plain
 packages/base/winunits/buildjwa.pp svneol=native#text/plain
 packages/base/winunits/comconst.pp svneol=native#text/plain
 packages/base/winunits/comconst.pp svneol=native#text/plain

+ 380 - 0
packages/base/winunits/JwaVista.pas

@@ -0,0 +1,380 @@
+{******************************************************************************}
+{                                                                              }
+{ Windows API interface Unit for Object Pascal                                 }
+{ Master file for Windows Vista applications                                   }
+{                                                                              }
+{ Portions created by Microsoft are Copyright (C) Microsoft Corporation.       }
+{  All Rights Reserved.                                                        }
+{                                                                              }
+{ The original Pascal code is: JwaVista.pas, released Octobre 2007.            }
+{                                                                              }
+{ Portions created by Christian Wimmer are Copyright (C) 2007                  }
+{ Christian Wimmer. All Rights Reserved.                                       }
+{                                                                              }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
+{                                                                              }
+{ You may retrieve the latest version of this file at the Project JEDI         }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net              }
+{                                                                              }
+{ The contents of this file are used with permission, subject to the Mozilla   }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at      }
+{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
+{                                                                              }
+{ Software distributed under the License is distributed on an "AS IS" basis,   }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License.    }
+{                                                                              }
+{ Alternatively, the contents of this file may be used under the terms of the  }
+{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
+{ provisions of the LGPL License are applicable instead of those above.        }
+{ If you wish to allow use of your version of this file only under the terms   }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting  the provisions above and  }
+{ replace  them with the notice and other provisions required by the LGPL      }
+{ License.  If you do not delete the provisions above, a recipient may use     }
+{ your version of this file under either the MPL or the LGPL License.          }
+{                                                                              }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{                                                                              }
+{ This unit contains declarations that are new in Windows Vista.               }
+{ This unit can be used in programs to be run under older versions of windows. }
+{ However you should not use these types in a semantic way.                    }
+{ This unit is not part of JwaWindows.pas and MUST be included by uses clause. }
+{ To use this unit you must compile JwaWindows.pas with include mode.}
+
+unit JwaVista;
+
+interface
+
+uses JwaWindows;
+
+
+type
+  WELL_KNOWN_SID_TYPE = (
+  WinNullSid {= 0},
+  WinWorldSid {= 1},
+  WinLocalSid {= 2},
+  WinCreatorOwnerSid {= 3},
+  WinCreatorGroupSid {= 4},
+  WinCreatorOwnerServerSid {= 5},
+  WinCreatorGroupServerSid {= 6},
+  WinNtAuthoritySid {= 7},
+  WinDialupSid {= 8},
+  WinNetworkSid {= 9},
+  WinBatchSid {= 10},
+  WinInteractiveSid {= 11},
+  WinServiceSid {= 12},
+  WinAnonymousSid {= 13},
+  WinProxySid {= 14},
+  WinEnterpriseControllersSid {= 15},
+  WinSelfSid {= 16},
+  WinAuthenticatedUserSid {= 17},
+  WinRestrictedCodeSid {= 18},
+  WinTerminalServerSid {= 19},
+  WinRemoteLogonIdSid {= 20},
+  WinLogonIdsSid {= 21},
+  WinLocalSystemSid {= 22},
+  WinLocalServiceSid {= 23},
+  WinNetworkServiceSid {= 24},
+  WinBuiltinDomainSid {= 25},
+  WinBuiltinAdministratorsSid {= 26},
+  WinBuiltinUsersSid {= 27},
+  WinBuiltinGuestsSid {= 28},
+  WinBuiltinPowerUsersSid {= 29},
+  WinBuiltinAccountOperatorsSid {= 30},
+  WinBuiltinSystemOperatorsSid {= 31},
+  WinBuiltinPrintOperatorsSid {= 32},
+  WinBuiltinBackupOperatorsSid {= 33},
+  WinBuiltinReplicatorSid {= 34},
+  WinBuiltinPreWindows2000CompatibleAccessSid {= 35},
+  WinBuiltinRemoteDesktopUsersSid {= 36},
+  WinBuiltinNetworkConfigurationOperatorsSid {= 37},
+  WinAccountAdministratorSid {= 38},
+  WinAccountGuestSid {= 39},
+  WinAccountKrbtgtSid {= 40},
+  WinAccountDomainAdminsSid {= 41},
+  WinAccountDomainUsersSid {= 42},
+  WinAccountDomainGuestsSid {= 43},
+  WinAccountComputersSid {= 44},
+  WinAccountControllersSid {= 45},
+  WinAccountCertAdminsSid {= 46},
+  WinAccountSchemaAdminsSid {= 47},
+  WinAccountEnterpriseAdminsSid {= 48},
+  WinAccountPolicyAdminsSid {= 49},
+  WinAccountRasAndIasServersSid {= 50},
+  WinNTLMAuthenticationSid {= 51},
+  WinDigestAuthenticationSid {= 52},
+  WinSChannelAuthenticationSid {= 53},
+  WinThisOrganizationSid {= 54},
+  WinOtherOrganizationSid {= 55},
+  WinBuiltinIncomingForestTrustBuildersSid {= 56},
+  WinBuiltinPerfMonitoringUsersSid {= 57},
+  WinBuiltinPerfLoggingUsersSid {= 58},
+  WinBuiltinAuthorizationAccessSid {= 59},
+  WinBuiltinTerminalServerLicenseServersSid {= 60},
+  WinBuiltinDCOMUsersSid {= 61},
+  WinBuiltinIUsersSid {= 62},
+  WinIUserSid {= 63},
+  WinBuiltinCryptoOperatorsSid {= 64},
+  WinUntrustedLabelSid {= 65},
+  WinLowLabelSid {= 66},
+  WinMediumLabelSid {= 67},
+  WinHighLabelSid {= 68},
+  WinSystemLabelSid {= 69},
+  WinWriteRestrictedCodeSid {= 70},
+  WinCreatorOwnerRightsSid {= 71},
+  WinCacheablePrincipalsGroupSid {= 72},
+  WinNonCacheablePrincipalsGroupSid {= 73},
+  WinEnterpriseReadonlyControllersSid {= 74},
+  WinAccountReadonlyControllersSid {= 75},
+  WinBuiltinEventLogReadersGroup {= 76},
+  WinNewEnterpriseReadonlyControllersSid {= 77},
+  WinBuiltinCertSvcDComAccessGroup {= 78}
+  );
+
+  TWellKnownSidType = WELL_KNOWN_SID_TYPE;
+
+
+    {Token elevation type.
+     TokenElevationTypePad0 does not belong to this type. It is only a pad.
+
+     Vista only
+    }
+  _TOKEN_ELEVATION_TYPE = (TokenElevationTypePad0,
+    TokenElevationTypeDefault, TokenElevationTypeFull,
+    TokenElevationTypeLimited);
+
+  {see @link(_TOKEN_ELEVATION_TYPE)}
+  TTokenElevationType = _TOKEN_ELEVATION_TYPE;
+  {see @Link(_TOKEN_ELEVATION_TYPE)}
+  PTokenElevationType = ^TTokenElevationType;
+
+  {@Name contains the elevation status of a token on a vista system.}
+  _TOKEN_ELEVATION = record
+    TokenIsElevated: DWORD;
+  end;
+
+  {see @Link(_TOKEN_ELEVATION)}
+  TTokenElevation = _TOKEN_ELEVATION;
+  {see @Link(_TOKEN_ELEVATION)}
+  PTokenElevation = ^TTokenElevation;
+
+    {@Name is the new token information class of a vista system.
+     The enum constant TokenPadding0 is only for padding and is not used.
+     }
+
+
+  _TOKEN_INFORMATION_CLASS = (TokenPadding0,
+    TokenUser,
+    TokenGroups,
+    TokenPrivileges,
+    TokenOwner,
+    TokenPrimaryGroup,
+    TokenDefaultDacl,
+    TokenSource,
+    TokenType,
+    TokenImpersonationLevel,
+    TokenStatistics,
+    TokenRestrictedSids,
+    TokenSessionId,
+    TokenGroupsAndPrivileges,
+    TokenSessionReference,
+    TokenSandBoxInert,
+    TokenAuditPolicy,
+    TokenOrigin,
+    TokenElevationType,
+    TokenLinkedToken,
+    TokenElevation,
+    TokenHasRestrictions,
+    TokenAccessInformation,
+    TokenVirtualizationAllowed,
+    TokenVirtualizationEnabled,
+    TokenIntegrityLevel,
+    TokenUIAccess,
+    TokenMandatoryPolicy,
+    TokenLogonSid,
+    // MaxTokenInfoClass should always be the last enum
+    MaxTokenInfoClass
+    );
+
+
+  {see @Link(_TOKEN_INFORMATION_CLASS)}
+  TTokenInformationClass   = _TOKEN_INFORMATION_CLASS;
+  {see @Link(_TOKEN_INFORMATION_CLASS)}
+  PTokenInformationClass   = ^TTokenInformationClass;
+
+type
+  MANDATORY_LEVEL = (
+    MandatoryLevelUntrusted, {= 0}
+    MandatoryLevelLow,
+    MandatoryLevelMedium,
+    MandatoryLevelHigh,
+    MandatoryLevelSystem,
+    MandatoryLevelSecureProcess,
+    MandatoryLevelCount);
+
+  PMANDATORY_LEVEL = ^MANDATORY_LEVEL;
+
+  TMandatoryLevel = MANDATORY_LEVEL;
+  PMandatoryLevel = ^TMandatoryLevel;
+
+const
+  SYSTEM_MANDATORY_LABEL_NO_WRITE_UP = $1; //A principal with a lower mandatory level than the object cannot write to the object.
+  SYSTEM_MANDATORY_LABEL_NO_READ_UP = $2; //A principal with a lower mandatory level than the object cannot read the object.
+  SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP = $4; //A principal with a lower mandatory level than the object cannot execute the object.
+
+type
+  //http://msdn2.microsoft.com/en-us/library/aa965848.aspx
+  _SYSTEM_MANDATORY_LABEL_ACE = record
+    Header : ACE_HEADER;
+    Mask : ACCESS_MASK;
+    SidStart : DWORD;
+  end;
+  SYSTEM_MANDATORY_LABEL_ACE = _SYSTEM_MANDATORY_LABEL_ACE;
+  PSYSTEM_MANDATORY_LABEL_ACE = ^_SYSTEM_MANDATORY_LABEL_ACE;
+
+  TSystemMandatoryLabelAce = _SYSTEM_MANDATORY_LABEL_ACE;
+  PSystemMandatoryLabelAce = ^TSystemMandatoryLabelAce;
+
+const
+  TOKEN_MANDATORY_POLICY_OFF = $0; //No mandatory integrity policy is enforced for the token.
+  TOKEN_MANDATORY_POLICY_NO_WRITE_UP = $1; //A process associated with the token cannot write to objects that have a greater mandatory integrity level.
+  TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN = $2; //A process created with the token has an integrity level that is the lesser of the parent-process integrity level and the executable-file integrity level.
+  TOKEN_MANDATORY_POLICY_VALID_MASK = $3; //A combination of TOKEN_MANDATORY_POLICY_NO_WRITE_UP and TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN
+
+type
+  //http://msdn2.microsoft.com/en-us/library/bb394728.aspx
+  _TOKEN_MANDATORY_POLICY = record
+    Policy : DWORD;
+  end;
+
+  TOKEN_MANDATORY_POLICY = _TOKEN_MANDATORY_POLICY;
+  PTOKEN_MANDATORY_POLICY = ^TOKEN_MANDATORY_POLICY;
+
+  TTokenMandatoryPolicy = _TOKEN_MANDATORY_POLICY;
+  PTokenMandatoryPolicy = ^TTokenMandatoryPolicy;
+
+const
+  {
+  The SID_HASH_SIZE array dimension is defined in WinNT.h as 32.
+  http://msdn2.microsoft.com/en-us/library/bb394725.aspx
+  }
+  SID_HASH_SIZE = 32;
+
+type
+  SID_HASH_ENTRY = ULONG_PTR;
+  TSidHashEntry = SID_HASH_ENTRY;
+
+  //http://msdn2.microsoft.com/en-us/library/bb394725.aspx
+  _SID_AND_ATTRIBUTES_HASH = record
+    SidCount : DWORD;
+    SidAttr : PSID_AND_ATTRIBUTES;
+    Hash : array[0..SID_HASH_SIZE-1] of SID_HASH_ENTRY;
+  end;
+
+  SID_AND_ATTRIBUTES_HASH = _SID_AND_ATTRIBUTES_HASH;
+  PSID_AND_ATTRIBUTES_HASH = ^SID_AND_ATTRIBUTES_HASH;
+
+  TSidAndAttributesHash = _SID_AND_ATTRIBUTES_HASH;
+  PSidAndAttributesHash = ^TSidAndAttributesHash;
+
+
+  //http://msdn2.microsoft.com/en-us/library/bb394726.aspx
+  _TOKEN_ACCESS_INFORMATION = record
+    SidHash: PSID_AND_ATTRIBUTES_HASH;
+    RestrictedSidHash : PSID_AND_ATTRIBUTES_HASH;
+    Privileges : PTOKEN_PRIVILEGES;
+    AuthenticationId : LUID;
+    TokenType : TOKEN_TYPE;
+    ImpersonationLevel : SECURITY_IMPERSONATION_LEVEL;
+    MandatoryPolicy : TOKEN_MANDATORY_POLICY;
+    Flags : DWORD;
+  end;
+
+  TOKEN_ACCESS_INFORMATION = _TOKEN_ACCESS_INFORMATION;
+  PTOKEN_ACCESS_INFORMATION = ^TOKEN_ACCESS_INFORMATION;
+
+  TTokenAccessInformation = _TOKEN_ACCESS_INFORMATION;
+  PTokenAccessInformation = ^TTokenAccessInformation;
+
+  //http://msdn2.microsoft.com/en-us/library/bb530719.aspx
+  _TOKEN_LINKED_TOKEN = record
+    LinkedToken : HANDLE;
+  end;
+  TOKEN_LINKED_TOKEN = _TOKEN_LINKED_TOKEN;
+  PTOKEN_LINKED_TOKEN = ^TOKEN_LINKED_TOKEN;
+
+  TTokenLinkedToken = _TOKEN_LINKED_TOKEN;
+  PTokenLinkedToken = ^TTokenLinkedToken;
+
+
+  _TOKEN_MANDATORY_LABEL = record
+    Label_ : SID_AND_ATTRIBUTES;
+  end;
+
+  TOKEN_MANDATORY_LABEL = _TOKEN_MANDATORY_LABEL;
+  PTOKEN_MANDATORY_LABEL = ^TOKEN_MANDATORY_LABEL;
+
+  TTokenMandatoryLabel = _TOKEN_MANDATORY_LABEL;
+  PTokenMandatoryLabel = ^TTokenMandatoryLabel;
+
+const
+  SYSTEM_MANDATORY_LABEL_ACE_TYPE = $11;
+
+  SE_RELABEL_NAME = 'SeRelabelPrivilege'; //Required to modify the mandatory integrity level of an object.
+
+
+  SE_GROUP_INTEGRITY                 = $00000020;
+  SE_GROUP_INTEGRITY_ENABLED         = $00000040;
+
+  {@Name includes the integrity ACE into the security descriptor string.
+   See http://msdn2.microsoft.com/en-us/library/aa376397.aspx
+   }
+  LABEL_SECURITY_INFORMATION = $0000010;
+
+
+  SECURITY_MANDATORY_UNTRUSTED_RID = $0;
+  SECURITY_MANDATORY_LOW_RID = $1000;
+  SECURITY_MANDATORY_MEDIUM_RID = $2000;
+  SECURITY_MANDATORY_HIGH_RID = $3000;          
+  SECURITY_MANDATORY_SYSTEM_RID = $4000;
+  SECURITY_MANDATORY_PROTECTED_PROCESS_RID = $5000;
+
+  LowIL = 'S-1-16-4096';
+  MediumIL = 'S-1-16-8192';
+  HighIL = 'S-1-16-12288';
+  SystemIL = 'S-1-16-16384';
+  ProtectedProcessIL = 'S-1-16-20480';
+
+
+  function AddMandatoryAce(pAcl: PACL; dwAceRevision, AceFlags, MandatoryPolicy: DWORD;
+    pLabelSid: PSID): BOOL; stdcall;
+  {$EXTERNALSYM AddMandatoryAce}
+
+
+
+implementation
+uses JwaWinDLLNames;
+
+{$IFNDEF DYNAMIC_LINK}
+  function AddMandatoryAce(pAcl: PACL; dwAceRevision, AceFlags, MandatoryPolicy: DWORD;
+    pLabelSid: PSID): BOOL; stdcall; external advapi32 name 'AddMandatoryAce';
+{$ELSE}
+
+var
+  _AddMandatoryAce: Pointer;
+
+function AddMandatoryAce;
+begin
+  GetProcedureAddress(_AddMandatoryAce, advapi32, 'AddMandatoryAce');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [_AddMandatoryAce]
+  end;
+end;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.

+ 1409 - 0
packages/base/winunits/JwaWinSta.pas

@@ -0,0 +1,1409 @@
+{******************************************************************}
+{ This Unit provides Delphi translations of some functions from    }
+{ WinSta.dll and Utildll.                                          }
+{ Most functions are undocumented and somehow related to           }
+{ Terminal Server                                                  }
+{                                                                  }
+{ Author: Remko Weijnen (r dot weijnen at gmail dot com)           }
+{ Documentation can be found at www.remkoweijnen.nl                }
+{                                                                  }
+{ The contents of this file are subject to                         }
+{ the Mozilla Public License Version 1.1 (the "License"); you may  }
+{ not use this file except in compliance with the License. You may }
+{ obtain a copy of the License at                                  }
+{ http://www.mozilla.org/MPL/MPL-1.1.html                          }
+{                                                                  }
+{ Software distributed under the License is distributed on an      }
+{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
+{ implied. See the License for the specific language governing     }
+{ rights and limitations under the License.                        }
+{******************************************************************}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+
+unit JwaWinSta;
+
+
+interface
+
+{$I jediapilib.inc}
+
+uses
+  DateUtils, SysUtils, JwaWinType, // JwaWinType must be declared before JwaWinBase because of duplicate declaration of FILETIME
+  JwaWinBase, JwaWinError, JwaNTStatus, JwaWinNT, JwaWinsock2,
+  JwaWinSvc, JwaWtsApi32, JwaNative;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
+//==============================================================================
+// Defines
+//==============================================================================
+const
+  SERVERNAME_CURRENT = 0;
+  
+  // constants used for WinStationGetTermSrvCounters
+  TOTAL_SESSIONS_CREATED_COUNTER = 1;
+  TOTAL_SESSIONS_DISCONNECTED_COUNTER = 2;
+  TOTAL_SESSIONS_RECONNECTED_COUNTER = 3;
+  TOTAL_SESSIONS_TOTAL_CONNECTED_NOW_COUNTER = 4;
+  TOTAL_SESSIONS_TOTAL_DISCONNECTED_NOW_COUNTER = 5;
+  TOTAL_SESSIONS_TOTAL_CONNECTED_NOW_COUNTER_2 = 6; //TermSrvSuccLocalLogons;
+  TOTAL_SESSIONS_TOTAL_DISCONNECTED_NOW_COUNTER_2 = 7;
+
+  // Max lenght for ElapsedTimeString (server 2008 version of utildll
+  // fixes size at 15, so that's assumed to be safe
+  ELAPSED_TIME_STRING_LENGTH = 15;
+
+  // WdFlag = WinStation Driver Flag, it is returned in class 3 (WdConfig)
+  // of WinStationQueryInformation and has a different value which
+  // depends on the protocol. WdFlag is also returned by QueryCurrentWinStation
+  WD_FLAG_CONSOLE_XP = $24; // XP
+  WD_FLAG_CONSOLE = $34; // 2003/2008
+  WD_FLAG_RDP = $36; // XP/2003/2008
+  WD_FLAG_ICA = $6E; // Citrix Presentation Server
+//  (value from Citrix PS4, other versions could be different!)
+
+  // Class constants for WinStationQueryInformationW
+  // These names were found in winsta.dll because they have
+  // corresponding unicode 2 ansi conversion functions.
+  // Unknown: AsyncConfig, NasiConfig, OemTdConfig, PdConfig, PdConfig2
+  // PdParams UserConfig, WinStationCreate, WinStationPrinter
+  //
+  // The structures below are currently defined, constant names were
+  // mapped on best guess:
+
+  WdConfig = 3;
+  WinStationClient = 1;
+  WinStationConfig = 6;
+  WinStationInformation = 8;
+  WinStationProductId = 27;
+  WinStationRemoteAddress = 29;
+
+  // Constants for WinStationSetInformation
+  WinStationBeep = 10;  // Calls MessageBeep
+
+  // This class is used to query the user's primary access token
+  // Only System account is allowed to retrieve this!
+  WinStationToken = 14;
+
+  // WinStationLocks plays the lock or unlock sound
+  // functionality not yet confirmed
+  WinStationLock = 28; // Locks or Unlocks the WinStation
+
+  SECONDS_PER_DAY = 86400;
+  SECONDS_PER_HOUR = 3600;
+  SECONDS_PER_MINUTE = 60;
+type
+  // This type is used for ElapsedTimeString
+  TDiffTime = record
+    wDays: Word;
+    wHours: Word;
+    wMinutes: Word;
+    wSeconds: Word;
+    wMilliseconds: Word;
+  end;
+  PDiffTime = ^TDiffTime;
+
+  // This type is used for WinStationQueryLogonCredentialsW
+  // dwType can be one of the types defined in JwaWinWlx
+  // WLX_CREDENTIAL_TYPE_V1_0 or  WLX_CREDENTIAL_TYPE_V2_0 = 2
+  _LOGON_CREDENTIALSW = record
+    dwType: DWORD;
+    pUsername: PWideChar;
+    pDomain: PWideChar;
+    pPassword: PWideChar;
+    Unknown2 : DWORD;
+    Unknown3 : DWORD;
+    Unknown4: DWORD;
+  end;
+  PLOGON_CREDENTIALSW = ^_LOGON_CREDENTIALSW;
+  TLogonCredentialsW = _LOGON_CREDENTIALSW;
+  PLogonCredentialsW = PLOGON_CREDENTIALSW;
+
+  _WINSTA_USER_TOKEN = record
+    ProcessId : DWORD;
+    ThreadId : DWORD;
+    TokenHandle : THandle;
+  end;
+  PWINSTA_USER_TOKEN = ^_WINSTA_USER_TOKEN;
+  TWinstaUserToken = _WINSTA_USER_TOKEN;
+  PWinstaUserToken = ^TWinstaUserToken;
+
+ // this type is used for WinStationGetTemSrvCounters
+  _TERM_SRV_COUNTER = record
+    dwIndex: DWORD;
+    bSuccess: BOOL;
+    dwValue: DWORD;
+    Reserved2: DWORD;
+    Reserved3: DWORD;
+    Reserved4: DWORD;
+  end;
+  PTERM_SRV_COUNTER = ^_TERM_SRV_COUNTER;
+  TTermSrvCounter = _TERM_SRV_COUNTER;
+  PTermSrvCounter = ^TTermSrvCounter;
+
+  TERM_SRV_COUNTER_ARRAY = array [1..7] of _TERM_SRV_COUNTER;
+  PTERM_SRV_COUNTER_ARRAY = ^TERM_SRV_COUNTER_ARRAY;
+  TTermSrvCounterArray = TERM_SRV_COUNTER_ARRAY;
+  PTermSrvCounterArray = PTERM_SRV_COUNTER_ARRAY;
+
+  // The following types are used for WinStationGetAllProcesses
+  // _WINSTA_PROCESS_INFO
+  _WINSTA_PROCESS_INFO = record
+    ExtendedInfo: PSYSTEM_PROCESSES;
+    dwSidLength: DWORD;
+    pUserSid: PSID;
+  end;
+  PWINSTA_PROCESS_INFO = ^_WINSTA_PROCESS_INFO;
+  TWinstaProcessInfo = _WINSTA_PROCESS_INFO;
+  PWinstaProcessInfo = PWINSTA_PROCESS_INFO;
+
+  // Array of _WINSTA_PROCESS_INFO
+  _WINSTA_PROCESS_INFO_ARRAY = array [0..ANYSIZE_ARRAY-1] of _WINSTA_PROCESS_INFO;
+  PWINSTA_PROCESS_INFO_ARRAY= ^_WINSTA_PROCESS_INFO_ARRAY;
+  TWinstaProcessInfoArray = _WINSTA_PROCESS_INFO_ARRAY;
+  PWinstaProcessInfoArray = PWINSTA_PROCESS_INFO_ARRAY;
+
+  // The following types are used for WinStationQueryInformationW
+
+  // WinStationClient, returns information as provided by the
+  // Terminal Server client (mstsc).
+  _WINSTATION_CLIENTW = record
+    Comment: array[0..59] of WCHAR;
+    Reserved1: array[0..2] of DWORD;
+    ClientUsername: array[0..20] of WCHAR;
+    ClientDomain: array[0..17] of WCHAR;
+    ClientPassword: array[0..255] of WCHAR; // this was fixec win2000 SP4
+    Reserved2: array[0..1635] of BYTE;
+    Reserved3: array[0..6] of DWORD;
+    Reserved4: array[0..275] of BYTE;
+  end;
+  PWINSTATION_CLIENTW = ^_WINSTATION_CLIENTW;
+  TWinStationClientW = _WINSTATION_CLIENTW;
+  PWinStationClientW = PWINSTATION_CLIENTW;
+
+  // WdConfig class, returns information about the WinStationDriver
+  _WD_CONFIGW = record
+    WdName: array[0..32] of WCHAR;
+    WdDLL: array[0..32] of WCHAR;
+    WsxDLL: array[0..33] of WCHAR;
+    WdFlag: DWORD;
+    InputBufferLength: DWORD;
+    CfgDLL: array[0..32] of WCHAR;
+    WdPrefix: array[0..12] of WCHAR;
+  end;
+  PWD_CONFIGW = ^_WD_CONFIGW;
+  TWdConfigW = _WD_CONFIGW;
+  PWdConfigW = PWD_CONFIGW;
+
+  // WinStationConfig class, returns information about the client's
+  // configuration such as network, time(zone) settings and such
+  _WINSTATION_CONFIGW = record
+    Reserved1: DWORD;
+    ClientName: array[0..20] of WCHAR;
+    Domain: array[0..17] of WCHAR;
+    Username: array[0..35] of WCHAR;
+    CurrentDirectory: array[0..256] of WCHAR;
+    ApplicationName:array[0..259] of WCHAR;
+    Reserved2: DWORD;
+    AddressFamily: DWORD;  // AF_INET, AF_IPX, AF_NETBIOS, AF_UNSPEC
+    ClientAddress: array[0..27] of WCHAR;
+    Reserved3: array[0..7] of BYTE;
+    Reserved4: array[0..4] of DWORD;
+    Reserved5: array[0..69] of BYTE;
+    ClientDLLName: array[0..330] of WCHAR;
+    Reserved6: array[0..1] of FILETIME;
+    AudioDriver: array[0..9] of WCHAR;
+    TZBias: DWORD;
+    TZStandardName: array[0..31] of WCHAR;
+    Reserved7: DWORD; // Standard Bias??
+    TZDaylightName: array[0..31] of WCHAR;
+    TZDayLightStart: array[0..15] of BYTE;
+    TZDayLightBias: DWORD;
+    Reserved8: DWORD; // Daylight offset?
+    TSInstanceID: array[0..33] of WCHAR; // sometimes windows license key(s)
+    Reserved9: DWORD;      // related to license key or instanceid?
+  end;
+  PWINSTATION_CONFIGW = ^_WINSTATION_CONFIGW;
+  TWinStationConfigW = _WINSTATION_CONFIGW;
+  PWinStationConfigW = PWINSTATION_CONFIGW;
+
+  // class WinStationInformationClass
+  // provides information about the current state of the client such as
+  // idletime, sessionstatus and transferred/received bytes
+  _WINSTATION_INFORMATIONW = record
+    State: DWORD;
+    WinStationName: array[0..10] of WideChar;
+    Unknown1: array[0..10] of byte;
+    Unknown3: array[0..10] of WideChar;
+    Unknown2: array[0..8] of byte;
+    SessionId: DWORD;
+    Reserved2: array[0..3] of byte;
+    ConnectTime: FILETIME;
+    DisconnectTime: FILETIME;
+    LastInputTime: FILETIME;
+    LogonTime: FILETIME;
+    Unknown4: array[0..11] of byte;
+    OutgoingFrames: DWORD;
+    OutgoingBytes: DWORD;
+    OutgoingCompressBytes: DWORD;
+    Unknown5: array[0..435] of byte;
+    IncomingCompressedBytes: DWORD;
+    Unknown6: array[0..7] of byte;
+    IncomingFrames: DWORD;
+    IncomingBytes: DWORD;
+    Unknown7: array[0..3] of byte;
+    Reserved3: array[0..528] of byte;
+    Domain: array[0..17] of WideChar;
+    Username: array[0..22] of WideChar;
+    CurrentTime: FILETIME;
+  end;
+  PWINSTATION_INFORMATIONW = ^_WINSTATION_INFORMATIONW;
+  TWinStationInformationExW = _WINSTATION_INFORMATIONW;
+  PWinStationInformationExW = PWINSTATION_INFORMATIONW;
+
+  // WinStationRemoteAddress (class 29)
+  // Definition is preliminary
+  // AddressFamily can be AF_INET, AF_IPX, AF_NETBIOS, AF_UNSPEC
+  // Port is the remote port number (local port number is 3389 by default)
+  // Address (for type AF_INET it start's at a 2 byte offset)
+  // You can format IP Address to string like this:
+  // Format('%d.%d.%d.%d', [WinStationAddress.Address[2],
+  //  WinStationRemoteAddress.[3], WinStationRemoteAddress.Address[4],
+  //  WinStationRemoteAddress..Address[5]]);
+  //
+  // Be sure to fill the structure with zeroes before query!
+  _WINSTATION_REMOTE_ADDRESS = record
+    AddressFamily: DWORD;
+    Port: WORD;
+    Address: array [0..19] of BYTE;
+    Reserved: array[0..5] of BYTE;
+  end;
+  PWINSTATION_REMOTE_ADDRESS = ^_WINSTATION_REMOTE_ADDRESS;
+  TWinStationRemoteAddress = _WINSTATION_REMOTE_ADDRESS;
+  PWinStationRemoteAddress = PWINSTATION_REMOTE_ADDRESS;
+
+
+function AreWeRunningTerminalServices: Boolean;
+
+procedure CachedGetUserFromSid(pSid: PSID; pUserName: LPWSTR;
+  var cbUserName: DWORD); stdcall;
+
+function CalculateDiffTime(TimeLow: INT64; TimeHigh: INT64): INT64;
+  stdcall;
+
+// Calculate Elapsed time from a Filetime (UTC time) to DiffTime structure
+function CalculateElapsedTime(lpFileTime: PFILETIME; var DiffTime: TDiffTime):
+  Boolean; stdcall;
+
+function CpuTime2Str(ACPUTime: LARGE_INTEGER): string;
+
+function CurrentDateTimeString(out lpBuffer: PWideChar): Boolean; stdcall;
+
+// This is the version for NT Terminal Server, 2000, XP/2003 and Server 2008
+function DateTimeString(DateTime: PFILETIME; lpBuffer: PWideChar): PWideChar;
+  stdcall;
+
+// This is a wrapped for all OS versions
+function DateTimeStringSafe(DateTime: PFILETIME; lpBuffer: PWideChar;
+  cchDest: SIZE_T): PWideChar; stdcall;
+
+// This is the Vista version which takes an additional parameter with
+// maximum buffer size (you have to set it) 
+function DateTimeStringVista(DateTime: PFILETIME; lpBuffer: PWideChar;
+  cchDest: SIZE_T): PWideChar; stdcall;
+
+function DiffTimeString(FTLow: FILETIME; FTHigh: FILETIME;
+  out pwElapsedTime: PWideChar): Integer;
+
+// This is the version for NT Terminal Server, 2000, XP/2003 and Server 2008
+function ElapsedTimeString(DiffTime: PDiffTime; bShowSeconds: Boolean;
+  lpElapsedTime: PWideChar): Integer; stdcall;
+
+// This is a wrapped for all OS versions
+function ElapsedTimeStringSafe(DiffTime: PDiffTime; bShowSeconds: Boolean;
+  lpElapsedTime: PWideChar; cchDest: SIZE_T): Integer;
+
+// This is the Vista version of ElapsedTimeString which takes an additional
+// parameter with the count of characters for lpElapsedTime (you have to set it)
+function ElapsedTimeStringEx(DiffTime: PDiffTime; bShowSeconds: Boolean;
+  lpElapsedTime: PWideChar; cchDest: SIZE_T): HRESULT; stdcall;
+
+function FileTime2DateTime(FileTime: TFileTime): TDateTime;
+
+function GetUnknownString: PWideChar; stdcall;
+
+function GetWTSLogonIdleTime(hServer: Handle; SessionId: DWORD;
+  var sLogonTime: string; var sIdleTime: string): Boolean;
+
+// Helper function that inits the structure for you!
+procedure InitTermSrvCounterArray(
+  var ATermSrvCounterArray: TTermSrvCounterArray);
+
+function IsTerminalServiceRunning: boolean;
+
+// Tested and working on Windows XP but doesn't seem to work on
+// Windows Vista/2008. Better use W version to be sure!
+function LogonIdFromWinStationNameA(hServer: HANDLE; pWinStationName: LPSTR;
+  var SessionId: DWORD): BOOL; stdcall;
+
+// Tested and working on XP, 2003 and 2008
+function LogonIdFromWinStationNameW(hServer: HANDLE; pWinStationName: LPWSTR;
+  var SessionId: DWORD): BOOL; stdcall;
+
+// This is the version for NT Terminal Server, 2000, XP/2003 and Server 2008
+// Reserve 66 bytes for pWinStationName and 21 for pUserName
+function QueryCurrentWinStation(pWinStationName: LPWSTR;
+  pUserName: LPWSTR; var SessionId: DWORD; var WdFlag: DWORD): Boolean;
+  stdcall;
+
+// This is the Vista version of QueryCurrentWinStation which takes an
+// additional parameter with the count of characters for pUserName
+// note that pWinStationname is Fixed Size!
+function QueryCurrentWinStationEx(pWinStationName: LPWSTR;
+  pUserName: PWideChar; cchDest: DWORD; var SessionId: DWORD;
+  var WdFlag: DWORD): Boolean; stdcall;
+
+function QueryCurrentWinStationSafe(pWinStationName: LPWSTR;
+  pUserName: PWideChar; cchDest: DWORD; var SessionId: DWORD;
+  var WdFlag: DWORD): Boolean; stdcall;
+
+function StrConnectState(ConnectState: WTS_CONNECTSTATE_CLASS;
+  bShortString: BOOL): PWideChar; stdcall;
+
+function WinStationBroadcastSystemMessage(hServer: HANDLE;
+  SendToAllWinstations: BOOL; SessionId: DWORD; TimeOut: DWORD;
+  dwFlags: DWORD; lpdwRecipients: DWORD; uiMessage: ULONG; wParam: WPARAM;
+  lParam: LPARAM; pResponse: LONGINT): LONGINT; stdcall;
+
+function WinStationCallBack(hServer:HANDLE; SessionId: DWORD;
+	pPhoneNumber: LPWSTR): BOOL; stdcall;
+
+function WinStationConnectW(hServer: Handle; SessionId: DWORD;
+  TargetSessionId: DWORD; pPassword: LPWSTR;
+  bWait: BOOL): BOOL; stdcall;
+
+function WinStationDisconnect(hServer: THandle; SessionId: DWORD;
+  bWait: BOOL): BOOL; stdcall;
+
+function WinStationEnumerateA(hServer: HANDLE;
+  var ppSessionInfo: PWTS_SESSION_INFOA; var pCount: DWORD): BOOL; stdcall;
+
+function WinStationEnumerateW(hServer: HANDLE;
+  var ppSessionInfo: PWTS_SESSION_INFOW; var pCount: DWORD): BOOL; stdcall;
+
+// Used to release memory allocated by WinStationGetAllProcesses
+function WinStationFreeGAPMemory(ClassIndex: DWORD;
+  pProcessInfo: PWINSTA_PROCESS_INFO_ARRAY; Count: Integer): BOOL; stdcall;
+
+// Important! pProcessInfo must be nil before calling this function
+// by using Out parameter Delphi takes care of this for us
+function WinStationGetAllProcesses(hServer: HANDLE; ClassIndex: DWORD;
+  var Count: Integer; out pProcessInfo: PWINSTA_PROCESS_INFO_ARRAY):
+  BOOL; stdcall;
+
+function WinStationGetLanAdapterNameW(hServer: HANDLE; LanaId: DWORD;
+  ProtocolTypeLength: DWORD; ProtocolType: PWideChar;
+  var ResultLength: DWORD; var LanAdapterName: PWideChar): DWORD; stdcall;
+
+function WinStationGetProcessSid(hServer: Handle; dwPID: DWORD;
+  ProcessStartTime: FILETIME; pProcessUserSid: PSID; var dwSidSize: DWORD):
+  BOOL; stdcall;
+
+function WinStationGetRemoteIPAddress(hServer: HANDLE; SessionId: DWORD;
+  var RemoteIPAddress: string; var Port: WORD): Boolean;
+
+function WinStationGetTermSrvCountersValue(hServer: Handle;
+  dwArraySize: DWORD; PCountersArray: PTERM_SRV_COUNTER_ARRAY): BOOL;
+  stdcall;
+
+function WinStationNameFromLogonIdA(hServer: HANDLE; SessionId: ULONG;
+  pWinStationName: LPSTR): BOOL; stdcall;
+
+function WinStationNameFromLogonIdW(hServer: HANDLE; SessionId: ULONG;
+  pWinStationName: LPWSTR): BOOL; stdcall;
+
+function WinStationQueryInformationW(hServer: HANDLE; SessionId: DWORD;
+  WinStationInformationClass: Cardinal; pWinStationInformation: PVOID;
+  WinStationInformationLength: DWORD; var pReturnLength: DWORD):
+  Boolean; stdcall;
+
+function WinStationQueryLogonCredentialsW(
+  var LogonCredentials: _LOGON_CREDENTIALSW): HRESULT; stdcall;
+
+function WinstationQueryUserToken(hServer: HANDLE; SessionId: DWORD;
+  var hToken: HANDLE): BOOL;
+
+// WinStationRename needs Admin rights and always returns true
+// need to check GetLastError
+// Duplicate names are not allowed
+// Renaming a WinStation gives errors on Remote Connections:
+// the windowstation is busy processing connect, disconnect, reset
+// or login request
+
+// A version untested
+function WinStationRenameA(hServer: HANDLE; pOldWinStationName: LPSTR;
+  pNewWinStationName: LPSTR): BOOL; stdcall;
+
+// W version was tested
+function WinStationRenameW(hServer: HANDLE; pOldWinStationName: LPWSTR;
+  pNewWinStationName: LPWSTR): BOOL; stdcall;
+
+function WinStationSendMessageA(hServer: HANDLE; SessionId: DWORD;
+  pTitle: LPSTR; TitleLength: DWORD; pMessage: LPSTR; MessageLength: DWORD;
+  Style: DWORD; Timeout: DWORD; var pResponse: DWORD;
+  bWait: BOOL): BOOL; stdcall;
+
+function WinStationSendMessageW(hServer: HANDLE; SessionId: DWORD;
+  pTitle: LPWSTR; TitleLength: DWORD; pMessage: LPWSTR; MessageLength: DWORD;
+  Style: DWORD; Timeout: DWORD; var pResponse: DWORD;
+  bWait: BOOL): BOOL; stdcall;
+
+function WinStationSetInformationA(hServer: HANDLE; SessionID: DWORD;
+  InformationClass: DWORD; InformationClassDATA: PVOID;
+  DataSize: DWORD): BOOL; stdcall;
+
+function WinStationSetInformationW(hServer: HANDLE; SessionID: DWORD;
+  InformationClass: DWORD; InformationClassDATA: PVOID;
+  DataSize: DWORD): BOOL; stdcall;
+
+function WinStationShadow(hServer: Handle; pServerName: LPWSTR;
+  SessionId: DWORD; HotKey: DWORD; HKModifier: DWORD): BOOL; stdcall;
+
+// Admin can stop a shadowed session. SessionId is the targetsession
+// so the "victim" and not the one who is shadowing
+function WinStationShadowStop(hServer: Handle; SessionId: DWORD;
+  bWait: BOOL): BOOL; stdcall;
+
+function WinStationShutDownSystem(hSERVER: HANDLE;
+  ShutdownFlags: DWORD): BOOL; stdcall;
+
+function WinStationTerminateProcess(hServer: Handle; dwPID: DWORD;
+  dwExitCode: DWORD): BOOL; stdcall;
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+implementation
+
+uses
+  JwaWinDLLNames;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  winstadll = 'winsta.dll';
+  utildll = 'utildll.dll';
+{$ENDIF JWA_INCLUDEMODE}
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+
+{$IFNDEF DYNAMIC_LINK}
+procedure CachedGetUserFromSid; external utildll name 'CachedGetUserFromSid';
+function CalculateDiffTime; external utildll name 'CalculateDiffTime';
+function CalculateElapsedTime; external utildll name 'CalculateElapsedTime';
+function CurrentDateTimeString; external utildll name 'CurrentDateTimeString';
+function DateTimeString; external utildll name 'DateTimeString';
+function DateTimeStringVista; external utildll name 'DateTimeString';
+function ElapsedTimeString; external utildll name 'ElapsedTimeString';
+// Vista version of ElapsedTimeString, exported name is ElapsedTimeString
+function ElapsedTimeStringEx; external utildll name 'ElapsedTimeString';
+function GetUnknownString; external utildll name 'GetUnknownString';
+function LogonIdFromWinStationNameA; external winstadll name 'LogonIdFromWinStationNameA';
+function LogonIdFromWinStationNameW; external winstadll name 'LogonIdFromWinStationNameW';
+function QueryCurrentWinStation; external utildll name 'QueryCurrentWinStation';
+function QueryCurrentWinStationEx; external utildll name 'QueryCurrentWinStation';
+function StrConnectState; external utildll name 'StrConnectState';
+function WinStationBroadcastSystemMessage; external winstadll name 'WinStationBroadcastSystemMessage';
+function WinStationCallBack; external winstadll name 'WinStationCallBack';
+function WinStationConnectW; external winstadll name 'WinStationConnectW';
+function WinStationDisconnect; external winstadll name 'WinStationDisconnect';
+function WinStationEnumerateA; external winstadll name 'WinStationEnumerateA';
+function WinStationEnumerateW; external winstadll name 'WinStationEnumerateW';
+function WinStationFreeGAPMemory; external winstadll name 'WinStationFreeGAPMemory';
+function WinStationGetAllProcesses; external winstadll name 'WinStationGetAllProcesses';
+function WinStationGetLanAdapterNameW; external winstadll name 'WinStationGetLanAdapterNameW';
+function WinStationGetProcessSid; external winstadll name 'WinStationGetProcessSid';
+function WinStationGetTermSrvCountersValue; external winstadll name 'WinStationGetTermSrvCountersValue';
+function WinStationNameFromLogonIdA; external winstadll name 'WinStationNameFromLogonIdA';
+function WinStationNameFromLogonIdW; external winstadll name 'WinStationNameFromLogonIdW';
+function WinStationQueryLogonCredentialsW; external winstadll name 'WinStationQueryLogonCredentialsW';
+function WinStationRenameA; external winstadll name 'WinStationRenameA';
+function WinStationRenameW; external winstadll name 'WinStationRenameW';
+function WinStationSendMessageA; external winstadll name 'WinStationSendMessageA';
+function WinStationSendMessageW; external winstadll name 'WinStationSendMessageW';
+function WinStationSetInformationA; external winstadll name 'WinStationSetInformationA';
+function WinStationSetInformationW; external winstadll name 'WinStationSetInformationW';
+function WinStationShadow; external winstadll name 'WinStationShadow';
+function WinStationShadowStop; external winstadll name 'WinStationShadowStop';
+function WinStationShutDownSystem; external winstadll name 'WinStationShutDownSystem';
+function WinStationQueryInformationW; external winstadll name 'WinStationQueryInformationW';
+function WinStationTerminateProcess; external winstadll name 'WinStationTerminateProcess';
+{$ELSE}
+
+var
+  __CachedGetUserFromSid: Pointer;
+
+procedure CachedGetUserFromSid;
+begin
+  GetProcedureAddress(__CachedGetUserFromSid, utildll, 'CachedGetUserFromSid');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__CachedGetUserFromSid]
+  end;
+end;
+
+var
+  __CalculateDiffTime: Pointer;
+
+function CalculateDiffTime;
+begin
+  GetProcedureAddress(__CalculateDiffTime, utildll, 'CalculateDiffTime');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__CalculateDiffTime]
+  end;
+end;
+
+var
+  __CalculateElapsedTime: Pointer;
+
+function CalculateElapsedTime;
+begin
+  GetProcedureAddress(__CalculateElapsedTime, utildll, 'CalculateElapsedTime');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__CalculateElapsedTime]
+  end;
+end;
+
+var
+  __CurrentDateTimeString: Pointer;
+
+function CurrentDateTimeString;
+begin
+  GetProcedureAddress(__CurrentDateTimeString, utildll, 'CurrentDateTimeString');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__CurrentDateTimeString]
+  end;
+end;
+
+var
+  __DateTimeString: Pointer;
+
+function DateTimeString;
+begin
+  GetProcedureAddress(__DateTimeString, utildll, 'DateTimeString');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__DateTimeString]
+  end;
+end;
+
+var
+  __DateTimeStringVista: Pointer;
+
+function DateTimeStringVista;
+begin
+  GetProcedureAddress(__DateTimeStringVista, utildll, 'DateTimeString');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__DateTimeStringVista]
+  end;
+end;
+
+var
+  __ElapsedTimeString: Pointer;
+
+function ElapsedTimeString;
+begin
+  GetProcedureAddress(__ElapsedTimeString, utildll, 'ElapsedTimeString');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__ElapsedTimeString]
+  end;
+end;
+
+var
+  __ElapsedTimeStringEx: Pointer;
+
+function ElapsedTimeStringEx;
+begin
+  GetProcedureAddress(__ElapsedTimeStringEx, utildll, 'ElapsedTimeString');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__ElapsedTimeStringEx]
+  end;
+end;
+
+
+var
+  __GetUnknownString: Pointer;
+
+function GetUnknownString;
+begin
+  GetProcedureAddress(__GetUnknownString, utildll, 'GetUnknownString');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__GetUnknownString]
+  end;
+end;
+
+var
+  __LogonIdFromWinStationNameA: Pointer;
+
+function LogonIdFromWinStationNameA;
+begin
+  GetProcedureAddress(__LogonIdFromWinStationNameA, winstadll, 'LogonIdFromWinStationNameA');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__LogonIdFromWinStationNameA]
+  end;
+end;
+
+var
+  __LogonIdFromWinStationNameW: Pointer;
+
+function LogonIdFromWinStationNameW;
+begin
+  GetProcedureAddress(__LogonIdFromWinStationNameW, winstadll, 'LogonIdFromWinStationNameW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__LogonIdFromWinStationNameW]
+  end;
+end;
+
+var
+  __QueryCurrentWinStation: Pointer;
+
+function QueryCurrentWinStation;
+begin
+  GetProcedureAddress(__QueryCurrentWinStation, utildll, 'QueryCurrentWinStation');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__QueryCurrentWinStation]
+  end;
+end;
+
+var
+  __QueryCurrentWinStationEx: Pointer;
+
+function QueryCurrentWinStationEx;
+begin
+  GetProcedureAddress(__QueryCurrentWinStationEx, utildll, 'QueryCurrentWinStation');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__QueryCurrentWinStationEx]
+  end;
+end;
+
+var
+  __StrConnectState: Pointer;
+
+function StrConnectState;
+begin
+  GetProcedureAddress(__StrConnectState, utildll, 'StrConnectState');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__StrConnectState]
+  end;
+end;
+
+var
+  __WinStationBroadcastSystemMessage: Pointer;
+
+function WinStationBroadcastSystemMessage;
+begin
+  GetProcedureAddress(__WinStationBroadcastSystemMessage, winstadll, 'WinStationBroadcastSystemMessage');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationBroadcastSystemMessage]
+  end;
+end;
+
+var
+  __WinStationCallBack: Pointer;
+
+function WinStationCallBack;
+begin
+  GetProcedureAddress(__WinStationCallBack, winstadll, 'WinStationCallBack');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationCallBack]
+  end;
+end;
+
+
+var
+  __WinStationConnectW: Pointer;
+
+function WinStationConnectW;
+begin
+  GetProcedureAddress(__WinStationConnectW, winstadll, 'WinStationConnectW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationConnectW]
+  end;
+end;
+
+
+var
+  __WinStationDisconnect: Pointer;
+
+function WinStationDisconnect;
+begin
+  GetProcedureAddress(__WinStationDisconnect, winstadll, 'WinStationDisconnect');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationDisconnect]
+  end;
+end;
+
+var
+  __WinStationEnumerateA: Pointer;
+
+function WinStationEnumerateA;
+begin
+  GetProcedureAddress(__WinStationEnumerateA, winstadll, 'WinStationEnumerateA');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationEnumerateA]
+  end;
+end;
+
+var
+  __WinStationEnumerateW: Pointer;
+
+function WinStationEnumerateW;
+begin
+  GetProcedureAddress(__WinStationEnumerateW, winstadll, 'WinStationEnumerateW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationEnumerateW]
+  end;
+end;
+
+var
+  __WinStationFreeGAPMemory: Pointer;
+
+function WinStationFreeGAPMemory;
+begin
+  GetProcedureAddress(__WinStationFreeGAPMemory, winstadll, 'WinStationFreeGAPMemory');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationFreeGAPMemory]
+  end;
+end;
+
+var
+  __WinStationGetAllProcesses: Pointer;
+
+function WinStationGetAllProcesses;
+begin
+  GetProcedureAddress(__WinStationGetAllProcesses, winstadll, 'WinStationGetAllProcesses');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationGetAllProcesses]
+  end;
+end;
+
+var
+  __WinStationGetLanAdapterNameW: Pointer;
+
+function WinStationGetLanAdapterNameW;
+begin
+  GetProcedureAddress(__WinStationGetLanAdapterNameW, winstadll, 'WinStationGetLanAdapterNameW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationGetLanAdapterNameW]
+  end;
+end;
+
+var
+  __WinStationGetProcessSid: Pointer;
+
+function WinStationGetProcessSid;
+begin
+  GetProcedureAddress(__WinStationGetProcessSid, winstadll, 'WinStationGetProcessSid');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationGetProcessSid]
+  end;
+end;
+
+var
+  __WinStationGetTermSrvCountersValue: Pointer;
+
+function WinStationGetTermSrvCountersValue;
+begin
+  GetProcedureAddress(__WinStationGetTermSrvCountersValue, winstadll, 'WinStationGetTermSrvCountersValue');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationGetTermSrvCountersValue]
+  end;
+end;
+
+var
+  __WinStationNameFromLogonIdA: Pointer;
+
+function WinStationNameFromLogonIdA;
+begin
+  GetProcedureAddress(__WinStationNameFromLogonIdA, winstadll, 'WinStationNameFromLogonIdA');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationNameFromLogonIdA]
+  end;
+end;
+
+
+var
+  __WinStationNameFromLogonIdW: Pointer;
+
+function WinStationNameFromLogonIdW;
+begin
+  GetProcedureAddress(__WinStationNameFromLogonIdW, winstadll, 'WinStationNameFromLogonIdW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationNameFromLogonIdW]
+  end;
+end;
+
+var
+  __WinStationQueryLogonCredentialsW: Pointer;
+
+function WinStationQueryLogonCredentialsW;
+begin
+  GetProcedureAddress(__WinStationQueryLogonCredentialsW, winstadll, 'WinStationQueryLogonCredentialsW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationQueryLogonCredentialsW]
+  end;
+end;
+
+var
+  __WinStationRenameA: Pointer;
+
+function WinStationRenameA;
+begin
+  GetProcedureAddress(__WinStationRenameA, winstadll, 'WinStationRenameA');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationRenameA]
+  end;
+end;
+
+var
+  __WinStationRenameW: Pointer;
+
+function WinStationRenameW;
+begin
+  GetProcedureAddress(__WinStationRenameW, winstadll, 'WinStationRenameW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationRenameW]
+  end;
+end;
+
+var
+  __WinStationQueryInformationW: Pointer;
+
+function WinStationQueryInformationW;
+begin
+  GetProcedureAddress(__WinStationQueryInformationW, winstadll, 'WinStationQueryInformationW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationQueryInformationW]
+  end;
+end;
+
+var
+  __WinStationSendMessageA: Pointer;
+
+function WinStationSendMessageA;
+begin
+  GetProcedureAddress(__WinStationSendMessageA, winstadll, 'WinStationSendMessageA');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationSendMessageA]
+  end;
+end;
+
+var
+  __WinStationSendMessageW: Pointer;
+
+function WinStationSendMessageW;
+begin
+  GetProcedureAddress(__WinStationSendMessageW, winstadll, 'WinStationSendMessageW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationSendMessageW]
+  end;
+end;
+
+var
+  __WinStationSetInformationA: Pointer;
+
+function WinStationSetInformationA;
+begin
+  GetProcedureAddress(__WinStationSetInformationA, winstadll, 'WinStationSetInformationA');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationSetInformationA]
+  end;
+end;
+
+var
+  __WinStationSetInformationW: Pointer;
+
+function WinStationSetInformationW;
+begin
+  GetProcedureAddress(__WinStationSetInformationW, winstadll, 'WinStationSetInformationW');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationSetInformationW]
+  end;
+end;
+
+var
+  __WinStationShadow: Pointer;
+
+function WinStationShadow;
+begin
+  GetProcedureAddress(__WinStationShadow, winstadll, 'WinStationShadow');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationShadow]
+  end;
+end;
+
+
+var
+  __WinStationShadowStop : Pointer;
+
+function WinStationShadowStop;
+begin
+  GetProcedureAddress(__WinStationShadowStop, winstadll, 'WinStationShadowStop');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationShadowStop]
+  end;
+end;
+
+
+var
+  __WinStationShutDownSystem : Pointer;
+
+function WinStationShutDownSystem;
+begin
+  GetProcedureAddress(__WinStationShutDownSystem, winstadll, 'WinStationShutDownSystem');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationShutDownSystem]
+  end;
+end;
+
+var
+  __WinStationTerminateProcess: Pointer;
+
+function WinStationTerminateProcess;
+begin
+  GetProcedureAddress(__WinStationTerminateProcess, winstadll, 'WinStationTerminateProcess');
+  asm
+        MOV     ESP, EBP
+        POP     EBP
+        JMP     [__WinStationTerminateProcess]
+  end;
+end;
+{$ENDIF DYNAMIC_LINK}
+
+// This function is not exported
+function IsVista: boolean;
+var VersionInfo: TOSVersionInfoEx;
+begin
+  // Zero Memory and set structure size
+  ZeroMemory(@VersionInfo, SizeOf(VersionInfo));
+  VersionInfo.dwOSVersionInfoSize := SizeOf(VersionInfo);
+  GetVersionEx(@VersionInfo);
+
+  // Are we running Vista?
+  Result := (VersionInfo.dwMajorVersion = 6) and
+    (VersionInfo.dwMinorVersion = 0) and
+    (VersionInfo.wProductType = VER_NT_WORKSTATION);
+end;
+
+// This the way QWinsta checks if Terminal Services is active:
+function AreWeRunningTerminalServices: Boolean;
+var VersionInfo: TOSVersionInfoEx;
+  dwlConditionMask: Int64;
+begin
+  // Zero Memory and set structure size
+  ZeroMemory(@VersionInfo, SizeOf(VersionInfo));
+  VersionInfo.dwOSVersionInfoSize := SizeOf(VersionInfo);
+
+  // We are either Terminal Server or Personal Terminal Server
+  VersionInfo.wSuiteMask := VER_SUITE_TERMINAL or VER_SUITE_SINGLEUSERTS;
+  dwlConditionMask := VerSetConditionMask(0, VER_SUITENAME, VER_OR);
+
+  // Test it
+  Result := VerifyVersionInfo(VersionInfo, VER_SUITENAME, dwlConditionMask);
+end;
+
+// This functions converts CPU times as returned by
+// TSystemProcesses structure to a string
+function CpuTime2Str(ACPUTime: LARGE_INTEGER): String;
+var SystemTime: TSystemTime;
+{$IFDEF COMPILER7_UP}
+  FS: TFormatSettings;
+{$ENDIF COMPILER7_UP}
+begin
+  FileTimeToSystemTime(FILETIME(ACPUTime), SystemTime);
+{$IFDEF COMPILER7_UP}
+  GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FS);
+  Result := TimeToStr(SystemTimeToDateTime(SystemTime), FS);
+{$ELSE}
+  Result := TimeToStr(SystemTimeToDateTime(SystemTime));
+{$ENDIF COMPILER7_UP}
+end;
+
+function DateTimeStringSafe(DateTime: PFILETIME; lpBuffer: PWideChar;
+  cchDest: SIZE_T): PWideChar; stdcall;
+begin
+  // Zero Memory
+  ZeroMemory(lpBuffer, cchDest * SizeOf(WCHAR));
+
+ // Are we running Vista?
+  if IsVista then
+  begin
+    // Vista version
+    Result := DateTimeStringVista(DateTime, lpBuffer, cchDest);
+  end
+  else begin
+    // Other OS's (including server 2008!)
+    Result := DateTimeString(DateTime, lpBuffer);
+  end;
+end;
+
+// DiffTimeString is a helper function that returns a formatted
+// Elapsed time string (the way Idle Time is displayed in TSAdmin)
+// Return value is the string length
+function DiffTimeString(FTLow: FILETIME; FTHigh: FILETIME;
+  out pwElapsedTime: PWideChar): Integer;
+var
+  DiffSecs: INT64;
+  DiffTime: TDiffTime;
+  NumChars: DWORD;
+begin
+  // Get the Difftime where Time1 is the "oldest" time
+  // Return value is the difference in seconds
+  DiffSecs := CalculateDiffTime(Int64(FTLow), Int64(FTHigh));
+  // Recalc DiffTime to TDiffTime
+  ZeroMemory(@DiffTime, SizeOf(DiffTime));
+  // Calculate no of whole days
+  DiffTime.wDays := DiffSecs DIV SECONDS_PER_DAY;
+  // Calculate no of whole hours
+  DiffTime.wHours :=  DiffSecs MOD SECONDS_PER_DAY DIV SECONDS_PER_HOUR;
+  // Calculate no of whole minutes
+  DiffTime.wMinutes := DiffSecs MOD SECONDS_PER_DAY MOD SECONDS_PER_HOUR
+    DIV SECONDS_PER_MINUTE; // Result = No of whole minutes
+  // Calculate no of whole seconds
+  DiffTime.wSeconds := DiffSecs MOD SECONDS_PER_DAY MOD SECONDS_PER_HOUR
+    MOD SECONDS_PER_MINUTE; // Result = No of seconds
+  // Note that Milliseconds are not used and therefore not calculated
+
+  // Reserve Memory
+  GetMem(pwElapsedTime, ELAPSED_TIME_STRING_LENGTH * SizeOf(WCHAR));
+  // Format Elapsed TimeString in minutes (bShowSeconds = False)
+  NumChars := ElapsedTimeStringSafe(@DiffTime, False, pwElapsedTime,
+    ELAPSED_TIME_STRING_LENGTH);
+  Result := NumChars;
+  // Caller has to free memory when done
+end;
+
+function ElapsedTimeStringSafe(DiffTime: PDiffTime; bShowSeconds: Boolean;
+  lpElapsedTime: PWideChar; cchDest: SIZE_T): Integer;
+var
+  hr: HRESULT;
+begin
+  // Zero Memory
+  ZeroMemory(lpElapsedTime, cchDest * SizeOf(WCHAR));
+
+ // Are we running Vista?
+  if IsVista then
+  begin
+    hr := ElapsedTimeStringEx(DiffTime, bShowSeconds, lpElapsedTime,
+      cchDest);
+    if Succeeded(hr) then
+    begin
+      Result := cchDest;
+    end
+    else begin
+      Result := 0;
+    end;
+   
+  end
+  else begin
+    Result := ElapsedTimeString(DiffTime, bShowSeconds, lpElapsedTime);
+  end;
+  // Caller has to free memory when done
+end;
+
+function FileTime2DateTime(FileTime: TFileTime): TDateTime;
+var LocalFileTime: TFileTime;
+  SystemTime: TSystemTime;
+begin
+  FileTimeToLocalFileTime(FileTime, LocalFileTime);
+  FileTimeToSystemTime(LocalFileTime, SystemTime);
+  Result := SystemTimeToDateTime(SystemTime);
+end;
+
+function GetWTSLogonIdleTime(hServer: HANDLE; SessionId: DWORD;
+  var sLogonTime: string; var sIdleTime: string): Boolean;
+var
+  uReturnLength: DWORD;
+  Info: _WINSTATION_INFORMATIONW;
+  CurrentTime: TDateTime;
+  LastInputTime: TDateTime;
+  IdleTime: TDateTime;
+  LogonTime: TDateTime;
+  Days, Hours, Minutes: Word;
+  {$IFDEF COMPILER7_UP}
+  FS: TFormatSettings;
+  {$ENDIF COMPILER7_UP}
+begin
+  {$IFDEF COMPILER7_UP}
+  GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FS);
+  {$ENDIF COMPILER7_UP}
+  uReturnLength := 0;
+  try
+    Result := WinStationQueryInformationW(hServer, SessionId, 8, @Info, SizeOf(Info), uReturnLength);
+    if Result then
+    begin
+      LogonTime := FileTime2DateTime(Info.LogonTime);
+      if YearOf(LogonTime) = 1601 then
+        sLogonTime := ''
+      else
+        {$IFDEF COMPILER7_UP}
+        sLogonTime := DateTimeToStr(LogonTime, FS);
+        {$ELSE}
+        sLogonTime := DateTimeToStr(LogonTime);
+        {$ENDIF COMPILER7_UP}
+      { from Usenet post by Chuck Chopp
+        http://groups.google.com/group/microsoft.public.win32.programmer.kernel/browse_thread/thread/c6dd86e7df6d26e4/3cf53e12a3246e25?lnk=st&q=WinStationQueryInformationa+group:microsoft.public.*&rnum=1&hl=en#3cf53e12a3246e25
+        2)  The system console session cannot go into an idle/disconnected state.
+            As such, the LastInputTime value will always math CurrentTime for the
+            console session.
+        3)  The LastInputTime value will be zero if the session has gone
+            disconnected.  In that case, use the DisconnectTime value in place of
+            LastInputTime when calculating the current idle time for a disconnected session.
+        4)  All of these time values are GMT time values.
+        5)  The disconnect time value will be zero if the sesson has never been
+            disconnected.}
+      CurrentTime := FileTime2DateTime(Info.CurrentTime);
+      LastInputTime := FileTime2DateTime(Info.LastInputTime);
+
+      // Disconnected session = idle since DisconnectTime
+      if YearOf(LastInputTime) = 1601 then
+        LastInputTime := FileTime2DateTime(Info.DisconnectTime);
+
+      IdleTime := LastInputTime - CurrentTime;
+      Days := Trunc(IdleTime);
+      Hours := HourOf(IdleTime);
+      Minutes := MinuteOf(IdleTime);
+      if Days > 0 then
+        sIdleTime := Format('%dd %d:%1.2d', [Days, Hours, Minutes])
+      else
+      if Hours > 0 then
+        sIdleTime := Format('%d:%1.2d', [Hours, Minutes])
+      else
+      if Minutes > 0 then
+        sIdleTime := IntToStr(Minutes)
+      else
+        sIdleTime := '-';
+    end;
+  except
+    Result := False;
+  end;
+end;
+
+procedure InitTermSrvCounterArray(var ATermSrvCounterArray: TTermSrvCounterArray);
+begin
+  ATermSrvCounterArray[1].dwIndex := TOTAL_SESSIONS_CREATED_COUNTER;
+  ATermSrvCounterArray[2].dwIndex := TOTAL_SESSIONS_DISCONNECTED_COUNTER;
+  ATermSrvCounterArray[3].dwIndex := TOTAL_SESSIONS_RECONNECTED_COUNTER;
+  ATermSrvCounterArray[4].dwIndex := TOTAL_SESSIONS_TOTAL_CONNECTED_NOW_COUNTER;
+  ATermSrvCounterArray[5].dwIndex := TOTAL_SESSIONS_TOTAL_DISCONNECTED_NOW_COUNTER;
+  ATermSrvCounterArray[6].dwIndex := TOTAL_SESSIONS_TOTAL_CONNECTED_NOW_COUNTER_2;
+  ATermSrvCounterArray[7].dwIndex := TOTAL_SESSIONS_TOTAL_DISCONNECTED_NOW_COUNTER_2;
+end;
+
+// This is the way WTSApi32.dll checks if Terminal Service is running
+function IsTerminalServiceRunning: boolean;
+var hSCM: HANDLE;
+  hService: HANDLE;
+  ServiceStatus: SERVICE_STATUS;
+begin
+  Result := False;
+  // Open handle to Service Control Manager
+  hSCM := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, GENERIC_READ);
+  if hSCM > 0 then
+  begin
+    // Open handle to Terminal Server Service
+    hService := OpenService(hSCM, 'TermService', GENERIC_READ);
+    if hService > 0 then
+    begin
+      // Check if the service is running
+      QueryServiceStatus(hService, ServiceStatus);
+      Result := ServiceStatus.dwCurrentState = SERVICE_RUNNING;
+      // Close the handle
+      CloseServiceHandle(hService);
+    end;
+    // Close the handle
+    CloseServiceHandle(hSCM);
+  end;
+end;
+
+function QueryCurrentWinStationSafe(pWinStationName: LPWSTR;
+  pUserName: PWideChar; cchDest: DWORD; var SessionId: DWORD;
+  var WdFlag: DWORD): Boolean;
+begin
+  // Zero Memory
+  ZeroMemory(pWinStationName, 66);
+  ZeroMemory(pUserName, cchDest * SizeOf(WCHAR));
+
+  // Are we running Vista?
+  if IsVista then
+  begin
+    Result := QueryCurrentWinStationEx(pWinStationName, pUserName, cchDest,
+      SessionId, WdFlag);
+  end
+  else begin
+    Result := QueryCurrentWinStation(pWinStationName, pUserName, SessionId,
+      WdFlag);
+  end;
+
+end;
+
+function WinStationGetRemoteIPAddress(hServer: HANDLE; SessionId: DWORD;
+  var RemoteIPAddress: string; var Port: WORD): Boolean;
+var WinStationRemoteIPAddress: TWinStationRemoteAddress;
+  pReturnLength: DWORD;
+begin
+  // Zero Memory
+  ZeroMemory(@WinStationRemoteIPAddress, SizeOf(WinStationRemoteIPAddress));
+  // Query Remote Address
+  Result := WinStationQueryInformationW(hServer, SessionId,
+    WinStationRemoteAddress, @WinStationRemoteIPAddress,
+    SizeOf(WinStationRemoteIPAddress), pReturnLength);
+  if Result then
+  begin
+    // If the AddressFamily is IPv4
+    if WinStationRemoteIPAddress.AddressFamily = AF_INET then
+    begin
+      // The ntohs function converts a u_short from TCP/IP network byte order
+      // to host byte order (which is little-endian on Intel processors).
+      Port := ntohs(WinStationRemoteIPAddress.Port);
+      with WinStationRemoteIPAddress do
+      begin
+        // format the IP Address as string
+        RemoteIPAddress := Format('%d.%d.%d.%d', [Address[2], Address[3],
+          Address[4], Address[5]]);
+        // If you want to convert the to a sockaddr structure you could
+        // user WSAStringToAddress
+      end;
+    end
+    else begin
+      Result := False;
+      Port := 0;
+      RemoteIPAddress := '';
+      // SetLastError to give the user a clue as to why we failed..
+      //  An address incompatible with the requested protocol was used.
+      // (An address incompatible with the requested protocol was used.)
+      SetLastError(WSAEAFNOSUPPORT);
+    end;
+  end;
+end;
+
+function WinStationQueryUserToken(hServer: HANDLE; SessionId: DWORD;
+  var hToken: HANDLE): BOOL;
+var WinstaUserToken: _WINSTA_USER_TOKEN;
+  dwReturnLength: DWORD;
+  LUID: _LUID;
+  bWasPrivEnabled: Boolean;
+  Res: NTSTATUS;
+begin
+  // Enable SeTcbPrivilege (system account has this enabled by default)
+  LookupPrivilegeValue(nil, SE_TCB_NAME, LUID);
+  Res := RtlAdjustPrivilege(LUID.LowPart, True, False, @bWasPrivEnabled);
+
+  // Initialize structure
+  WinstaUserToken.ProcessId :=  GetCurrentProcessId;  // Current Process Id
+  WinstaUserToken.ThreadId := GetCurrentThreadId; // Current Thread Id
+  WinstaUserToken.TokenHandle := 0;
+
+  if Res = STATUS_SUCCESS then
+  begin
+    // Query for the token, we are only allowed to do this if we are the
+    // System account (else ACCESS_DENIED is returned)
+    Result := WinStationQueryInformationW(hServer, SessionId, WinStationToken,
+      @WinstaUserToken, SizeOf(WinstaUserToken), dwReturnLength);
+    hToken := WinStaUserToken.TokenHandle;
+
+    // Restore state of SeTcbPrivilege
+    RtlAdjustPrivilege(LUID.LowPart, bWasPrivEnabled, False, @bWasPrivEnabled);
+  end
+  else begin
+    Result := False;
+    // Convert NTStatus to WinError and SetLastError
+    SetLastError(RtlNtStatusToDosError(Res));
+  end;
+
+end;
+
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

File diff suppressed because it is too large
+ 1 - 1
packages/base/winunits/Makefile


+ 1 - 1
packages/base/winunits/Makefile.fpc

@@ -46,7 +46,7 @@ implicitunits=flatsb winver mmsystem comobj comconst commctrl ole2 activex shell
  jwawpwizmsg jwaws2atm jwaws2bth jwaws2dnet jwaws2spi jwaws2tcpip \
  jwawpwizmsg jwaws2atm jwaws2bth jwaws2dnet jwaws2spi jwaws2tcpip \
  jwawshisotp jwawsnetbs jwawsnwlink jwawtsapi32 jwazmouse jwasensevts \
  jwawshisotp jwawsnetbs jwawsnwlink jwawtsapi32 jwazmouse jwasensevts \
  jwaadstlb jwanative shfolder richedit jwawindows jwacarderr jwaactivex \
  jwaadstlb jwanative shfolder richedit jwawindows jwacarderr jwaactivex \
- jwawindllnames jwawinternl
+ jwawindllnames jwawinternl jwawinsta jwavista
 
 
 
 
 examples=examples
 examples=examples

+ 489 - 0
packages/base/winunits/ModuleLoader.pas

@@ -0,0 +1,489 @@
+{******************************************************************}
+{                                                                  }
+{       Project JEDI                                               }
+{       OS independent Dynamic Loading Helpers                     }
+{                                                                  }
+{ The initial developer of the this code is                        }
+{ Robert Marquardt <robert_marquardt att gmx dott de)              }
+{                                                                  }
+{ Copyright (C) 2000, 2001 Robert Marquardt.                       }
+{                                                                  }
+{ Obtained through:                                                }
+{ Joint Endeavour of Delphi Innovators (Project JEDI)              }
+{                                                                  }
+{ You may retrieve the latest version of this file at the Project  }
+{ JEDI home page, located at http://delphi-jedi.org                }
+{                                                                  }
+{ The contents of this file are used with permission, subject to   }
+{ the Mozilla Public License Version 1.1 (the "License"); you may  }
+{ not use this file except in compliance with the License. You may }
+{ obtain a copy of the License at                                  }
+{ http://www.mozilla.org/NPL/NPL-1_1Final.html                     }
+{                                                                  }
+{ Software distributed under the License is distributed on an      }
+{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
+{ implied. See the License for the specific language governing     }
+{ rights and limitations under the License.                        }
+{                                                                  }
+{******************************************************************}
+{$IFNDEF JWA_OMIT_SECTIONS}
+unit ModuleLoader;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{.$I jvcl.inc}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+{$WEAKPACKAGEUNIT ON}
+
+interface
+
+{$IFDEF MSWINDOWS}
+
+uses
+  Windows;
+{$ENDIF MSWINDOWS}
+{$IFDEF UNIX}
+
+uses
+  Types, Libc;
+{$ENDIF UNIX}
+
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
+{$IFDEF MSWINDOWS}
+type
+  // Handle to a loaded DLL
+  TModuleHandle = HINST;
+{$ENDIF MSWINDOWS}
+{$IFDEF UNIX} 
+type
+  // Handle to a loaded .so
+  TModuleHandle = Pointer;
+
+{$ENDIF UNIX}
+
+
+
+
+const
+  // Value designating an unassigned TModuleHandle or a failed loading
+  INVALID_MODULEHANDLE_VALUE = TModuleHandle(0);
+
+
+{$IFNDEF JWA_INCLUDEMODE}
+function LoadModule(var Module: TModuleHandle; FileName: string): Boolean;
+{$ELSE}
+function ModuleLoader_LoadModule(var Module: TModuleHandle; FileName: string): Boolean;
+{$ENDIF JWA_INCLUDEMODE}
+
+function LoadModuleEx(var Module: TModuleHandle; FileName: string; Flags: Cardinal): Boolean;
+procedure UnloadModule(var Module: TModuleHandle);
+function GetModuleSymbol(Module: TModuleHandle; SymbolName: string): Pointer;
+function GetModuleSymbolEx(Module: TModuleHandle; SymbolName: string; var Accu: Boolean): Pointer;
+function ReadModuleData(Module: TModuleHandle; SymbolName: string; var Buffer; Size: Cardinal): Boolean;
+function WriteModuleData(Module: TModuleHandle; SymbolName: string; var Buffer; Size: Cardinal): Boolean;
+
+// (p3)
+// Simple DLL loading class. The idea is to use it to dynamically load
+// a DLL at run-time using the GetProcedure method. Another (better) use is to derive a
+// new class for each DLL you are interested in and explicitly call GetProcedure for
+// each function in an overriden Load method. You would then add procedure/function
+// aliases to the new class that maps down to the internally managed function pointers.
+// This class is built from an idea I read about in Delphi Magazine a while ago but
+// I forget who was the originator. If you know, let me know and I'll put it in the credits
+
+// NB!!!
+// * Prepared for Kylix but not tested
+// * Is GetLastError implemented on Kylix? RaiseLastOSError implies it is...
+
+type
+  TModuleLoadMethod = (ltDontResolveDllReferences, ltLoadAsDataFile, ltAlteredSearchPath);
+  TModuleLoadMethods = set of TModuleLoadMethod;
+
+  TModuleLoader = class(TObject)
+  private
+    FHandle: TModuleHandle;
+    FDLLName: string;
+    function GetLoaded: Boolean;
+  protected
+    procedure Load(LoadMethods: TModuleLoadMethods); virtual;
+    procedure Unload; virtual;
+    procedure Error(ErrorCode: Cardinal); virtual;
+  public
+    // Check whether a DLL (and optionally a function) is available on the system
+    // To only check the DLL, leave ProcName empty
+    class function IsAvaliable(const ADLLName: string; const AProcName: string = ''): Boolean;
+    constructor Create(const ADLLName: string; LoadMethods: TModuleLoadMethods = []);
+    destructor Destroy; override;
+    // Get a pointer to a function in the DLL. Should be called as GetProcedure('Name',@FuncPointer);
+    // Returns True if the function was found. Note that a call to GetProcAddress is only executed if AProc = nil
+    function GetProcedure(const AName: string; var AProc: Pointer): Boolean;
+    // Returns a symbol exported from the DLL and puts it in Buffer.
+    // Make sure AName is actually a symbol and not a function or this will crash horribly!
+    function GetExportedSymbol(const AName: string; var Buffer; Size: Integer): Boolean;
+    // Changes a symbol exported from the DLL into the value in Buffer.
+    // The change is not persistent (it will get lost when the DLL is unloaded)
+    // Make sure AName is actually a symbol and not a function or this will crash horribly!
+    function SetExportedSymbol(const AName: string; var Buffer; Size: Integer): Boolean;
+
+    property Loaded: Boolean read GetLoaded;
+    property DLLName: string read FDLLName;
+    property Handle: TModuleHandle read FHandle;
+  end;
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFDEF MSWINDOWS}
+
+// load the DLL file FileName
+// the rules for FileName are those of LoadLibrary
+// Returns: True = success, False = failure to load
+// Assigns: the handle of the loaded DLL to Module
+// Warning: if Module has any other value than INVALID_MODULEHANDLE_VALUE
+// on entry the function will do nothing but returning success.
+
+{$IFNDEF JWA_INCLUDEMODE}
+function LoadModule(var Module: TModuleHandle; FileName: string): Boolean;
+{$ELSE}
+function ModuleLoader_LoadModule(var Module: TModuleHandle; FileName: string): Boolean;
+{$ENDIF JWA_INCLUDEMODE}
+begin
+  if Module = INVALID_MODULEHANDLE_VALUE then
+    Module := LoadLibraryA(PChar(FileName));
+  Result := Module <> INVALID_MODULEHANDLE_VALUE;
+end;
+
+// load the DLL file FileName
+// LoadLibraryEx is used to get better control of the loading
+// for the allowed values for flags see LoadLibraryEx documentation.
+
+function LoadModuleEx(var Module: TModuleHandle; FileName: string; Flags: Cardinal): Boolean;
+begin
+  if Module = INVALID_MODULEHANDLE_VALUE then
+    Module := LoadLibraryExA(PChar(FileName), 0, Flags);
+  Result := Module <> INVALID_MODULEHANDLE_VALUE;
+end;
+
+// unload a DLL loaded with LoadModule or LoadModuleEx
+// The procedure will not try to unload a handle with
+// value INVALID_MODULEHANDLE_VALUE and assigns this value
+// to Module after unload.
+
+procedure UnloadModule(var Module: TModuleHandle);
+begin
+  if Module <> INVALID_MODULEHANDLE_VALUE then
+    FreeLibrary(Module);
+  Module := INVALID_MODULEHANDLE_VALUE;
+end;
+
+// returns the pointer to the symbol named SymbolName
+// if it is exported from the DLL Module
+// nil is returned if the symbol is not available
+
+function GetModuleSymbol(Module: TModuleHandle; SymbolName: string): Pointer;
+begin
+  Result := nil;
+  if Module <> INVALID_MODULEHANDLE_VALUE then
+    Result := GetProcAddress(Module, PChar(SymbolName));
+end;
+
+// returns the pointer to the symbol named SymbolName
+// if it is exported from the DLL Module
+// nil is returned if the symbol is not available.
+// as an extra the Boolean variable Accu is updated
+// by anding in the success of the function.
+// This is very handy for rendering a global result
+// when accessing a long list of symbols.
+
+function GetModuleSymbolEx(Module: TModuleHandle; SymbolName: string; var Accu: Boolean): Pointer;
+begin
+  Result := nil;
+  if Module <> INVALID_MODULEHANDLE_VALUE then
+    Result := GetProcAddress(Module, PChar(SymbolName));
+  Accu := Accu and (Result <> nil);
+end;
+
+// get the value of variables exported from a DLL Module
+// Delphi cannot access variables in a DLL directly, so
+// this function allows to copy the data from the DLL.
+// Beware! You are accessing the DLL memory image directly.
+// Be sure to access a variable not a function and be sure
+// to read the correct amount of data.
+
+function ReadModuleData(Module: TModuleHandle; SymbolName: string; var Buffer; Size: Cardinal): Boolean;
+var
+  Sym: Pointer;
+begin
+  Result := True;
+  Sym := GetModuleSymbolEx(Module, SymbolName, Result);
+  if Result then
+    Move(Sym^, Buffer, Size);
+end;
+
+// set the value of variables exported from a DLL Module
+// Delphi cannot access variables in a DLL directly, so
+// this function allows to copy the data to the DLL!
+// BEWARE! You are accessing the DLL memory image directly.
+// Be sure to access a variable not a function and be sure
+// to write the correct amount of data.
+// The changes are not persistent. They get lost when the
+// DLL is unloaded.
+
+function WriteModuleData(Module: TModuleHandle; SymbolName: string; var Buffer; Size: Cardinal): Boolean;
+var
+  Sym: Pointer;
+begin
+  Result := True;
+  Sym := GetModuleSymbolEx(Module, SymbolName, Result);
+  if Result then
+    Move(Buffer, Sym^, Size);
+end;
+
+{$ENDIF MSWINDOWS}
+
+{$IFDEF UNIX}
+
+const
+  TYPE_E_ELEMENTNOTFOUND = $8002802B;
+
+// load the .so file FileName
+// the rules for FileName are those of dlopen()
+// Returns: True = success, False = failure to load
+// Assigns: the handle of the loaded .so to Module
+// Warning: if Module has any other value than INVALID_MODULEHANDLE_VALUE
+// on entry the function will do nothing but returning success.
+
+{$IFNDEF JWA_INCLUDEMODE}
+function LoadModule(var Module: TModuleHandle; FileName: string): Boolean;
+{$ELSE}
+function ModuleLoader_LoadModule(var Module: TModuleHandle; FileName: string): Boolean;
+{$ENDIF JWA_INCLUDEMODE}
+begin
+  if Module = INVALID_MODULEHANDLE_VALUE then
+    Module := dlopen(PChar(FileName), RTLD_NOW);
+  Result := Module <> INVALID_MODULEHANDLE_VALUE;
+end;
+
+// load the .so file FileName
+// dlopen() with flags is used to get better control of the loading
+// for the allowed values for flags see "man dlopen".
+
+function LoadModuleEx(var Module: TModuleHandle; FileName: string; Flags: Cardinal): Boolean;
+begin
+  if Module = INVALID_MODULEHANDLE_VALUE then
+    Module := dlopen(PChar(FileName), Flags);
+  Result := Module <> INVALID_MODULEHANDLE_VALUE;
+end;
+
+// unload a .so loaded with LoadModule or LoadModuleEx
+// The procedure will not try to unload a handle with
+// value INVALID_MODULEHANDLE_VALUE and assigns this value
+// to Module after unload.
+
+procedure UnloadModule(var Module: TModuleHandle);
+begin
+  if Module <> INVALID_MODULEHANDLE_VALUE then
+    dlclose(Module);
+  Module := INVALID_MODULEHANDLE_VALUE;
+end;
+
+// returns the pointer to the symbol named SymbolName
+// if it is exported from the .so Module
+// nil is returned if the symbol is not available
+
+function GetModuleSymbol(Module: TModuleHandle; SymbolName: string): Pointer;
+begin
+  Result := nil;
+  if Module <> INVALID_MODULEHANDLE_VALUE then
+    Result := dlsym(Module, PChar(SymbolName));
+end;
+
+// returns the pointer to the symbol named SymbolName
+// if it is exported from the .so Module
+// nil is returned if the symbol is not available.
+// as an extra the Boolean variable Accu is updated
+// by anding in the success of the function.
+// This is very handy for rendering a global result
+// when accessing a long list of symbols.
+
+function GetModuleSymbolEx(Module: TModuleHandle; SymbolName: string; var Accu: Boolean): Pointer;
+begin
+  Result := nil;
+  if Module <> INVALID_MODULEHANDLE_VALUE then
+    Result := dlsym(Module, PChar(SymbolName));
+  Accu := Accu and (Result <> nil);
+end;
+
+// get the value of variables exported from a .so Module
+// Delphi cannot access variables in a .so directly, so
+// this function allows to copy the data from the .so.
+// Beware! You are accessing the .so memory image directly.
+// Be sure to access a variable not a function and be sure
+// to read the correct amount of data.
+
+function ReadModuleData(Module: TModuleHandle; SymbolName: string; var Buffer; Size: Cardinal): Boolean;
+var
+  Sym: Pointer;
+begin
+  Result := True;
+  Sym := GetModuleSymbolEx(Module, SymbolName, Result);
+  if Result then
+    Move(Sym^, Buffer, Size);
+end;
+
+// set the value of variables exported from a .so Module
+// Delphi cannot access variables in a .so directly, so
+// this function allows to copy the data to the .so!
+// BEWARE! You are accessing the .so memory image directly.
+// Be sure to access a variable not a function and be sure
+// to write the correct amount of data.
+// The changes are not persistent. They get lost when the
+// .so is unloaded.
+
+function WriteModuleData(Module: TModuleHandle; SymbolName: string; var Buffer; Size: Cardinal): Boolean;
+var
+  Sym: Pointer;
+begin
+  Result := True;
+  Sym := GetModuleSymbolEx(Module, SymbolName, Result);
+  if Result then
+    Move(Buffer, Sym^, Size);
+end;
+
+{$ENDIF UNIX}
+
+//=== { TModuleLoader } ======================================================
+
+constructor TModuleLoader.Create(const ADLLName: string; LoadMethods: TModuleLoadMethods = []);
+begin
+  inherited Create;
+  FHandle := INVALID_MODULEHANDLE_VALUE;
+  FDLLName := ADLLName;
+  Load(LoadMethods);
+end;
+
+destructor TModuleLoader.Destroy;
+begin
+  Unload;
+  inherited Destroy;
+end;
+
+procedure TModuleLoader.Error(ErrorCode: Cardinal);
+begin
+  // overriden classes should handle this
+end;
+
+function TModuleLoader.GetExportedSymbol(const AName: string; var Buffer;
+  Size: Integer): Boolean;
+var
+  ASymbol: Pointer;
+begin
+  Result := GetProcedure(AName, ASymbol);
+  if Result then
+    Move(ASymbol^, Buffer, Size);
+end;
+
+function TModuleLoader.GetLoaded: Boolean;
+begin
+  Result := Handle <> INVALID_MODULEHANDLE_VALUE;
+end;
+
+function TModuleLoader.GetProcedure(const AName: string; var AProc: Pointer): Boolean;
+begin
+  Result := Loaded;
+  if Result and not Assigned(AProc) then
+  begin
+    AProc := GetModuleSymbol(Handle, AName);
+    Result := Assigned(AProc);
+  end;
+  if not Result then
+  begin
+    AProc := nil;
+    Error(DWORD(TYPE_E_ELEMENTNOTFOUND));
+  end;
+end;
+
+class function TModuleLoader.IsAvaliable(const ADLLName: string; const AProcName: string = ''): Boolean;
+var
+  Module: TModuleHandle;
+  P: Pointer;
+begin
+{$IFNDEF JWA_INCLUDEMODE}
+  Result := LoadModule(Module, ADLLName);
+{$ELSE}
+  Result := ModuleLoader_LoadModule(Module, ADLLName);
+{$ENDIF JWA_INCLUDEMODE}
+
+  if Result then
+  begin
+    if AProcName <> '' then
+    begin
+      P := GetModuleSymbol(Module, AProcName);
+      Result := Assigned(P);
+    end;
+    UnloadModule(Module);
+  end;
+end;
+
+procedure TModuleLoader.Load(LoadMethods: TModuleLoadMethods);
+const
+  cLoadMethods: array [TModuleLoadMethod] of DWORD =
+    {$IFDEF MSWINDOWS}
+    (DONT_RESOLVE_DLL_REFERENCES, LOAD_LIBRARY_AS_DATAFILE, LOAD_WITH_ALTERED_SEARCH_PATH);
+    {$ENDIF MSWINDOWS}
+    {$IFDEF UNIX}
+    (RTLD_LAZY, RTLD_LAZY, RTLD_LAZY); // there is not really a equivalent under Linux
+    {$ENDIF UNIX}
+var
+  Flags: DWORD;
+  I: TModuleLoadMethod;
+begin
+  Flags := 0;
+  for I := Low(TModuleLoadMethod) to High(TModuleLoadMethod) do
+    if I in LoadMethods then
+      Flags := Flags or cLoadMethods[I];
+  if FHandle = INVALID_MODULEHANDLE_VALUE then
+    LoadModuleEx(FHandle, DLLName, Flags);
+  if FHandle = INVALID_MODULEHANDLE_VALUE then
+    Error(GetLastError);
+end;
+
+function TModuleLoader.SetExportedSymbol(const AName: string; var Buffer;
+  Size: Integer): Boolean;
+var
+  ASymbol: Pointer;
+begin
+  Result := GetProcedure(AName, ASymbol);
+  if Result then
+    Move(Buffer, ASymbol^, Size);
+end;
+
+procedure TModuleLoader.Unload;
+begin
+  if FHandle <> INVALID_MODULEHANDLE_VALUE then
+    UnloadModule(FHandle);
+  FHandle := INVALID_MODULEHANDLE_VALUE;
+end;
+
+{$ENDIF JWA_INTERFACESECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

+ 1 - 1
packages/base/winunits/buildjwa.pp

@@ -58,7 +58,7 @@ uses
     jwawpcrsmsg, jwawpftpmsg, jwawppstmsg, jwawpspihlp, jwawptypes,
     jwawpcrsmsg, jwawpftpmsg, jwawppstmsg, jwawpspihlp, jwawptypes,
     jwawpwizmsg, jwaws2atm, jwaws2bth, jwaws2dnet, jwaws2spi, jwaws2tcpip,
     jwawpwizmsg, jwaws2atm, jwaws2bth, jwaws2dnet, jwaws2spi, jwaws2tcpip,
     jwawshisotp, jwawsnetbs, jwawsnwlink, jwawtsapi32, jwazmouse, jwasensevts,
     jwawshisotp, jwawsnetbs, jwawsnwlink, jwawtsapi32, jwazmouse, jwasensevts,
-    jwaadstlb, jwanative, jwawindows, jwacarderr;
+    jwaadstlb, jwanative, jwawindows, jwacarderr,jwawinsta, jwavista;
 
 
 implementation
 implementation
 
 

File diff suppressed because it is too large
+ 413 - 431
packages/base/winunits/jedi.inc


+ 74 - 5
packages/base/winunits/jediapilib.inc

@@ -48,11 +48,14 @@ ALERT_jedi_inc_incompatible
 // secure against old versions of jedi.inc.
 // secure against old versions of jedi.inc.
 {$ENDIF !JEDI_INC}
 {$ENDIF !JEDI_INC}
 
 
-// activate standalone feature for files
-{$IFNDEF JWA_INCLUDEMODE}
-{$DEFINE JWA_INTERFACESECTION}
-{$DEFINE JWA_IMPLEMENTATIONSECTION}
-{$ENDIF !JWA_INCLUDEMODE}
+{WARNING:
+Do not change state of
+JWA_INCLUDEMODE
+JWA_INTERFACESECTION
+JWA_IMPLEMENTATIONSECTION
+Its only set in JwaWindows.pas.
+Standalone compiling would be useless!
+}
 
 
 // Global switch to enable dynamic linking of some APIs
 // Global switch to enable dynamic linking of some APIs
 {.DEFINE DYNAMIC_LINK}
 {.DEFINE DYNAMIC_LINK}
@@ -69,6 +72,24 @@ ALERT_jedi_inc_incompatible
 // directly through the use of Windows.pas instead of JwaWinType.pas.
 // directly through the use of Windows.pas instead of JwaWinType.pas.
 {$DEFINE USE_DELPHI_TYPES}
 {$DEFINE USE_DELPHI_TYPES}
 
 
+
+// This global switch activates the using of long function variables
+// for dynamic linking
+// in old Delphi versions long var names are shorten and no more recognized.
+{$UNDEF SUPPORT_LONG_VARNAMES}
+{$IFDEF DELPHI6_UP}
+  {$DEFINE SUPPORT_LONG_VARNAMES}
+{$ENDIF DELPHI6_UP}
+
+{$IFDEF FPC}
+  {$DEFINE SUPPORT_LONG_VARNAMES}
+{$ENDIF FPC}
+
+//activate 64bit tweaks for some functions
+//jwaWinBase::InterlockedCompareExchangePointer
+//jwaWinBase::InterlockedExchangePointer
+{$DEFINE CPU64BIT}
+
 // Global switch for the Windows version the files are compatible with
 // Global switch for the Windows version the files are compatible with
 // ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
 // ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
 // Default is WINXP
 // Default is WINXP
@@ -80,6 +101,13 @@ ALERT_jedi_inc_incompatible
 {.DEFINE WIN2000}
 {.DEFINE WIN2000}
 {$DEFINE WINXP}
 {$DEFINE WINXP}
 {.DEFINE WIN2003}
 {.DEFINE WIN2003}
+{.DEFINE WINVISTA}
+{.$DEFINE WIN2008}
+
+{.DEFINE SERVICEPACK_1}
+{.DEFINE SERVICEPACK_2}
+{.DEFINE SERVICEPACK_3}
+{.DEFINE SERVICEPACK_4}
 
 
 // Global switch for the Windows Internet Explorer versions
 // Global switch for the Windows Internet Explorer versions
 // ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
 // ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
@@ -106,6 +134,32 @@ ALERT_jedi_inc_incompatible
 {$DEFINE HTMLHELP12}
 {$DEFINE HTMLHELP12}
 
 
 // secondary IFDEFs for "_UP" which means also any later OS version
 // secondary IFDEFs for "_UP" which means also any later OS version
+
+{$IFDEF WIN2008}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+ {$DEFINE WINNT4_UP}
+ {$DEFINE WIN2000_UP}
+ {$DEFINE WINXP_UP}
+ {$DEFINE WIN2003_UP}
+ {$DEFINE WINVISTA_UP}
+ {$DEFINE WIN2008_UP}
+{$ENDIF WIN2008}
+
+{$IFDEF WINVISTA}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+ {$DEFINE WINNT4_UP}
+ {$DEFINE WIN2000_UP}
+ {$DEFINE WINXP_UP}
+ {$DEFINE WIN2003_UP}
+ {$DEFINE WINVISTA_UP}
+{$ENDIF WINVISTA}
+
 {$IFDEF WIN2003}
 {$IFDEF WIN2003}
  {$DEFINE WIN95_UP}
  {$DEFINE WIN95_UP}
  {$DEFINE WIN98_UP}
  {$DEFINE WIN98_UP}
@@ -166,6 +220,21 @@ ALERT_jedi_inc_incompatible
  {$DEFINE WIN95_UP}
  {$DEFINE WIN95_UP}
 {$ENDIF WIN95}
 {$ENDIF WIN95}
 
 
+{$IFDEF SERVICEPACK_2}
+ {$DEFINE SERVICEPACK_1_UP}
+{$ENDIF SERVICEPACK_2}
+
+{$IFDEF SERVICEPACK_3}
+ {$DEFINE SERVICEPACK_1_UP}
+ {$DEFINE SERVICEPACK_2_UP}
+{$ENDIF SERVICEPACK_3}
+
+{$IFDEF SERVICEPACK_4}
+ {$DEFINE SERVICEPACK_1_UP}
+ {$DEFINE SERVICEPACK_2_UP}
+ {$DEFINE SERVICEPACK_3_UP}
+{$ENDIF SERVICEPACK_4}
+
 
 
 // secondary IFDEFs for "_UP" which means also any later IE version
 // secondary IFDEFs for "_UP" which means also any later IE version
 {$IFDEF IE600}
 {$IFDEF IE600}

+ 29 - 6
packages/base/winunits/jwaObjsel.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaObjSel.pas,v 1.6 2005/09/03 13:12:10 marquardt Exp $
-
+// $Id: JwaObjSel.pas,v 1.8 2007/09/05 11:58:51 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaObjSel;
 unit JwaObjSel;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ObjSel.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaActiveX, JwaWindows;
+  JwaActiveX, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ObjSel.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //  Contents:   Object Picker Dialog public header
 //  Contents:   Object Picker Dialog public header
 
 
@@ -670,6 +675,24 @@ type
   end;
   end;
   {$EXTERNALSYM IDsObjectPicker}
   {$EXTERNALSYM IDsObjectPicker}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 29 - 8
packages/base/winunits/jwaaccctrl.pas

@@ -36,18 +36,13 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAccCtrl.pas,v 1.7 2005/09/03 14:27:47 marquardt Exp $
-
+// $Id: JwaAccCtrl.pas,v 1.9 2007/09/05 11:58:48 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAccCtrl;
 unit JwaAccCtrl;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
-{$I jediapilib.inc}
-
-interface
-
-uses
-  JwaWindows;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "aclapi.h"'}
 {$HPPEMIT '#include "aclapi.h"'}
@@ -61,6 +56,17 @@ uses
 {$HPPEMIT '#endif'}
 {$HPPEMIT '#endif'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
+{$I jediapilib.inc}
+
+interface
+
+uses
+  JwaWinNT, JwaWinType;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 (* Dependencies
 (* Dependencies
 // winnt
 // winnt
 PSID
 PSID
@@ -1214,7 +1220,18 @@ type
   PInheritedFrom = PInheritedFromA;
   PInheritedFrom = PInheritedFromA;
   {$ENDIF UNICODE}
   {$ENDIF UNICODE}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+uses
+  JwaWinBase;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 // (rom) MACRO implementation
 // (rom) MACRO implementation
 function AccFree(hMem: HLOCAL): HLOCAL;
 function AccFree(hMem: HLOCAL): HLOCAL;
@@ -1222,5 +1239,9 @@ begin
   Result := LocalFree(hMem);
   Result := LocalFree(hMem);
 end;
 end;
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
 
 

+ 32 - 5
packages/base/winunits/jwaaclapi.pas

@@ -40,23 +40,30 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAclApi.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaAclApi.pas,v 1.11 2007/09/05 11:58:48 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAclApi;
 unit JwaAclApi;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "aclapi.h"'}
 {$HPPEMIT '#include "aclapi.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaAccCtrl, JwaWindows;
+  JwaAccCtrl, JwaWinNT, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
+
+{$IFNDEF JWA_INCLUDEMODE}
 //
 //
 // Progress Function:
 // Progress Function:
 // Caller of tree operation implements this Progress function, then
 // Caller of tree operation implements this Progress function, then
@@ -70,6 +77,7 @@ uses
 // to "Only On Error."
 // to "Only On Error."
 //
 //
 
 
+
 type
 type
   FN_PROGRESS = procedure(
   FN_PROGRESS = procedure(
     pObjectName: LPWSTR;    // name of object just processed
     pObjectName: LPWSTR;    // name of object just processed
@@ -80,6 +88,7 @@ type
     ); stdcall;
     ); stdcall;
   {$EXTERNALSYM FN_PROGRESS}
   {$EXTERNALSYM FN_PROGRESS}
   TFnProgress = FN_PROGRESS;
   TFnProgress = FN_PROGRESS;
+{$ENDIF JWA_INCLUDEMODE}  
 
 
 function SetEntriesInAclA(cCountOfExplicitEntries: ULONG;
 function SetEntriesInAclA(cCountOfExplicitEntries: ULONG;
   pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
   pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
@@ -352,10 +361,24 @@ function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
 function GetMultipleTrustee(pTrustee: PTRUSTEE): PTRUSTEE; stdcall;
 function GetMultipleTrustee(pTrustee: PTRUSTEE): PTRUSTEE; stdcall;
 {$EXTERNALSYM GetMultipleTrustee}
 {$EXTERNALSYM GetMultipleTrustee}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  aclapilib = 'advapi32.dll';
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -1330,4 +1353,8 @@ function GetMultipleTrustee; external aclapilib name 'GetMultipleTrustee' + AWSu
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 32 - 7
packages/base/winunits/jwaaclui.pas

@@ -40,23 +40,30 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAclUI.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaAclUI.pas,v 1.13 2007/09/05 11:58:48 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAclUI;
 unit JwaAclUI;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "aclui.h"'}
 {$HPPEMIT '#include "aclui.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaAccCtrl, JwaWindows;
+  JwaAccCtrl, JwaWinNT, JwaWinUser, JwaWinType, JwaActiveX;
+
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // ISecurityInformation interface
 // ISecurityInformation interface
 //
 //
@@ -91,7 +98,7 @@ type
   {$EXTERNALSYM PSI_OBJECT_INFO}
   {$EXTERNALSYM PSI_OBJECT_INFO}
   _SI_OBJECT_INFO = record
   _SI_OBJECT_INFO = record
     dwFlags: DWORD;
     dwFlags: DWORD;
-    hInstance: HINST;      // resources (e.g. strings) reside here
+    hInstance: HINST;  // resources (e.g. strings) reside here
     pszServerName: LPWSTR; // must be present
     pszServerName: LPWSTR; // must be present
     pszObjectName: LPWSTR; // must be present
     pszObjectName: LPWSTR; // must be present
     pszPageTitle: LPWSTR;  // only valid if SI_PAGE_TITLE is set
     pszPageTitle: LPWSTR;  // only valid if SI_PAGE_TITLE is set
@@ -250,10 +257,13 @@ type
   {$EXTERNALSYM LPSECURITYINFO}
   {$EXTERNALSYM LPSECURITYINFO}
 
 
   ISecurityInformation2 = interface(IUnknown)
   ISecurityInformation2 = interface(IUnknown)
-  [SID_ISecurityInformation]
+  [SID_ISecurityInformation2]
     function IsDaclCanonical(pDacl: PACL): BOOL; stdcall;
     function IsDaclCanonical(pDacl: PACL): BOOL; stdcall;
+
+    {If the compiler does not compile your implemented interface.
+     Try ActiveX.IDataObject instead if simply IDataObject.}
     function LookupSids(cSids: ULONG; rgpSids: PPSID;
     function LookupSids(cSids: ULONG; rgpSids: PPSID;
-      out ppdo: Pointer{*LPDATAOBJECT}): HRESULT; stdcall;
+      out ppdo: IDataObject): HRESULT; stdcall;
   end;
   end;
   {$EXTERNALSYM ISecurityInformation2}
   {$EXTERNALSYM ISecurityInformation2}
 
 
@@ -331,10 +341,20 @@ function CreateSecurityPage(psi: LPSECURITYINFO): HPROPSHEETPAGE; stdcall;
 function EditSecurity(hwndOwner: HWND; psi: LPSECURITYINFO): BOOL; stdcall;
 function EditSecurity(hwndOwner: HWND; psi: LPSECURITYINFO): BOOL; stdcall;
 {$EXTERNALSYM EditSecurity}
 {$EXTERNALSYM EditSecurity}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  acluilib = 'aclui.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -371,4 +391,9 @@ function EditSecurity; external acluilib name 'EditSecurity';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 32 - 10
packages/base/winunits/jwaactiveds.pas

@@ -40,25 +40,31 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaActiveDS.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaActiveDS.pas,v 1.13 2007/09/06 14:57:10 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaActiveDS;
 unit JwaActiveDS;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "activeds.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef GUID REFIID'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaActiveX, JwaAdsTLB, JwaWindows;
+  JwaActiveX, JwaAdsTLB, JwaWinNT, JwaWinType, JwaWinUser;
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "activeds.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef GUID REFIID'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 type
 type
   REFIID = GUID;
   REFIID = GUID;
   {$NODEFINE REFIID}
   {$NODEFINE REFIID}
@@ -209,6 +215,7 @@ procedure AdsFreeAdsValues(pAdsValues: PADSVALUE; dwNumValues: DWORD); stdcall;
 //
 //
 
 
 const
 const
+  {$IFNDEF JWA_INCLUDEMODE}
   FACILITY_WINDOWS  = 8;
   FACILITY_WINDOWS  = 8;
   {$EXTERNALSYM FACILITY_WINDOWS}
   {$EXTERNALSYM FACILITY_WINDOWS}
   FACILITY_STORAGE  = 3;
   FACILITY_STORAGE  = 3;
@@ -227,6 +234,7 @@ const
   {$EXTERNALSYM FACILITY_ITF}
   {$EXTERNALSYM FACILITY_ITF}
   FACILITY_DISPATCH = 2;
   FACILITY_DISPATCH = 2;
   {$EXTERNALSYM FACILITY_DISPATCH}
   {$EXTERNALSYM FACILITY_DISPATCH}
+  {$ENDIF JWA_INCLUDEMODE}
 
 
 //
 //
 // Define the severity codes
 // Define the severity codes
@@ -850,11 +858,20 @@ function ADsPropSetHwnd(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
 
 
 function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO): BOOL; stdcall;
 function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO): BOOL; stdcall;
 {$EXTERNALSYM ADsPropCheckIfWritable}
 {$EXTERNALSYM ADsPropCheckIfWritable}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  adslib = 'activeds.dll';
+  dsprop = 'dsprop.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 // adshlp.h
 // adshlp.h
 
 
@@ -1203,4 +1220,9 @@ function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

+ 27 - 7
packages/base/winunits/jwaactivex.pas

@@ -41,8 +41,8 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaActiveX.pas,v 1.1 2005/09/03 13:12:10 marquardt Exp $
-
+// $Id: JwaActiveX.pas,v 1.5 2007/10/18 16:32:37 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaActiveX;
 unit JwaActiveX;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
@@ -52,7 +52,10 @@ unit JwaActiveX;
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   { IConnectionPoint status codes }
   { IConnectionPoint status codes }
@@ -147,6 +150,7 @@ type
   TSafeArray = SAFEARRAY;
   TSafeArray = SAFEARRAY;
   {$EXTERNALSYM SAFEARRAY}
   {$EXTERNALSYM SAFEARRAY}
 
 
+  {$IFNDEF JWA_INCLUDEMODE}
   (* tagBLOB related types cause problem due to two definitions of BLOB in wtypes.h/nspapi.h *)
   (* tagBLOB related types cause problem due to two definitions of BLOB in wtypes.h/nspapi.h *)
   (* Investigating something that will always work even when a BLOB is not a tagBLOB         *)
   (* Investigating something that will always work even when a BLOB is not a tagBLOB         *)
   {$EXTERNALSYM PBlob}
   {$EXTERNALSYM PBlob}
@@ -162,6 +166,7 @@ type
   TBlob = tagBLOB;
   TBlob = tagBLOB;
   {$EXTERNALSYM BLOB}
   {$EXTERNALSYM BLOB}
   BLOB = TBlob;
   BLOB = TBlob;
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   PClipData = ^CLIPDATA;
   PClipData = ^CLIPDATA;
   CLIPDATA = record
   CLIPDATA = record
@@ -414,10 +419,10 @@ type
     function QueryGetData(const formatetc: TFormatEtc): HRESULT; stdcall;
     function QueryGetData(const formatetc: TFormatEtc): HRESULT; stdcall;
     function GetCanonicalFormatEtc(const formatetc: TFormatEtc; out formatetcOut: TFormatEtc): HRESULT; stdcall;
     function GetCanonicalFormatEtc(const formatetc: TFormatEtc; out formatetcOut: TFormatEtc): HRESULT; stdcall;
     function SetData(const formatetc: TFormatEtc; var medium: TStgMedium; fRelease: BOOL): HRESULT; stdcall;
     function SetData(const formatetc: TFormatEtc; var medium: TStgMedium; fRelease: BOOL): HRESULT; stdcall;
-    function EnumFormatEtc(dwDirection: Longint; out enumFormatEtc: IEnumFORMATETC): HRESULT; stdcall;
-    function DAdvise(const formatetc: TFormatEtc; advf: Longint;
-      const advSink: IAdviseSink; out dwConnection: Longint): HRESULT; stdcall;
-    function DUnadvise(dwConnection: Longint): HRESULT; stdcall;
+    function EnumFormatEtc(dwDirection: DWORD; out enumFormatEtc: IEnumFORMATETC): HRESULT; stdcall;
+    function DAdvise(const formatetc: TFormatEtc; advf: DWORD;
+      const advSink: IAdviseSink; out dwConnection: DWORD): HRESULT; stdcall;
+    function DUnadvise(dwConnection: DWORD): HRESULT; stdcall;
     function EnumDAdvise(out enumAdvise: IEnumSTATDATA): HRESULT; stdcall;
     function EnumDAdvise(out enumAdvise: IEnumSTATDATA): HRESULT; stdcall;
   end;
   end;
   {$EXTERNALSYM IDataObject}
   {$EXTERNALSYM IDataObject}
@@ -793,6 +798,21 @@ type
   end;
   end;
   {$EXTERNALSYM IStorage}
   {$EXTERNALSYM IStorage}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 1
packages/base/winunits/jwaadsdb.pas

@@ -40,20 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdsDb.pas,v 1.5 2004/12/08 08:18:35 marquardt Exp $
+// $Id: JwaAdsDb.pas,v 1.7 2007/09/06 14:57:10 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdsDb;
 unit JwaAdsDb;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "adsdb.h"'}
 {$HPPEMIT '#include "adsdb.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 //  Contents:   Definitions for the OLE DB provider for ADSI
 //  Contents:   Definitions for the OLE DB provider for ADSI
 
 
 //
 //
@@ -64,10 +71,23 @@ interface
 // are available publicly in iads.h. This file has been left here so that
 // are available publicly in iads.h. This file has been left here so that
 // old references to adsdb.h do not break compiles.
 // old references to adsdb.h do not break compiles.
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 const
 const
   DBPROPFLAGS_ADSISEARCH        = $0000C000;
   DBPROPFLAGS_ADSISEARCH        = $0000C000;
   {$EXTERNALSYM DBPROPFLAGS_ADSISEARCH}
   {$EXTERNALSYM DBPROPFLAGS_ADSISEARCH}
+{$ENDIF JWA_INCLUDEMODE}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 24 - 1
packages/base/winunits/jwaadserr.pas

@@ -40,20 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdsErr.pas,v 1.5 2004/12/08 08:18:35 marquardt Exp $
+// $Id: JwaAdsErr.pas,v 1.7 2007/09/06 14:57:10 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdsErr;
 unit JwaAdsErr;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "adserr.h"'}
 {$HPPEMIT '#include "adserr.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 //
 //
 //  Values are 32 bit values layed out as follows:
 //  Values are 32 bit values layed out as follows:
 //
 //
@@ -84,6 +93,7 @@ interface
 // Define the facility codes
 // Define the facility codes
 //
 //
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 const
 const
   FACILITY_WINDOWS  = 8;
   FACILITY_WINDOWS  = 8;
   {$EXTERNALSYM FACILITY_WINDOWS}
   {$EXTERNALSYM FACILITY_WINDOWS}
@@ -318,6 +328,19 @@ const
   E_ADS_INVALID_FILTER = HRESULT($80005014);
   E_ADS_INVALID_FILTER = HRESULT($80005014);
   {$EXTERNALSYM E_ADS_INVALID_FILTER}
   {$EXTERNALSYM E_ADS_INVALID_FILTER}
 
 
+{$ENDIF JWA_INCLUDEMODE}
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 40 - 8
packages/base/winunits/jwaadshlp.pas

@@ -40,22 +40,31 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdsHlp.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaAdsHlp.pas,v 1.12 2007/09/06 14:57:10 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdsHlp;
 unit JwaAdsHlp;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
-
-{$I jediapilib.inc}
-
-interface
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "adshlp.h"'}
 {$HPPEMIT '#include "adshlp.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
+{$I jediapilib.inc}
+
+interface
+
 uses
 uses
-  JwaActiveX, JwaAdsTLB, JwaWindows;
+  JwaActiveX, JwaAdsTLB, JwaWinType, JwaWinNT;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
 
 
 function ADsGetObject(lpszPathName: LPCWSTR; const riid: TGUID; out ppObject: Pointer): HRESULT; stdcall;
 function ADsGetObject(lpszPathName: LPCWSTR; const riid: TGUID; out ppObject: Pointer): HRESULT; stdcall;
 {$EXTERNALSYM ADsGetObject}
 {$EXTERNALSYM ADsGetObject}
@@ -136,6 +145,7 @@ function PropVariantToAdsType(var pVariant: OleVariant; dwNumVariant: DWORD;
   var ppAdsValues: PADSVALUE; pdwNumValues: PDWORD): HRESULT; stdcall;
   var ppAdsValues: PADSVALUE; pdwNumValues: PDWORD): HRESULT; stdcall;
 {$EXTERNALSYM PropVariantToAdsType}
 {$EXTERNALSYM PropVariantToAdsType}
 
 
+
 function AdsTypeToPropVariant(pAdsValues: PADSVALUE; dwNumValues: DWORD;
 function AdsTypeToPropVariant(pAdsValues: PADSVALUE; dwNumValues: DWORD;
   var pVariant: OleVariant): HRESULT; stdcall;
   var pVariant: OleVariant): HRESULT; stdcall;
 {$EXTERNALSYM AdsTypeToPropVariant}
 {$EXTERNALSYM AdsTypeToPropVariant}
@@ -155,20 +165,33 @@ function BinarySDToSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
   var pVarsec: VARIANT; pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
   var pVarsec: VARIANT; pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
 {$EXTERNALSYM BinarySDToSecurityDescriptor}
 {$EXTERNALSYM BinarySDToSecurityDescriptor}
 
 
+{$ENDIF JWA_INCLUDEMODE}
+
 function SecurityDescriptorToBinarySD(vVarSecDes: VARIANT;
 function SecurityDescriptorToBinarySD(vVarSecDes: VARIANT;
   var ppSecurityDescriptor: PSECURITY_DESCRIPTOR; pdwSDLength: PDWORD;
   var ppSecurityDescriptor: PSECURITY_DESCRIPTOR; pdwSDLength: PDWORD;
   pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
   pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
 {$EXTERNALSYM SecurityDescriptorToBinarySD}
 {$EXTERNALSYM SecurityDescriptorToBinarySD}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  adslib = 'activeds.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 //procedure ADsFreeAllErrorRecords
 //procedure ADsFreeAllErrorRecords
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
+
 var
 var
   _ADsGetObject: Pointer;
   _ADsGetObject: Pointer;
 
 
@@ -442,6 +465,8 @@ begin
   end;
   end;
 end;
 end;
 
 
+{$ENDIF JWA_INCLUDEMODE}
+
 var
 var
   _SecurityDescriptorToBinarySD: Pointer;
   _SecurityDescriptorToBinarySD: Pointer;
 
 
@@ -457,6 +482,7 @@ end;
 
 
 {$ELSE}
 {$ELSE}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 function ADsGetObject; external adslib name 'ADsGetObject';
 function ADsGetObject; external adslib name 'ADsGetObject';
 function ADsBuildEnumerator; external adslib name 'ADsBuildEnumerator';
 function ADsBuildEnumerator; external adslib name 'ADsBuildEnumerator';
 function ADsFreeEnumerator; external adslib name 'ADsFreeEnumerator';
 function ADsFreeEnumerator; external adslib name 'ADsFreeEnumerator';
@@ -478,8 +504,14 @@ function PropVariantToAdsType; external adslib name 'PropVariantToAdsType';
 function AdsTypeToPropVariant; external adslib name 'AdsTypeToPropVariant';
 function AdsTypeToPropVariant; external adslib name 'AdsTypeToPropVariant';
 procedure AdsFreeAdsValues; external adslib name 'AdsFreeAdsValues';
 procedure AdsFreeAdsValues; external adslib name 'AdsFreeAdsValues';
 function BinarySDToSecurityDescriptor; external adslib name 'BinarySDToSecurityDescriptor';
 function BinarySDToSecurityDescriptor; external adslib name 'BinarySDToSecurityDescriptor';
+{$ENDIF JWA_INCLUDEMODE}
+
 function SecurityDescriptorToBinarySD; external adslib name 'SecurityDescriptorToBinarySD';
 function SecurityDescriptorToBinarySD; external adslib name 'SecurityDescriptorToBinarySD';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 22 - 1
packages/base/winunits/jwaadsnms.pas

@@ -40,22 +40,30 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdsnms.pas,v 1.5 2004/12/08 08:18:35 marquardt Exp $
+// $Id: JwaAdsnms.pas,v 1.7 2007/09/06 14:57:11 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdsnms;
 unit JwaAdsnms;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "adsnms.h"'}
 {$HPPEMIT '#include "adsnms.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 //  Contents:   Class Names and schema definitions for ADS objects
 //  Contents:   Class Names and schema definitions for ADS objects
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 const
 const
   NAMESPACE_CLASS_NAME        = 'Namespace';
   NAMESPACE_CLASS_NAME        = 'Namespace';
   {$EXTERNALSYM NAMESPACE_CLASS_NAME}
   {$EXTERNALSYM NAMESPACE_CLASS_NAME}
@@ -140,7 +148,20 @@ const
   {$EXTERNALSYM FPNW_RESOURCE_SCHEMA_NAME}
   {$EXTERNALSYM FPNW_RESOURCE_SCHEMA_NAME}
   FPNW_FILESHARE_SCHEMA_NAME   = 'FPNWFileShare';
   FPNW_FILESHARE_SCHEMA_NAME   = 'FPNWFileShare';
   {$EXTERNALSYM FPNW_FILESHARE_SCHEMA_NAME}
   {$EXTERNALSYM FPNW_FILESHARE_SCHEMA_NAME}
+{$ENDIF JWA_INCLUDEMODE}
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

+ 42 - 7
packages/base/winunits/jwaadsprop.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdsProp.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaAdsProp.pas,v 1.13 2007/09/06 14:57:10 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdsProp;
 unit JwaAdsProp;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adsprop.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaAdsTLB, JwaWindows;
+  JwaActiveX, JwaAdsTLB, JwaWinUser, JwaWinType;
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adsprop.h"'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //  Windows NT Active Directory Service Property Pages
 //  Windows NT Active Directory Service Property Pages
 //
 //
@@ -63,6 +70,7 @@ uses
 //              sheets.
 //              sheets.
 
 
 const
 const
+  {$IFNDEF JWA_INCLUDEMODE}
   WM_ADSPROP_NOTIFY_PAGEINIT   = WM_USER + 1101; // where LPARAM is the PADSPROPINITPARAMS pointer.
   WM_ADSPROP_NOTIFY_PAGEINIT   = WM_USER + 1101; // where LPARAM is the PADSPROPINITPARAMS pointer.
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEINIT}
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEINIT}
   WM_ADSPROP_NOTIFY_PAGEHWND   = WM_USER + 1102; // where WPARAM => page's HWND and LPARAM => page's Title
   WM_ADSPROP_NOTIFY_PAGEHWND   = WM_USER + 1102; // where WPARAM => page's HWND and LPARAM => page's Title
@@ -77,6 +85,7 @@ const
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_FOREGROUND}
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_FOREGROUND}
   WM_ADSPROP_NOTIFY_EXIT       = WM_USER + 1107; // sent on page release
   WM_ADSPROP_NOTIFY_EXIT       = WM_USER + 1107; // sent on page release
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_EXIT}
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_EXIT}
+  {$ENDIF JWA_INCLUDEMODE}
   WM_ADSPROP_NOTIFY_ERROR      = WM_USER + 1110; // used to send the notification object an error message
   WM_ADSPROP_NOTIFY_ERROR      = WM_USER + 1110; // used to send the notification object an error message
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_ERROR}
   {$EXTERNALSYM WM_ADSPROP_NOTIFY_ERROR}
   
   
@@ -90,6 +99,7 @@ const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
 type
 type
+  {$IFNDEF JWA_INCLUDEMODE}
   // imports of a type library sometimes are missing a few decls, these are just
   // imports of a type library sometimes are missing a few decls, these are just
   // a few of them to make this file compile at all. I really should do all of
   // a few of them to make this file compile at all. I really should do all of
   // them one day. TODO
   // them one day. TODO
@@ -113,6 +123,7 @@ type
   ADSPROPINITPARAMS = _ADSPROPINITPARAMS;
   ADSPROPINITPARAMS = _ADSPROPINITPARAMS;
   {$EXTERNALSYM ADSPROPINITPARAMS}
   {$EXTERNALSYM ADSPROPINITPARAMS}
   TAdsPropInitParams = ADSPROPINITPARAMS;
   TAdsPropInitParams = ADSPROPINITPARAMS;
+  {$ENDIF JWA_INCLUDEMODE}
 
 
 //+----------------------------------------------------------------------------
 //+----------------------------------------------------------------------------
 //
 //
@@ -138,6 +149,7 @@ type
   {$EXTERNALSYM PADSPROPERROR}
   {$EXTERNALSYM PADSPROPERROR}
   TAdsPropError = ADSPROPERROR;
   TAdsPropError = ADSPROPERROR;
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 //+----------------------------------------------------------------------------
 //+----------------------------------------------------------------------------
 //
 //
 //  Function:   ADsPropCreateNotifyObj
 //  Function:   ADsPropCreateNotifyObj
@@ -259,6 +271,8 @@ function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO):
 function ADsPropSendErrorMessage(hNotifyObj: HWND; pError: PADSPROPERROR): BOOL; stdcall;
 function ADsPropSendErrorMessage(hNotifyObj: HWND; pError: PADSPROPERROR): BOOL; stdcall;
 {$EXTERNALSYM ADsPropSendErrorMessage}
 {$EXTERNALSYM ADsPropSendErrorMessage}
 
 
+
+
 //+----------------------------------------------------------------------------
 //+----------------------------------------------------------------------------
 //
 //
 //  function:   ADsPropShowErrorDialog
 //  function:   ADsPropShowErrorDialog
@@ -276,13 +290,26 @@ function ADsPropSendErrorMessage(hNotifyObj: HWND; pError: PADSPROPERROR): BOOL;
 function ADsPropShowErrorDialog(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
 function ADsPropShowErrorDialog(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
 {$EXTERNALSYM ADsPropShowErrorDialog}
 {$EXTERNALSYM ADsPropShowErrorDialog}
 
 
+{$ENDIF JWA_INCLUDEMODE}
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  dsprop = 'dsprop.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
+
 var
 var
   _ADsPropCreateNotifyObj: Pointer;
   _ADsPropCreateNotifyObj: Pointer;
 
 
@@ -374,8 +401,11 @@ begin
   end;
   end;
 end;
 end;
 
 
+{$ENDIF JWA_INCLUDEMODE}
+
 {$ELSE}
 {$ELSE}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 function ADsPropCreateNotifyObj; external dsprop name 'ADsPropCreateNotifyObj';
 function ADsPropCreateNotifyObj; external dsprop name 'ADsPropCreateNotifyObj';
 function ADsPropGetInitInfo; external dsprop name 'ADsPropGetInitInfo';
 function ADsPropGetInitInfo; external dsprop name 'ADsPropGetInitInfo';
 function ADsPropSetHwndWithTitle; external dsprop name 'ADsPropSetHwndWithTitle';
 function ADsPropSetHwndWithTitle; external dsprop name 'ADsPropSetHwndWithTitle';
@@ -383,7 +413,12 @@ function ADsPropSetHwnd; external dsprop name 'ADsPropSetHwnd';
 function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
 function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
 function ADsPropSendErrorMessage; external dsprop name 'ADsPropSendErrorMessage';
 function ADsPropSendErrorMessage; external dsprop name 'ADsPropSendErrorMessage';
 function ADsPropShowErrorDialog; external dsprop name 'ADsPropShowErrorDialog';
 function ADsPropShowErrorDialog; external dsprop name 'ADsPropShowErrorDialog';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 2
packages/base/winunits/jwaadssts.pas

@@ -40,25 +40,32 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdssts.pas,v 1.6 2005/09/03 14:27:47 marquardt Exp $
+// $Id: JwaAdssts.pas,v 1.9 2007/09/06 14:57:11 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdssts;
 unit JwaAdssts;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "adssts.h"'}
 {$HPPEMIT '#include "adssts.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinNT;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //  Contents:   Status Codes for ADS objects
 //  Contents:   Status Codes for ADS objects
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 const
 const
   ADS_PRINTER_PAUSED            = $00000001;
   ADS_PRINTER_PAUSED            = $00000001;
   {$EXTERNALSYM ADS_PRINTER_PAUSED}
   {$EXTERNALSYM ADS_PRINTER_PAUSED}
@@ -197,7 +204,19 @@ const
   {$EXTERNALSYM ADS_SERVICE_ERROR_SEVERE}
   {$EXTERNALSYM ADS_SERVICE_ERROR_SEVERE}
   ADS_SERVICE_ERROR_CRITICAL = 3;
   ADS_SERVICE_ERROR_CRITICAL = 3;
   {$EXTERNALSYM ADS_SERVICE_ERROR_CRITICAL}
   {$EXTERNALSYM ADS_SERVICE_ERROR_CRITICAL}
+{$ENDIF JWA_INCLUDEMODE}
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 138 - 88
packages/base/winunits/jwaadstlb.pas

@@ -1,6 +1,8 @@
-// $Id: JwaAdsTLB.pas,v 1.5 2005/09/03 13:12:10 marquardt Exp $
+// $Id: JwaAdsTLB.pas,v 1.7 2007/09/06 14:57:10 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdsTLB;
 unit JwaAdsTLB;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 // ************************************************************************ //
 // ************************************************************************ //
 // WARNING
 // WARNING
@@ -48,7 +50,7 @@ unit JwaAdsTLB;
 //   Error creating palette bitmap of (TAccessControlEntry) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TAccessControlEntry) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TAccessControlList) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TAccessControlList) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TSecurityDescriptor) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TSecurityDescriptor) : Server activeds.dll contains no icons
-//   Error creating palette bitmap of (TLargeInteger) : Server activeds.dll contains no icons
+//   Error creating palette bitmap of ({$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TNameTranslate) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TNameTranslate) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TCaseIgnoreList) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TCaseIgnoreList) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TFaxNumber) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TFaxNumber) : Server activeds.dll contains no icons
@@ -57,7 +59,7 @@ unit JwaAdsTLB;
 //   Error creating palette bitmap of (TEmail) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TEmail) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TPath) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TPath) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TReplicaPointer) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TReplicaPointer) : Server activeds.dll contains no icons
-//   Error creating palette bitmap of (TAcl) : Server activeds.dll contains no icons
+//   Error creating palette bitmap of ({$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TTimestamp) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TTimestamp) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TPostalAddress) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TPostalAddress) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TBackLink) : Server activeds.dll contains no icons
 //   Error creating palette bitmap of (TBackLink) : Server activeds.dll contains no icons
@@ -71,10 +73,16 @@ unit JwaAdsTLB;
 // ************************************************************************ //
 // ************************************************************************ //
 {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
 {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 interface
 interface
 {$i jediapilib.inc}
 {$i jediapilib.inc}
 uses
 uses
-  Windows, ActiveX, Classes {$IFNDEF NOVCL} , Graphics, OleServer, OleCtrls, StdVCL {$ENDIF} ;
+  Windows, ActiveX, Classes 
+     {$ifndef FPC} {$IFNDEF NOVCL} , Graphics, OleServer, OleCtrls, StdVCL {$ENDIF} {$endif} ;  // Are these used at all?
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 {$IFDEF FPC}
 {$IFDEF FPC}
 Type
 Type
@@ -905,7 +913,9 @@ type
   Email = IADsEmail;
   Email = IADsEmail;
   Path = IADsPath;
   Path = IADsPath;
   ReplicaPointer = IADsReplicaPointer;
   ReplicaPointer = IADsReplicaPointer;
+  {$IFNDEF JWA_INCLUDEMODE}
   Acl = IADsAcl;
   Acl = IADsAcl;
+  {$ENDIF JWA_INCLUDEMODE}
   Timestamp = IADsTimestamp;
   Timestamp = IADsTimestamp;
   PostalAddress = IADsPostalAddress;
   PostalAddress = IADsPostalAddress;
   BackLink = IADsBackLink;
   BackLink = IADsBackLink;
@@ -959,6 +969,9 @@ type
 
 
   ADS_NT_SECURITY_DESCRIPTOR = __MIDL___MIDL_itf_ads_0000_0003;
   ADS_NT_SECURITY_DESCRIPTOR = __MIDL___MIDL_itf_ads_0000_0003;
 
 
+
+  {$IFNDEF JWA_INCLUDEMODE}
+
   _SYSTEMTIME = packed record
   _SYSTEMTIME = packed record
     wYear: Word;
     wYear: Word;
     wMonth: Word;
     wMonth: Word;
@@ -974,6 +987,8 @@ type
     QuadPart: Int64;
     QuadPart: Int64;
   end;
   end;
 
 
+  {$ENDIF JWA_INCLUDEMODE}
+
   __MIDL___MIDL_itf_ads_0000_0004 = packed record
   __MIDL___MIDL_itf_ads_0000_0004 = packed record
     dwLength: LongWord;
     dwLength: LongWord;
     lpValue: ^Byte;
     lpValue: ^Byte;
@@ -1178,14 +1193,18 @@ type
     lLbound: Integer;
     lLbound: Integer;
   end;
   end;
 
 
+  {$IFNDEF JWA_INCLUDEMODE}
   ULONG_PTR = LongWord;
   ULONG_PTR = LongWord;
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   tagIDLDESC = packed record
   tagIDLDESC = packed record
     dwReserved: ULONG_PTR;
     dwReserved: ULONG_PTR;
     wIDLFlags: Word;
     wIDLFlags: Word;
   end;
   end;
 
 
+  {$IFNDEF JWA_INCLUDEMODE}
   DWORD = LongWord;
   DWORD = LongWord;
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   tagPARAMDESCEX = packed record
   tagPARAMDESCEX = packed record
     cBytes: LongWord;
     cBytes: LongWord;
@@ -4561,7 +4580,7 @@ type
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   TSecurityDescriptorProperties= class;
   TSecurityDescriptorProperties= class;
 {$ENDIF}
 {$ENDIF}
-  TSecurityDescriptor = class(TOleServer)
+  {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF} = class(TOleServer)
   private
   private
     FIntf:        IADsSecurityDescriptor;
     FIntf:        IADsSecurityDescriptor;
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
@@ -4618,15 +4637,15 @@ type
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 // *********************************************************************//
 // *********************************************************************//
 // OLE Server Properties Proxy Class
 // OLE Server Properties Proxy Class
-// Server Object    : TSecurityDescriptor
+// Server Object    : {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}
 // (This object is used by the IDE's Property Inspector to allow editing
 // (This object is used by the IDE's Property Inspector to allow editing
 //  of the properties of this server)
 //  of the properties of this server)
 // *********************************************************************//
 // *********************************************************************//
  TSecurityDescriptorProperties = class(TPersistent)
  TSecurityDescriptorProperties = class(TPersistent)
   private
   private
-    FServer:    TSecurityDescriptor;
+    FServer:    {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF};
     function    GetDefaultInterface: IADsSecurityDescriptor;
     function    GetDefaultInterface: IADsSecurityDescriptor;
-    constructor Create(AServer: TSecurityDescriptor);
+    constructor Create(AServer: {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF});
   protected
   protected
     function  Get_Revision: Integer;
     function  Get_Revision: Integer;
     procedure Set_Revision(retval: Integer);
     procedure Set_Revision(retval: Integer);
@@ -4676,7 +4695,7 @@ type
 
 
 // *********************************************************************//
 // *********************************************************************//
 // OLE Server Proxy class declaration
 // OLE Server Proxy class declaration
-// Server Object    : TLargeInteger
+// Server Object    : {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}
 // Help String      :
 // Help String      :
 // Default Interface: IADsLargeInteger
 // Default Interface: IADsLargeInteger
 // Def. Intf. DISP? : No
 // Def. Intf. DISP? : No
@@ -4686,7 +4705,7 @@ type
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   TLargeIntegerProperties= class;
   TLargeIntegerProperties= class;
 {$ENDIF}
 {$ENDIF}
-  TLargeInteger = class(TOleServer)
+  {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF} = class(TOleServer)
   private
   private
     FIntf:        IADsLargeInteger;
     FIntf:        IADsLargeInteger;
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
@@ -4718,15 +4737,15 @@ type
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 // *********************************************************************//
 // *********************************************************************//
 // OLE Server Properties Proxy Class
 // OLE Server Properties Proxy Class
-// Server Object    : TLargeInteger
+// Server Object    : {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}
 // (This object is used by the IDE's Property Inspector to allow editing
 // (This object is used by the IDE's Property Inspector to allow editing
 //  of the properties of this server)
 //  of the properties of this server)
 // *********************************************************************//
 // *********************************************************************//
  TLargeIntegerProperties = class(TPersistent)
  TLargeIntegerProperties = class(TPersistent)
   private
   private
-    FServer:    TLargeInteger;
+    FServer:    {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF};
     function    GetDefaultInterface: IADsLargeInteger;
     function    GetDefaultInterface: IADsLargeInteger;
-    constructor Create(AServer: TLargeInteger);
+    constructor Create(AServer: {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF});
   protected
   protected
     function  Get_HighPart: Integer;
     function  Get_HighPart: Integer;
     procedure Set_HighPart(retval: Integer);
     procedure Set_HighPart(retval: Integer);
@@ -5384,7 +5403,7 @@ type
 
 
 // *********************************************************************//
 // *********************************************************************//
 // OLE Server Proxy class declaration
 // OLE Server Proxy class declaration
-// Server Object    : TAcl
+// Server Object    : {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}
 // Help String      :
 // Help String      :
 // Default Interface: IADsAcl
 // Default Interface: IADsAcl
 // Def. Intf. DISP? : No
 // Def. Intf. DISP? : No
@@ -5394,7 +5413,7 @@ type
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   TAclProperties= class;
   TAclProperties= class;
 {$ENDIF}
 {$ENDIF}
-  TAcl = class(TOleServer)
+  {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF} = class(TOleServer)
   private
   private
     FIntf:        IADsAcl;
     FIntf:        IADsAcl;
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
@@ -5430,15 +5449,15 @@ type
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 // *********************************************************************//
 // *********************************************************************//
 // OLE Server Properties Proxy Class
 // OLE Server Properties Proxy Class
-// Server Object    : TAcl
+// Server Object    : {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}
 // (This object is used by the IDE's Property Inspector to allow editing
 // (This object is used by the IDE's Property Inspector to allow editing
 //  of the properties of this server)
 //  of the properties of this server)
 // *********************************************************************//
 // *********************************************************************//
  TAclProperties = class(TPersistent)
  TAclProperties = class(TPersistent)
   private
   private
-    FServer:    TAcl;
+    FServer:    {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF};
     function    GetDefaultInterface: IADsAcl;
     function    GetDefaultInterface: IADsAcl;
-    constructor Create(AServer: TAcl);
+    constructor Create(AServer:  {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF});
   protected
   protected
     function  Get_ProtectedAttrName: WideString;
     function  Get_ProtectedAttrName: WideString;
     procedure Set_ProtectedAttrName(const retval: WideString);
     procedure Set_ProtectedAttrName(const retval: WideString);
@@ -6255,11 +6274,18 @@ type
   end;
   end;
 {$ENDIF}
 {$ENDIF}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 procedure Register;
 procedure Register;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-implementation
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
+implementation
 uses ComObj;
 uses ComObj;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 class function CoPropertyEntry.Create: IADsPropertyEntry;
 class function CoPropertyEntry.Create: IADsPropertyEntry;
 begin
 begin
@@ -7164,7 +7190,7 @@ begin
   Result := CreateRemoteComObject(MachineName, CLASS_SecurityDescriptor) as IADsSecurityDescriptor;
   Result := CreateRemoteComObject(MachineName, CLASS_SecurityDescriptor) as IADsSecurityDescriptor;
 end;
 end;
 
 
-procedure TSecurityDescriptor.InitServerData;
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.InitServerData;
 const
 const
   CServerData: TServerData = (
   CServerData: TServerData = (
     ClassID:   '{B958F73C-9BDD-11D0-852C-00C04FD8D503}';
     ClassID:   '{B958F73C-9BDD-11D0-852C-00C04FD8D503}';
@@ -7176,7 +7202,7 @@ begin
   ServerData := @CServerData;
   ServerData := @CServerData;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Connect;
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Connect;
 var
 var
   punk: IUnknown;
   punk: IUnknown;
 begin
 begin
@@ -7187,13 +7213,13 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TSecurityDescriptor.ConnectTo(svrIntf: IADsSecurityDescriptor);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.ConnectTo(svrIntf: IADsSecurityDescriptor);
 begin
 begin
   Disconnect;
   Disconnect;
   FIntf := svrIntf;
   FIntf := svrIntf;
 end;
 end;
 
 
-procedure TSecurityDescriptor.DisConnect;
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.DisConnect;
 begin
 begin
   if Fintf <> nil then
   if Fintf <> nil then
   begin
   begin
@@ -7201,7 +7227,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TSecurityDescriptor.GetDefaultInterface: IADsSecurityDescriptor;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.GetDefaultInterface: IADsSecurityDescriptor;
 begin
 begin
   if FIntf = nil then
   if FIntf = nil then
     Connect;
     Connect;
@@ -7209,7 +7235,7 @@ begin
   Result := FIntf;
   Result := FIntf;
 end;
 end;
 
 
-constructor TSecurityDescriptor.Create(AOwner: TComponent);
+constructor {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Create(AOwner: TComponent);
 begin
 begin
   inherited Create(AOwner);
   inherited Create(AOwner);
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
@@ -7217,7 +7243,7 @@ begin
 {$ENDIF}
 {$ENDIF}
 end;
 end;
 
 
-destructor TSecurityDescriptor.Destroy;
+destructor {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Destroy;
 begin
 begin
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   FProps.Free;
   FProps.Free;
@@ -7226,119 +7252,119 @@ begin
 end;
 end;
 
 
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TSecurityDescriptor.GetServerProperties: TSecurityDescriptorProperties;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.GetServerProperties: TSecurityDescriptorProperties;
 begin
 begin
   Result := FProps;
   Result := FProps;
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
-function  TSecurityDescriptor.Get_Revision: Integer;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_Revision: Integer;
 begin
 begin
   Result := DefaultInterface.Get_Revision;
   Result := DefaultInterface.Get_Revision;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_Revision(retval: Integer);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_Revision(retval: Integer);
 begin
 begin
   DefaultInterface.Set_Revision(retval);
   DefaultInterface.Set_Revision(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_Control: Integer;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_Control: Integer;
 begin
 begin
   Result := DefaultInterface.Get_Control;
   Result := DefaultInterface.Get_Control;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_Control(retval: Integer);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_Control(retval: Integer);
 begin
 begin
   DefaultInterface.Set_Control(retval);
   DefaultInterface.Set_Control(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_Owner: WideString;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_Owner: WideString;
 begin
 begin
   Result := DefaultInterface.Get_Owner;
   Result := DefaultInterface.Get_Owner;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_Owner(const retval: WideString);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_Owner(const retval: WideString);
 begin
 begin
   DefaultInterface.Set_Owner(retval);
   DefaultInterface.Set_Owner(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_OwnerDefaulted: WordBool;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_OwnerDefaulted: WordBool;
 begin
 begin
   Result := DefaultInterface.Get_OwnerDefaulted;
   Result := DefaultInterface.Get_OwnerDefaulted;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_OwnerDefaulted(retval: WordBool);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_OwnerDefaulted(retval: WordBool);
 begin
 begin
   DefaultInterface.Set_OwnerDefaulted(retval);
   DefaultInterface.Set_OwnerDefaulted(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_Group: WideString;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_Group: WideString;
 begin
 begin
   Result := DefaultInterface.Get_Group;
   Result := DefaultInterface.Get_Group;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_Group(const retval: WideString);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_Group(const retval: WideString);
 begin
 begin
   DefaultInterface.Set_Group(retval);
   DefaultInterface.Set_Group(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_GroupDefaulted: WordBool;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_GroupDefaulted: WordBool;
 begin
 begin
   Result := DefaultInterface.Get_GroupDefaulted;
   Result := DefaultInterface.Get_GroupDefaulted;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_GroupDefaulted(retval: WordBool);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_GroupDefaulted(retval: WordBool);
 begin
 begin
   DefaultInterface.Set_GroupDefaulted(retval);
   DefaultInterface.Set_GroupDefaulted(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_DiscretionaryAcl: IDispatch;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_DiscretionaryAcl: IDispatch;
 begin
 begin
   Result := DefaultInterface.Get_DiscretionaryAcl;
   Result := DefaultInterface.Get_DiscretionaryAcl;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_DiscretionaryAcl(const retval: IDispatch);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_DiscretionaryAcl(const retval: IDispatch);
 begin
 begin
   DefaultInterface.Set_DiscretionaryAcl(retval);
   DefaultInterface.Set_DiscretionaryAcl(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_DaclDefaulted: WordBool;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_DaclDefaulted: WordBool;
 begin
 begin
   Result := DefaultInterface.Get_DaclDefaulted;
   Result := DefaultInterface.Get_DaclDefaulted;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_DaclDefaulted(retval: WordBool);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_DaclDefaulted(retval: WordBool);
 begin
 begin
   DefaultInterface.Set_DaclDefaulted(retval);
   DefaultInterface.Set_DaclDefaulted(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_SystemAcl: IDispatch;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_SystemAcl: IDispatch;
 begin
 begin
   Result := DefaultInterface.Get_SystemAcl;
   Result := DefaultInterface.Get_SystemAcl;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_SystemAcl(const retval: IDispatch);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_SystemAcl(const retval: IDispatch);
 begin
 begin
   DefaultInterface.Set_SystemAcl(retval);
   DefaultInterface.Set_SystemAcl(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.Get_SaclDefaulted: WordBool;
+function {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Get_SaclDefaulted: WordBool;
 begin
 begin
   Result := DefaultInterface.Get_SaclDefaulted;
   Result := DefaultInterface.Get_SaclDefaulted;
 end;
 end;
 
 
-procedure TSecurityDescriptor.Set_SaclDefaulted(retval: WordBool);
+procedure {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.Set_SaclDefaulted(retval: WordBool);
 begin
 begin
   DefaultInterface.Set_SaclDefaulted(retval);
   DefaultInterface.Set_SaclDefaulted(retval);
 end;
 end;
 
 
-function  TSecurityDescriptor.CopySecurityDescriptor: IDispatch;
+function  {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF}.CopySecurityDescriptor: IDispatch;
 begin
 begin
   Result := DefaultInterface.CopySecurityDescriptor;
   Result := DefaultInterface.CopySecurityDescriptor;
 end;
 end;
 
 
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TSecurityDescriptorProperties.Create(AServer: TSecurityDescriptor);
+constructor TSecurityDescriptorProperties.Create(AServer: {$IFNDEF JWA_INCLUDEMODE} TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF});
 begin
 begin
   inherited Create;
   inherited Create;
   FServer := AServer;
   FServer := AServer;
@@ -7461,7 +7487,7 @@ begin
   Result := CreateRemoteComObject(MachineName, CLASS_LargeInteger) as IADsLargeInteger;
   Result := CreateRemoteComObject(MachineName, CLASS_LargeInteger) as IADsLargeInteger;
 end;
 end;
 
 
-procedure TLargeInteger.InitServerData;
+procedure {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.InitServerData;
 const
 const
   CServerData: TServerData = (
   CServerData: TServerData = (
     ClassID:   '{927971F5-0939-11D1-8BE1-00C04FD8D503}';
     ClassID:   '{927971F5-0939-11D1-8BE1-00C04FD8D503}';
@@ -7473,7 +7499,7 @@ begin
   ServerData := @CServerData;
   ServerData := @CServerData;
 end;
 end;
 
 
-procedure TLargeInteger.Connect;
+procedure {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Connect;
 var
 var
   punk: IUnknown;
   punk: IUnknown;
 begin
 begin
@@ -7484,13 +7510,13 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TLargeInteger.ConnectTo(svrIntf: IADsLargeInteger);
+procedure {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.ConnectTo(svrIntf: IADsLargeInteger);
 begin
 begin
   Disconnect;
   Disconnect;
   FIntf := svrIntf;
   FIntf := svrIntf;
 end;
 end;
 
 
-procedure TLargeInteger.DisConnect;
+procedure {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.DisConnect;
 begin
 begin
   if Fintf <> nil then
   if Fintf <> nil then
   begin
   begin
@@ -7498,7 +7524,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TLargeInteger.GetDefaultInterface: IADsLargeInteger;
+function {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.GetDefaultInterface: IADsLargeInteger;
 begin
 begin
   if FIntf = nil then
   if FIntf = nil then
     Connect;
     Connect;
@@ -7506,7 +7532,7 @@ begin
   Result := FIntf;
   Result := FIntf;
 end;
 end;
 
 
-constructor TLargeInteger.Create(AOwner: TComponent);
+constructor {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Create(AOwner: TComponent);
 begin
 begin
   inherited Create(AOwner);
   inherited Create(AOwner);
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
@@ -7514,7 +7540,7 @@ begin
 {$ENDIF}
 {$ENDIF}
 end;
 end;
 
 
-destructor TLargeInteger.Destroy;
+destructor {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Destroy;
 begin
 begin
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   FProps.Free;
   FProps.Free;
@@ -7523,34 +7549,34 @@ begin
 end;
 end;
 
 
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TLargeInteger.GetServerProperties: TLargeIntegerProperties;
+function {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.GetServerProperties: TLargeIntegerProperties;
 begin
 begin
   Result := FProps;
   Result := FProps;
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
-function  TLargeInteger.Get_HighPart: Integer;
+function  {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Get_HighPart: Integer;
 begin
 begin
   Result := DefaultInterface.Get_HighPart;
   Result := DefaultInterface.Get_HighPart;
 end;
 end;
 
 
-procedure TLargeInteger.Set_HighPart(retval: Integer);
+procedure {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Set_HighPart(retval: Integer);
 begin
 begin
   DefaultInterface.Set_HighPart(retval);
   DefaultInterface.Set_HighPart(retval);
 end;
 end;
 
 
-function  TLargeInteger.Get_LowPart: Integer;
+function  {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Get_LowPart: Integer;
 begin
 begin
   Result := DefaultInterface.Get_LowPart;
   Result := DefaultInterface.Get_LowPart;
 end;
 end;
 
 
-procedure TLargeInteger.Set_LowPart(retval: Integer);
+procedure {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF}.Set_LowPart(retval: Integer);
 begin
 begin
   DefaultInterface.Set_LowPart(retval);
   DefaultInterface.Set_LowPart(retval);
 end;
 end;
 
 
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TLargeIntegerProperties.Create(AServer: TLargeInteger);
+constructor TLargeIntegerProperties.Create(AServer: {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF});
 begin
 begin
   inherited Create;
   inherited Create;
   FServer := AServer;
   FServer := AServer;
@@ -8691,7 +8717,7 @@ begin
   Result := CreateRemoteComObject(MachineName, CLASS_Acl) as IADsAcl;
   Result := CreateRemoteComObject(MachineName, CLASS_Acl) as IADsAcl;
 end;
 end;
 
 
-procedure TAcl.InitServerData;
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.InitServerData;
 const
 const
   CServerData: TServerData = (
   CServerData: TServerData = (
     ClassID:   '{7AF1EFB6-0869-11D1-A377-00C04FB950DC}';
     ClassID:   '{7AF1EFB6-0869-11D1-A377-00C04FB950DC}';
@@ -8703,7 +8729,7 @@ begin
   ServerData := @CServerData;
   ServerData := @CServerData;
 end;
 end;
 
 
-procedure TAcl.Connect;
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Connect;
 var
 var
   punk: IUnknown;
   punk: IUnknown;
 begin
 begin
@@ -8714,13 +8740,13 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TAcl.ConnectTo(svrIntf: IADsAcl);
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.ConnectTo(svrIntf: IADsAcl);
 begin
 begin
   Disconnect;
   Disconnect;
   FIntf := svrIntf;
   FIntf := svrIntf;
 end;
 end;
 
 
-procedure TAcl.DisConnect;
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.DisConnect;
 begin
 begin
   if Fintf <> nil then
   if Fintf <> nil then
   begin
   begin
@@ -8728,7 +8754,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TAcl.GetDefaultInterface: IADsAcl;
+function  {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.GetDefaultInterface: IADsAcl;
 begin
 begin
   if FIntf = nil then
   if FIntf = nil then
     Connect;
     Connect;
@@ -8736,7 +8762,7 @@ begin
   Result := FIntf;
   Result := FIntf;
 end;
 end;
 
 
-constructor TAcl.Create(AOwner: TComponent);
+constructor {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Create(AOwner: TComponent);
 begin
 begin
   inherited Create(AOwner);
   inherited Create(AOwner);
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
@@ -8744,7 +8770,7 @@ begin
 {$ENDIF}
 {$ENDIF}
 end;
 end;
 
 
-destructor TAcl.Destroy;
+destructor {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Destroy;
 begin
 begin
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   FProps.Free;
   FProps.Free;
@@ -8753,49 +8779,49 @@ begin
 end;
 end;
 
 
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TAcl.GetServerProperties: TAclProperties;
+function {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.GetServerProperties: TAclProperties;
 begin
 begin
   Result := FProps;
   Result := FProps;
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
-function  TAcl.Get_ProtectedAttrName: WideString;
+function {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Get_ProtectedAttrName: WideString;
 begin
 begin
   Result := DefaultInterface.Get_ProtectedAttrName;
   Result := DefaultInterface.Get_ProtectedAttrName;
 end;
 end;
 
 
-procedure TAcl.Set_ProtectedAttrName(const retval: WideString);
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Set_ProtectedAttrName(const retval: WideString);
 begin
 begin
   DefaultInterface.Set_ProtectedAttrName(retval);
   DefaultInterface.Set_ProtectedAttrName(retval);
 end;
 end;
 
 
-function  TAcl.Get_SubjectName: WideString;
+function {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Get_SubjectName: WideString;
 begin
 begin
   Result := DefaultInterface.Get_SubjectName;
   Result := DefaultInterface.Get_SubjectName;
 end;
 end;
 
 
-procedure TAcl.Set_SubjectName(const retval: WideString);
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Set_SubjectName(const retval: WideString);
 begin
 begin
   DefaultInterface.Set_SubjectName(retval);
   DefaultInterface.Set_SubjectName(retval);
 end;
 end;
 
 
-function  TAcl.Get_Privileges: Integer;
+function {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Get_Privileges: Integer;
 begin
 begin
   Result := DefaultInterface.Get_Privileges;
   Result := DefaultInterface.Get_Privileges;
 end;
 end;
 
 
-procedure TAcl.Set_Privileges(retval: Integer);
+procedure {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.Set_Privileges(retval: Integer);
 begin
 begin
   DefaultInterface.Set_Privileges(retval);
   DefaultInterface.Set_Privileges(retval);
 end;
 end;
 
 
-function  TAcl.CopyAcl: IDispatch;
+function {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF}.CopyAcl: IDispatch;
 begin
 begin
   Result := DefaultInterface.CopyAcl;
   Result := DefaultInterface.CopyAcl;
 end;
 end;
 
 
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
 {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TAclProperties.Create(AServer: TAcl);
+constructor TAclProperties.Create(AServer: {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF});
 begin
 begin
   inherited Create;
   inherited Create;
   FServer := AServer;
   FServer := AServer;
@@ -10286,17 +10312,41 @@ end;
 
 
 {$endif}
 {$endif}
 
 
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 procedure Register;
 procedure Register;
 begin
 begin
-  RegisterComponents('ActiveX',[TPropertyEntry, TPropertyValue, TAccessControlEntry, TAccessControlList,
-    TSecurityDescriptor, TLargeInteger, TNameTranslate, TCaseIgnoreList, TFaxNumber,
-    TNetAddress, TOctetList, TEmail, TPath, TReplicaPointer,
-    TAcl, TTimestamp, TPostalAddress, TBackLink, TTypedName,
-    THold, TPathname, TADSystemInfo, TWinNTSystemInfo, TDNWithBinary,
-    TDNWithString]);
-end;
-
-
-
+  RegisterComponents('ActiveX',[
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}TPropertyEntry,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}TPropertyValue,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}TAccessControlEntry,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}TAccessControlList,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+//   {$IFNDEF JWA_INCLUDEMODE} JwaAdsTLB.TSecurityDescriptor {$ELSE} TSecurityDescriptorX {$ENDIF},
+//   {$IFNDEF JWA_INCLUDEMODE} TLargeInteger {$ELSE} TLargeIntegerX {$ENDIF},
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TNameTranslate,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TCaseIgnoreList,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TFaxNumber,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TNetAddress,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TOctetList,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TEmail,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TReplicaPointer,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+   {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TPath,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+//   {$IFNDEF JWA_INCLUDEMODE} TAcl {$ELSE} TAclX {$ENDIF},
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TTimestamp,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TPostalAddress,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TBackLink,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TTypedName,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TPathname,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TADSystemInfo,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TWinNTSystemInfo,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TDNWithBinary,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TDNWithString,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} TPath,{$ENDIF LIVE_SERVER_AT_DESIGN_TIME}
+    ]);
+end;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 25 - 6
packages/base/winunits/jwaadtgen.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAdtGen.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaAdtGen.pas,v 1.13 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAdtGen;
 unit JwaAdtGen;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "adtgen.h"'}
 {$HPPEMIT '#include "adtgen.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinNT, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // type of audit 
 // type of audit 
@@ -137,7 +142,7 @@ type
     //
     //
     
     
     APT_Luid,
     APT_Luid,
-    
+
     //
     //
     // Guid
     // Guid
     //
     //
@@ -434,10 +439,20 @@ const
   AUTHZ_AUDIT_INSTANCE_INFORMATION = $2;
   AUTHZ_AUDIT_INSTANCE_INFORMATION = $2;
   {$EXTERNALSYM AUTHZ_AUDIT_INSTANCE_INFORMATION}
   {$EXTERNALSYM AUTHZ_AUDIT_INSTANCE_INFORMATION}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  authzlib = 'authz.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 // (rom) MACRO implementation
 // (rom) MACRO implementation
 function ApExtractType(TypeFlags: DWORD): AUDIT_PARAM_TYPE;
 function ApExtractType(TypeFlags: DWORD): AUDIT_PARAM_TYPE;
@@ -455,4 +470,8 @@ end;
 AuthzpRegisterAuditEvent
 AuthzpRegisterAuditEvent
 AuthzpUnregisterAuditEvent
 AuthzpUnregisterAuditEvent
 }
 }
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 3
packages/base/winunits/jwaaf_irda.pas

@@ -40,23 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAF_Irda.pas,v 1.6 2005/09/08 07:49:25 marquardt Exp $
-
+// $Id: JwaAF_Irda.pas,v 1.8 2007/09/05 11:58:48 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAF_Irda;
 unit JwaAF_Irda;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "af_irda.h"'}
 {$HPPEMIT '#include "af_irda.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinSock2, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Winsock1.1, IrDA1.1, WindowsNT5.0, Windows98 and WindowsCE1.0.
 // Winsock1.1, IrDA1.1, WindowsNT5.0, Windows98 and WindowsCE1.0.
 // Define one of _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_WCE.
 // Define one of _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_WCE.
@@ -441,6 +445,20 @@ type
   TIasQuery = IAS_QUERY;
   TIasQuery = IAS_QUERY;
   PIasQuery = PIAS_QUERY;  
   PIasQuery = PIAS_QUERY;  
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 24 - 3
packages/base/winunits/jwaatalkwsh.pas

@@ -40,23 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAtalkWsh.pas,v 1.7 2005/09/08 07:49:25 marquardt Exp $
-
+// $Id: JwaAtalkWsh.pas,v 1.9 2007/09/05 11:58:48 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAtalkWsh;
 unit JwaAtalkWsh;
 
 
 interface
 interface
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "atalkwsh.h"'}
 {$HPPEMIT '#include "atalkwsh.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinSock2, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 //  All protocol types should be specified in the Decimal base
 //  All protocol types should be specified in the Decimal base
 //
 //
@@ -321,6 +325,23 @@ type
   TWSHPapGetServerStatus = WSH_PAP_GET_SERVER_STATUS;
   TWSHPapGetServerStatus = WSH_PAP_GET_SERVER_STATUS;
   PWSHPapGetServerStatus = PWSH_PAP_GET_SERVER_STATUS;
   PWSHPapGetServerStatus = PWSH_PAP_GET_SERVER_STATUS;
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 2
packages/base/winunits/jwaauthif.pas

@@ -40,22 +40,31 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAuthif.pas,v 1.6 2005/09/03 14:27:47 marquardt Exp $
+// $Id: JwaAuthif.pas,v 1.8 2007/09/05 11:58:48 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAuthif;
 unit JwaAuthif;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "authif.h"'}
 {$HPPEMIT '#include "authif.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 //  Enumerates the attribute types that are passed to the extension DLL.  The
 //  Enumerates the attribute types that are passed to the extension DLL.  The
@@ -642,6 +651,22 @@ type
   PRADIUS_EXTENSION_PROCESS_2 = function(pECB: PRADIUS_EXTENSION_CONTROL_BLOCK): DWORD; stdcall;
   PRADIUS_EXTENSION_PROCESS_2 = function(pECB: PRADIUS_EXTENSION_CONTROL_BLOCK): DWORD; stdcall;
   {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS_2}
   {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS_2}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 25 - 4
packages/base/winunits/jwaauthz.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaAuthz.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaAuthz.pas,v 1.13 2007/09/06 14:57:11 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaAuthz;
 unit JwaAuthz;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "authz.h"'}
 {$HPPEMIT '#include "authz.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinNT, JwaWinType;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // Flags which may be used at the time of client context creation using a sid.
 // Flags which may be used at the time of client context creation using a sid.
@@ -466,10 +473,20 @@ AuthzReportSecurityEventFromParams(
     );
     );
 *)
 *)
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  authzlib = 'authz.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -702,4 +719,8 @@ function AuthzFreeAuditEvent; external authzlib name 'AuthzFreeAuditEvent';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwabatclass.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBatClass.pas,v 1.6 2005/09/03 14:27:47 marquardt Exp $
-
+// $Id: JwaBatClass.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBatClass;
 unit JwaBatClass;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "BatClass.h"'}
 {$HPPEMIT '#include "BatClass.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWinIoctl, JwaWindows;
+  JwaWinIoctl, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // Battery device GUID
 // Battery device GUID
@@ -318,6 +325,23 @@ const
 
 
 // mvb remainder of header file is kernel mode only
 // mvb remainder of header file is kernel mode only
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 20 - 2
packages/base/winunits/jwabits.pas

@@ -40,23 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBits.pas,v 1.7 2005/09/03 14:27:47 marquardt Exp $
+// $Id: JwaBits.pas,v 1.9 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBits;
 unit JwaBits;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bits.h"'}
 {$HPPEMIT '#include "bits.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaBitsMsg;
+  JwaWinBase, JwaWinType, JwaBitsMsg;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 const
 const
   BG_SIZE_UNKNOWN = Int64(-1);
   BG_SIZE_UNKNOWN = Int64(-1);
   {$EXTERNALSYM BG_SIZE_UNKNOWN}
   {$EXTERNALSYM BG_SIZE_UNKNOWN}
@@ -442,6 +447,19 @@ const
   CLSID_BackgroundCopyManager: GUID = '{4991d34b-80a1-4291-83b6-3328366b9097}';
   CLSID_BackgroundCopyManager: GUID = '{4991d34b-80a1-4291-83b6-3328366b9097}';
   {$EXTERNALSYM CLSID_BackgroundCopyManager}
   {$EXTERNALSYM CLSID_BackgroundCopyManager}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwabits1_5.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBits1_5.pas,v 1.7 2005/09/03 14:27:47 marquardt Exp $
-
+// $Id: JwaBits1_5.pas,v 1.9 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBits1_5;
 unit JwaBits1_5;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bits1_5.h"'}
 {$HPPEMIT '#include "bits1_5.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaBits;
+  JwaWinBase, JwaWinType, JwaBits;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 type
 type
   _BG_JOB_REPLY_PROGRESS = record
   _BG_JOB_REPLY_PROGRESS = record
@@ -128,6 +135,23 @@ const
   CLSID_BackgroundCopyManager1_5: GUID = '{f087771f-d74f-4c1a-bb8a-e16aca9124ea}';
   CLSID_BackgroundCopyManager1_5: GUID = '{f087771f-d74f-4c1a-bb8a-e16aca9124ea}';
   {$EXTERNALSYM CLSID_BackgroundCopyManager1_5}
   {$EXTERNALSYM CLSID_BackgroundCopyManager1_5}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 3
packages/base/winunits/jwabitscfg.pas

@@ -40,29 +40,36 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBitscfg.pas,v 1.7 2005/09/03 14:27:47 marquardt Exp $
-
+// $Id: JwaBitscfg.pas,v 1.10 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBitscfg;
 unit JwaBitscfg;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bitscfg.h"'}
 {$HPPEMIT '#include "bitscfg.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinBase, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   IID_IBITSExtensionSetup: TGUID = '{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}';
   IID_IBITSExtensionSetup: TGUID = '{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}';
   {$EXTERNALSYM IID_IBITSExtensionSetup}
   {$EXTERNALSYM IID_IBITSExtensionSetup}
 
 
 type
 type
+  {$IFNDEF JWA_INCLUDEMODE}
   REFIID = TGUID; // also in ActiveDS and another unit
   REFIID = TGUID; // also in ActiveDS and another unit
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   IBITSExtensionSetup = interface(IDispatch)
   IBITSExtensionSetup = interface(IDispatch)
   ['{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}']
   ['{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}']
@@ -87,6 +94,17 @@ const
   CLSID_BITSExtensionSetupFactory: GUID = '{efbbab68-7286-4783-94bf-9461d8b7e7e9}';
   CLSID_BITSExtensionSetupFactory: GUID = '{efbbab68-7286-4783-94bf-9461d8b7e7e9}';
   {$EXTERNALSYM CLSID_BITSExtensionSetupFactory}
   {$EXTERNALSYM CLSID_BITSExtensionSetupFactory}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 2
packages/base/winunits/jwabitsmsg.pas

@@ -40,23 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBitsMsg.pas,v 1.6 2005/09/03 14:27:47 marquardt Exp $
+// $Id: JwaBitsMsg.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBitsMsg;
 unit JwaBitsMsg;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "BitsMsg.h"'}
 {$HPPEMIT '#include "BitsMsg.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 //  Values are 32 bit values layed out as follows:
 //  Values are 32 bit values layed out as follows:
 //
 //
@@ -991,6 +997,19 @@ const
   MC_STATE_FILE_CORRUPT = DWORD($80194007);
   MC_STATE_FILE_CORRUPT = DWORD($80194007);
   {$EXTERNALSYM MC_STATE_FILE_CORRUPT}
   {$EXTERNALSYM MC_STATE_FILE_CORRUPT}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 25 - 2
packages/base/winunits/jwablberr.pas

@@ -40,19 +40,26 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBLBErr.pas,v 1.5 2004/12/08 08:18:35 marquardt Exp $
-
+// $Id: JwaBLBErr.pas,v 1.6 2007/09/05 11:58:48 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBLBErr;
 unit JwaBLBErr;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "BLBErr.h"'}
 {$HPPEMIT '#include "BLBErr.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
 
 
@@ -60,7 +67,23 @@ const
 
 
   SDPBLB_CONF_BLOB_DESTROYED = $e0000300;
   SDPBLB_CONF_BLOB_DESTROYED = $e0000300;
   {$EXTERNALSYM SDPBLB_CONF_BLOB_DESTROYED}
   {$EXTERNALSYM SDPBLB_CONF_BLOB_DESTROYED}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 147 - 5
packages/base/winunits/jwabluetoothapis.pas

@@ -38,22 +38,31 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBluetoothAPIs.pas,v 1.11 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaBluetoothAPIs.pas,v 1.15 2007/09/06 14:57:11 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBluetoothAPIs;
 unit JwaBluetoothAPIs;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bluetoothapis.h"'}
 {$HPPEMIT '#include "bluetoothapis.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
+{$I jedi.inc} //used for D5 compiling
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaBthSdpDef;
+  JwaWinType, JwaWinBase, JwaBthSdpDef;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   BLUETOOTH_MAX_NAME_SIZE            = 248;
   BLUETOOTH_MAX_NAME_SIZE            = 248;
@@ -296,7 +305,7 @@ type
   {$EXTERNALSYM _BLUETOOTH_DEVICE_INFO}
   {$EXTERNALSYM _BLUETOOTH_DEVICE_INFO}
   BLUETOOTH_DEVICE_INFO = _BLUETOOTH_DEVICE_INFO;
   BLUETOOTH_DEVICE_INFO = _BLUETOOTH_DEVICE_INFO;
   {$EXTERNALSYM BLUETOOTH_DEVICE_INFO}
   {$EXTERNALSYM BLUETOOTH_DEVICE_INFO}
-  PBLUETOOTH_DEVICE_INFO = BLUETOOTH_DEVICE_INFO;
+  PBLUETOOTH_DEVICE_INFO = ^BLUETOOTH_DEVICE_INFO;
   {$EXTERNALSYM PBLUETOOTH_DEVICE_INFO}
   {$EXTERNALSYM PBLUETOOTH_DEVICE_INFO}
   TBlueToothDeviceInfo = BLUETOOTH_DEVICE_INFO;
   TBlueToothDeviceInfo = BLUETOOTH_DEVICE_INFO;
   PBlueToothDeviceInfo = PBLUETOOTH_DEVICE_INFO;
   PBlueToothDeviceInfo = PBLUETOOTH_DEVICE_INFO;
@@ -1586,10 +1595,19 @@ function BluetoothEnumAttributes(
     pvParam: Pointer): BOOL;
     pvParam: Pointer): BOOL;
 {$EXTERNALSYM BluetoothEnumAttributes}
 {$EXTERNALSYM BluetoothEnumAttributes}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  btapi = 'irprops.cpl';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 // (rom) MACRO implementation
 // (rom) MACRO implementation
 function BluetoothEnumAttributes(pSDPStream: PBYTE; cbStreamSize: ULONG;
 function BluetoothEnumAttributes(pSDPStream: PBYTE; cbStreamSize: ULONG;
@@ -1757,16 +1775,33 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothDisplayDeviceProperties: Pointer;
   _BluetoothDisplayDeviceProperties: Pointer;
+{$ELSE}
+  _BluetoothDisplayDProperties: Pointer;
+{$ENDIF}
+
 
 
 function BluetoothDisplayDeviceProperties;
 function BluetoothDisplayDeviceProperties;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothDisplayDeviceProperties, btapi, 'BluetoothDisplayDeviceProperties');
   GetProcedureAddress(_BluetoothDisplayDeviceProperties, btapi, 'BluetoothDisplayDeviceProperties');
+{$ELSE}
+  GetProcedureAddress(_BluetoothDisplayDProperties, btapi, 'BluetoothDisplayDeviceProperties');
+{$ENDIF}
+
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothDisplayDeviceProperties]
         JMP     [_BluetoothDisplayDeviceProperties]
+{$ELSE}
+       JMP     [_BluetoothDisplayDProperties]
+{$ENDIF}
+
   end;
   end;
+
 end;
 end;
 
 
 var
 var
@@ -1783,15 +1818,30 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothAuthenticateMultipleDevices: Pointer;
   _BluetoothAuthenticateMultipleDevices: Pointer;
+{$ELSE}
+  _BluetoothAuthenticateMDevices: Pointer;
+{$ENDIF}
+
 
 
 function BluetoothAuthenticateMultipleDevices;
 function BluetoothAuthenticateMultipleDevices;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothAuthenticateMultipleDevices, btapi, 'BluetoothAuthenticateMultipleDevices');
   GetProcedureAddress(_BluetoothAuthenticateMultipleDevices, btapi, 'BluetoothAuthenticateMultipleDevices');
+{$ELSE}
+  GetProcedureAddress(_BluetoothAuthenticateMDevices, btapi, 'BluetoothAuthenticateMultipleDevices');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothAuthenticateMultipleDevices]
         JMP     [_BluetoothAuthenticateMultipleDevices]
+{$ELSE}
+       JMP     [_BluetoothAuthenticateMDevices]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
@@ -1809,15 +1859,30 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothEnumerateInstalledServices: Pointer;
   _BluetoothEnumerateInstalledServices: Pointer;
+{$ELSE}
+  _BluetoothEnumerateIS: Pointer;
+{$ENDIF}
+
 
 
 function BluetoothEnumerateInstalledServices;
 function BluetoothEnumerateInstalledServices;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothEnumerateInstalledServices, btapi, 'BluetoothEnumerateInstalledServices');
   GetProcedureAddress(_BluetoothEnumerateInstalledServices, btapi, 'BluetoothEnumerateInstalledServices');
+{$ELSE}
+  GetProcedureAddress(_BluetoothEnumerateIS, btapi, 'BluetoothEnumerateInstalledServices');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothEnumerateInstalledServices]
         JMP     [_BluetoothEnumerateInstalledServices]
+{$ELSE}
+       JMP     [_BluetoothEnumerateIS]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
@@ -1848,15 +1913,29 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothEnableIncomingConnections: Pointer;
   _BluetoothEnableIncomingConnections: Pointer;
+{$ELSE}
+  _BluetoothEnableIC: Pointer;
+{$ENDIF}
 
 
 function BluetoothEnableIncomingConnections;
 function BluetoothEnableIncomingConnections;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothEnableIncomingConnections, btapi, 'BluetoothEnableIncomingConnections');
   GetProcedureAddress(_BluetoothEnableIncomingConnections, btapi, 'BluetoothEnableIncomingConnections');
+{$ELSE}
+  GetProcedureAddress(_BluetoothEnableIC, btapi, 'BluetoothEnableIncomingConnections');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothEnableIncomingConnections]
         JMP     [_BluetoothEnableIncomingConnections]
+{$ELSE}
+       JMP     [_BluetoothEnableIC]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
@@ -1874,41 +1953,86 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothRegisterForAuthentication: Pointer;
   _BluetoothRegisterForAuthentication: Pointer;
+{$ELSE}
+  _BluetoothRegisterFA: Pointer;
+{$ENDIF}
+
 
 
 function BluetoothRegisterForAuthentication;
 function BluetoothRegisterForAuthentication;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothRegisterForAuthentication, btapi, 'BluetoothRegisterForAuthentication');
   GetProcedureAddress(_BluetoothRegisterForAuthentication, btapi, 'BluetoothRegisterForAuthentication');
+{$ELSE}
+  GetProcedureAddress(_BluetoothRegisterFA, btapi, 'BluetoothRegisterForAuthentication');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothRegisterForAuthentication]
         JMP     [_BluetoothRegisterForAuthentication]
+{$ELSE}
+        JMP     [_BluetoothRegisterFA]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothUnregisterAuthentication: Pointer;
   _BluetoothUnregisterAuthentication: Pointer;
+{$ELSE}
+  _BluetoothUA: Pointer;
+{$ENDIF}
 
 
 function BluetoothUnregisterAuthentication;
 function BluetoothUnregisterAuthentication;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothUnregisterAuthentication, btapi, 'BluetoothUnregisterAuthentication');
   GetProcedureAddress(_BluetoothUnregisterAuthentication, btapi, 'BluetoothUnregisterAuthentication');
+{$ELSE}
+  GetProcedureAddress(_BluetoothUA, btapi, 'BluetoothUnregisterAuthentication');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothUnregisterAuthentication]
         JMP     [_BluetoothUnregisterAuthentication]
+{$ELSE}
+        JMP     [_BluetoothUA]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothSendAuthenticationResponse: Pointer;
   _BluetoothSendAuthenticationResponse: Pointer;
+{$ELSE}
+  _BluetoothSendAR: Pointer;
+{$ENDIF}
+
 
 
 function BluetoothSendAuthenticationResponse;
 function BluetoothSendAuthenticationResponse;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothSendAuthenticationResponse, btapi, 'BluetoothSendAuthenticationResponse');
   GetProcedureAddress(_BluetoothSendAuthenticationResponse, btapi, 'BluetoothSendAuthenticationResponse');
+{$ELSE}
+  GetProcedureAddress(_BluetoothSendAR, btapi, 'BluetoothSendAuthenticationResponse');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothSendAuthenticationResponse]
         JMP     [_BluetoothSendAuthenticationResponse]
+{$ELSE}
+        JMP     [_BluetoothSendAR]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
@@ -1926,15 +2050,29 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _BluetoothSdpGetContainerElementData: Pointer;
   _BluetoothSdpGetContainerElementData: Pointer;
+{$ELSE}
+  _BluetoothSdpGetCED: Pointer;
+{$ENDIF}
 
 
 function BluetoothSdpGetContainerElementData;
 function BluetoothSdpGetContainerElementData;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_BluetoothSdpGetContainerElementData, btapi, 'BluetoothSdpGetContainerElementData');
   GetProcedureAddress(_BluetoothSdpGetContainerElementData, btapi, 'BluetoothSdpGetContainerElementData');
+{$ELSE}
+  GetProcedureAddress(_BluetoothSdpGetCED, btapi, 'BluetoothSdpGetContainerElementData');
+{$ENDIF}
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_BluetoothSdpGetContainerElementData]
         JMP     [_BluetoothSdpGetContainerElementData]
+{$ELSE}
+        JMP     [_BluetoothSdpGetCED]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
@@ -2011,4 +2149,8 @@ function BluetoothSdpEnumAttributes; external btapi name 'BluetoothSdpEnumAttrib
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 2
packages/base/winunits/jwabthdef.pas

@@ -38,23 +38,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBtHDef.pas,v 1.10 2005/09/03 14:27:47 marquardt Exp $
+// $Id: JwaBtHDef.pas,v 1.13 2007/09/06 14:57:11 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBtHDef;
 unit JwaBtHDef;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bthdef.h"'}
 {$HPPEMIT '#include "bthdef.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaBthSdpDef;
+  JwaWinType, JwaBthSdpDef;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 const
 const
   GUID_BTHPORT_DEVICE_INTERFACE: TGUID =     '{0850302A-B344-4FDA-9BE9-90576B8D46F0}';
   GUID_BTHPORT_DEVICE_INTERFACE: TGUID =     '{0850302A-B344-4FDA-9BE9-90576B8D46F0}';
   {$EXTERNALSYM GUID_BTHPORT_DEVICE_INTERFACE}
   {$EXTERNALSYM GUID_BTHPORT_DEVICE_INTERFACE}
@@ -388,8 +394,10 @@ const
   {$EXTERNALSYM BTH_MFG_INTERNAL_USE}
   {$EXTERNALSYM BTH_MFG_INTERNAL_USE}
 
 
 type
 type
+  {$IFNDEF JWA_INCLUDEMODE}
   BTH_ADDR = Int64;
   BTH_ADDR = Int64;
   {$EXTERNALSYM BTH_ADDR}
   {$EXTERNALSYM BTH_ADDR}
+  {$ENDIF JWA_INCLUDEMODE}
   PBTH_ADDR = ^BTH_ADDR;
   PBTH_ADDR = ^BTH_ADDR;
   {$EXTERNALSYM PBTH_ADDR}
   {$EXTERNALSYM PBTH_ADDR}
   BTH_COD = ULONG;
   BTH_COD = ULONG;
@@ -1327,7 +1335,14 @@ function LMP_TRANSPARENT_SCO_DATA(X: Integer): Integer;
 function LMP_FLOW_CONTROL_LAG(X: Integer): Integer;
 function LMP_FLOW_CONTROL_LAG(X: Integer): Integer;
 {$EXTERNALSYM LMP_FLOW_CONTROL_LAG}
 {$EXTERNALSYM LMP_FLOW_CONTROL_LAG}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 function GET_NAP(_bth_addr: BTH_ADDR): Word;
 function GET_NAP(_bth_addr: BTH_ADDR): Word;
 begin
 begin
@@ -1524,4 +1539,8 @@ begin
   _cod := (_cod and not COD_SERVICE_MASK) or (_service shl COD_SERVICE_BIT_OFFSET);
   _cod := (_cod and not COD_SERVICE_MASK) or (_service shl COD_SERVICE_BIT_OFFSET);
 end;
 end;
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 3
packages/base/winunits/jwabthsdpdef.pas

@@ -38,23 +38,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBthSdpDef.pas,v 1.1 2005/09/05 06:29:33 marquardt Exp $
+// $Id: JwaBthSdpDef.pas,v 1.3 2007/09/05 11:58:49 dezipaitor Exp $
 
 
-unit JwaBthSdpDef;
+{$IFNDEF JWA_OMIT_SECTIONS}
+unit JWaBthSdpDef;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bthsdpdef.h"'}
 {$HPPEMIT '#include "bthsdpdef.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 type
 type
   SDP_LARGE_INTEGER_16 = record
   SDP_LARGE_INTEGER_16 = record
     LowPart: Int64;
     LowPart: Int64;
@@ -187,6 +192,19 @@ type
   {$EXTERNALSYM SdpQueryUuid}
   {$EXTERNALSYM SdpQueryUuid}
   TSdpQueryUuid = SdpQueryUuid;
   TSdpQueryUuid = SdpQueryUuid;
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 28 - 3
packages/base/winunits/jwabugcodes.pas

@@ -40,25 +40,33 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaBugCodes.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaBugCodes.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaBugCodes;
 unit JwaBugCodes;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "bugcodes.h"'}
 {$HPPEMIT '#include "bugcodes.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
 
 
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 //
 //
 //  Values are 32 bit values layed out as follows:
 //  Values are 32 bit values layed out as follows:
 //
 //
@@ -2851,6 +2859,23 @@ const
   WORKER_INVALID = ULONG($000000E4);
   WORKER_INVALID = ULONG($000000E4);
   {$EXTERNALSYM WORKER_INVALID}
   {$EXTERNALSYM WORKER_INVALID}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 18 - 2
packages/base/winunits/jwacarderr.pas

@@ -6,11 +6,15 @@
    They exist here to provide error messages on pre-Win2K systems.
    They exist here to provide error messages on pre-Win2K systems.
 
 
 *}
 *}
-
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaCardErr;
 unit JwaCardErr;
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 const
 const
   // =============================
   // =============================
   // Facility SCARD Error Messages
   // Facility SCARD Error Messages
@@ -600,7 +604,19 @@ const
   //  No PIN was presented to the smart card.
   //  No PIN was presented to the smart card.
   //
   //
   SCARD_W_CARD_NOT_AUTHENTICATED   = $8010006F;
   SCARD_W_CARD_NOT_AUTHENTICATED   = $8010006F;
+{$ENDIF JWA_INCLUDEMODE}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
-end.
+{$IFNDEF JWA_OMIT_SECTIONS}
+end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 23 - 18
packages/base/winunits/jwacderr.pas

@@ -40,26 +40,25 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaCdErr.pas,v 1.6 2005/09/04 07:02:38 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+// $Id: JwaCdErr.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaCdErr;
 unit JwaCdErr;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cderr.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cderr.h"'}
-{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 const
 const
   CDERR_DIALOGFAILURE = $FFFF;
   CDERR_DIALOGFAILURE = $FFFF;
   {$EXTERNALSYM CDERR_DIALOGFAILURE}
   {$EXTERNALSYM CDERR_DIALOGFAILURE}
@@ -142,15 +141,21 @@ const
   CCERR_CHOOSECOLORCODES = $5000;
   CCERR_CHOOSECOLORCODES = $5000;
   {$EXTERNALSYM CCERR_CHOOSECOLORCODES}
   {$EXTERNALSYM CCERR_CHOOSECOLORCODES}
 
 
-{$ENDIF JWA_INTERFACESECTION}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
-{$ENDIF !JWA_INCLUDEMODE}
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 6
packages/base/winunits/jwacmnquery.pas

@@ -40,23 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaCmnQuery.pas,v 1.8 2005/09/03 13:12:10 marquardt Exp $
-
+// $Id: JwaCmnQuery.pas,v 1.10 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaCmnQuery;
 unit JwaCmnQuery;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cmnquery.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
   JwaActiveX, // IPersist todo objidl, ocidl
   JwaActiveX, // IPersist todo objidl, ocidl
-  JwaWindows;
+  JwaWinUser, JwaWinType;
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cmnquery.h"'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   IID_IQueryForm: TGUID = (D1:$8cfcee30; D2:$39bd; D3:$11d0; D4:($b8, $d1, $0, $a0, $24, $ab, $2d, $bb));
   IID_IQueryForm: TGUID = (D1:$8cfcee30; D2:$39bd; D3:$11d0; D4:($b8, $d1, $0, $a0, $24, $ab, $2d, $bb));
@@ -276,6 +282,21 @@ type
   end;
   end;
   {$EXTERNALSYM ICommonQuery}
   {$EXTERNALSYM ICommonQuery}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+
+

+ 19 - 2
packages/base/winunits/jwacolordlg.pas

@@ -40,19 +40,23 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaColorDlg.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
-
+// $Id: JwaColorDlg.pas,v 1.6 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaColorDlg;
 unit JwaColorDlg;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "colordlg.h"'}
 {$HPPEMIT '#include "colordlg.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 //  Constant Declarations.
 //  Constant Declarations.
@@ -130,6 +134,19 @@ const
   NUM_CUSTOM_COLORS = 16;
   NUM_CUSTOM_COLORS = 16;
   {$EXTERNALSYM NUM_CUSTOM_COLORS}
   {$EXTERNALSYM NUM_CUSTOM_COLORS}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 24 - 4
packages/base/winunits/jwacpl.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaCpl.pas,v 1.7 2005/09/03 14:27:48 marquardt Exp $
+// $Id: JwaCpl.pas,v 1.10 2007/09/06 14:57:11 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaCpl;
 unit JwaCpl;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "cpl.h"'}
 {$HPPEMIT '#include "cpl.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinUser, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // General rules for being installed in the Control Panel:
 // General rules for being installed in the Control Panel:
@@ -97,15 +103,15 @@ uses
 //
 //
 //
 //
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 const
 const
   WM_CPL_LAUNCH   = WM_USER + 1000;
   WM_CPL_LAUNCH   = WM_USER + 1000;
   {$EXTERNALSYM WM_CPL_LAUNCH}
   {$EXTERNALSYM WM_CPL_LAUNCH}
   WM_CPL_LAUNCHED = WM_USER + 1001;
   WM_CPL_LAUNCHED = WM_USER + 1001;
   {$EXTERNALSYM WM_CPL_LAUNCHED}
   {$EXTERNALSYM WM_CPL_LAUNCHED}
 
 
-// A function prototype for CPlApplet()
-
 type
 type
+// A function prototype for CPlApplet()
   APPLET_PROC = function(hwndCpl: HWND; msg: UINT;
   APPLET_PROC = function(hwndCpl: HWND; msg: UINT;
     lParam1, lParam2: LPARAM): LONG; stdcall;
     lParam1, lParam2: LPARAM): LONG; stdcall;
   {$EXTERNALSYM APPLET_PROC}
   {$EXTERNALSYM APPLET_PROC}
@@ -124,6 +130,7 @@ type
   {$EXTERNALSYM tagCPLINFO}
   {$EXTERNALSYM tagCPLINFO}
   CPLINFO = tagCPLINFO;
   CPLINFO = tagCPLINFO;
   {$EXTERNALSYM CPLINFO}
   {$EXTERNALSYM CPLINFO}
+
   TCplInfo = CPLINFO;
   TCplInfo = CPLINFO;
   PCplInfo = LPCPLINFO;
   PCplInfo = LPCPLINFO;
 
 
@@ -161,6 +168,7 @@ type
   NEWCPLINFOW = tagNEWCPLINFOW;
   NEWCPLINFOW = tagNEWCPLINFOW;
   {$EXTERNALSYM NEWCPLINFOW}
   {$EXTERNALSYM NEWCPLINFOW}
   TNewCplInfoW = NEWCPLINFOW;
   TNewCplInfoW = NEWCPLINFOW;
+
   PNewCplInfoW = LPNEWCPLINFOW;
   PNewCplInfoW = LPNEWCPLINFOW;
 
 
   {$IFDEF UNICODE}
   {$IFDEF UNICODE}
@@ -291,7 +299,19 @@ const
 
 
   CPL_SETUP = 200;
   CPL_SETUP = 200;
   {$EXTERNALSYM CPL_SETUP}
   {$EXTERNALSYM CPL_SETUP}
+{$ENDIF JWA_INCLUDEMODE}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 19 - 1
packages/base/winunits/jwacplext.pas

@@ -40,19 +40,24 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaCplext.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
+// $Id: JwaCplext.pas,v 1.6 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaCplext;
 unit JwaCplext;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "Cplext.h"'}
 {$HPPEMIT '#include "Cplext.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
 //  Below are constants for pages which can be replaced in the standard control
 //  Below are constants for pages which can be replaced in the standard control
@@ -102,6 +107,19 @@ const
 
 
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 22 - 5
packages/base/winunits/jwacryptuiapi.pas

@@ -40,23 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaCryptUIApi.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaCryptUIApi.pas,v 1.12 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaCryptUIApi;
 unit JwaCryptUIApi;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "cryptuiapi.h"'}
 {$HPPEMIT '#include "cryptuiapi.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinCrypt, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 // #include <pshpack8.h>
 // #include <pshpack8.h>
 
 
 //+-------------------------------------------------------------------------
 //+-------------------------------------------------------------------------
@@ -114,10 +118,19 @@ const
   CRYPTUI_SELECT_EXPIRATION_COLUMN     = $000000020;
   CRYPTUI_SELECT_EXPIRATION_COLUMN     = $000000020;
   {$EXTERNALSYM CRYPTUI_SELECT_EXPIRATION_COLUMN}
   {$EXTERNALSYM CRYPTUI_SELECT_EXPIRATION_COLUMN}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  cryptuiapi = 'cryptui.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -154,4 +167,8 @@ function CryptUIDlgSelectCertificateFromStore; external cryptuiapi name 'CryptUI
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 24 - 3
packages/base/winunits/jwadbt.pas

@@ -40,28 +40,34 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDbt.pas,v 1.7 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaDbt.pas,v 1.10 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDbt;
 unit JwaDbt;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dbt.h"'}
 {$HPPEMIT '#include "dbt.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType, JwaWinUser;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // BroadcastSpecialMessage constants.
 // BroadcastSpecialMessage constants.
 //
 //
 
 
 const
 const
+  {$IFNDEF JWA_INCLUDEMODE}
   WM_DEVICECHANGE = $0219;
   WM_DEVICECHANGE = $0219;
   {$EXTERNALSYM WM_DEVICECHANGE}
   {$EXTERNALSYM WM_DEVICECHANGE}
 
 
@@ -92,11 +98,14 @@ const
   {$EXTERNALSYM BSF_FORCEIFHUNG}
   {$EXTERNALSYM BSF_FORCEIFHUNG}
   BSF_NOTIMEOUTIFNOTHUNG = $00000040;
   BSF_NOTIMEOUTIFNOTHUNG = $00000040;
   {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG}
   {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG}
+  {$ENDIF JWA_INCLUDEMODE}
+
   BSF_MSGSRV32ISOK       = $80000000;     // Called synchronously from PM API
   BSF_MSGSRV32ISOK       = $80000000;     // Called synchronously from PM API
   {$EXTERNALSYM BSF_MSGSRV32ISOK}
   {$EXTERNALSYM BSF_MSGSRV32ISOK}
   BSF_MSGSRV32ISOK_BIT   = 31;            // Called synchronously from PM API
   BSF_MSGSRV32ISOK_BIT   = 31;            // Called synchronously from PM API
   {$EXTERNALSYM BSF_MSGSRV32ISOK_BIT}
   {$EXTERNALSYM BSF_MSGSRV32ISOK_BIT}
 
 
+  {$IFNDEF JWA_INCLUDEMODE}
   BSM_ALLCOMPONENTS      = $00000000;
   BSM_ALLCOMPONENTS      = $00000000;
   {$EXTERNALSYM BSM_ALLCOMPONENTS}
   {$EXTERNALSYM BSM_ALLCOMPONENTS}
   BSM_VXDS               = $00000001;
   BSM_VXDS               = $00000001;
@@ -107,6 +116,7 @@ const
   {$EXTERNALSYM BSM_INSTALLABLEDRIVERS}
   {$EXTERNALSYM BSM_INSTALLABLEDRIVERS}
   BSM_APPLICATIONS       = $00000008;
   BSM_APPLICATIONS       = $00000008;
   {$EXTERNALSYM BSM_APPLICATIONS}
   {$EXTERNALSYM BSM_APPLICATIONS}
+  {$ENDIF JWA_INCLUDEMODE}
 
 
 (*
 (*
  * Message = WM_DEVICECHANGE
  * Message = WM_DEVICECHANGE
@@ -667,7 +677,18 @@ type
    dwData: Pointer;
    dwData: Pointer;
    Result: Longint;
    Result: Longint;
   end;
   end;
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

+ 23 - 21
packages/base/winunits/jwadde.pas

@@ -40,31 +40,31 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDde.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaDde.pas,v 1.11 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDde;
 unit JwaDde;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Dde.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
   JwaWinNT, JwaWinType;
   JwaWinNT, JwaWinType;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Dde.h"'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 // DDE window messages
 // DDE window messages
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 const
 const
   WM_DDE_FIRST = $03E0;
   WM_DDE_FIRST = $03E0;
   {$EXTERNALSYM WM_DDE_FIRST}
   {$EXTERNALSYM WM_DDE_FIRST}
@@ -237,18 +237,20 @@ function FreeDDElParam(msg: UINT; lParam: LPARAM): BOOL; stdcall;
 function ReuseDDElParam(lParam: LPARAM; msgIn, msgOut: UINT; uiLo, uiHi: UINT_PTR): LPARAM; stdcall;
 function ReuseDDElParam(lParam: LPARAM; msgIn, msgOut: UINT; uiLo, uiHi: UINT_PTR): LPARAM; stdcall;
 {$EXTERNALSYM ReuseDDElParam}
 {$EXTERNALSYM ReuseDDElParam}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
 
 
-{$ENDIF !JWA_INCLUDEMODE}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  user32 = 'user32.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -341,8 +343,8 @@ function ReuseDDElParam; external user32 name 'ReuseDDElParam';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS}

+ 25 - 5
packages/base/winunits/jwadhcpcsdk.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDhcpCSdk.pas,v 1.8 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaDhcpCSdk.pas,v 1.11 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDhcpCSdk;
 unit JwaDhcpCSdk;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dhcpcsdk.h"'}
 {$HPPEMIT '#include "dhcpcsdk.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // DHCP Standard Options.
 // DHCP Standard Options.
@@ -336,10 +341,21 @@ function DhcpDeRegisterParamChange(Flags: DWORD; Reserved, Event: LPVOID): DWORD
 function DhcpRemoveDNSRegistrations: DWORD; stdcall;
 function DhcpRemoveDNSRegistrations: DWORD; stdcall;
 {$EXTERNALSYM DhcpRemoveDNSRegistrations}
 {$EXTERNALSYM DhcpRemoveDNSRegistrations}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  dhcpapi = 'dhcpcsvc.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -446,4 +462,8 @@ function DhcpRemoveDNSRegistrations; external dhcpapi name 'DhcpRemoveDNSRegistr
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 52 - 10
packages/base/winunits/jwadhcpsapi.pas

@@ -40,32 +40,47 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDhcpsApi.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaDhcpsApi.pas,v 1.12 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDhcpsApi;
 unit JwaDhcpsApi;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dhcpsapi.h"'}
 {$HPPEMIT '#include "dhcpsapi.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 type
 type
+  {$IFNDEF JWA_INCLUDEMODE}
   DHCP_IP_ADDRESS = DWORD;
   DHCP_IP_ADDRESS = DWORD;
+  {$ENDIF JWA_INCLUDEMODE}
+
   {$EXTERNALSYM DHCP_IP_ADDRESS}
   {$EXTERNALSYM DHCP_IP_ADDRESS}
   PDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
   PDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
   {$EXTERNALSYM PDHCP_IP_ADDRESS}
   {$EXTERNALSYM PDHCP_IP_ADDRESS}
+
+  {$IFNDEF JWA_INCLUDEMODE}
   LPDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
   LPDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
   {$EXTERNALSYM LPDHCP_IP_ADDRESS}
   {$EXTERNALSYM LPDHCP_IP_ADDRESS}
+  {$ENDIF JWA_INCLUDEMODE}
+
+  {$IFNDEF JWA_INCLUDEMODE}
   TDhcpIpAddress = DHCP_IP_ADDRESS;
   TDhcpIpAddress = DHCP_IP_ADDRESS;
   PDhcpIpAddress = ^DHCP_IP_ADDRESS;
   PDhcpIpAddress = ^DHCP_IP_ADDRESS;
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   DHCP_IP_MASK = DWORD;
   DHCP_IP_MASK = DWORD;
   {$EXTERNALSYM DHCP_IP_MASK}
   {$EXTERNALSYM DHCP_IP_MASK}
@@ -87,8 +102,11 @@ type
   {$EXTERNALSYM DATE_TIME}
   {$EXTERNALSYM DATE_TIME}
   LPDATE_TIME = ^DATE_TIME;
   LPDATE_TIME = ^DATE_TIME;
   {$EXTERNALSYM LPDATE_TIME}
   {$EXTERNALSYM LPDATE_TIME}
+
+  {$IFNDEF JWA_INCLUDEMODE}
   TDateTime = DATE_TIME;
   TDateTime = DATE_TIME;
   PDateTime = ^DATE_TIME;
   PDateTime = ^DATE_TIME;
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   _DWORD_DWORD = record
   _DWORD_DWORD = record
     DWord1: DWORD;
     DWord1: DWORD;
@@ -311,7 +329,13 @@ type
 
 
 type
 type
   _DHCP_SUBNET_STATE = (
   _DHCP_SUBNET_STATE = (
-    DhcpSubnetEnabled = 0,
+{$IFDEF COMPILER6_UP}
+  DhcpSubnetEnabled = 0,
+{$ELSE}
+  DhcpSubnetEnabled,
+{$ENDIF}
+
+
     DhcpSubnetDisabled,
     DhcpSubnetDisabled,
     DhcpSubnetEnabledSwitched,
     DhcpSubnetEnabledSwitched,
     DhcpSubnetDisabledSwitched,
     DhcpSubnetDisabledSwitched,
@@ -413,7 +437,10 @@ type
   LPDHCP_OPTION_VALUE = ^DHCP_OPTION_VALUE;
   LPDHCP_OPTION_VALUE = ^DHCP_OPTION_VALUE;
   {$EXTERNALSYM LPDHCP_OPTION_VALUE}
   {$EXTERNALSYM LPDHCP_OPTION_VALUE}
   TDhcpOptionValue = DHCP_OPTION_VALUE;
   TDhcpOptionValue = DHCP_OPTION_VALUE;
-  PDhcpOptionValue = ^DHCP_OPTION_VALUE;  
+  PDhcpOptionValue = ^DHCP_OPTION_VALUE;
+
+
+
 
 
 function DhcpGetVersion(ServerIpAddress: LPWSTR; MajorVersion, MinorVersion: LPDWORD): DWORD; stdcall;
 function DhcpGetVersion(ServerIpAddress: LPWSTR; MajorVersion, MinorVersion: LPDWORD): DWORD; stdcall;
 {$EXTERNALSYM DhcpGetVersion}
 {$EXTERNALSYM DhcpGetVersion}
@@ -438,12 +465,22 @@ function DhcpGetSubnetInfo(ServerIpAddress: PWideChar; SubnetAddress: DHCP_IP_AD
 function DhcpGetOptionValue(ServerIpAddress: PWideChar; OptionID: DHCP_OPTION_ID; const ScopeInfo: DHCP_OPTION_SCOPE_INFO; out OptionValue: LPDHCP_OPTION_VALUE): DWORD; stdcall;
 function DhcpGetOptionValue(ServerIpAddress: PWideChar; OptionID: DHCP_OPTION_ID; const ScopeInfo: DHCP_OPTION_SCOPE_INFO; out OptionValue: LPDHCP_OPTION_VALUE): DWORD; stdcall;
 {$EXTERNALSYM DhcpGetOptionValue}
 {$EXTERNALSYM DhcpGetOptionValue}
 procedure DhcpRpcFreeMemory(BufferPointer: PVOID); stdcall;
 procedure DhcpRpcFreeMemory(BufferPointer: PVOID); stdcall;
-{$EXTERNALSYM DhcpRpcFreeMemory}
+{$EXTERNALSYM DhcpRpcFreeMemory}     
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  dhcplib = 'dhcpsapi.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -601,8 +638,8 @@ begin
         POP     EBP
         POP     EBP
         JMP     [_DhcpRpcFreeMemory]
         JMP     [_DhcpRpcFreeMemory]
   end;
   end;
-end;
-                                   
+end;     
+
 {$ELSE}
 {$ELSE}
 
 
 function DhcpGetVersion; external dhcplib name 'DhcpGetVersion';
 function DhcpGetVersion; external dhcplib name 'DhcpGetVersion';
@@ -620,4 +657,9 @@ procedure DhcpRpcFreeMemory; external dhcplib name 'DhcpRpcFreeMemory';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

+ 25 - 3
packages/base/winunits/jwadhcpssdk.pas

@@ -40,11 +40,12 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDhcpSSdk.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaDhcpSSdk.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDhcpSSdk;
 unit JwaDhcpSSdk;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dhcpssdk.h"'}
 {$HPPEMIT '#include "dhcpssdk.h"'}
@@ -52,12 +53,17 @@ unit JwaDhcpSSdk;
 {$HPPEMIT 'typedef DHCP_IP_ADDRESS *LPDHCP_IP_ADDRESS;'}
 {$HPPEMIT 'typedef DHCP_IP_ADDRESS *LPDHCP_IP_ADDRESS;'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinNT, JwaWinType;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //  This structure could change any day.  This will be accurate only for version 0 -- which
 //  This structure could change any day.  This will be accurate only for version 0 -- which
 //  has to be checked for by any CalloutDLL that is hooking onto the DhcpHandleOptionsHook.
 //  has to be checked for by any CalloutDLL that is hooking onto the DhcpHandleOptionsHook.
@@ -69,6 +75,7 @@ type
   {$NODEFINE LPDHCP_IP_ADDRESS}
   {$NODEFINE LPDHCP_IP_ADDRESS}
   TDhcpIpAddress = DHCP_IP_ADDRESS;
   TDhcpIpAddress = DHCP_IP_ADDRESS;
 
 
+
   _DHCP_SERVER_OPTIONS = record
   _DHCP_SERVER_OPTIONS = record
     MessageType: LPBYTE;
     MessageType: LPBYTE;
     SubnetMask: LPDHCP_IP_ADDRESS;
     SubnetMask: LPDHCP_IP_ADDRESS;
@@ -516,6 +523,21 @@ Arguments:
     this table structure.  The table structure is defined above.
     this table structure.  The table structure is defined above.
 }
 }
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+
+

+ 27 - 17
packages/base/winunits/jwadlgs.pas

@@ -40,25 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDlgs.pas,v 1.7 2005/09/01 09:39:07 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+// $Id: JwaDlgs.pas,v 1.9 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDlgs;
 unit JwaDlgs;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dlgs.h"'}
+{$HPPEMIT ''}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dlgs.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 //  Constant Declarations.
 //  Constant Declarations.
@@ -498,15 +500,23 @@ type
   CRGB = tagCRGB;
   CRGB = tagCRGB;
   {$EXTERNALSYM CRGB}
   {$EXTERNALSYM CRGB}
 
 
-{$ENDIF JWA_INTERFACESECTION}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
-{$ENDIF !JWA_INCLUDEMODE}
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+

+ 25 - 5
packages/base/winunits/jwadsadmin.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDSAdmin.pas,v 1.6 2005/09/03 13:12:10 marquardt Exp $
+// $Id: JwaDSAdmin.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDSAdmin;
 unit JwaDSAdmin;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dsadmin.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaActiveX, JwaAdsTLB, JwaPrSht, JwaWindows;
+  JwaActiveX, JwaAdsTLB, JwaPrSht, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dsadmin.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // CoClass for the Object creation dialog object
 // CoClass for the Object creation dialog object
@@ -252,7 +258,21 @@ type
     function End_: HRESULT; stdcall;
     function End_: HRESULT; stdcall;
   end;
   end;
   {$EXTERNALSYM IDsAdminNotifyHandler}
   {$EXTERNALSYM IDsAdminNotifyHandler}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+
+

+ 27 - 5
packages/base/winunits/jwadsclient.pas

@@ -40,23 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDSClient.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaDSClient.pas,v 1.12 2007/09/06 14:57:11 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDSClient;
 unit JwaDSClient;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dsclient.h"'}
 {$HPPEMIT '#include "dsclient.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaAdsTLB, JwaWindows;
+  JwaAdsTLB, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //---------------------------------------------------------------------------//
 //---------------------------------------------------------------------------//
 // CLSIDs exposed for the dsclient.
 // CLSIDs exposed for the dsclient.
 //---------------------------------------------------------------------------//
 //---------------------------------------------------------------------------//
@@ -681,10 +685,24 @@ procedure DsGetFriendlyClassName(pszObjectClass, pszBuffer: LPWSTR;
   cchBuffer: UINT); stdcall;
   cchBuffer: UINT); stdcall;
 {$EXTERNALSYM DsGetFriendlyClassName}
 {$EXTERNALSYM DsGetFriendlyClassName}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  dsuiext = 'dsuiext.dll';
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -763,4 +781,8 @@ procedure DsGetFriendlyClassName; external dsuiext name 'DsGetFriendlyClassName'
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 40 - 7
packages/base/winunits/jwadsgetdc.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDSGetDc.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaDSGetDc.pas,v 1.13 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDSGetDc;
 unit JwaDSGetDc;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "DsGetDC.h"'}
 {$HPPEMIT '#include "DsGetDC.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaNtSecApi, JwaWindows;
+  JwaNtSecApi, JwaWinNT, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // Structure definitions
 // Structure definitions
@@ -261,15 +266,24 @@ function DsValidateSubnetName(SubnetName: LPCTSTR): DWORD; stdcall;
 
 
 // Types from Winsock2.h 
 // Types from Winsock2.h 
 
 
+
+
+{$IFNDEF JWA_INCLUDEMODE}
 type
 type
   sockaddr = record
   sockaddr = record
-    sa_family: Word;              // address family
-    sa_data: array [0..13]of Char;   // up to 14 bytes of direct address
+    sa_family: Word;                  // address family
+    sa_data: array [0..13] of Char;   // up to 14 bytes of direct address
   end;
   end;
   {$EXTERNALSYM sockaddr}
   {$EXTERNALSYM sockaddr}
 
 
   PSOCKADDR = ^SOCKADDR;
   PSOCKADDR = ^SOCKADDR;
   {$EXTERNALSYM PSOCKADDR}
   {$EXTERNALSYM PSOCKADDR}
+{$ENDIF JWA_INCLUDEMODE}
+
+{$IFNDEF JWA_WINSOCK_2}
+//include only if not defined in jwaWinsock2.pas
+type
+
   LPSOCKADDR = PSOCKADDR;
   LPSOCKADDR = PSOCKADDR;
   {$EXTERNALSYM LPSOCKADDR}
   {$EXTERNALSYM LPSOCKADDR}
 
 
@@ -286,6 +300,7 @@ type
   {$EXTERNALSYM LPSOCKET_ADDRESS}
   {$EXTERNALSYM LPSOCKET_ADDRESS}
   TSocketAddress = SOCKET_ADDRESS;
   TSocketAddress = SOCKET_ADDRESS;
   PSocketAddress = LPSOCKET_ADDRESS;
   PSocketAddress = LPSOCKET_ADDRESS;
+{$ENDIF JWA_WINSOCK_2}
 
 
 function DsAddressToSiteNamesA(ComputerName: LPCSTR; EntryCount: DWORD;
 function DsAddressToSiteNamesA(ComputerName: LPCSTR; EntryCount: DWORD;
   SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPChar): DWORD; stdcall;
   SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPChar): DWORD; stdcall;
@@ -518,10 +533,24 @@ procedure DsGetDcCloseW(GetDcContextHandle: HANDLE); stdcall;
 procedure DsGetDcClose(GetDcContextHandle: HANDLE); stdcall;
 procedure DsGetDcClose(GetDcContextHandle: HANDLE); stdcall;
 {$EXTERNALSYM DsGetDcClose}
 {$EXTERNALSYM DsGetDcClose}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  netapi32 = 'netapi32.dll';
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -1006,4 +1035,8 @@ procedure DsGetDcClose; external netapi32 name 'DsGetDcClose';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 24 - 6
packages/base/winunits/jwadskquota.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDskQuota.pas,v 1.7 2005/09/03 13:12:10 marquardt Exp $
-
+// $Id: JwaDskQuota.pas,v 1.9 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDskQuota;
 unit JwaDskQuota;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "DskQuota.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaActiveX, JwaWindows;
+  JwaActiveX, JwaWinNT, JwaWinType;
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "DskQuota.h"'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
 
 
@@ -352,8 +358,15 @@ type
   {$EXTERNALSYM DISKQUOTA_EVENTS;}
   {$EXTERNALSYM DISKQUOTA_EVENTS;}
   PDISKQUOTA_EVENTS = ^DISKQUOTA_EVENTS;
   PDISKQUOTA_EVENTS = ^DISKQUOTA_EVENTS;
   {$EXTERNALSYM PDISKQUOTA_EVENTS;}
   {$EXTERNALSYM PDISKQUOTA_EVENTS;}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 function DISKQUOTA_SET_DISABLED(var s: DWORD): DWORD;
 function DISKQUOTA_SET_DISABLED(var s: DWORD): DWORD;
 begin
 begin
@@ -422,4 +435,9 @@ begin
     Result := Result or DISKQUOTA_LOGFLAG_USER_LIMIT;
     Result := Result or DISKQUOTA_LOGFLAG_USER_LIMIT;
 end;
 end;
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 23 - 3
packages/base/winunits/jwadsquery.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDSQuery.pas,v 1.8 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaDSQuery.pas,v 1.10 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDSQuery;
 unit JwaDSQuery;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dsquery.h"'}
 {$HPPEMIT '#include "dsquery.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaCmnQuery, JwaWindows;
+  JwaCmnQuery, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   CLSID_DsQuery: TGUID = (D1:$8a23e65e; D2:$31c2; D3:$11d0; D4:($89, $1c, $0, $a0, $24, $ab, $2d, $bb));
   CLSID_DsQuery: TGUID = (D1:$8a23e65e; D2:$31c2; D3:$11d0; D4:($89, $1c, $0, $a0, $24, $ab, $2d, $bb));
@@ -218,6 +223,21 @@ const
   DSQPM_HELPTOPICS = CQPM_HANDLERSPECIFIC + 1; // wParam = 0, lParam = hWnd parent
   DSQPM_HELPTOPICS = CQPM_HANDLERSPECIFIC + 1; // wParam = 0, lParam = hWnd parent
   {$EXTERNALSYM DSQPM_HELPTOPICS}
   {$EXTERNALSYM DSQPM_HELPTOPICS}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
 
 
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+
+

+ 23 - 5
packages/base/winunits/jwadsrole.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDSRole.pas,v 1.8 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaDSRole.pas,v 1.11 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDSRole;
 unit JwaDSRole;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dsrole.h"'}
 {$HPPEMIT '#include "dsrole.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // Domain information
 // Domain information
@@ -173,10 +178,19 @@ function DsRoleGetPrimaryDomainInformation(lpServer: LPCWSTR;
 procedure DsRoleFreeMemory(Buffer: PVOID); stdcall;
 procedure DsRoleFreeMemory(Buffer: PVOID); stdcall;
 {$EXTERNALSYM DsRoleFreeMemory}
 {$EXTERNALSYM DsRoleFreeMemory}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  netapi32 = 'netapi32.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -213,4 +227,8 @@ procedure DsRoleFreeMemory; external netapi32 name 'DsRoleFreeMemory';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 23 - 5
packages/base/winunits/jwadssec.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaDsSec.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaDsSec.pas,v 1.13 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaDsSec;
 unit JwaDsSec;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "dssec.h"'}
 {$HPPEMIT '#include "dssec.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaPrSht;
+  JwaWinType, JwaWinNT, JwaPrSht;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //+---------------------------------------------------------------------------
 //+---------------------------------------------------------------------------
 //
 //
@@ -145,11 +151,19 @@ type
     pfnWriteSD: PFNWRITEOBJECTSECURITY;
     pfnWriteSD: PFNWRITEOBJECTSECURITY;
     lpContext:LPARAM): HRESULT; stdcall;
     lpContext:LPARAM): HRESULT; stdcall;
   {$EXTERNALSYM PFNDSCREATESECPAGE}
   {$EXTERNALSYM PFNDSCREATESECPAGE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  dssec = 'dssec.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -172,4 +186,8 @@ function DSCreateSecurityPage; external dssec name 'DSCreateSecurityPage';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 4
packages/base/winunits/jwaerrorrep.pas

@@ -40,23 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaErrorRep.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaErrorRep.pas,v 1.13 2007/09/14 06:48:45 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaErrorRep;
 unit JwaErrorRep;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "errorrep.h"'}
 {$HPPEMIT '#include "errorrep.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinBase, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 type
 type
   tagEFaultRepRetVal = (
   tagEFaultRepRetVal = (
     frrvOk,
     frrvOk,
@@ -92,10 +97,24 @@ type
   pfn_ADDEREXCLUDEDAPPLICATION = pfn_ADDEREXCLUDEDAPPLICATIONW;
   pfn_ADDEREXCLUDEDAPPLICATION = pfn_ADDEREXCLUDEDAPPLICATIONW;
   {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATION}
   {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATION}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  faultreplib = 'faultrep.dll';
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -160,4 +179,8 @@ function AddERExcludedApplication; external faultreplib name 'AddERExcludedAppli
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 22 - 17
packages/base/winunits/jwaexcpt.pas

@@ -40,14 +40,21 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaExcpt.pas,v 1.7 2005/09/04 07:02:38 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaExcpt.pas,v 1.9 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaExcpt;
 unit JwaExcpt;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "excpt.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
@@ -55,13 +62,8 @@ interface
 uses
 uses
   JwaWinType;
   JwaWinType;
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "excpt.h"'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 // This file contains the definitions and prototypes for the compiler-
 // This file contains the definitions and prototypes for the compiler-
 // dependent intrinsics, support functions and keywords which implement
 // dependent intrinsics, support functions and keywords which implement
@@ -94,15 +96,18 @@ const
   EXCEPTION_CONTINUE_EXECUTION   = DWORD(-1);
   EXCEPTION_CONTINUE_EXECUTION   = DWORD(-1);
   {$EXTERNALSYM EXCEPTION_CONTINUE_EXECUTION}
   {$EXTERNALSYM EXCEPTION_CONTINUE_EXECUTION}
 
 
-{$ENDIF JWA_INTERFACESECTION}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
-{$ENDIF !JWA_INCLUDEMODE}
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS}

+ 22 - 3
packages/base/winunits/jwafaxdev.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaFaxDev.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaFaxDev.pas,v 1.9 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaFaxDev;
 unit JwaFaxDev;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "faxdev.h"'}
 {$HPPEMIT '#include "faxdev.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaPrSht;
+  JwaWinType, JwaPrSht;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // FAX status constants
 // FAX status constants
@@ -104,7 +110,9 @@ const
 //
 //
 
 
 type
 type
+  {$IFNDEF JWA_INCLUDEMODE}
   HCALL = HANDLE; // todo from TAPI
   HCALL = HANDLE; // todo from TAPI
+  {$ENDIF JWA_INCLUDEMODE}
 
 
   PFAX_SEND = ^FAX_SEND;
   PFAX_SEND = ^FAX_SEND;
   {$EXTERNALSYM PFAX_SEND}
   {$EXTERNALSYM PFAX_SEND}
@@ -202,6 +210,17 @@ type
   PFAXDEVCONFIGURE = function(out PropSheetPage: HPROPSHEETPAGE): BOOL; stdcall;
   PFAXDEVCONFIGURE = function(out PropSheetPage: HPROPSHEETPAGE): BOOL; stdcall;
   {$EXTERNALSYM PFAXDEVCONFIGURE}
   {$EXTERNALSYM PFAXDEVCONFIGURE}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 2
packages/base/winunits/jwafaxext.pas

@@ -40,22 +40,30 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaFaxExt.pas,v 1.7 2005/09/03 14:27:48 marquardt Exp $
+// $Id: JwaFaxExt.pas,v 1.9 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaFaxExt;
 unit JwaFaxExt;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "faxext.h"'}
 {$HPPEMIT '#include "faxext.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 {************************************
 {************************************
 *                                   *
 *                                   *
@@ -121,6 +129,23 @@ type
     pFaxExtFreeBuffer: PFAX_EXT_FREE_BUFFER): HRESULT; stdcall;
     pFaxExtFreeBuffer: PFAX_EXT_FREE_BUFFER): HRESULT; stdcall;
   {$EXTERNALSYM PFAX_EXT_INITIALIZE_CONFIG}
   {$EXTERNALSYM PFAX_EXT_INITIALIZE_CONFIG}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwafaxmmc.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaFaxMmc.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaFaxMmc.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaFaxMmc;
 unit JwaFaxMmc;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "faxmmc.h"'}
 {$HPPEMIT '#include "faxmmc.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 type
 type
   OLESTR = WideString; // todo 
   OLESTR = WideString; // todo 
@@ -94,6 +101,23 @@ const
   CF_MSFAXSRV_ROUTING_METHOD_GUID = TEXT('FAXSRV_RoutingMethodGuid');
   CF_MSFAXSRV_ROUTING_METHOD_GUID = TEXT('FAXSRV_RoutingMethodGuid');
   {$EXTERNALSYM CF_MSFAXSRV_ROUTING_METHOD_GUID}
   {$EXTERNALSYM CF_MSFAXSRV_ROUTING_METHOD_GUID}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwafaxroute.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaFaxRoute.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaFaxRoute.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaFaxRoute;
 unit JwaFaxRoute;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "faxroute.h"'}
 {$HPPEMIT '#include "faxroute.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // microsoft routing guids
 // microsoft routing guids
@@ -161,7 +168,24 @@ type
   {$EXTERNALSYM PFAXROUTEGETROUTINGINFO}
   {$EXTERNALSYM PFAXROUTEGETROUTINGINFO}
   PFAXROUTESETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: DWORD): BOOL; stdcall;
   PFAXROUTESETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: DWORD): BOOL; stdcall;
   {$EXTERNALSYM PFAXROUTESETROUTINGINFO}
   {$EXTERNALSYM PFAXROUTESETROUTINGINFO}
+  
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 29 - 8
packages/base/winunits/jwagpedit.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaGPEdit.pas,v 1.8 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaGPEdit.pas,v 1.11 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaGPEdit;
 unit JwaGPEdit;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "GPEdit.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaActiveX, JwaPrSht, JwaWindows;
+  JwaActiveX, JwaPrSht, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "GPEdit.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 type
 type
   LPOLESTR = POleStr;
   LPOLESTR = POleStr;
@@ -166,9 +171,11 @@ const
 // GUID that identifies the registry extension
 // GUID that identifies the registry extension
 //
 //
 
 
+  {$IFNDEF JWA_INCLUDEMODE}
   REGISTRY_EXTENSION_GUID: TGUID = (
   REGISTRY_EXTENSION_GUID: TGUID = (
     D1:$35378EAC; D2:$683F; D3:$11D2; D4:($A8, $9A, $00, $C0, $4F, $BB, $CF, $A2));
     D1:$35378EAC; D2:$683F; D3:$11D2; D4:($A8, $9A, $00, $C0, $4F, $BB, $CF, $A2));
   {$EXTERNALSYM IID_IGroupPolicyObject}
   {$EXTERNALSYM IID_IGroupPolicyObject}
+  {$ENDIF JWA_INCLUDEMODE}
 
 
 //========================================================================================
 //========================================================================================
 //
 //
@@ -851,10 +858,19 @@ function ImportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
 function ExportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
 function ExportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
 {$EXTERNALSYM ExportRSoPData}
 {$EXTERNALSYM ExportRSoPData}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  gpeditlib = 'gpedit.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -947,4 +963,9 @@ function ExportRSoPData; external gpeditlib name 'ExportRSoPData';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+

+ 19 - 5
packages/base/winunits/jwahherror.pas

@@ -42,8 +42,8 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaHhError.pas,v 1.8 2005/09/03 16:10:30 marquardt Exp $
-
+// $Id: JwaHhError.pas,v 1.11 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaHhError;
 unit JwaHhError;
 
 
 interface
 interface
@@ -53,10 +53,13 @@ interface
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 uses
 uses
-  JwaWindows;
-
+  JwaWinType, JwaWinError;
+{$ENDIF JWA_OMIT_SECTIONS}
 // Published: http://support.microsoft.com/default.aspx?scid=kb;en-us;297768
 // Published: http://support.microsoft.com/default.aspx?scid=kb;en-us;297768
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
 type
 type
   // HH_LAST_ERROR Command Related structures and constants
   // HH_LAST_ERROR Command Related structures and constants
   // Used by command HH_GET_LAST_ERROR
   // Used by command HH_GET_LAST_ERROR
@@ -69,7 +72,7 @@ type
   end;
   end;
   HH_LAST_ERROR = tagHH_LAST_ERROR;
   HH_LAST_ERROR = tagHH_LAST_ERROR;
   THHLastError = tagHH_LAST_ERROR;
   THHLastError = tagHH_LAST_ERROR;
-
+{$ENDIF JWA_INCLUDEMODE}
 // Error codes
 // Error codes
 
 
 const
 const
@@ -88,6 +91,17 @@ const
   HH_E_KEYWORD_EXCLUDED        = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0304); // no hits found because of infotype and subset exclusion.
   HH_E_KEYWORD_EXCLUDED        = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0304); // no hits found because of infotype and subset exclusion.
   HH_E_KEYWORD_NOT_SUPPORTED   = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0305); // no hits found because of keywords not being supported in this mode.
   HH_E_KEYWORD_NOT_SUPPORTED   = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0305); // no hits found because of keywords not being supported in this mode.
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 2
packages/base/winunits/jwahtmlGuid.pas

@@ -40,19 +40,24 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaHtmlGuid.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
-
+// $Id: JwaHtmlGuid.pas,v 1.6 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaHtmlGuid;
 unit JwaHtmlGuid;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "htmlguid.h"'}
 {$HPPEMIT '#include "htmlguid.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
 // GUID for HTML viewer is: {25336920-03F9-11cf-8FD0-00AA00686F13}
 // GUID for HTML viewer is: {25336920-03F9-11cf-8FD0-00AA00686F13}
@@ -85,6 +90,20 @@ const
   CLSID_Page: TGUID = (D1:$71bc8843; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
   CLSID_Page: TGUID = (D1:$71bc8843; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
   {$EXTERNALSYM CLSID_Page}
   {$EXTERNALSYM CLSID_Page}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 36 - 10
packages/base/winunits/jwahtmlhelp.pas

@@ -43,8 +43,8 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaHtmlHelp.pas,v 1.12 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaHtmlHelp.pas,v 1.15 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaHtmlHelp;
 unit JwaHtmlHelp;
 
 
 {$I jediapilib.inc}
 {$I jediapilib.inc}
@@ -52,6 +52,7 @@ unit JwaHtmlHelp;
 interface
 interface
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 (*$HPPEMIT ''*)
 (*$HPPEMIT ''*)
 (*$HPPEMIT '#include "htmlhelp.h"'*)
 (*$HPPEMIT '#include "htmlhelp.h"'*)
@@ -64,14 +65,16 @@ interface
 (*$HPPEMIT '} HH_LAST_ERROR ;'*)
 (*$HPPEMIT '} HH_LAST_ERROR ;'*)
 (*$HPPEMIT ''*)
 (*$HPPEMIT ''*)
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 uses
 uses
   {$IFDEF HAS_UNIT_VARIANTS}
   {$IFDEF HAS_UNIT_VARIANTS}
   Variants,
   Variants,
   {$ENDIF HAS_UNIT_VARIANTS}
   {$ENDIF HAS_UNIT_VARIANTS}
-  JwaWindows;
-
+  JwaWinType, JwaWinUser;
+{$ENDIF JWA_OMIT_SECTIONS}
 // Commands to pass to HtmlHelp()
 // Commands to pass to HtmlHelp()
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 const
 const
   HH_DISPLAY_TOPIC           = $0000;
   HH_DISPLAY_TOPIC           = $0000;
   {$EXTERNALSYM HH_DISPLAY_TOPIC}
   {$EXTERNALSYM HH_DISPLAY_TOPIC}
@@ -401,7 +404,7 @@ type
   PHHPopup = ^THHPopup;
   PHHPopup = ^THHPopup;
   tagHH_POPUP = packed record
   tagHH_POPUP = packed record
     cbStruct: Integer;                     // sizeof this structure
     cbStruct: Integer;                     // sizeof this structure
-    hinst_: HINST;                         // instance handle for string resource
+    hinst_: HINST;                     // instance handle for string resource
     idString: UINT;                        // string resource id, or text id if pszFile is specified in HtmlHelp call
     idString: UINT;                        // string resource id, or text id if pszFile is specified in HtmlHelp call
     pszText: LPCTSTR;                      // used if idString is zero
     pszText: LPCTSTR;                      // used if idString is zero
     pt: POINT;                             // top center of popup window
     pt: POINT;                             // top center of popup window
@@ -738,13 +741,26 @@ type
 
 
 {$ENDIF HTMLHELP12}
 {$ENDIF HTMLHELP12}
 
 
-implementation
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
+implementation
+{$IFDEF DYNAMIC_LINK}
 uses
 uses
-  {$IFDEF DYNAMIC_LINK}
-  JwaWindows, JwaWinReg,
-  {$ENDIF DYNAMIC_LINK}
-  JwaWinDLLNames;
+  JwaWinBase, JwaWinError, JwaWinNT, JwaWinReg;
+{$ENDIF DYNAMIC_LINK}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -813,10 +829,20 @@ end;
 
 
 {$ELSE}
 {$ELSE}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  hhctrl = 'hhctrl.ocx';
+{$ENDIF JWA_INCLUDEMODE}
+
 function HtmlHelpA; external hhctrl name 'HtmlHelpA';
 function HtmlHelpA; external hhctrl name 'HtmlHelpA';
 function HtmlHelpW; external hhctrl name 'HtmlHelpW';
 function HtmlHelpW; external hhctrl name 'HtmlHelpW';
 function HtmlHelp; external hhctrl name 'HtmlHelp' + AWSuffix;
 function HtmlHelp; external hhctrl name 'HtmlHelp' + AWSuffix;
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwaiaccess.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIAccess.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaIAccess.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIAccess;
 unit JwaIAccess;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "iaccess.h"'}
 {$HPPEMIT '#include "iaccess.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaAccCtrl, JwaWindows;
+  JwaAccCtrl, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 {****************************************************************************
 {****************************************************************************
  *  Storage access control interface
  *  Storage access control interface
@@ -110,7 +117,24 @@ type
   end;
   end;
   {$EXTERNALSYM IAuditControl}
   {$EXTERNALSYM IAuditControl}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
 
 

+ 20 - 3
packages/base/winunits/jwaiadmext.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIAdmExt.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
+// $Id: JwaIAdmExt.pas,v 1.8 2007/09/05 11:58:49 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIAdmExt;
 unit JwaIAdmExt;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "iadmext.h"'}
 {$HPPEMIT '#include "iadmext.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaIisCnfg, JwaWindows;
+  JwaIisCnfg, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // The Main Interface. All extensions must support this interface.
 // The Main Interface. All extensions must support this interface.
@@ -124,7 +129,19 @@ type
   end;
   end;
   {$EXTERNALSYM IADMEXT}
   {$EXTERNALSYM IADMEXT}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-end.
 
 
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
+end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 23 - 5
packages/base/winunits/jwaicmpapi.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIcmpApi.pas,v 1.14 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaIcmpApi.pas,v 1.17 2007/09/14 06:48:45 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIcmpApi;
 unit JwaIcmpApi;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "icmpapi.h"'}
 {$HPPEMIT '#include "icmpapi.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaIpExport, JwaWS2tcpip, JwaWinternl;
+  JwaWinType, JwaIpExport, JwaNative, JwaWS2tcpip;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //    Declarations for the Win32 ICMP Echo request API.
 //    Declarations for the Win32 ICMP Echo request API.
 
 
@@ -320,10 +325,19 @@ function IcmpParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall
 function Icmp6ParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall;
 function Icmp6ParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall;
 {$EXTERNALSYM Icmp6ParseReplies}
 {$EXTERNALSYM Icmp6ParseReplies}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  icmplib = 'iphlpapi.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -444,4 +458,8 @@ function Icmp6ParseReplies; external icmplib name 'Icmp6ParseReplies';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 24 - 5
packages/base/winunits/jwaiiscnfg.pas

@@ -40,20 +40,25 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIisCnfg;
 unit JwaIisCnfg;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iiscnfg.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iiscnfg.h"'}
-{$HPPEMIT ''}
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // Paths
 // Paths
@@ -1755,7 +1760,15 @@ procedure MD_SET_DATA_RECORD(_pMDR, _id, _attr, _utype, _dtype, _dlen, _pData);
   IIS_CLASS_COMPRESS_SCHEME_W  = WideString('IIsCompressionScheme');
   IIS_CLASS_COMPRESS_SCHEME_W  = WideString('IIsCompressionScheme');
   {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEME_W}
   {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEME_W}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
 
 
 {TODO structure declaration is in generated file
 {TODO structure declaration is in generated file
 procedure MD_SET_DATA_RECORD(_pMDR: Pointer; _id, _attr, _utype, _dtype, _dlen: DWORD; _pData: Pointer);
 procedure MD_SET_DATA_RECORD(_pMDR: Pointer; _id, _attr, _utype, _dtype, _dlen: DWORD; _pData: Pointer);
@@ -1769,5 +1782,11 @@ begin
 end;
 end;
 }
 }
 
 
+
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
 
 

+ 34 - 4
packages/base/winunits/jwaimagehlp.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaImageHlp.pas,v 1.10 2005/09/06 16:36:50 marquardt Exp $
+// $Id: JwaImageHlp.pas,v 1.13 2007/09/14 06:48:45 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaImageHlp;
 unit JwaImageHlp;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "ImageHlp.h"'}
 {$HPPEMIT '#include "ImageHlp.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  Windows, JwaWindows;
+  Windows, JwaWinBase, JwaWinNT, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   IMAGE_SEPARATION = 64*1024;
   IMAGE_SEPARATION = 64*1024;
@@ -2733,19 +2739,35 @@ type
 //
 //
 //--
 //--
 
 
+
 function RVA_TO_ADDR(Mapping, Rva: Pointer): Pointer;
 function RVA_TO_ADDR(Mapping, Rva: Pointer): Pointer;
 {$EXTERNALSYM RVA_TO_ADDR}
 {$EXTERNALSYM RVA_TO_ADDR}
 
 
+
 function MiniDumpWriteDump(hProcess: HANDLE; ProcessId: DWORD; hFile: HANDLE; DumpType: MINIDUMP_TYPE; ExceptionParam: PMINIDUMP_EXCEPTION_INFORMATION; UserStreamParam: PMINIDUMP_USER_STREAM_INFORMATION; CallbackParam: PMINIDUMP_CALLBACK_INFORMATION): BOOL; stdcall;
 function MiniDumpWriteDump(hProcess: HANDLE; ProcessId: DWORD; hFile: HANDLE; DumpType: MINIDUMP_TYPE; ExceptionParam: PMINIDUMP_EXCEPTION_INFORMATION; UserStreamParam: PMINIDUMP_USER_STREAM_INFORMATION; CallbackParam: PMINIDUMP_CALLBACK_INFORMATION): BOOL; stdcall;
 {$EXTERNALSYM MiniDumpWriteDump}
 {$EXTERNALSYM MiniDumpWriteDump}
 
 
 function MiniDumpReadDumpStream(BaseOfDump: PVOID; StreamNumber: ULONG; var Dir: PMINIDUMP_DIRECTORY; var StreamPointer: PVOID; var StreamSize: ULONG): BOOL; stdcall;
 function MiniDumpReadDumpStream(BaseOfDump: PVOID; StreamNumber: ULONG; var Dir: PMINIDUMP_DIRECTORY; var StreamPointer: PVOID; var StreamSize: ULONG): BOOL; stdcall;
 {$EXTERNALSYM MiniDumpReadDumpStream}
 {$EXTERNALSYM MiniDumpReadDumpStream}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  ImageHlpLib = 'imagehlp.dll';
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
 procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
 begin
 begin
@@ -2777,8 +2799,10 @@ begin
   Result := Pointer(Cardinal(Mapping) + Cardinal(Rva));
   Result := Pointer(Cardinal(Mapping) + Cardinal(Rva));
 end;
 end;
 
 
+
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
+
 var
 var
   _BindImage: Pointer;
   _BindImage: Pointer;
 
 
@@ -3429,6 +3453,7 @@ begin
   end;
   end;
 end;
 end;
 
 
+
 var
 var
   _SymEnumSourceFiles: Pointer;
   _SymEnumSourceFiles: Pointer;
 
 
@@ -4274,6 +4299,7 @@ begin
   end;
   end;
 end;
 end;
 
 
+
 {$ELSE}
 {$ELSE}
 
 
 function BindImage; external ImageHlpLib name 'BindImage';
 function BindImage; external ImageHlpLib name 'BindImage';
@@ -4394,4 +4420,8 @@ function MiniDumpReadDumpStream; external ImageHlpLib name 'MiniDumpReadDumpStre
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 30 - 6
packages/base/winunits/jwaimapi.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaImapi.pas,v 1.7 2005/09/03 13:12:10 marquardt Exp $
-
+// $Id: JwaImapi.pas,v 1.9 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaImapi;
 unit JwaImapi;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "imapi.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaActiveX, JwaWindows;
+  JwaActiveX, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "imapi.h"'}
-{$HPPEMIT ''}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // interface IDiscRecorder
 // interface IDiscRecorder
@@ -288,6 +295,23 @@ const
   MSEnumDiscRecordersObj: TGUID = '{8A03567A-63CB-4BA8-BAF6-52119816D1EF}';
   MSEnumDiscRecordersObj: TGUID = '{8A03567A-63CB-4BA8-BAF6-52119816D1EF}';
   {$EXTERNALSYM MSEnumDiscRecordersObj}
   {$EXTERNALSYM MSEnumDiscRecordersObj}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 30 - 6
packages/base/winunits/jwaimapierror.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaImapiError.pas,v 1.7 2005/09/03 16:10:31 marquardt Exp $
-
+// $Id: JwaImapiError.pas,v 1.9 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaImapiError;
 unit JwaImapiError;
 
 
 interface
 interface
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "imapi.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinError, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "imapi.h"'}
-{$HPPEMIT ''}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   IMAPI_S_PROPERTIESIGNORED     = HRESULT((SEVERITY_SUCCESS shl 31) or (FACILITY_ITF shl 16) or $200);
   IMAPI_S_PROPERTIESIGNORED     = HRESULT((SEVERITY_SUCCESS shl 31) or (FACILITY_ITF shl 16) or $200);
@@ -135,6 +142,23 @@ const
   IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 46);
   IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 46);
   {$EXTERNALSYM IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC}
   {$EXTERNALSYM IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 28 - 5
packages/base/winunits/jwaime.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIme.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaIme.pas,v 1.12 2007/09/14 06:48:46 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIme;
 unit JwaIme;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "Ime.h"'}
 {$HPPEMIT '#include "Ime.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   IME_MAXPROCESS = 32;
   IME_MAXPROCESS = 32;
@@ -391,10 +396,24 @@ type
   {$EXTERNALSYM NPSTRINGEXSTRUCT}
   {$EXTERNALSYM NPSTRINGEXSTRUCT}
   TStringexStruct = STRINGEXSTRUCT;
   TStringexStruct = STRINGEXSTRUCT;
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  imelib = 'user32.dll';
+  {$IFDEF UNICODE}
+  AWSuffix = 'W';
+  {$ELSE}
+  AWSuffix = 'A';
+  {$ENDIF UNICODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -445,4 +464,8 @@ function SendIMEMessageEx; external imelib name 'SendIMEMessageEx' + AWSuffix;
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 28 - 3
packages/base/winunits/jwaioevent.pas

@@ -40,23 +40,30 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIoEvent.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaIoEvent.pas,v 1.8 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIoEvent;
 unit JwaIoEvent;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "Ioevent.h"'}
 {$HPPEMIT '#include "Ioevent.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+
 
 
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 //  Label change event.  This event is signalled upon successful completion
 //  Label change event.  This event is signalled upon successful completion
 //  of a label change.  There is no additional data.
 //  of a label change.  There is no additional data.
@@ -285,6 +292,24 @@ const
   GUID_IO_DISK_LAYOUT_CHANGE: TGUID = (D1:$11dff54c; D2:$8469; D3:$41f9; D4:($b3, $de, $ef, $83, $64, $87, $c5, $4a));
   GUID_IO_DISK_LAYOUT_CHANGE: TGUID = (D1:$11dff54c; D2:$8469; D3:$41f9; D4:($b3, $de, $ef, $83, $64, $87, $c5, $4a));
   {$EXTERNALSYM GUID_IO_DISK_LAYOUT_CHANGE}
   {$EXTERNALSYM GUID_IO_DISK_LAYOUT_CHANGE}
 
 
+//your interface declarations here
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 22 - 3
packages/base/winunits/jwaipexport.pas

@@ -43,22 +43,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIpExport.pas,v 1.8 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaIpExport.pas,v 1.11 2007/09/14 06:48:46 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIpExport;
 unit JwaIpExport;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "ipexport.h"'}
 {$HPPEMIT '#include "ipexport.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaWS2tcpip;
+  JwaWinType, JwaWS2tcpip;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // IP type definitions.
 // IP type definitions.
@@ -103,6 +108,7 @@ type
 
 
 //#ifndef s_addr
 //#ifndef s_addr
 
 
+  {$IFNDEF JWA_INCLUDEMODE}
   in_addr = record
   in_addr = record
     case Integer of
     case Integer of
       0: (
       0: (
@@ -116,6 +122,7 @@ type
         );
         );
   end;
   end;
   {$EXTERNALSYM in_addr}
   {$EXTERNALSYM in_addr}
+  {$ENDIF JWA_INCLUDEMODE}
 
 
 //#define s_addr  S_un.S_addr /* can be used for most tcp & ip code */
 //#define s_addr  S_un.S_addr /* can be used for most tcp & ip code */
 
 
@@ -436,6 +443,18 @@ const
   IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = 106;
   IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = 106;
   {$EXTERNALSYM IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
   {$EXTERNALSYM IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
 
 
+//your interface declarations here
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 49 - 9
packages/base/winunits/jwaiphlpapi.pas

@@ -43,22 +43,31 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIpHlpApi.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaIpHlpApi.pas,v 1.11 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIpHlpApi;
 unit JwaIpHlpApi;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iphlpapi.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
+{$I jedi.inc} //used for D5 compiling
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaIpExport, JwaIpRtrMib, JwaIpTypes, JwaWindows;
+  JwaIpExport, JwaIpRtrMib, JwaIpTypes, JwaWinType, JwaWinBase, JwaWinSock;
+
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iphlpapi.h"'}
-{$HPPEMIT ''}
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 //                                                                          //
 //                                                                          //
@@ -386,10 +395,23 @@ function RestoreMediaSense(pOverlapped: POVERLAPPED; lpdwEnableCount: LPDWORD):
 function GetIpErrorString(ErrorCode: IP_STATUS; Buffer: PWCHAR; var Size: DWORD): DWORD; stdcall;
 function GetIpErrorString(ErrorCode: IP_STATUS; Buffer: PWCHAR; var Size: DWORD): DWORD; stdcall;
 {$EXTERNALSYM GetIpErrorString}
 {$EXTERNALSYM GetIpErrorString}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  iphlpapilib = 'iphlpapi.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -797,15 +819,27 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _NhpAllocateAndGetInterfaceInfoFromStack: Pointer;
   _NhpAllocateAndGetInterfaceInfoFromStack: Pointer;
+{$ELSE}
+  _NhpAllocateAGIIFrStack: Pointer;
+{$ENDIF}
 
 
 function NhpAllocateAndGetInterfaceInfoFromStack;
 function NhpAllocateAndGetInterfaceInfoFromStack;
 begin
 begin
-  GetProcedureAddress(_NhpAllocateAndGetInterfaceInfoFromStack, iphlpapilib, 'NhpAllocateAndGetInterfaceInfoFromStack');
+{$IFDEF SUPPORT_LONG_VARNAMES}
+  GetProcedureAddress(_NhpAllocateAndGetInterfaceInfoFromStack,iphlpapilib, 'NhpAllocateAndGetInterfaceInfoFromStack');
+{$ELSE}
+  GetProcedureAddress(_NhpAllocateAGIIFrStack,iphlpapilib, 'NhpAllocateAndGetInterfaceInfoFromStack');
+{$ENDIF}
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_NhpAllocateAndGetInterfaceInfoFromStack]
         JMP     [_NhpAllocateAndGetInterfaceInfoFromStack]
+{$ELSE}
+        JMP     [_NhpAllocateAGIIFrStack]
+{$ENDIF}
   end;
   end;
 end;
 end;
 
 
@@ -1182,4 +1216,10 @@ function GetIpErrorString; external iphlpapilib name 'GetIpErrorString';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 2
packages/base/winunits/jwaipifcons.pas

@@ -43,19 +43,26 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIpIfCons.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
-
+// $Id: JwaIpIfCons.pas,v 1.6 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIpIfCons;
 unit JwaIpIfCons;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "ipifcons.h"'}
 {$HPPEMIT '#include "ipifcons.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 //                                                                          //
 //                                                                          //
@@ -485,6 +492,24 @@ const
   MIB_IF_OPER_STATUS_OPERATIONAL     = 5;
   MIB_IF_OPER_STATUS_OPERATIONAL     = 5;
   {$EXTERNALSYM MIB_IF_OPER_STATUS_OPERATIONAL}
   {$EXTERNALSYM MIB_IF_OPER_STATUS_OPERATIONAL}
 
 
+//your interface declarations here
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 28 - 3
packages/base/winunits/jwaipinfoid.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIpInfoId.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaIpInfoId.pas,v 1.8 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIpInfoId;
 unit JwaIpInfoId;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "ipinfoid.h"'}
 {$HPPEMIT '#include "ipinfoid.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   IP_ROUTER_MANAGER_VERSION = 1;
   IP_ROUTER_MANAGER_VERSION = 1;
@@ -128,6 +135,24 @@ const
 //                                                                          //
 //                                                                          //
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 
 
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwaiprtrmib.pas

@@ -43,22 +43,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIpRtrMib.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaIpRtrMib.pas,v 1.8 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIpRtrMib;
 unit JwaIpRtrMib;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "iprtrmib.h"'}
 {$HPPEMIT '#include "iprtrmib.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows;
+  JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 //                                                                          //
 //                                                                          //
@@ -1239,6 +1246,23 @@ const
 
 
 // #define CAST_MIB_INFO(X,Y,Z)    Z = (Y)(X->rgbyData)
 // #define CAST_MIB_INFO(X,Y,Z)    Z = (Y)(X->rgbyData)
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 27 - 3
packages/base/winunits/jwaiptypes.pas

@@ -43,22 +43,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIpTypes.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
-
+// $Id: JwaIpTypes.pas,v 1.8 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIpTypes;
 unit JwaIpTypes;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "iptypes.h"'}
 {$HPPEMIT '#include "iptypes.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWinsock2, JwaWindows;
+  JwaWinsock2, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 type
 type
   // #include <time.h>  // TODO
   // #include <time.h>  // TODO
@@ -489,6 +496,23 @@ type
   TIpInterfaceNameInfo = IP_INTERFACE_NAME_INFO;
   TIpInterfaceNameInfo = IP_INTERFACE_NAME_INFO;
   PIpInterfaceNameInfo = ^IP_INTERFACE_NAME_INFO;
   PIpInterfaceNameInfo = ^IP_INTERFACE_NAME_INFO;
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 28 - 2
packages/base/winunits/jwaisguids.pas

@@ -40,20 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIsGuids.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
-
+// $Id: JwaIsGuids.pas,v 1.6 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIsGuids;
 unit JwaIsGuids;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "isguids.h"'}
 {$HPPEMIT '#include "isguids.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 //
 //
 // isguids.h - Internet Shortcut GUID definitions.
 // isguids.h - Internet Shortcut GUID definitions.
 //
 //
@@ -77,6 +85,24 @@ const
   {$EXTERNALSYM IID_IUniformResourceLocator}
   {$EXTERNALSYM IID_IUniformResourceLocator}
   {$ENDIF UNICODE}
   {$ENDIF UNICODE}
 
 
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 25 - 2
packages/base/winunits/jwaissper16.pas

@@ -40,22 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaIssPer16.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
-
+// $Id: JwaIssPer16.pas,v 1.7 2007/09/14 06:48:46 marquardt Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaIssPer16;
 unit JwaIssPer16;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "issper16.h"'}
 {$HPPEMIT '#include "issper16.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
   JwaSSPI;
   JwaSSPI;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 // Define the severities
 // Define the severities
 //
 //
@@ -89,6 +96,7 @@ uses
 //
 //
 
 
 const
 const
+  {$IFNDEF JWA_INCLUDEMODE}
   FACILITY_SECURITY = $9;
   FACILITY_SECURITY = $9;
   {$EXTERNALSYM FACILITY_SECURITY}
   {$EXTERNALSYM FACILITY_SECURITY}
   FACILITY_NULL     = 0;
   FACILITY_NULL     = 0;
@@ -100,9 +108,12 @@ const
 
 
   STATUS_SEVERITY_SUCCESS = $0;
   STATUS_SEVERITY_SUCCESS = $0;
   {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
   {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
+  {$ENDIF JWA_INCLUDEMODE}
+
   STATUS_SEVERITY_COERROR = $2;
   STATUS_SEVERITY_COERROR = $2;
   {$EXTERNALSYM STATUS_SEVERITY_COERROR}
   {$EXTERNALSYM STATUS_SEVERITY_COERROR}
 
 
+{$IFNDEF JWA_INCLUDEMODE}
 //
 //
 // MessageId: SEC_E_INSUFFICIENT_MEMORY
 // MessageId: SEC_E_INSUFFICIENT_MEMORY
 //
 //
@@ -394,7 +405,19 @@ const
   {$EXTERNALSYM SEC_E_NO_SPM}
   {$EXTERNALSYM SEC_E_NO_SPM}
   SEC_E_BAD_PKGID     = SEC_E_SECPKG_NOT_FOUND;
   SEC_E_BAD_PKGID     = SEC_E_SECPKG_NOT_FOUND;
   {$EXTERNALSYM SEC_E_BAD_PKGID}
   {$EXTERNALSYM SEC_E_BAD_PKGID}
+{$ENDIF JWA_INCLUDEMODE}
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 51 - 14
packages/base/winunits/jwalm.pas

@@ -41,30 +41,40 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLM.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
+// $Id: JwaLM.pas,v 1.11 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaLM;
 unit JwaLM;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS}
+
 {$DEFINE JWALM_PAS}
 {$DEFINE JWALM_PAS}
-{$DEFINE JWA_INCLUDEMODE}
+{.$DEFINE JWA_INCLUDEMODE}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
   JwaWindows;
   JwaWindows;
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 {$DEFINE JWA_INTERFACESECTION}
 {$DEFINE JWA_INTERFACESECTION}
-{$I JwaLmErr.pas}      // LAN Manager network error definitions
-{$I JwaLmCons.pas}     // LAN Manager common definitions
+{$DEFINE JWA_OMIT_SECTIONS_LM}
+
 
 
-{$I JwaLmAccess.pas}   // Access, Domain, Group and User classes
-{$I JwaLmAlert.pas}    // Alerter
-{$I JwaLmShare.pas}    // Connection, File, Session and Share classes
-{$I JwaLmMsg.pas}      // Message class
+
+ {$I JwaLmCons.pas}     // LAN Manager common definitions
+ {$I JwaLmErr.pas}      // LAN Manager network error definitions
+ {$I JwaLmAccess.pas}   // Access, Domain, Group and User classes
+ {$I JwaLmAlert.pas}    // Alerter
+ {$I JwaLmShare.pas}    // Connection, File, Session and Share classes
+ {$I JwaLmMsg.pas}      // Message class
 {$I JwaLmRemUtl.pas}   // Remote Utility class
 {$I JwaLmRemUtl.pas}   // Remote Utility class
 {$I JwaLmRepl.pas}     // Replicator class
 {$I JwaLmRepl.pas}     // Replicator class
 {$I JwaLmServer.pas}   // Server class
 {$I JwaLmServer.pas}   // Server class
@@ -77,21 +87,30 @@ uses
 {$I JwaLmStats.pas}    // NetStats class
 {$I JwaLmStats.pas}    // NetStats class
 {$I JwaLmAudit.pas}    // NetAudit class
 {$I JwaLmAudit.pas}    // NetAudit class
 {$I JwaLmJoin.pas}     // NetJoinDomain class
 {$I JwaLmJoin.pas}     // NetJoinDomain class
+
+
+
 {$UNDEF JWA_INTERFACESECTION}
 {$UNDEF JWA_INTERFACESECTION}
+{$UNDEF JWA_OMIT_SECTIONS_LM}
+
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
 
 
 uses
 uses
   JwaWinDLLNames;
   JwaWinDLLNames;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$DEFINE JWA_IMPLEMENTATIONSECTION}
 {$DEFINE JWA_IMPLEMENTATIONSECTION}
-{$I JwaLmCons.pas}     // LAN Manager common definitions
-{$I JwaLmErr.pas}      // LAN Manager network error definitions
+{$DEFINE JWA_OMIT_SECTIONS_LM}
 
 
-{$I JwaLmAccess.pas}   // Access, Domain, Group and User classes
-{$I JwaLmAlert.pas}    // Alerter
-{$I JwaLmShare.pas}    // Connection, File, Session and Share classes
-{$I JwaLmMsg.pas}      // Message class
+ {$I JwaLmCons.pas}     // LAN Manager common definitions
+ {$I JwaLmErr.pas}      // LAN Manager network error definitions
+ {$I JwaLmAccess.pas}   // Access, Domain, Group and User classes
+ {$I JwaLmAlert.pas}    // Alerter
+ {$I JwaLmShare.pas}    // Connection, File, Session and Share classes
+ {$I JwaLmMsg.pas}      // Message class
 {$I JwaLmRemUtl.pas}   // Remote Utility class
 {$I JwaLmRemUtl.pas}   // Remote Utility class
 {$I JwaLmRepl.pas}     // Replicator class
 {$I JwaLmRepl.pas}     // Replicator class
 {$I JwaLmServer.pas}   // Server class
 {$I JwaLmServer.pas}   // Server class
@@ -104,7 +123,25 @@ uses
 {$I JwaLmStats.pas}    // NetStats class
 {$I JwaLmStats.pas}    // NetStats class
 {$I JwaLmAudit.pas}    // NetAudit class
 {$I JwaLmAudit.pas}    // NetAudit class
 {$I JwaLmJoin.pas}     // NetJoinDomain class
 {$I JwaLmJoin.pas}     // NetJoinDomain class
+
+{$UNDEF JWA_OMIT_SECTIONS_LM}
 {$UNDEF JWA_IMPLEMENTATIONSECTION}
 {$UNDEF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 

+ 21 - 25
packages/base/winunits/jwalmaccess.pas

@@ -40,29 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmAccess.pas,v 1.11 2005/09/07 09:54:53 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+// $Id: JwaLmAccess.pas,v 1.13 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmAccess;
 unit JwaLmAccess;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmaccess.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmaccess.h"'}
-{$HPPEMIT ''}
+  JwaWinNT, JwaWinType, JwaLmCons;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Function Prototypes - User
 // Function Prototypes - User
 //
 //
@@ -2170,18 +2169,13 @@ const
   NETLOGON_VERIFY_STATUS_RETURNED  = $80; // Trust verification status returned in netlog2_pdc_connection_status
   NETLOGON_VERIFY_STATUS_RETURNED  = $80; // Trust verification status returned in netlog2_pdc_connection_status
   {$EXTERNALSYM NETLOGON_VERIFY_STATUS_RETURNED}
   {$EXTERNALSYM NETLOGON_VERIFY_STATUS_RETURNED}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -2833,9 +2827,11 @@ function I_NetLogonControl2; external netapi32 name 'I_NetLogonControl2';
 function NetEnumerateTrustedDomains; external netapi32 name 'NetEnumerateTrustedDomains';
 function NetEnumerateTrustedDomains; external netapi32 name 'NetEnumerateTrustedDomains';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+

+ 22 - 22
packages/base/winunits/jwalmalert.pas

@@ -40,29 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmAlert.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+// $Id: JwaLmAlert.pas,v 1.12 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmAlert;
 unit JwaLmAlert;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmalert.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmalert.h"'}
-{$HPPEMIT ''}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Function Prototypes
 // Function Prototypes
 //
 //
@@ -237,18 +235,19 @@ const
   PRJOB_QS_PRINTING = 3;
   PRJOB_QS_PRINTING = 3;
   {$EXTERNALSYM PRJOB_QS_PRINTING}
   {$EXTERNALSYM PRJOB_QS_PRINTING}
 
 
-{$ENDIF JWA_INTERFACESECTION}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
 
 
-{$IFNDEF JWA_INCLUDEMODE}
 
 
+
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
 
 
-{$ENDIF !JWA_INCLUDEMODE}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 function ALERT_OTHER_INFO(x: Pointer): Pointer;
 function ALERT_OTHER_INFO(x: Pointer): Pointer;
 begin
 begin
@@ -290,8 +289,9 @@ function NetAlertRaiseEx; external netapi32 name 'NetAlertRaiseEx';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 20 - 25
packages/base/winunits/jwalmapibuf.pas

@@ -40,29 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmApiBuf.pas,v 1.9 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmApiBuf.pas,v 1.11 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmApiBuf;
 unit JwaLmApiBuf;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmapibuf.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmapibuf.h"'}
-{$HPPEMIT ''}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Function Prototypes
 // Function Prototypes
 //
 //
@@ -84,18 +83,14 @@ function NetApiBufferSize(Buffer: LPVOID; var ByteCount: DWORD): NET_API_STATUS;
 function NetapipBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
 function NetapipBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
 {$EXTERNALSYM NetapipBufferAllocate}
 {$EXTERNALSYM NetapipBufferAllocate}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -174,8 +169,8 @@ function NetapipBufferAllocate; external netapi32 name 'NetapipBufferAllocate';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_INTERFACESECTION}
+                             
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 19 - 6
packages/base/winunits/jwalmat.pas

@@ -40,22 +40,27 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmAt.pas,v 1.8 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaLmAt.pas,v 1.10 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaLmAt;
 unit JwaLmAt;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "lmat.h"'}
 {$HPPEMIT '#include "lmat.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 //  The following bits are used with Flags field in structures below.
 //  The following bits are used with Flags field in structures below.
@@ -157,11 +162,14 @@ function NetScheduleJobEnum(Servername: LPCWSTR; var PointerToBuffer: LPBYTE; Pr
 function NetScheduleJobGetInfo(Servername: LPCWSTR; JobId: DWORD; var PointerToBuffer: LPBYTE): NET_API_STATUS; stdcall;
 function NetScheduleJobGetInfo(Servername: LPCWSTR; JobId: DWORD; var PointerToBuffer: LPBYTE): NET_API_STATUS; stdcall;
 {$EXTERNALSYM NetScheduleJobGetInfo}
 {$EXTERNALSYM NetScheduleJobGetInfo}
 
 
-implementation
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-uses
-  JwaWinDLLNames;
+{$IFNDEF JWA_OMIT_SECTIONS}
+implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$IFNDEF JWA_INTERFACESECTION}
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
 var
 var
@@ -225,4 +233,9 @@ function NetScheduleJobGetInfo; external netapi32 name 'NetScheduleJobGetInfo';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 20 - 25
packages/base/winunits/jwalmaudit.pas

@@ -40,28 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmAudit.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmAudit.pas,v 1.13 2007/09/14 06:48:46 marquardt Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmAudit;
 unit JwaLmAudit;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmaudit.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmaudit.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 {$IFNDEF JWA_INCLUDEMODE}
 {$IFNDEF JWA_INCLUDEMODE}
 
 
@@ -88,7 +88,7 @@ const
   LOGFLAGS_SEEK     = $2;
   LOGFLAGS_SEEK     = $2;
   {$EXTERNALSYM LOGFLAGS_SEEK}
   {$EXTERNALSYM LOGFLAGS_SEEK}
 
 
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_INCLUDEMODE}
 
 
 //
 //
 // Function Prototypes - Audit
 // Function Prototypes - Audit
@@ -677,19 +677,14 @@ const
   {$EXTERNALSYM AA_A_ACL}
   {$EXTERNALSYM AA_A_ACL}
   AA_A_ALL    = AA_F_OPEN or AA_F_WRITE or AA_F_DELETE or AA_F_ACL;
   AA_A_ALL    = AA_F_OPEN or AA_F_WRITE or AA_F_DELETE or AA_F_ACL;
   {$EXTERNALSYM AA_A_ALL}
   {$EXTERNALSYM AA_A_ALL}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -740,8 +735,8 @@ function NetAuditWrite; external netapi32 name 'NetAuditWrite';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 44 - 20
packages/base/winunits/jwalmconfig.pas

@@ -40,24 +40,21 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmConfig.pas,v 1.11 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmConfig.pas,v 1.13 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmConfig;
 unit JwaLmConfig;
 
 
 {$I jediapilib.inc}
 {$I jediapilib.inc}
+{$I jedi.inc} //used for D5 compiling
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "lmconfig.h"'}
 {$HPPEMIT '#include "lmconfig.h"'}
@@ -65,6 +62,8 @@ uses
 
 
 {$DEFINE LM_REVISED_CONFIG_APIS}
 {$DEFINE LM_REVISED_CONFIG_APIS}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
+
 //
 //
 // Function Prototypes - Config
 // Function Prototypes - Config
 //
 //
@@ -115,18 +114,14 @@ type
   TConfigInfo0 = CONFIG_INFO_0;
   TConfigInfo0 = CONFIG_INFO_0;
   PConfigInfo0 = PCONFIG_INFO_0;  
   PConfigInfo0 = PCONFIG_INFO_0;  
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -170,28 +165,57 @@ begin
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _NetRegisterDomainNameChangeNotification: Pointer;
   _NetRegisterDomainNameChangeNotification: Pointer;
+{$ELSE}
+  _NetRegisterDomainNCN: Pointer;
+{$ENDIF}
+
 
 
 function NetRegisterDomainNameChangeNotification;
 function NetRegisterDomainNameChangeNotification;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_NetRegisterDomainNameChangeNotification, netapi32, 'NetRegisterDomainNameChangeNotification');
   GetProcedureAddress(_NetRegisterDomainNameChangeNotification, netapi32, 'NetRegisterDomainNameChangeNotification');
+{$ELSE}
+  GetProcedureAddress(_NetRegisterDomainNCN, netapi32, 'NetRegisterDomainNameChangeNotification');
+{$ENDIF}
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_NetRegisterDomainNameChangeNotification]
         JMP     [_NetRegisterDomainNameChangeNotification]
+{$ELSE}
+        JMP     [_NetRegisterDomainNCN]
+{$ENDIF}
   end;
   end;
 end;
 end;
 
 
 var
 var
+{$IFDEF SUPPORT_LONG_VARNAMES}
   _NetUnregisterDomainNameChangeNotification: Pointer;
   _NetUnregisterDomainNameChangeNotification: Pointer;
+{$ELSE}
+  _NetUnregisterDomainNCN: Pointer;
+{$ENDIF}
+
 
 
 function NetUnregisterDomainNameChangeNotification;
 function NetUnregisterDomainNameChangeNotification;
 begin
 begin
+{$IFDEF SUPPORT_LONG_VARNAMES}
   GetProcedureAddress(_NetUnregisterDomainNameChangeNotification, netapi32, 'NetUnregisterDomainNameChangeNotification');
   GetProcedureAddress(_NetUnregisterDomainNameChangeNotification, netapi32, 'NetUnregisterDomainNameChangeNotification');
+{$ELSE}
+  GetProcedureAddress(_NetUnregisterDomainNCN, netapi32, 'NetUnregisterDomainNameChangeNotification');
+{$ENDIF}
+
+
   asm
   asm
         MOV     ESP, EBP
         MOV     ESP, EBP
         POP     EBP
         POP     EBP
+{$IFDEF SUPPORT_LONG_VARNAMES}
         JMP     [_NetUnregisterDomainNameChangeNotification]
         JMP     [_NetUnregisterDomainNameChangeNotification]
+{$ELSE}
+        JMP     [_NetUnregisterDomainNCN]
+{$ENDIF}
+
   end;
   end;
 end;
 end;
 
 
@@ -205,8 +229,8 @@ function NetUnregisterDomainNameChangeNotification; external netapi32 name 'NetU
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 28 - 17
packages/base/winunits/jwalmcons.pas

@@ -40,28 +40,33 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmCons.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmCons.pas,v 1.12 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaLmCons;
 unit JwaLmCons;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lm.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmErr;
+  JwaWinType, JwaLmErr;
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$ENDIF !JWA_INCLUDEMODE}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lm.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_INCLUDEMODE}
+const
+  NetApi32 = 'netapi32.dll';
+{$ENDIF JWA_INCLUDEMODE}
 
 
 //
 //
 // NOTE:  Lengths of strings are given as the maximum lengths of the
 // NOTE:  Lengths of strings are given as the maximum lengths of the
@@ -361,15 +366,21 @@ const
   MAX_LANMAN_MESSAGE_ID = 5899;
   MAX_LANMAN_MESSAGE_ID = 5899;
   {$EXTERNALSYM MAX_LANMAN_MESSAGE_ID}
   {$EXTERNALSYM MAX_LANMAN_MESSAGE_ID}
 
 
-{$ENDIF JWA_INTERFACESECTION}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
-{$ENDIF !JWA_INCLUDEMODE}
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
+
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS}

+ 21 - 5
packages/base/winunits/jwalmdfs.pas

@@ -40,22 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmDFS.pas,v 1.8 2005/09/06 16:36:50 marquardt Exp $
-
+// $Id: JwaLmDFS.pas,v 1.10 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaLmDFS;
 unit JwaLmDFS;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "lmdfs.h"'}
 {$HPPEMIT '#include "lmdfs.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
+  JwaLmCons, JwaWinType;
+
+{$ENDIF JWA_OMIT_SECTIONS}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 //
 //
 // DFS Volume state
 // DFS Volume state
@@ -481,10 +487,15 @@ function NetDfsMove(DfsEntryPath: LPWSTR; DfsNewEntryPath: LPWSTR): NET_API_STAT
 function NetDfsRename(Path: LPWSTR; NewPath: LPWSTR): NET_API_STATUS; stdcall;
 function NetDfsRename(Path: LPWSTR; NewPath: LPWSTR): NET_API_STATUS; stdcall;
 {$EXTERNALSYM NetDfsRename}
 {$EXTERNALSYM NetDfsRename}
 
 
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-uses
-  JwaWinDLLNames;
+
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -731,4 +742,9 @@ function NetDfsRename; external netapi32 name 'NetDfsRename';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
+{$ENDIF JWA_INTERFACESECTION}
+
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
+{$ENDIF JWA_OMIT_SECTIONS}

+ 23 - 17
packages/base/winunits/jwalmerr.pas

@@ -40,25 +40,25 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmErr.pas,v 1.7 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+// $Id: JwaLmErr.pas,v 1.9 2007/09/05 11:58:50 dezipaitor Exp $
+{$IFNDEF JWA_OMIT_SECTIONS}
 unit JwaLmErr;
 unit JwaLmErr;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmerr.h"'}
+{$HPPEMIT ''}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
+{$ENDIF JWA_OMIT_SECTIONS}
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
 
 
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmerr.h"'}
-{$HPPEMIT ''}
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 
 
 const
 const
   NERR_Success = 0; // Success
   NERR_Success = 0; // Success
@@ -931,15 +931,21 @@ const
 //    WARNING:  Do not exceed MAX_NERR; values above this are used by
 //    WARNING:  Do not exceed MAX_NERR; values above this are used by
 //              other error code ranges (errlog.h, service.h, apperr.h).
 //              other error code ranges (errlog.h, service.h, apperr.h).
 
 
-{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
+{$IFNDEF JWA_OMIT_SECTIONS}
 implementation
 implementation
-{$ENDIF !JWA_INCLUDEMODE}
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS}
+
+{$IFNDEF JWA_INTERFACESECTION}
+//your implementation here
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS}
+
+

+ 19 - 27
packages/base/winunits/jwalmerrlog.pas

@@ -40,29 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmErrLog.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmErrLog.pas,v 1.12 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmErrLog;
 unit JwaLmErrLog;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmerrlog.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmerrlog.h"'}
-{$HPPEMIT ''}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Data Structures - Config
 // Data Structures - Config
 //
 //
@@ -2139,20 +2138,14 @@ const
      * to this domain controller. After the misconfiguration is corrected, restart the NetLogon
      * to this domain controller. After the misconfiguration is corrected, restart the NetLogon
      * service on this machine and verify that this event log no longer appears.
      * service on this machine and verify that this event log no longer appears.
      *)
      *)
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
-
+{$IFNDEF JWA_INTERFACESECTION}
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
 var
 var
@@ -2201,9 +2194,8 @@ function NetErrorLogRead; external netapi32 name 'NetErrorLogRead';
 function NetErrorLogWrite; external netapi32 name 'NetErrorLogWrite';
 function NetErrorLogWrite; external netapi32 name 'NetErrorLogWrite';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 13 - 21
packages/base/winunits/jwalmjoin.pas

@@ -40,10 +40,9 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmJoin.pas,v 1.11 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmJoin.pas,v 1.13 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmJoin;
 unit JwaLmJoin;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
@@ -53,16 +52,14 @@ unit JwaLmJoin;
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 {$HPPEMIT '#include "lmjoin.h"'}
 {$HPPEMIT '#include "lmjoin.h"'}
 {$HPPEMIT ''}
 {$HPPEMIT ''}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Types of name that can be validated
 // Types of name that can be validated
 //
 //
@@ -220,18 +217,14 @@ type
 function NetEnumerateComputerNames(Server: LPCWSTR; NameType: NET_COMPUTER_NAME_TYPE; Reserved: ULONG; EntryCount: PDWORD; var ComputerNames: LPLPWSTR): NET_API_STATUS; stdcall;
 function NetEnumerateComputerNames(Server: LPCWSTR; NameType: NET_COMPUTER_NAME_TYPE; Reserved: ULONG; EntryCount: PDWORD; var ComputerNames: LPLPWSTR): NET_API_STATUS; stdcall;
 {$EXTERNALSYM NetEnumerateComputerNames}
 {$EXTERNALSYM NetEnumerateComputerNames}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -379,9 +372,8 @@ function NetSetPrimaryComputerName; external netapi32 name 'NetSetPrimaryCompute
 function NetEnumerateComputerNames; external netapi32 name 'NetEnumerateComputerNames';
 function NetEnumerateComputerNames; external netapi32 name 'NetEnumerateComputerNames';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 21 - 21
packages/base/winunits/jwalmmsg.pas

@@ -40,29 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmMsg.pas,v 1.9 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmMsg.pas,v 1.11 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmMsg;
 unit JwaLmMsg;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmmsg.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmmsg.h"'}
-{$HPPEMIT ''}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Function Prototypes
 // Function Prototypes
 //
 //
@@ -131,18 +130,18 @@ const
   MSGNAME_FORWARDED_FROM = $10;    // Name forwarded from remote station
   MSGNAME_FORWARDED_FROM = $10;    // Name forwarded from remote station
   {$EXTERNALSYM MSGNAME_FORWARDED_FROM}
   {$EXTERNALSYM MSGNAME_FORWARDED_FROM}
 
 
-{$ENDIF JWA_INTERFACESECTION}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
+
 
 
-{$IFNDEF JWA_INCLUDEMODE}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
 
 
-{$ENDIF !JWA_INCLUDEMODE}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -221,8 +220,9 @@ function NetMessageBufferSend; external netapi32 name 'NetMessageBufferSend';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
+
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 19 - 25
packages/base/winunits/jwalmremutl.pas

@@ -40,29 +40,28 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmRemUtl.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmRemUtl.pas,v 1.12 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmRemUtl;
 unit JwaLmRemUtl;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmremutl.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmremutl.h"'}
-{$HPPEMIT ''}
+  JwaLmCons, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Type Definitions
 // Type Definitions
 //
 //
@@ -160,19 +159,14 @@ const
   {$EXTERNALSYM ALLOCATE_RESPONSE}
   {$EXTERNALSYM ALLOCATE_RESPONSE}
   USE_SPECIFIC_TRANSPORT = DWORD($80000000);
   USE_SPECIFIC_TRANSPORT = DWORD($80000000);
   {$EXTERNALSYM USE_SPECIFIC_TRANSPORT}
   {$EXTERNALSYM USE_SPECIFIC_TRANSPORT}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 // todo cdecl function so no dynamic linking for the time being...
 // todo cdecl function so no dynamic linking for the time being...
 
 
@@ -215,8 +209,8 @@ function NetRemoteComputerSupports; external netapi32 name 'NetRemoteComputerSup
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 19 - 22
packages/base/winunits/jwalmrepl.pas

@@ -40,29 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmRepl.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmRepl.pas,v 1.12 2007/09/05 11:58:50 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmRepl;
 unit JwaLmRepl;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmrepl.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
+  JwaLmCons, JwaWinType;
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmrepl.h"'}
-{$HPPEMIT ''}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Replicator Configuration APIs
 // Replicator Configuration APIs
 //
 //
@@ -347,19 +347,16 @@ const
   {$EXTERNALSYM REPL_STATE_NO_SYNC}
   {$EXTERNALSYM REPL_STATE_NO_SYNC}
   REPL_STATE_NEVER_REPLICATED = 3;
   REPL_STATE_NEVER_REPLICATED = 3;
   {$EXTERNALSYM REPL_STATE_NEVER_REPLICATED}
   {$EXTERNALSYM REPL_STATE_NEVER_REPLICATED}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
 
 
-{$ENDIF !JWA_INCLUDEMODE}
 
 
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -578,8 +575,8 @@ function NetReplImportDirUnlock; external netapi32 name 'NetReplImportDirUnlock'
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

+ 20 - 25
packages/base/winunits/jwalmserver.pas

@@ -40,29 +40,29 @@
 {                                                                              }
 {                                                                              }
 {******************************************************************************}
 {******************************************************************************}
 
 
-// $Id: JwaLmServer.pas,v 1.11 2005/09/07 09:54:54 marquardt Exp $
-
-{$IFNDEF JWA_INCLUDEMODE}
+// $Id: JwaLmServer.pas,v 1.13 2007/09/05 11:58:51 dezipaitor Exp $
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 unit JwaLmServer;
 unit JwaLmServer;
 
 
 {$WEAKPACKAGEUNIT}
 {$WEAKPACKAGEUNIT}
+{$ENDIF JWA_OMIT_SECTIONS_LM}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmserver.h"'}
+{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 {$I jediapilib.inc}
 {$I jediapilib.inc}
 
 
 interface
 interface
 
 
 uses
 uses
-  JwaWindows, JwaLmCons;
+  JwaLmCons, JwaWinSvc, JwaWinType;
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_INTERFACESECTION}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmserver.h"'}
-{$HPPEMIT ''}
 
 
+{$IFNDEF JWA_IMPLEMENTATIONSECTION}
 //
 //
 // Function Prototypes - SERVER
 // Function Prototypes - SERVER
 //
 //
@@ -102,7 +102,7 @@ function NetServerTransportAdd(servername: LMSTR; level: DWORD; bufptr: LPBYTE):
 
 
 function NetServerTransportAddEx(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
 function NetServerTransportAddEx(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
 {$EXTERNALSYM NetServerTransportAddEx}
 {$EXTERNALSYM NetServerTransportAddEx}
-
+     
 function NetServerTransportDel(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
 function NetServerTransportDel(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
 {$EXTERNALSYM NetServerTransportDel}
 {$EXTERNALSYM NetServerTransportDel}
 
 
@@ -2415,19 +2415,14 @@ const
 
 
   SVTI2_REMAP_PIPE_NAMES = $2;
   SVTI2_REMAP_PIPE_NAMES = $2;
   {$EXTERNALSYM SVTI2_REMAP_PIPE_NAMES}
   {$EXTERNALSYM SVTI2_REMAP_PIPE_NAMES}
+{$ENDIF JWA_IMPLEMENTATIONSECTION}
 
 
-{$ENDIF JWA_INTERFACESECTION}
-
-{$IFNDEF JWA_INCLUDEMODE}
-
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 implementation
 implementation
+//uses ...
+{$ENDIF JWA_OMIT_SECTIONS_LM}
 
 
-uses
-  JwaWinDLLNames;
-
-{$ENDIF !JWA_INCLUDEMODE}
-
-{$IFDEF JWA_IMPLEMENTATIONSECTION}
+{$IFNDEF JWA_INTERFACESECTION}
 
 
 {$IFDEF DYNAMIC_LINK}
 {$IFDEF DYNAMIC_LINK}
 
 
@@ -2618,8 +2613,8 @@ function SetServiceBits; external netapi32 name 'SetServiceBits';
 
 
 {$ENDIF DYNAMIC_LINK}
 {$ENDIF DYNAMIC_LINK}
 
 
-{$ENDIF JWA_IMPLEMENTATIONSECTION}
+{$ENDIF JWA_INTERFACESECTION}
 
 
-{$IFNDEF JWA_INCLUDEMODE}
+{$IFNDEF JWA_OMIT_SECTIONS_LM}
 end.
 end.
-{$ENDIF !JWA_INCLUDEMODE}
+{$ENDIF JWA_OMIT_SECTIONS_LM}

Some files were not shown because too many files changed in this diff