]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-64-bit-type-safety-20051105
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 6 Nov 2005 09:29:36 +0000 (09:29 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 6 Nov 2005 09:29:36 +0000 (09:29 +0000)
64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

more corrections for use of 64-bit types on Windows

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

355 files changed:
src/WINNT/afs_setup_utils/NTMakefile
src/WINNT/afsadmsvr/ITaAfsAdmSvr.idl
src/WINNT/afsadmsvr/ITaAfsAdmSvrTypes.idl
src/WINNT/afsadmsvr/NTMakefile
src/WINNT/afsadmsvr/TaAfsAdmSvr.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrCell.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClient.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClient.h
src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.h
src/WINNT/afsadmsvr/TaAfsAdmSvrClientCache.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClientCache.h
src/WINNT/afsadmsvr/TaAfsAdmSvrClientCell.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClientGroup.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClientNotify.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClientNotify.h
src/WINNT/afsadmsvr/TaAfsAdmSvrClientPing.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrClientPing.h
src/WINNT/afsadmsvr/TaAfsAdmSvrClientUser.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrGeneral.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrGeneral.h
src/WINNT/afsadmsvr/TaAfsAdmSvrGroup.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrProperties.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrUser.cpp
src/WINNT/afsapplib/NTMakefile
src/WINNT/afsapplib/afsapplib.cpp
src/WINNT/afsapplib/afsapplib.h
src/WINNT/afsapplib/al_admsvr.cpp
src/WINNT/afsapplib/al_admsvr.h
src/WINNT/afsapplib/al_browse.cpp
src/WINNT/afsapplib/al_browseset.cpp
src/WINNT/afsapplib/al_cover.cpp
src/WINNT/afsapplib/al_creds.cpp
src/WINNT/afsapplib/al_misc.cpp
src/WINNT/afsapplib/al_progress.cpp
src/WINNT/afsapplib/al_pump.cpp
src/WINNT/afsapplib/al_wizard.cpp
src/WINNT/afsapplib/checklist.cpp
src/WINNT/afsapplib/dialog.cpp
src/WINNT/afsapplib/hashlist.h
src/WINNT/afsapplib/lang/NTMakefile
src/WINNT/afsapplib/resize.cpp
src/WINNT/afsapplib/subclass.cpp
src/WINNT/afsapplib/test/NTMakefile
src/WINNT/afsclass/afsclassfn.cpp
src/WINNT/afsclass/afsclassfn.h
src/WINNT/afsclass/c_agg.cpp
src/WINNT/afsclass/c_agg.h
src/WINNT/afsclass/c_cell.cpp
src/WINNT/afsclass/c_debug.cpp
src/WINNT/afsclass/c_debug.h
src/WINNT/afsclass/c_svr.cpp
src/WINNT/afsclass/internal.cpp
src/WINNT/afsclass/worker.cpp
src/WINNT/afsclass/worker.h
src/WINNT/afsd/NTMakefile
src/WINNT/afsd/afsd.h
src/WINNT/afsd/afsd_eventlog.c
src/WINNT/afsd/afsd_flushvol.c
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/afsd_service.c
src/WINNT/afsd/afsdifs.c
src/WINNT/afsd/afskfw.c
src/WINNT/afsd/afslogon.c
src/WINNT/afsd/afsshare.c
src/WINNT/afsd/cklog.c
src/WINNT/afsd/cm.h
src/WINNT/afsd/cm_aclent.h
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_buf.h
src/WINNT/afsd/cm_callback.c
src/WINNT/afsd/cm_callback.h
src/WINNT/afsd/cm_config.c
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_conn.h
src/WINNT/afsd/cm_daemon.c
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_dcache.h
src/WINNT/afsd/cm_dir.c
src/WINNT/afsd/cm_dir.h
src/WINNT/afsd/cm_dns.c
src/WINNT/afsd/cm_freelance.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_memmap.c
src/WINNT/afsd/cm_memmap.h
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_scache.h
src/WINNT/afsd/cm_server.c
src/WINNT/afsd/cm_server.h
src/WINNT/afsd/cm_user.c
src/WINNT/afsd/cm_user.h
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/ctokens.c
src/WINNT/afsd/fs.c
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb.h
src/WINNT/afsd/smb3.c
src/WINNT/afsd/smb_ioctl.c
src/WINNT/afsd/symlink.c
src/WINNT/afslegal/NTMakefile
src/WINNT/afsrdr/kif.h
src/WINNT/afsreg/afssw.c
src/WINNT/afsreg/syscfg.c
src/WINNT/afsreg/test/NTMakefile
src/WINNT/afsreg/vptab.c
src/WINNT/afssvrcfg/NTMakefile
src/WINNT/afssvrcpa/NTMakefile
src/WINNT/afssvrmgr/NTMakefile
src/WINNT/afssvrmgr/action.cpp
src/WINNT/afssvrmgr/agg_prop.cpp
src/WINNT/afssvrmgr/agg_tab.cpp
src/WINNT/afssvrmgr/alert.h
src/WINNT/afssvrmgr/columns.cpp
src/WINNT/afssvrmgr/creds.cpp
src/WINNT/afssvrmgr/dispguts.cpp
src/WINNT/afssvrmgr/display.cpp
src/WINNT/afssvrmgr/display.h
src/WINNT/afssvrmgr/helpfunc.cpp
src/WINNT/afssvrmgr/prefs.cpp
src/WINNT/afssvrmgr/problems.cpp
src/WINNT/afssvrmgr/set_clone.cpp
src/WINNT/afssvrmgr/set_create.cpp
src/WINNT/afssvrmgr/set_createrep.cpp
src/WINNT/afssvrmgr/set_delete.cpp
src/WINNT/afssvrmgr/set_dump.cpp
src/WINNT/afssvrmgr/set_move.cpp
src/WINNT/afssvrmgr/set_prop.cpp
src/WINNT/afssvrmgr/set_quota.cpp
src/WINNT/afssvrmgr/set_release.cpp
src/WINNT/afssvrmgr/set_rename.cpp
src/WINNT/afssvrmgr/set_repprop.cpp
src/WINNT/afssvrmgr/set_restore.cpp
src/WINNT/afssvrmgr/set_tab.cpp
src/WINNT/afssvrmgr/subset.cpp
src/WINNT/afssvrmgr/svc_delete.cpp
src/WINNT/afssvrmgr/svc_prop.cpp
src/WINNT/afssvrmgr/svc_tab.cpp
src/WINNT/afssvrmgr/svc_viewlog.cpp
src/WINNT/afssvrmgr/svr_address.cpp
src/WINNT/afssvrmgr/svr_execute.cpp
src/WINNT/afssvrmgr/svr_getdates.cpp
src/WINNT/afssvrmgr/svr_hosts.cpp
src/WINNT/afssvrmgr/svr_install.cpp
src/WINNT/afssvrmgr/svr_prop.cpp
src/WINNT/afssvrmgr/svr_prune.cpp
src/WINNT/afssvrmgr/svr_salvage.cpp
src/WINNT/afssvrmgr/svr_security.cpp
src/WINNT/afssvrmgr/svr_syncvldb.cpp
src/WINNT/afssvrmgr/svr_uninstall.cpp
src/WINNT/afssvrmgr/svr_window.cpp
src/WINNT/afssvrmgr/svrmgr.h
src/WINNT/afssvrmgr/task.cpp
src/WINNT/afssvrmgr/task.h
src/WINNT/afssvrmgr/window.cpp
src/WINNT/afsusrmgr/NTMakefile
src/WINNT/afsusrmgr/TaAfsUsrMgr.h
src/WINNT/afsusrmgr/browse.cpp
src/WINNT/afsusrmgr/columns.cpp
src/WINNT/afsusrmgr/creds.cpp
src/WINNT/afsusrmgr/display.cpp
src/WINNT/afsusrmgr/display.h
src/WINNT/afsusrmgr/general.cpp
src/WINNT/afsusrmgr/grp_create.cpp
src/WINNT/afsusrmgr/grp_delete.cpp
src/WINNT/afsusrmgr/grp_prop.cpp
src/WINNT/afsusrmgr/grp_rename.cpp
src/WINNT/afsusrmgr/grp_tab.cpp
src/WINNT/afsusrmgr/helpfunc.cpp
src/WINNT/afsusrmgr/mch_create.cpp
src/WINNT/afsusrmgr/mch_delete.cpp
src/WINNT/afsusrmgr/mch_tab.cpp
src/WINNT/afsusrmgr/options.cpp
src/WINNT/afsusrmgr/task.cpp
src/WINNT/afsusrmgr/task.h
src/WINNT/afsusrmgr/usr_cpw.cpp
src/WINNT/afsusrmgr/usr_create.cpp
src/WINNT/afsusrmgr/usr_delete.cpp
src/WINNT/afsusrmgr/usr_prop.cpp
src/WINNT/afsusrmgr/usr_tab.cpp
src/WINNT/afsusrmgr/window.cpp
src/WINNT/afsusrmgr/window.h
src/WINNT/aklog/NTMakefile
src/WINNT/bosctlsvc/NTMakefile
src/WINNT/client_config/NTMakefile
src/WINNT/client_config/dlg_automap.cpp
src/WINNT/client_config/drivemap.cpp
src/WINNT/client_config/tab_advanced.cpp
src/WINNT/client_config/tab_drives.cpp
src/WINNT/client_config/tab_general.cpp
src/WINNT/client_config/tab_hosts.cpp
src/WINNT/client_config/tab_prefs.cpp
src/WINNT/client_cpa/NTMakefile
src/WINNT/client_creds/NTMakefile
src/WINNT/client_creds/advtab.cpp
src/WINNT/client_creds/afswiz.cpp
src/WINNT/client_creds/credstab.cpp
src/WINNT/client_creds/mounttab.cpp
src/WINNT/client_exp/NTMakefile
src/WINNT/client_exp/shell_ext.cpp
src/WINNT/client_exp/shell_ext.h
src/WINNT/client_osi/NTMakefile
src/WINNT/client_osi/dbrpc.idl
src/WINNT/client_osi/osibasel.c
src/WINNT/client_osi/osibasel.h
src/WINNT/client_osi/osidb.h
src/WINNT/client_osi/osilog.c
src/WINNT/client_osi/osilog.h
src/WINNT/client_osi/osiltype.h
src/WINNT/client_osi/osisleep.c
src/WINNT/client_osi/osisleep.h
src/WINNT/client_osi/osistatl.c
src/WINNT/client_osi/osiutils.c
src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/preview.wmf
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/cachmgr.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/fserver1.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/fserver2.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/overview.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout1.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout2.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout3.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout4.gif
src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/vnode.gif
src/WINNT/eventlog/test/NTMakefile
src/WINNT/install/NSIS/NTMakefile
src/WINNT/install/loopback/NTMakefile
src/WINNT/install/wix/config.wxi
src/WINNT/install/wix/custom/NTMakefile
src/WINNT/install/wix/feature.wxi
src/WINNT/install/wix/files.wxi
src/WINNT/install/wix/lang/en_US/strings.wxl
src/WINNT/install/wix/language_config.wxi
src/WINNT/install/wix/openafs.wxs
src/WINNT/install/wix/platform.wxi [new file with mode: 0644]
src/WINNT/install/wix/property.wxi
src/WINNT/install/wix/registry.wxi
src/WINNT/install/wix/runtime.wxi
src/WINNT/install/wix/uninstall/NTMakefile
src/WINNT/license/NTMakefile
src/WINNT/license/main.cpp
src/WINNT/pthread/NTMakefile
src/WINNT/pthread/pthread.c
src/WINNT/pthread/test/NTMakefile
src/WINNT/talocale/tal_alloc.cpp
src/WINNT/talocale/tal_alloc.h
src/WINNT/talocale/tal_dialog.cpp
src/WINNT/talocale/tal_dialog.h
src/WINNT/talocale/tal_string.cpp
src/WINNT/talocale/tal_string.h
src/WINNT/talocale/talocale.h
src/afs/afs_pioctl.c
src/auth/NTMakefile
src/auth/cellconfig.c
src/auth/ktc_nt.c
src/auth/test/NTMakefile
src/auth/writeconfig.c
src/bozo/NTMakefile
src/bu_utils/NTMakefile
src/bucoord/NTMakefile
src/budb/NTMakefile
src/butc/NTMakefile
src/butm/NTMakefile
src/cmd/cmd.c
src/cmd/test/NTMakefile
src/comerr/NTMakefile
src/comerr/test/NTMakefile
src/config/NTDllmap.txt
src/config/NTMakefile
src/config/NTMakefile.amd64_w2k
src/config/NTMakefile.i386_nt40
src/config/NTMakefile.i386_w2k
src/config/param.amd64_w2k.h
src/config/param.i64_w2k.h
src/config/touch.c
src/config/util_cr.c
src/dir/test/NTMakefile
src/finale/NTMakefile
src/fsint/afscbint.xg
src/kauth/NTMakefile
src/kauth/kkids.c
src/kauth/test/NTMakefile
src/libadmin/adminutil/NTMakefile
src/libadmin/bos/NTMakefile
src/libadmin/cfg/NTMakefile
src/libadmin/cfg/test/NTMakefile
src/libadmin/client/NTMakefile
src/libadmin/kas/NTMakefile
src/libadmin/pts/NTMakefile
src/libadmin/test/NTMakefile
src/libadmin/vos/NTMakefile
src/libafsauthent/NTMakefile
src/libafsrpc/NTMakefile
src/lwp/NTMakefile
src/lwp/iomgr.c
src/lwp/lwp_nt.c
src/lwp/test/NTMakefile
src/pam/pam_afs.5
src/procmgmt/NTMakefile
src/procmgmt/procmgmt_nt.c
src/procmgmt/test/NTMakefile
src/ptserver/NTMakefile
src/rx/NTMakefile
src/rx/UKERNEL/rx_knet.c
src/rx/rx.c
src/rx/rx_event.c
src/rx/rx_globals.h
src/rx/rx_lwp.c
src/rx/rx_packet.c
src/rx/rx_prototypes.h
src/rx/rx_pthread.c
src/rx/rx_rdwr.c
src/rx/rx_user.c
src/rx/rx_user.h
src/rx/rx_xmit_nt.c
src/rx/rx_xmit_nt.h
src/rx/rxdebug.c
src/rx/test/NTMakefile
src/rx/xdr.h
src/rx/xdr_array.c
src/rx/xdr_mem.c
src/rx/xdr_prototypes.h
src/rx/xdr_rec.c
src/rxgen/NTMakefile
src/rxgen/rpc_hout.c
src/rxgen/rpc_main.c
src/rxgen/rpc_parse.c
src/rxgen/rpc_scan.c
src/rxkad/rxkad_server.c
src/rxkad/test/NTMakefile
src/rxstat/rxstat.c
src/shlibafsauthent/NTMakefile
src/sys/pioctl_nt.c
src/tbutc/NTMakefile
src/tviced/NTMakefile
src/ubik/NTMakefile
src/ubik/disk.c
src/ubik/recovery.c
src/ubik/remote.c
src/update/NTMakefile
src/usd/test/NTMakefile
src/util/assert.c
src/util/dirpath.c
src/util/hostparse.c
src/util/readdir_nt.c
src/util/regex.c
src/util/serverLog.c
src/util/snprintf.c
src/util/test/NTMakefile
src/util/winsock_nt.c
src/venus/up.c
src/viced/NTMakefile
src/vlserver/NTMakefile
src/vol/NTMakefile
src/vol/test/NTMakefile
src/volser/NTMakefile

index c5320f67349a90702a073ade10b7e52c50bf6822..d4439f26d9ca5e973e4fc8f32d340c604370a688 100644 (file)
@@ -82,6 +82,7 @@ AFSRM_EXELIBS =\
 
 $(AFSRM_EXEFILE): $(AFSRM_EXEOBJS) $(AFSRM_EXELIBS)
     $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 ############################################################################
 
@@ -129,36 +130,42 @@ $(OUT)\d_afs_setup_utils.obj: afs_setup_utils.cpp
 
 $(INSTALL_UTILS_DLLFILE) : $(OUT)\afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS)
     $(DLLGUILINK) -entry:DllEntryPoint /DEF:install_utils.def $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
     $(DLLPREP)
     $(COPY) $*.lib $(ILIBDIR)
     $(DEL) $*.lib $*.exp
 
 $(SERVER_UNINST_DLLFILE) : $(OUT)\s_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS)
     $(DLLGUILINK) -entry:DllEntryPoint /DEF:server_uninst.def $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
     $(DLLPREP)
     $(COPY) $*.lib $(ILIBDIR)
     $(DEL) $*.lib $*.exp
 
 $(CLIENT_UNINST_DLLFILE) : $(OUT)\c_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS)
     $(DLLGUILINK) -entry:DllEntryPoint /DEF:client_uninst.def $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
     $(DLLPREP)
     $(COPY) $*.lib $(ILIBDIR)
     $(DEL) $*.lib $*.exp
 
 $(CC_UNINST_DLLFILE) : $(OUT)\cc_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS)
     $(DLLGUILINK) -entry:DllEntryPoint /DEF:cc_uninst.def $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
     $(DLLPREP)
     $(COPY) $*.lib $(ILIBDIR)
     $(DEL) $*.lib $*.exp
 
 $(LIGHT_CLIENT_UNINST_DLLFILE) : $(OUT)\lc_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS)
     $(DLLGUILINK) -entry:DllEntryPoint /DEF:light_client_uninst.def $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
     $(DLLPREP)
     $(COPY) $*.lib $(ILIBDIR)
     $(DEL) $*.lib $*.exp
 
 $(DOCS_UNINST_DLLFILE) : $(OUT)\d_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS)
     $(DLLGUILINK) -entry:DllEntryPoint /DEF:docs_uninst.def $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
     $(DLLPREP)
     $(COPY) $*.lib $(ILIBDIR)
     $(DEL) $*.lib $*.exp
index af27b4117b9fafe42e247eeb15b9dd45e1da1e21..aa4cfd3110ad1eb478e5f256efeafcdb86dc4d8a 100644 (file)
@@ -23,7 +23,7 @@ interface ITaAfsAdminSvr
    //
    int AfsAdmSvr_Connect (
       [in]      STRING szClientAddress,
-      [out]     DWORD *pidClient,
+      [out]     UINT_PTR *pidClient,
       [out]     ULONG *pStatus
    );
 
@@ -31,7 +31,7 @@ interface ITaAfsAdminSvr
    // ...releases and invalidates the cookie representing the calling process.
    //
    int AfsAdmSvr_Disconnect (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [out]     ULONG *pStatus
    );
 
@@ -43,7 +43,7 @@ interface ITaAfsAdminSvr
    //    library TaAfsAdmSvrClient.lib automatically handles this.)
    //
    int AfsAdmSvr_Ping (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [out]     ULONG *pStatus
    );
    const DWORD csecAFSADMSVR_CLIENT_PING = (2L * 60L);  // 2 minutes
@@ -53,8 +53,8 @@ interface ITaAfsAdminSvr
    // ...obtains information about the supplied credentials token.
    //
    int AfsAdmSvr_CrackCredentials (
-      [in]      DWORD idClient,
-      [in]      DWORD hCreds,
+      [in]      UINT_PTR idClient,
+      [in]      UINT_PTR hCreds,
       [out]     STRING pszCell,
       [out]     STRING pszUser,
       [out]     SYSTEMTIME *pstExpiration,
@@ -66,8 +66,8 @@ interface ITaAfsAdminSvr
    //    if the user already has credentials in the cell, returns a nonzero
    //    token {hCreds}, suitable for use in AfsAdmSvr_OpenCell().
    //
-   DWORD AfsAdmSvr_GetCredentials (
-      [in]      DWORD idClient,
+   UINT_PTR AfsAdmSvr_GetCredentials (
+      [in]      UINT_PTR idClient,
       [in]      STRING pszCell,
       [out]     ULONG *pStatus
    );
@@ -77,8 +77,8 @@ interface ITaAfsAdminSvr
    //    on behalf of the specified user. if successful, returns a nonzero
    //    token {hCreds}, suitable for use in AfsAdmSvr_OpenCell().
    //
-   DWORD AfsAdmSvr_SetCredentials (
-      [in]      DWORD idClient,
+   UINT_PTR AfsAdmSvr_SetCredentials (
+      [in]      UINT_PTR idClient,
       [in]      STRING pszCell,
       [in]      STRING pszUser,
       [in]      STRING pszPassword,
@@ -91,8 +91,8 @@ interface ITaAfsAdminSvr
    //    call with a Refresh request if necessary.
    //
    int AfsAdmSvr_PushCredentials (
-      [in]      DWORD idClient,
-      [in]      DWORD hCreds,
+      [in]      UINT_PTR idClient,
+      [in]      UINT_PTR hCreds,
       [in]      ASID idCell,
       [out]     ULONG *pStatus
    );
@@ -102,7 +102,7 @@ interface ITaAfsAdminSvr
    // ...obtains the name of the primary cell used by the admin server
    //
    int AfsAdmSvr_GetLocalCell (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [out]     STRING pszCellName,
       [out]     ULONG *pStatus
    );
@@ -112,7 +112,7 @@ interface ITaAfsAdminSvr
    // ...translates an error code into a readable string
    //
    int AfsAdmSvr_ErrorCodeTranslate (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ULONG code,
       [in]      LANGID idLanguage,    // pass 0 for default language at server
       [out]     STRING pszErrorText,
@@ -124,7 +124,7 @@ interface ITaAfsAdminSvr
    // ...returns information about a particular operation in progress.
    //
    int AfsAdmSvr_GetAction (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      DWORD idAction,
       [out]     LPASACTION pAction,
       [out]     ULONG *pStatus
@@ -137,8 +137,8 @@ interface ITaAfsAdminSvr
    //    a particular client and/or performed in a particular cell.
    //
    int AfsAdmSvr_GetActions (
-      [in]      DWORD idClient,
-      [in]      DWORD idClientSearch,   // 0 to return for all clients
+      [in]      UINT_PTR idClient,
+      [in]      UINT_PTR idClientSearch,   // 0 to return for all clients
       [in]      ASID idCellSearch,      // 0 to return for all cells
       [out]     LPASACTIONLIST *ppList,
       [out]     ULONG *pStatus
@@ -149,8 +149,8 @@ interface ITaAfsAdminSvr
    // ...opens a cell for administration.
    //
    int AfsAdmSvr_OpenCell (
-      [in]      DWORD idClient,
-      [in]      DWORD hCreds,
+      [in]      UINT_PTR idClient,
+      [in]      UINT_PTR hCreds,
       [in]      STRING pszCellName,
       [in]      DWORD dwScopeFlags,
       [out]     ASID *pidCell,
@@ -163,7 +163,7 @@ interface ITaAfsAdminSvr
    // ...used by client to open a cell for administration.
    //
    int AfsAdmSvr_CloseCell (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [out]     ULONG *pStatus
    );
@@ -184,7 +184,7 @@ interface ITaAfsAdminSvr
    //    users named "b*" within a cell.
    //
    int AfsAdmSvr_FindObject (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idSearchScope,
       [in]      ASOBJTYPE ObjectType,
       [in]      AFSADMSVR_SEARCH_REFRESH SearchRefresh,
@@ -194,7 +194,7 @@ interface ITaAfsAdminSvr
    );
 
    int AfsAdmSvr_FindObjects (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idSearchScope,
       [in]      ASOBJTYPE ObjectType,
       [in]      AFSADMSVR_SEARCH_REFRESH SearchRefresh,
@@ -211,17 +211,17 @@ interface ITaAfsAdminSvr
    //    objects).
    //
    int AfsAdmSvr_GetObject (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      AFSADMSVR_GET_TYPE GetType,
       [in]      AFSADMSVR_GET_LEVEL GetLevel,
       [in]      ASID idObject,
-      [in]      DWORD verProperties,  // can be 0 if not RETURN_IF_OUT_OF_DATE
+      [in]      UINT_PTR verProperties,  // can be 0 if not RETURN_IF_OUT_OF_DATE
       [out]     LPASOBJPROP pProperties,
       [out]     ULONG *pStatus
    );
 
    int AfsAdmSvr_GetObjects (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      AFSADMSVR_GET_TYPE GetType,
       [in]      AFSADMSVR_GET_LEVEL GetLevel,
       [in]      LPASIDLIST pListObjects,  // lParam used as verProperties
@@ -236,13 +236,13 @@ interface ITaAfsAdminSvr
    //    object or objects.
    //
    int AfsAdmSvr_RefreshObject (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idObject,
       [out]     ULONG *pStatus
    );
 
    int AfsAdmSvr_RefreshObjects (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      LPASIDLIST pListObjects,
       [out]     ULONG *pStatus
    );
@@ -271,7 +271,7 @@ interface ITaAfsAdminSvr
    // ...returns a randomly-generated 8-byte encryption key
    //
    int AfsAdmSvr_GetRandomKey (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [out]     BYTE keyData[ ENCRYPTIONKEYLENGTH ],
       [out]     ULONG *pStatus
@@ -281,7 +281,7 @@ interface ITaAfsAdminSvr
    // ...changes a user account's properties.
    //
    int AfsAdmSvr_ChangeUser (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idUser,
       [in]      LPAFSADMSVR_CHANGEUSER_PARAMS pChange,
@@ -292,7 +292,7 @@ interface ITaAfsAdminSvr
    // ...retrieves the list of groups to which a user or group belongs
    //
    int AfsAdmSvr_GetGroupMembership (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idMember,
       [out]     LPASIDLIST *ppAsidList,
@@ -303,7 +303,7 @@ interface ITaAfsAdminSvr
    // ...retrieves the list of groups which a user or group owns
    //
    int AfsAdmSvr_GetGroupOwnership (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idOwner,
       [out]     LPASIDLIST *ppAsidList,
@@ -314,7 +314,7 @@ interface ITaAfsAdminSvr
    // ...changes a PTS group's properties.
    //
    int AfsAdmSvr_ChangeGroup (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idGroup,
       [in]      LPAFSADMSVR_CHANGEGROUP_PARAMS pChange,
@@ -325,7 +325,7 @@ interface ITaAfsAdminSvr
    // ...retrieves the list of users which belong to a group
    //
    int AfsAdmSvr_GetGroupMembers (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idGroup,
       [out]     LPASIDLIST *ppAsidList,
@@ -336,7 +336,7 @@ interface ITaAfsAdminSvr
    // ...adds a member to the specified group
    //
    int AfsAdmSvr_AddGroupMember (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idGroup,
       [in]      ASID idMember,
@@ -347,7 +347,7 @@ interface ITaAfsAdminSvr
    // ...removes a member from the specified group
    //
    int AfsAdmSvr_RemoveGroupMember (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idGroup,
       [in]      ASID idMember,
@@ -358,7 +358,7 @@ interface ITaAfsAdminSvr
    // ...changes a group's name
    //
    int AfsAdmSvr_RenameGroup (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idGroup,
       [in]      STRING szNewGroupName,
@@ -369,7 +369,7 @@ interface ITaAfsAdminSvr
    // ...creates a new PTS group
    //
    int AfsAdmSvr_CreateGroup (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      LPAFSADMSVR_CREATEGROUP_PARAMS pCreate,
       [out]     ASID *pidGroup,
@@ -380,7 +380,7 @@ interface ITaAfsAdminSvr
    // ...deletes a PTS group
    //
    int AfsAdmSvr_DeleteGroup (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idGroup,
       [out]     ULONG *pStatus
@@ -392,7 +392,7 @@ interface ITaAfsAdminSvr
    //    pass a valid encryption key in {keyData}.
    //
    int AfsAdmSvr_SetUserPassword (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idUser,
       [in]      int keyVersion,
@@ -405,7 +405,7 @@ interface ITaAfsAdminSvr
    // ...unlocks a user's account
    //
    int AfsAdmSvr_UnlockUser (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idUser,
       [out]     ULONG *pStatus
@@ -415,7 +415,7 @@ interface ITaAfsAdminSvr
    // ...creates a new user account
    //
    int AfsAdmSvr_CreateUser (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      LPAFSADMSVR_CREATEUSER_PARAMS pCreate,
       [out]     ASID *pidUser,
@@ -426,7 +426,7 @@ interface ITaAfsAdminSvr
    // ...deletes a user account
    //
    int AfsAdmSvr_DeleteUser (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ASID idUser,
       [in]      LPAFSADMSVR_DELETEUSER_PARAMS pDelete,
@@ -437,7 +437,7 @@ interface ITaAfsAdminSvr
    // ...changes a cell's properties.
    //
    int AfsAdmSvr_ChangeCell (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      LPAFSADMSVR_CHANGECELL_PARAMS pChange,
       [out]     ULONG *pStatus
@@ -447,7 +447,7 @@ interface ITaAfsAdminSvr
    // ...changes the refresh rate for a specific cell
    //
    int AfsAdmSvr_SetRefreshRate (
-      [in]      DWORD idClient,
+      [in]      UINT_PTR idClient,
       [in]      ASID idCell,
       [in]      ULONG cminRefreshRate,
       [out]     ULONG *pStatus
index e73db4a5c0147610f7b7587ad6ea4deee389000d..e6bdd2374fcc234ea584c60629f248c05d293198 100644 (file)
@@ -18,7 +18,7 @@ const int ENCRYPTIONKEYLENGTH = 8;
       // ASID - Admin Server ID
       // ...Type used for unique object identifiers throughout these adm
       //
-typedef DWORD ASID, *LPASID;
+typedef UINT_PTR ASID, *LPASID;
 
 
       // ASOBJTYPE - Admin Server Object Type
@@ -159,7 +159,7 @@ typedef struct {
 typedef struct {
    ASACTIONTYPE Action;        // The operation in progress
    DWORD idAction;     // Unique action identifier
-   DWORD idClient;     // Client which initiated the operation
+   UINT_PTR idClient;  // Client which initiated the operation
    ASID idCell;        // Cell in which operation is occurring
    DWORD csecActive;   // Elapsed active time for operation
 
@@ -237,9 +237,9 @@ typedef struct {
 
 typedef struct {
    ULONG dwID;
-   ULONG ckStorageTotal;
-   ULONG ckStorageFree;
-   ULONG ckStorageAllocated;
+   UINT_PTR ckStorageTotal;
+   UINT_PTR ckStorageFree;
+   UINT_PTR ckStorageAllocated;
 } ASOBJPROP_PARTITION, *LPASOBJPROP_PARTITION;
 
 cpp_quote ("#ifndef AFSCLASS_H")
@@ -261,8 +261,8 @@ typedef struct {
    SYSTEMTIME timeLastBackup;
    SYSTEMTIME timeCopyCreation;
    ULONG nFiles;
-   ULONG ckQuota;
-   ULONG ckUsed;
+   UINT_PTR ckQuota;
+   UINT_PTR ckUsed;
    FILESETTYPE FilesetType;
    DWORD FilesetState;
 } ASOBJPROP_VOLUME, *LPASOBJPROP_VOLUME;
@@ -471,7 +471,7 @@ typedef struct
    STRING szName;
    STRING szInstance;
    STRING szPassword;
-   int idUser;
+   UINT_PTR idUser;
    BOOL fCreateKAS;
    BOOL fCreatePTS;
    } AFSADMSVR_CREATEUSER_PARAMS, *LPAFSADMSVR_CREATEUSER_PARAMS;
index 39481c70e04edd4d50cdc07d94c3074e8fc2c16f..d65641600d767ac461dda2d773d1527efd203d8e 100644 (file)
@@ -101,13 +101,10 @@ MIDL_FLAGS=/ms_ext \
            /app_config \
            /I $(INCFILEDIR) \
            /I . \
-           /env win32 \
-           /win32 \
            /align 8 \
            /pack 8 \
            /W3 \
            /WX \
-          /no_robust \
            /nologo
 
 .SUFFIXES: .h .idl
@@ -148,6 +145,7 @@ afsclass_clean :
 
 $(EXEFILE) : $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK)  $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 install : \
index d1ac9a554413ee4c87c86f44702ee587f669c222..49102b11f56856e42f56c81674fee5ee1ac35697 100644 (file)
@@ -22,7 +22,7 @@
       // ...obtains a cookie to represent the calling process. The cookie should
       //    be freed with AfsAdmSvr_Disconnect when the process disconnects.
       //
-extern "C" int AfsAdmSvr_Connect (STRING szClientAddress, DWORD *pidClient, ULONG *pStatus)
+extern "C" int AfsAdmSvr_Connect (STRING szClientAddress, UINT_PTR *pidClient, ULONG *pStatus)
 {
    // Make sure AfsClass initialized properly. If it's already init'd,
    // this won't hurt at all.
@@ -36,7 +36,7 @@ extern "C" int AfsAdmSvr_Connect (STRING szClientAddress, DWORD *pidClient, ULON
 
    // Find a free CLIENTINFO structure for this caller
    //
-   if (!AfsAdmSvr_AttachClient (szClientAddress, pidClient, pStatus))
+   if (!AfsAdmSvr_AttachClient (szClientAddress, (PVOID *)pidClient, pStatus))
       return FALSE;
 
    Print (TEXT("Connected to client %s (ID 0x%08lX)"), AfsAdmSvr_GetClientName (*pidClient), *pidClient);
@@ -51,7 +51,7 @@ extern "C" int AfsAdmSvr_Connect (STRING szClientAddress, DWORD *pidClient, ULON
       //    seconds, lest the admin server think you've disconnected. (The
       //    client library TaAfsAdmSvrClient.lib automatically handles this.)
       //
-extern "C" int AfsAdmSvr_Ping (DWORD idClient, ULONG *pStatus)
+extern "C" int AfsAdmSvr_Ping (UINT_PTR idClient, ULONG *pStatus)
 {
    AfsAdmSvr_Enter();
 
@@ -67,7 +67,7 @@ extern "C" int AfsAdmSvr_Ping (DWORD idClient, ULONG *pStatus)
       // AfsAdmSvr_Disconnect
       // ...releases and invalidates the cookie representing the calling process.
       //
-extern "C" int AfsAdmSvr_Disconnect (DWORD idClient, ULONG *pStatus)
+extern "C" int AfsAdmSvr_Disconnect (UINT_PTR idClient, ULONG *pStatus)
 {
    AfsAdmSvr_Enter();
 
@@ -88,7 +88,7 @@ extern "C" int AfsAdmSvr_Disconnect (DWORD idClient, ULONG *pStatus)
       // ...queries the specified AFS credentials token for its cell, user
       //    and expiration date.
       //
-extern "C" int AfsAdmSvr_CrackCredentials (DWORD idClient, DWORD hCreds, STRING pszCell, STRING pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus)
+extern "C" int AfsAdmSvr_CrackCredentials (UINT_PTR idClient, UINT_PTR hCreds, STRING pszCell, STRING pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus)
 {
    ULONG status;
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
@@ -121,7 +121,7 @@ extern "C" int AfsAdmSvr_CrackCredentials (DWORD idClient, DWORD hCreds, STRING
       //    if the user already has credentials in the cell, returns a nonzero
       //    token {hCreds}, suitable for use in AfsAdmSvr_OpenCell().
       //
-extern "C" DWORD AfsAdmSvr_GetCredentials (DWORD idClient, STRING pszCell, ULONG *pStatus)
+extern "C" UINT_PTR AfsAdmSvr_GetCredentials (UINT_PTR idClient, STRING pszCell, ULONG *pStatus)
 {
    ULONG status;
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
@@ -133,12 +133,12 @@ extern "C" DWORD AfsAdmSvr_GetCredentials (DWORD idClient, STRING pszCell, ULONG
 
    const char *pszCellTest = (pszCell && *pszCell) ? (const char *)pszCell : NULL;
 
-   PVOID hCreds = NULL;
-   if (!afsclient_TokenGetExisting (pszCellTest, &hCreds, (afs_status_p)&status))
+   UINT_PTR hCreds = NULL;
+   if (!afsclient_TokenGetExisting (pszCellTest, (PVOID *)&hCreds, (afs_status_p)&status))
       return FALSE_(status, pStatus, iOp);
 
    AfsAdmSvr_EndOperation (iOp);
-   return (DWORD)hCreds;
+   return hCreds;
 }
 
 
@@ -147,7 +147,7 @@ extern "C" DWORD AfsAdmSvr_GetCredentials (DWORD idClient, STRING pszCell, ULONG
       //    on behalf of the specified user. if successful, returns a nonzero
       //    token {hCreds}, suitable for use in AfsAdmSvr_OpenCell().
       //
-extern "C" DWORD AfsAdmSvr_SetCredentials (DWORD idClient, STRING pszCell, STRING pszUser, STRING pszPassword, ULONG *pStatus)
+extern "C" UINT_PTR AfsAdmSvr_SetCredentials (UINT_PTR idClient, STRING pszCell, STRING pszUser, STRING pszPassword, ULONG *pStatus)
 {
    ULONG status;
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
@@ -159,12 +159,12 @@ extern "C" DWORD AfsAdmSvr_SetCredentials (DWORD idClient, STRING pszCell, STRIN
 
    const char *pszCellSet = (pszCell && *pszCell) ? (const char *)pszCell : NULL;
 
-   PVOID hCreds;
-   if (!afsclient_TokenGetNew (pszCellSet, (const char *)pszUser, (const char *)pszPassword, &hCreds, (afs_status_p)&status))
+   UINT_PTR hCreds;
+   if (!afsclient_TokenGetNew (pszCellSet, (const char *)pszUser, (const char *)pszPassword, (PVOID *)&hCreds, (afs_status_p)&status))
       return FALSE_(status,pStatus,iOp);
 
    AfsAdmSvr_EndOperation (iOp);
-   return (DWORD)hCreds;
+   return hCreds;
 }
 
 
@@ -173,7 +173,7 @@ extern "C" DWORD AfsAdmSvr_SetCredentials (DWORD idClient, STRING pszCell, STRIN
       //    when manipulating the specified cell. You should follow this
       //    call with a Refresh request if necessary.
       //
-extern "C" int AfsAdmSvr_PushCredentials (DWORD idClient, DWORD hCreds, ASID idCell, ULONG *pStatus)
+extern "C" int AfsAdmSvr_PushCredentials (UINT_PTR idClient, UINT_PTR hCreds, ASID idCell, ULONG *pStatus)
 {
    ULONG status;
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
@@ -201,7 +201,7 @@ extern "C" int AfsAdmSvr_PushCredentials (DWORD idClient, DWORD hCreds, ASID idC
       // AfsAdmSvr_GetLocalCell
       // ...obtains the name of the primary cell used by the admin server
       //
-extern "C" int AfsAdmSvr_GetLocalCell (DWORD idClient, STRING pszCellName, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetLocalCell (UINT_PTR idClient, STRING pszCellName, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -224,7 +224,7 @@ extern "C" int AfsAdmSvr_GetLocalCell (DWORD idClient, STRING pszCellName, ULONG
       // AfsAdmSvr_ErrorCodeTranslate
       // ...translates an error code into an English string
       //
-extern "C" int AfsAdmSvr_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus)
+extern "C" int AfsAdmSvr_ErrorCodeTranslate (UINT_PTR idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus)
 {
    if (!AfsAppLib_TranslateError (pszErrorText, code, idLanguage))
       return FALSE_(ERROR_INVALID_PARAMETER,pStatus);
@@ -241,7 +241,7 @@ extern "C" int AfsAdmSvr_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID
       // AfsAdmSvr_GetAction
       // ...returns information about a particular operation in progress.
       //
-extern "C" int AfsAdmSvr_GetAction (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetAction (UINT_PTR idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus)
 {
    Print (dlDETAIL, TEXT("Client 0x%08lX: GetAction (idAction=0x%08lX)"), idClient, idAction);
 
@@ -261,7 +261,7 @@ extern "C" int AfsAdmSvr_GetAction (DWORD idClient, DWORD idAction, LPASACTION p
       //    be constrained to only including those operations initiated by
       //    a particular client and/or performed in a particular cell.
       //
-extern "C" int AfsAdmSvr_GetActions (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetActions (UINT_PTR idClient, UINT_PTR idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus)
 {
    Print (dlDETAIL, TEXT("Client 0x%08lX: GetActions (idClientSearch=0x%08lX, idCellSearch=0x%08lX)"), idClient, idClientSearch, idCellSearch);
 
@@ -282,7 +282,7 @@ extern "C" int AfsAdmSvr_GetActions (DWORD idClient, DWORD idClientSearch, ASID
       // AfsAdmSvr_OpenCell
       // ...opens a cell for administration.
       //
-extern "C" int AfsAdmSvr_OpenCell (DWORD idClient, DWORD hCreds, STRING pszCellName, DWORD dwScopeFlags, ASID *pidCell, ULONG *pStatus)
+extern "C" int AfsAdmSvr_OpenCell (UINT_PTR idClient, UINT_PTR hCreds, STRING pszCellName, DWORD dwScopeFlags, ASID *pidCell, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -300,7 +300,7 @@ extern "C" int AfsAdmSvr_OpenCell (DWORD idClient, DWORD hCreds, STRING pszCellN
       return FALSE;
       }
 
-   Print (dlDETAIL, TEXT("Client 0x%08lX: OpenCell succeeded (idCell=0x%08lX)"), idClient, (DWORD)lpiCell);
+   Print (dlDETAIL, TEXT("Client 0x%08lX: OpenCell succeeded (idCell=0x%08lX)"), idClient, lpiCell);
 
    *pidCell = (ASID)lpiCell;
    AfsAdmSvr_EndOperation (iOp);
@@ -311,7 +311,7 @@ extern "C" int AfsAdmSvr_OpenCell (DWORD idClient, DWORD hCreds, STRING pszCellN
       // AfsAdmSvr_CloseCell
       // ...used by client to open a cell for administration.
       //
-extern "C" int AfsAdmSvr_CloseCell (DWORD idClient, ASID idCell, ULONG *pStatus)
+extern "C" int AfsAdmSvr_CloseCell (UINT_PTR idClient, ASID idCell, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -344,7 +344,7 @@ extern "C" int AfsAdmSvr_CloseCell (DWORD idClient, ASID idCell, ULONG *pStatus)
       //    which match the specified criteria--all volumes on a partition,
       //    or all users named "b*" within a cell.
       //
-extern "C" int AfsAdmSvr_FindObject (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szName, ASID *pidObject, ULONG *pStatus)
+extern "C" int AfsAdmSvr_FindObject (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szName, ASID *pidObject, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -445,7 +445,7 @@ extern "C" int AfsAdmSvr_FindObject (DWORD idClient, ASID idSearchScope, ASOBJTY
 }
 
 
-extern "C" int AfsAdmSvr_FindObjects (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus)
+extern "C" int AfsAdmSvr_FindObjects (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, AFSADMSVR_SEARCH_REFRESH SearchRefresh, STRING szPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -549,7 +549,7 @@ extern "C" int AfsAdmSvr_FindObjects (DWORD idClient, ASID idSearchScope, ASOBJT
       // ...returns server-cached information about the specified object (or
       //    objects).
       //
-extern "C" int AfsAdmSvr_GetObject (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, ASID idObject, DWORD verProperties, LPASOBJPROP pProperties, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetObject (UINT_PTR idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, ASID idObject, UINT_PTR verProperties, LPASOBJPROP pProperties, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -595,7 +595,7 @@ extern "C" int AfsAdmSvr_GetObject (DWORD idClient, AFSADMSVR_GET_TYPE GetType,
 }
 
 
-extern "C" int AfsAdmSvr_GetObjects (DWORD idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, LPASIDLIST pListObjects, LPASOBJPROPLIST *ppListObjectProperties, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetObjects (UINT_PTR idClient, AFSADMSVR_GET_TYPE GetType, AFSADMSVR_GET_LEVEL GetLevel, LPASIDLIST pListObjects, LPASOBJPROPLIST *ppListObjectProperties, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -634,7 +634,7 @@ extern "C" int AfsAdmSvr_GetObjects (DWORD idClient, AFSADMSVR_GET_TYPE GetType,
       // ...invalidates the server's cache of information about the specified
       //    object or objects.
       //
-extern "C" int AfsAdmSvr_RefreshObject (DWORD idClient, ASID idObject, ULONG *pStatus)
+extern "C" int AfsAdmSvr_RefreshObject (UINT_PTR idClient, ASID idObject, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -654,7 +654,7 @@ extern "C" int AfsAdmSvr_RefreshObject (DWORD idClient, ASID idObject, ULONG *pS
 }
 
 
-extern "C" int AfsAdmSvr_RefreshObjects (DWORD idClient, LPASIDLIST pListObjects, ULONG *pStatus)
+extern "C" int AfsAdmSvr_RefreshObjects (UINT_PTR idClient, LPASIDLIST pListObjects, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -691,7 +691,7 @@ extern "C" void AfsAdmSvr_CallbackHost (void)
       // AfsAdmSvr_GetRandomKey
       // ...returns a randomly-generated 8-byte encryption key
       //
-extern "C" int AfsAdmSvr_GetRandomKey (DWORD idClient, ASID idCell, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetRandomKey (UINT_PTR idClient, ASID idCell, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus)
 {
    if (!AfsAdmSvr_fIsValidClient (idClient))
       return FALSE_(ERROR_INVALID_PARAMETER,pStatus);
index a511b88acadc837f9b787a89cabef1f183a1521b..0d134006fc21ada3b2b95671a4395c25f064fea5 100644 (file)
@@ -22,7 +22,7 @@
       // AfsAdmSvr_ChangeCell
       // ...changes a cell's properties.
       //
-extern "C" int AfsAdmSvr_ChangeCell (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
+extern "C" int AfsAdmSvr_ChangeCell (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_CELL_CHANGE;
@@ -60,7 +60,7 @@ extern "C" int AfsAdmSvr_ChangeCell (DWORD idClient, ASID idCell, LPAFSADMSVR_CH
       // AfsAdmSvr_SetRefreshRate
       // ...changes the refresh rate for a specific cell
       //
-extern "C" int AfsAdmSvr_SetRefreshRate (DWORD idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
+extern "C" int AfsAdmSvr_SetRefreshRate (UINT_PTR idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
 {
    if (!AfsAdmSvr_fIsValidClient (idClient))
       return FALSE_(ERROR_INVALID_PARAMETER,pStatus);
index b38028a70d675dc6aa8868b0ac3c81ff79b863b0..bca6c96e879fa7d33b48ca0e515b735dde174b8b 100644 (file)
@@ -164,7 +164,7 @@ BOOL ADMINAPI asc_ActionListFree (LPASACTIONLIST *ppList)
  *
  */
 
-BOOL ADMINAPI asc_AdminServerOpen (LPCTSTR pszAddress, DWORD *pidClient, ULONG *pStatus)
+BOOL ADMINAPI asc_AdminServerOpen (LPCTSTR pszAddress, UINT_PTR *pidClient, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -200,7 +200,7 @@ BOOL ADMINAPI asc_AdminServerOpen (LPCTSTR pszAddress, DWORD *pidClient, ULONG *
 }
 
 
-BOOL ADMINAPI asc_AdminServerClose (DWORD idClient, ULONG *pStatus)
+BOOL ADMINAPI asc_AdminServerClose (UINT_PTR idClient, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -220,7 +220,7 @@ BOOL ADMINAPI asc_AdminServerClose (DWORD idClient, ULONG *pStatus)
 
 
 
-BOOL ADMINAPI asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus)
+BOOL ADMINAPI asc_CredentialsCrack (UINT_PTR idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus)
 {
    BOOL rc = FALSE;
    ULONG status = 0;
@@ -230,7 +230,7 @@ BOOL ADMINAPI asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell
       STRING szCell = TEXT("");
       STRING szUser = TEXT("");
 
-      if ((rc = AfsAdmSvr_CrackCredentials (idClient, (DWORD)hCreds, szCell, szUser, pstExpiration, &status)) != FALSE)
+      if ((rc = AfsAdmSvr_CrackCredentials (idClient, (UINT_PTR)hCreds, szCell, szUser, pstExpiration, &status)) != FALSE)
          {
          lstrcpy (pszCell, szCell);
          lstrcpy (pszUser, szUser);
@@ -249,9 +249,9 @@ BOOL ADMINAPI asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell
 }
 
 
-PVOID ADMINAPI asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStatus)
+UINT_PTR ADMINAPI asc_CredentialsGet (UINT_PTR idClient, LPCTSTR pszCell, ULONG *pStatus)
 {
-   PVOID rc = NULL;
+   UINT_PTR rc = 0;
    ULONG status = 0;
 
    RpcTryExcept
@@ -261,7 +261,7 @@ PVOID ADMINAPI asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStat
          STRING szCell;
          lstrcpy (szCell, pszCell);
 
-         rc = (PVOID)AfsAdmSvr_GetCredentials (idClient, szCell, &status);
+         rc = AfsAdmSvr_GetCredentials (idClient, szCell, &status);
          }
       }
    RpcExcept(1)
@@ -277,9 +277,9 @@ PVOID ADMINAPI asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStat
 }
 
 
-PVOID ADMINAPI asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus)
+UINT_PTR ADMINAPI asc_CredentialsSet (UINT_PTR idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus)
 {
-   PVOID rc = NULL;
+   UINT_PTR rc = 0;
    ULONG status = 0;
 
    RpcTryExcept
@@ -297,7 +297,7 @@ PVOID ADMINAPI asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszU
       // encrypted socket, or something... can't just be pushing
       // the user's unencrypted password across the wire.
 
-      rc = (PVOID)AfsAdmSvr_SetCredentials (idClient, szCell, szUser, szPassword, &status);
+      rc = AfsAdmSvr_SetCredentials (idClient, szCell, szUser, szPassword, &status);
       }
    RpcExcept(1)
       {
@@ -312,14 +312,14 @@ PVOID ADMINAPI asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszU
 }
 
 
-BOOL ADMINAPI asc_CredentialsPush (DWORD idClient, PVOID hCreds, ASID idCell, ULONG *pStatus)
+BOOL ADMINAPI asc_CredentialsPush (UINT_PTR idClient, PVOID hCreds, ASID idCell, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
 
    RpcTryExcept
       {
-      rc = AfsAdmSvr_PushCredentials (idClient, (DWORD)hCreds, idCell, &status);
+      rc = (AfsAdmSvr_PushCredentials (idClient, PtrToUlong(hCreds), idCell, &status)?TRUE:FALSE);
       }
    RpcExcept(1)
       {
@@ -334,7 +334,7 @@ BOOL ADMINAPI asc_CredentialsPush (DWORD idClient, PVOID hCreds, ASID idCell, UL
 }
 
 
-BOOL ADMINAPI asc_LocalCellGet (DWORD idClient, LPTSTR pszCell, ULONG *pStatus)
+BOOL ADMINAPI asc_LocalCellGet (UINT_PTR idClient, LPTSTR pszCell, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -360,7 +360,7 @@ BOOL ADMINAPI asc_LocalCellGet (DWORD idClient, LPTSTR pszCell, ULONG *pStatus)
 }
 
 
-BOOL ADMINAPI asc_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus)
+BOOL ADMINAPI asc_ErrorCodeTranslate (UINT_PTR idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -386,7 +386,7 @@ BOOL ADMINAPI asc_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLangu
 }
 
 
-BOOL ADMINAPI asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus)
+BOOL ADMINAPI asc_CellOpen (UINT_PTR idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -396,7 +396,7 @@ BOOL ADMINAPI asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD
       STRING szCell;
       lstrcpy (szCell, pszCell);
 
-      if ((rc = AfsAdmSvr_OpenCell (idClient, (DWORD)hCreds, szCell, dwScope, pidCell, &status)) != FALSE)
+      if ((rc = (AfsAdmSvr_OpenCell (idClient, PtrToUlong(hCreds), szCell, dwScope, pidCell, &status)?TRUE:FALSE)) != FALSE)
          {
          if (!CreateCellCache (*pidCell))
             {
@@ -423,7 +423,7 @@ BOOL ADMINAPI asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD
 }
 
 
-BOOL ADMINAPI asc_CellClose (DWORD idClient, ASID idCell, ULONG *pStatus)
+BOOL ADMINAPI asc_CellClose (UINT_PTR idClient, ASID idCell, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -446,7 +446,7 @@ BOOL ADMINAPI asc_CellClose (DWORD idClient, ASID idCell, ULONG *pStatus)
 }
 
 
-BOOL ADMINAPI asc_ObjectFind (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectFind (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -471,7 +471,7 @@ BOOL ADMINAPI asc_ObjectFind (DWORD idClient, ASID idSearchScope, ASOBJTYPE Obje
 }
 
 
-BOOL ADMINAPI asc_ObjectFindMultiple (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectFindMultiple (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -508,7 +508,7 @@ BOOL ADMINAPI asc_ObjectFindMultiple (DWORD idClient, ASID idSearchScope, ASOBJT
 }
 
 
-BOOL ADMINAPI asc_ObjectPropertiesGet (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectPropertiesGet (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -537,7 +537,7 @@ BOOL ADMINAPI asc_ObjectPropertiesGet (DWORD idClient, AFSADMSVR_GET_LEVEL GetLe
 }
 
 
-BOOL ADMINAPI asc_ObjectPropertiesGetMultiple (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectPropertiesGetMultiple (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -570,7 +570,7 @@ BOOL ADMINAPI asc_ObjectPropertiesGetMultiple (DWORD idClient, AFSADMSVR_GET_LEV
 }
 
 
-BOOL ADMINAPI asc_ObjectListen (DWORD idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectListen (UINT_PTR idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus)
 {
    if (!idObject)
       {
@@ -591,14 +591,14 @@ BOOL ADMINAPI asc_ObjectListen (DWORD idClient, ASID idCell, ASID idObject, HWND
 }
 
 
-BOOL ADMINAPI asc_ObjectListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus)
 {
    ClearObjectNotifications (hNotify);
    return TRUE;
 }
 
 
-BOOL ADMINAPI asc_ObjectListenMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectListenMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus)
 {
    if (!pAsidList)
       {
@@ -626,7 +626,7 @@ BOOL ADMINAPI asc_ObjectListenMultiple (DWORD idClient, ASID idCell, LPASIDLIST
 }
 
 
-BOOL ADMINAPI asc_ObjectRefresh (DWORD idClient, ASID idCell, ASID idObject, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectRefresh (UINT_PTR idClient, ASID idCell, ASID idObject, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -662,7 +662,7 @@ BOOL ADMINAPI asc_ObjectRefresh (DWORD idClient, ASID idCell, ASID idObject, ULO
 }
 
 
-BOOL ADMINAPI asc_ObjectRefreshMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectRefreshMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -698,7 +698,7 @@ BOOL ADMINAPI asc_ObjectRefreshMultiple (DWORD idClient, ASID idCell, LPASIDLIST
 }
 
 
-BOOL ADMINAPI asc_RandomKeyGet (DWORD idClient, ASID idCell, PBYTE key, ULONG *pStatus)
+BOOL ADMINAPI asc_RandomKeyGet (UINT_PTR idClient, ASID idCell, PBYTE key, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -721,13 +721,13 @@ BOOL ADMINAPI asc_RandomKeyGet (DWORD idClient, ASID idCell, PBYTE key, ULONG *p
 }
 
 
-BOOL ADMINAPI asc_CellNameGet_Fast (DWORD idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus)
+BOOL ADMINAPI asc_CellNameGet_Fast (UINT_PTR idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus)
 {
    return asc_ObjectNameGet_Fast (idClient, idCell, idCell, pszCell, pStatus);
 }
 
 
-BOOL ADMINAPI asc_ObjectNameGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectNameGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -754,7 +754,7 @@ BOOL ADMINAPI asc_ObjectNameGet_Fast (DWORD idClient, ASID idCell, ASID idObject
 }
 
 
-BOOL ADMINAPI asc_ObjectTypeGet_Fast (DWORD idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectTypeGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -781,7 +781,7 @@ BOOL ADMINAPI asc_ObjectTypeGet_Fast (DWORD idClient, ASID idCell, ASID idObject
 }
 
 
-BOOL ADMINAPI asc_ObjectPropertiesGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
+BOOL ADMINAPI asc_ObjectPropertiesGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -808,7 +808,7 @@ BOOL ADMINAPI asc_ObjectPropertiesGet_Fast (DWORD idClient, ASID idCell, ASID id
 }
 
 
-BOOL ADMINAPI asc_ActionGet (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus)
+BOOL ADMINAPI asc_ActionGet (UINT_PTR idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -831,7 +831,7 @@ BOOL ADMINAPI asc_ActionGet (DWORD idClient, DWORD idAction, LPASACTION pAction,
 }
 
 
-BOOL ADMINAPI asc_ActionGetMultiple (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus)
+BOOL ADMINAPI asc_ActionGetMultiple (UINT_PTR idClient, UINT_PTR idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -854,7 +854,7 @@ BOOL ADMINAPI asc_ActionGetMultiple (DWORD idClient, DWORD idClientSearch, ASID
 }
 
 
-BOOL ADMINAPI asc_ActionListen (DWORD idClient, HWND hNotify, ULONG *pStatus)
+BOOL ADMINAPI asc_ActionListen (UINT_PTR idClient, HWND hNotify, ULONG *pStatus)
 {
    if (!SetActionNotification (hNotify, TRUE))
       {
@@ -866,7 +866,7 @@ BOOL ADMINAPI asc_ActionListen (DWORD idClient, HWND hNotify, ULONG *pStatus)
 }
 
 
-BOOL ADMINAPI asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus)
+BOOL ADMINAPI asc_ActionListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus)
 {
    if (!SetActionNotification (hNotify, FALSE))
       {
index c271333b154743c75143dbe9a12fa6a59c6551c4..945e9af222a010933065098513c604143e45715c 100644 (file)
@@ -77,36 +77,36 @@ BOOL ADMINAPI asc_ActionListFree (LPASACTIONLIST *ppList);
  *
  */
 
-BOOL ADMINAPI asc_AdminServerOpen (LPCTSTR pszAddress, DWORD *pidClient, ULONG *pStatus);
-BOOL ADMINAPI asc_AdminServerClose (DWORD idClient, ULONG *pStatus);
+BOOL ADMINAPI asc_AdminServerOpen (LPCTSTR pszAddress, UINT_PTR *pidClient, ULONG *pStatus);
+BOOL ADMINAPI asc_AdminServerClose (UINT_PTR idClient, ULONG *pStatus);
 
-BOOL ADMINAPI asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus);
-PVOID ADMINAPI asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStatus);
-PVOID ADMINAPI asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus);
-BOOL ADMINAPI asc_CredentialsPush (DWORD idClient, PVOID hCreds, ASID idCel, ULONG *pStatus);
+BOOL ADMINAPI asc_CredentialsCrack (UINT_PTR idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus);
+UINT_PTR ADMINAPI asc_CredentialsGet (UINT_PTR idClient, LPCTSTR pszCell, ULONG *pStatus);
+UINT_PTR ADMINAPI asc_CredentialsSet (UINT_PTR idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus);
+BOOL ADMINAPI asc_CredentialsPush (UINT_PTR idClient, PVOID hCreds, ASID idCel, ULONG *pStatus);
 
-BOOL ADMINAPI asc_LocalCellGet (DWORD idClient, LPTSTR pszCell, ULONG *pStatus);
-BOOL ADMINAPI asc_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus);
+BOOL ADMINAPI asc_LocalCellGet (UINT_PTR idClient, LPTSTR pszCell, ULONG *pStatus);
+BOOL ADMINAPI asc_ErrorCodeTranslate (UINT_PTR idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus);
 
-BOOL ADMINAPI asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus);
-BOOL ADMINAPI asc_CellClose (DWORD idClient, ASID idCell, ULONG *pStatus);
-BOOL ADMINAPI asc_CellChange (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus);
-BOOL ADMINAPI asc_CellRefreshRateSet (DWORD idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus);
+BOOL ADMINAPI asc_CellOpen (UINT_PTR idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus);
+BOOL ADMINAPI asc_CellClose (UINT_PTR idClient, ASID idCell, ULONG *pStatus);
+BOOL ADMINAPI asc_CellChange (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus);
+BOOL ADMINAPI asc_CellRefreshRateSet (UINT_PTR idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus);
 
-BOOL ADMINAPI asc_ObjectFind (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus);
-BOOL ADMINAPI asc_ObjectFindMultiple (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus);
-BOOL ADMINAPI asc_ObjectPropertiesGet (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus);
-BOOL ADMINAPI asc_ObjectPropertiesGetMultiple (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectFind (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectFindMultiple (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectPropertiesGet (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectPropertiesGetMultiple (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus);
 
-BOOL ADMINAPI asc_ObjectRefresh (DWORD idClient, ASID idCell, ASID idObject, ULONG *pStatus);
-BOOL ADMINAPI asc_ObjectRefreshMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectRefresh (UINT_PTR idClient, ASID idCell, ASID idObject, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectRefreshMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus);
 
-BOOL ADMINAPI asc_RandomKeyGet (DWORD idClient, ASID idCell, PBYTE key, ULONG *pStatus);
+BOOL ADMINAPI asc_RandomKeyGet (UINT_PTR idClient, ASID idCell, PBYTE key, ULONG *pStatus);
 
-BOOL ADMINAPI asc_CellNameGet_Fast (DWORD idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus = NULL);
-BOOL ADMINAPI asc_ObjectNameGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPTSTR pszObjectName, ULONG *pStatus = NULL);
-BOOL ADMINAPI asc_ObjectTypeGet_Fast (DWORD idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus = NULL);
-BOOL ADMINAPI asc_ObjectPropertiesGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus = NULL);
+BOOL ADMINAPI asc_CellNameGet_Fast (UINT_PTR idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus = NULL);
+BOOL ADMINAPI asc_ObjectNameGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPTSTR pszObjectName, ULONG *pStatus = NULL);
+BOOL ADMINAPI asc_ObjectTypeGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus = NULL);
+BOOL ADMINAPI asc_ObjectPropertiesGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus = NULL);
 
 void ADMINAPI asc_Enter (void);
 void ADMINAPI asc_Leave (void);
@@ -118,14 +118,14 @@ LPCRITICAL_SECTION ADMINAPI asc_GetCriticalSection (void);
  *
  */
 
-BOOL ADMINAPI asc_ObjectListen (DWORD idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus);
-BOOL ADMINAPI asc_ObjectListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus);
-BOOL ADMINAPI asc_ObjectListenMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectListen (UINT_PTR idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
+BOOL ADMINAPI asc_ObjectListenMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus);
 
-BOOL ADMINAPI asc_ActionGet (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus);
-BOOL ADMINAPI asc_ActionGetMultiple (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus);
-BOOL ADMINAPI asc_ActionListen (DWORD idClient, HWND hNotify, ULONG *pStatus);
-BOOL ADMINAPI asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus);
+BOOL ADMINAPI asc_ActionGet (UINT_PTR idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus);
+BOOL ADMINAPI asc_ActionGetMultiple (UINT_PTR idClient, UINT_PTR idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus);
+BOOL ADMINAPI asc_ActionListen (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
+BOOL ADMINAPI asc_ActionListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
 
 
 /*
@@ -133,11 +133,11 @@ BOOL ADMINAPI asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatu
  *
  */
 
-BOOL ADMINAPI asc_UserChange (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus);
-BOOL ADMINAPI asc_UserPasswordSet (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus);
-BOOL ADMINAPI asc_UserUnlock (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus);
-BOOL ADMINAPI asc_UserCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus);
-BOOL ADMINAPI asc_UserDelete (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus);
+BOOL ADMINAPI asc_UserChange (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus);
+BOOL ADMINAPI asc_UserPasswordSet (UINT_PTR idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus);
+BOOL ADMINAPI asc_UserUnlock (UINT_PTR idClient, ASID idCell, ASID idUser, ULONG *pStatus);
+BOOL ADMINAPI asc_UserCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus);
+BOOL ADMINAPI asc_UserDelete (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus);
 
 
 /*
@@ -145,15 +145,15 @@ BOOL ADMINAPI asc_UserDelete (DWORD idClient, ASID idCell, ASID idUser, LPAFSADM
  *
  */
 
-BOOL ADMINAPI asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus);
-BOOL ADMINAPI asc_GroupDelete (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupChange (UINT_PTR idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupMembersGet (UINT_PTR idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupMemberAdd (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupMemberRemove (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupRename (UINT_PTR idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupMembershipGet (UINT_PTR idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupOwnershipGet (UINT_PTR idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus);
+BOOL ADMINAPI asc_GroupDelete (UINT_PTR idClient, ASID idCell, ASID idGroup, ULONG *pStatus);
 
 
 #endif // TAAFSADMSVRCLIENT_H
index ff1db0e76a62e923e6cafe0f49f7dbe2e4b06c06..72dddcd5aee61c02d46d8fa9dc4ef7950ef0a610 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *
  */
 
-BOOL ValidateBinding (RPC_NS_HANDLE hBind, DWORD *pidClient, ULONG *pStatus);
+BOOL ValidateBinding (RPC_NS_HANDLE hBind, UINT_PTR *pidClient, ULONG *pStatus);
 
 
 /*
@@ -41,7 +41,7 @@ BOOL ValidateBinding (RPC_NS_HANDLE hBind, DWORD *pidClient, ULONG *pStatus);
  *
  */
 
-BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, DWORD *pidClient, ULONG *pStatus)
+BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, UINT_PTR *pidClient, ULONG *pStatus)
 {
    RPC_STATUS status = 0;
 
@@ -103,7 +103,7 @@ BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, DWORD *pidClien
 }
 
 
-BOOL ADMINAPI UnbindFromAdminServer (DWORD idClient, ULONG *pStatus)
+BOOL ADMINAPI UnbindFromAdminServer (UINT_PTR idClient, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -162,7 +162,7 @@ BOOL ADMINAPI ForkNewAdminServer (ULONG *pStatus)
 }
 
 
-BOOL ValidateBinding (RPC_NS_HANDLE hBind, DWORD *pidClient, ULONG *pStatus)
+BOOL ValidateBinding (RPC_NS_HANDLE hBind, UINT_PTR *pidClient, ULONG *pStatus)
 {
    RPC_NS_HANDLE hBindOld = hBindTaAfsAdminSvr;
    BOOL rc = FALSE;
index dd3da05dcd8c0a560377c71abfd1910e220f8152..834c38ba89280e67652e57d4638b07f7b1236929 100644 (file)
@@ -16,8 +16,8 @@
  *
  */
 
-BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, DWORD *pidClient, ULONG *pStatus);
-BOOL ADMINAPI UnbindFromAdminServer (DWORD idClient, ULONG *pStatus);
+BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, UINT_PTR *pidClient, ULONG *pStatus);
+BOOL ADMINAPI UnbindFromAdminServer (UINT_PTR idClient, ULONG *pStatus);
 BOOL ADMINAPI ForkNewAdminServer (ULONG *pStatus);
 
 LPCTSTR ADMINAPI ResolveAddress (LPCTSTR pszAddress);
index c7cc97a72153b366b1fe950d9fe6c4b97afc2f21..7bbb51376a72ad36cbc74e664ff331e950bbf26b 100644 (file)
@@ -174,7 +174,7 @@ void UpdateCachedProperties (ASID idCell, ASID idObject, LPASOBJPROP pProperties
 }
 
 
-BOOL RefreshCachedProperties (DWORD idClient, ASID idCell, ASID idObject, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus)
+BOOL RefreshCachedProperties (UINT_PTR idClient, ASID idCell, ASID idObject, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -206,7 +206,7 @@ BOOL RefreshCachedProperties (DWORD idClient, ASID idCell, ASID idObject, AFSADM
 }
 
 
-BOOL RefreshCachedProperties (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus)
+BOOL RefreshCachedProperties (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
index 571582f50424ed7b958da881f7873e16275548bd..a78593a929aceb7a5d619bfa3052e3fa72640935 100644 (file)
@@ -21,8 +21,8 @@ BOOL DestroyCellCache (ASID idCell);
 
 LPASOBJPROP GetCachedProperties (ASID idCell, ASID idObject);
 
-BOOL RefreshCachedProperties (DWORD idClient, ASID idCell, ASID idObject, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus);
-BOOL RefreshCachedProperties (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus);
+BOOL RefreshCachedProperties (UINT_PTR idClient, ASID idCell, ASID idObject, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus);
+BOOL RefreshCachedProperties (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, AFSADMSVR_GET_LEVEL GetLevel, ULONG *pStatus);
 
 
 #endif // TAAFSADMSVRCLIENTCACHE_H
index 27aeeb41f33abeae35275df9fd3cceb46467976e..beb49067c97ab20fc84c946703faa84cbdceda5f 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
  *
  */
 
-BOOL ADMINAPI asc_CellChange (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
+BOOL ADMINAPI asc_CellChange (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -49,7 +49,7 @@ BOOL ADMINAPI asc_CellChange (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECEL
 }
 
 
-BOOL ADMINAPI asc_CellRefreshRateSet (DWORD idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
+BOOL ADMINAPI asc_CellRefreshRateSet (UINT_PTR idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
index ea8addf0bd9d0967069b11e1189f44da7275e909..8168ad665c54680e1551f86d50e142e5d0d1dc85 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
  *
  */
 
-BOOL ADMINAPI asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupChange (UINT_PTR idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -49,7 +49,7 @@ BOOL ADMINAPI asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSA
 }
 
 
-BOOL ADMINAPI asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupMembersGet (UINT_PTR idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -71,7 +71,7 @@ BOOL ADMINAPI asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LP
 }
 
 
-BOOL ADMINAPI asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupMemberAdd (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -93,7 +93,7 @@ BOOL ADMINAPI asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASI
 }
 
 
-BOOL ADMINAPI asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupMemberRemove (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -115,7 +115,7 @@ BOOL ADMINAPI asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup,
 }
 
 
-BOOL ADMINAPI asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupRename (UINT_PTR idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -147,7 +147,7 @@ BOOL ADMINAPI asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTST
 }
 
 
-BOOL ADMINAPI asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupMembershipGet (UINT_PTR idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -169,7 +169,7 @@ BOOL ADMINAPI asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idMember
 }
 
 
-BOOL ADMINAPI asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupOwnershipGet (UINT_PTR idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -191,7 +191,7 @@ BOOL ADMINAPI asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idOwner,
 }
 
 
-BOOL ADMINAPI asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -220,7 +220,7 @@ BOOL ADMINAPI asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGR
 }
 
 
-BOOL ADMINAPI asc_GroupDelete (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
+BOOL ADMINAPI asc_GroupDelete (UINT_PTR idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
index f30c7880d57fe41f20bfc319a6591acca7c9ef5c..4d31060563e255beb32fb85a7026535b946aae26 100644 (file)
@@ -95,7 +95,7 @@ void ClearObjectNotifications (HWND hNotify)
 }
 
 
-void TestForNotifications (DWORD idClient, ASID idCell, ASID idObject)
+void TestForNotifications (UINT_PTR idClient, ASID idCell, ASID idObject)
 {
    if (l.pListeners)
       {
index 1f2aa70cd8a8c8e293eb500461c1a6d7a731783c..5920f848e5928d4bce0c5c834d47756f0971c39e 100644 (file)
@@ -18,7 +18,7 @@
 
 BOOL AddObjectNotification (HWND hNotify, ASID idCell, ASID idObject);
 void ClearObjectNotifications (HWND hNotify);
-void TestForNotifications (DWORD idClient, ASID idCell, ASID idObject = 0);
+void TestForNotifications (UINT_PTR idClient, ASID idCell, ASID idObject = 0);
 void NotifyObjectListeners (ASID idCell, ASID idObject);
 
 BOOL SetActionNotification (HWND hNotify, BOOL fSet);
index 1b2afd0db4f4a51304964b59c9f587a42e7faee8..8875707d43d965104172922bb060321521f63542 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
 static struct
    {
    HANDLE hPingThread;
-   DWORD *adwClients;
+   UINT_PTR *adwClients;
    size_t cdwClients;
 
    HANDLE hCallbackThread;
@@ -47,7 +47,7 @@ DWORD WINAPI ClientCallbackThread (LPVOID lp);
  *
  */
 
-void StartPingThread (DWORD idClient)
+void StartPingThread (UINT_PTR idClient)
 {
    asc_Enter();
 
@@ -72,7 +72,7 @@ void StartPingThread (DWORD idClient)
 }
 
 
-void StopPingThread (DWORD idClient)
+void StopPingThread (UINT_PTR idClient)
 {
    asc_Enter();
 
@@ -96,7 +96,7 @@ DWORD WINAPI ClientPingThread (LPVOID lp)
 
       for (size_t ii = 0; ii < l.cdwClients; ++ii)
          {
-         DWORD idClient;
+         UINT_PTR idClient;
          if ((idClient = l.adwClients[ ii ]) == 0)
             continue;
 
index 176c65a871c2f059fef86fa432e13b50ed0b9a34..276fe81e338e7f66959c76e712e74dcb9c388e9d 100644 (file)
@@ -16,8 +16,8 @@
  *
  */
 
-void StartPingThread (DWORD idClient);
-void StopPingThread (DWORD idClient);
+void StartPingThread (UINT_PTR idClient);
+void StopPingThread (UINT_PTR idClient);
 
 void StartCallbackThread (void);
 void StopCallbackThread (void);
index f318fe0ca4bd4157eb43e33845e019e6f5143c9c..5c47d14b5d0167d98878ac0fa571d32f7cc6934e 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
  *
  */
 
-BOOL ADMINAPI asc_UserChange (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus)
+BOOL ADMINAPI asc_UserChange (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -49,7 +49,7 @@ BOOL ADMINAPI asc_UserChange (DWORD idClient, ASID idCell, ASID idUser, LPAFSADM
 }
 
 
-BOOL ADMINAPI asc_UserPasswordSet (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus)
+BOOL ADMINAPI asc_UserPasswordSet (UINT_PTR idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -90,7 +90,7 @@ BOOL ADMINAPI asc_UserPasswordSet (DWORD idClient, ASID idCell, ASID idUser, int
 }
 
 
-BOOL ADMINAPI asc_UserUnlock (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus)
+BOOL ADMINAPI asc_UserUnlock (UINT_PTR idClient, ASID idCell, ASID idUser, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -119,7 +119,7 @@ BOOL ADMINAPI asc_UserUnlock (DWORD idClient, ASID idCell, ASID idUser, ULONG *p
 }
 
 
-BOOL ADMINAPI asc_UserCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus)
+BOOL ADMINAPI asc_UserCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -148,7 +148,7 @@ BOOL ADMINAPI asc_UserCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSE
 }
 
 
-BOOL ADMINAPI asc_UserDelete (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus)
+BOOL ADMINAPI asc_UserDelete (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
index 9c46803e09de24f286629c65ca001eacc8946121..cc8da0e07a06143bc96bf08caf7dd8526934c0fe 100644 (file)
@@ -42,7 +42,7 @@ typedef struct
 typedef struct
    {
    BOOL fInUse;
-   DWORD idClient;
+   UINT_PTR idClient;
    LPASACTION pAction;
    DWORD dwTickStart;
    } OPERATION, *LPOPERATION;
@@ -106,14 +106,14 @@ void AfsAdmSvr_Leave (void)
  *
  */
 
-BOOL AfsAdmSvr_fIsValidClient (DWORD idClient)
+BOOL AfsAdmSvr_fIsValidClient (UINT_PTR idClient)
 {
    BOOL rc = FALSE;
    AfsAdmSvr_Enter();
 
    for (size_t iClient = 0; !rc && iClient < l.cClientsAllocated; ++iClient)
       {
-      if (idClient == (DWORD)(l.aClients[ iClient ]))
+      if (idClient == (UINT_PTR)l.aClients[ iClient ])
          {
          if (l.aClients[ iClient ]->timeLastPing + cminREQ_CLIENT_PING > AfsAdmSvr_GetCurrentTime())
             rc = TRUE;
@@ -125,7 +125,7 @@ BOOL AfsAdmSvr_fIsValidClient (DWORD idClient)
 }
 
 
-BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, DWORD *pidClient, ULONG *pStatus)
+BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, PVOID *pidClient, ULONG *pStatus)
 {
    AfsAdmSvr_Enter();
    size_t iClient;
@@ -136,12 +136,12 @@ BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, DWORD *pidClient, ULONG *pStatus)
       }
    if (!REALLOC (l.aClients, l.cClientsAllocated, 1+iClient, cREALLOC_CLIENTS))
       {
-      *pidClient = 0;
+      *pidClient = NULL;
       return FALSE;
       }
    if ((l.aClients[ iClient ] = New (CLIENTINFO)) == NULL)
       {
-      *pidClient = 0;
+      *pidClient = NULL;
       return FALSE;
       }
    memset (l.aClients[ iClient ], 0x00, sizeof(CLIENTINFO));
@@ -152,19 +152,19 @@ BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, DWORD *pidClient, ULONG *pStatus)
    if (!AfsAdmSvr_ResolveName (&l.aClients[ iClient ]->ipAddress, l.aClients[ iClient ]->szName))
       memset (&l.aClients[ iClient ]->ipAddress, 0x00, sizeof(SOCKADDR_IN));
 
-   *pidClient = (DWORD)(l.aClients[ iClient ]);
+   *pidClient = (PVOID)(l.aClients[ iClient ]);
    AfsAdmSvr_Leave();
    return TRUE;
 }
 
 
-void AfsAdmSvr_DetachClient (DWORD idClient)
+void AfsAdmSvr_DetachClient (UINT_PTR idClient)
 {
    AfsAdmSvr_Enter();
    size_t iClient;
    for (iClient = 0; iClient < l.cClientsAllocated; ++iClient)
       {
-      if (idClient == (DWORD)(l.aClients[ iClient ]))
+      if (idClient == (UINT_PTR)(l.aClients[ iClient ]))
          break;
       }
    if (iClient < l.cClientsAllocated)
@@ -178,7 +178,7 @@ void AfsAdmSvr_DetachClient (DWORD idClient)
 }
 
 
-LPCTSTR AfsAdmSvr_GetClientName (DWORD idClient)
+LPCTSTR AfsAdmSvr_GetClientName (UINT_PTR idClient)
 {
    static TCHAR szName[ cchSTRING ];
    LPCTSTR pszName = NULL;
@@ -186,7 +186,7 @@ LPCTSTR AfsAdmSvr_GetClientName (DWORD idClient)
 
    for (size_t iClient = 0; !pszName && iClient < l.cClientsAllocated; ++iClient)
       {
-      if (idClient == (DWORD)(l.aClients[ iClient ]))
+      if (idClient == (UINT_PTR)(l.aClients[ iClient ]))
          {
          lstrcpy (szName, l.aClients[ iClient ]->szName);
          pszName = szName;
@@ -198,7 +198,7 @@ LPCTSTR AfsAdmSvr_GetClientName (DWORD idClient)
 }
 
 
-LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (DWORD idClient)
+LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (UINT_PTR idClient)
 {
    static SOCKADDR_IN ipAddress;
    LPSOCKADDR_IN pAddress = NULL;
@@ -206,7 +206,7 @@ LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (DWORD idClient)
 
    for (size_t iClient = 0; !pAddress && iClient < l.cClientsAllocated; ++iClient)
       {
-      if (idClient == (DWORD)(l.aClients[ iClient ]))
+      if (idClient == (UINT_PTR)(l.aClients[ iClient ]))
          {
          memcpy (&ipAddress, &l.aClients[ iClient ]->ipAddress, sizeof(SOCKADDR_IN));
          pAddress = &ipAddress;
@@ -218,13 +218,13 @@ LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (DWORD idClient)
 }
 
 
-void AfsAdmSvr_PingClient (DWORD idClient)
+void AfsAdmSvr_PingClient (UINT_PTR idClient)
 {
    AfsAdmSvr_Enter();
 
    for (size_t iClient = 0; iClient < l.cClientsAllocated; ++iClient)
       {
-      if (idClient == (DWORD)(l.aClients[ iClient ]))
+      if (idClient == (UINT_PTR)(l.aClients[ iClient ]))
          {
          l.aClients[ iClient ]->timeLastPing = AfsAdmSvr_GetCurrentTime();
          }
@@ -306,6 +306,25 @@ BOOL Leave_FALSE_ (ULONG status, ULONG *pStatus, size_t iOp)
    return FALSE;
 }
 
+PVOID NULL_ (ULONG status, ULONG *pStatus, size_t iOp)
+{
+   if (pStatus)
+      *pStatus = status;
+   if (iOp != (size_t)-2)
+      AfsAdmSvr_EndOperation (iOp);
+   return NULL;
+}
+
+PVOID Leave_NULL_ (ULONG status, ULONG *pStatus, size_t iOp)
+{
+   AfsAdmSvr_Leave();
+   if (pStatus)
+      *pStatus = status;
+   if (iOp != (size_t)-2)
+      AfsAdmSvr_EndOperation (iOp);
+   return NULL;
+}
+
 BOOL TRUE_ (ULONG *pStatus, size_t iOp)
 {
    if (pStatus)
@@ -393,7 +412,7 @@ DWORD WINAPI AfsAdmSvr_AutoShutdownThread (LPVOID lp)
          if (l.aClients[ iClient ]->timeLastPing + cminREQ_CLIENT_PING <= AfsAdmSvr_GetCurrentTime())
             {
             Print (dlCONNECTION, "Client 0x%08lX idle for too long; detaching", l.aClients[ iClient ]);
-            AfsAdmSvr_DetachClient ((DWORD)l.aClients[ iClient ]);
+            AfsAdmSvr_DetachClient ((UINT_PTR)l.aClients[ iClient ]);
             }
          }
 
@@ -460,7 +479,7 @@ void AfsAdmSvr_TestShutdown (void)
 }
 
 
-size_t AfsAdmSvr_BeginOperation (DWORD idClient, LPASACTION pAction)
+size_t AfsAdmSvr_BeginOperation (UINT_PTR idClient, LPASACTION pAction)
 {
    AfsAdmSvr_Enter();
 
@@ -592,18 +611,18 @@ BOOL AfsAdmSvr_GetOperation (DWORD idAction, LPASACTION pAction)
 }
 
 
-LPASACTIONLIST AfsAdmSvr_GetOperations (DWORD idClientSearch, ASID idCellSearch)
+LPASACTIONLIST AfsAdmSvr_GetOperations (UINT_PTR idClientSearch, ASID idCellSearch)
 {
    LPASACTIONLIST pList = AfsAdmSvr_CreateActionList();
    AfsAdmSvr_Enter();
 
-   for (size_t iOp = 0; iOp < l.cOperationsAllocated; ++iOp)
+   for (WORD iOp = 0; iOp < l.cOperationsAllocated; ++iOp)
       {
       if (!l.aOperations[ iOp ].fInUse)
          continue;
       if (!l.aOperations[ iOp ].pAction)
          continue;
-      if (idClientSearch && (idClientSearch != l.aOperations[ iOp ].pAction->idClient))
+      if (idClientSearch && ((UINT_PTR)idClientSearch != l.aOperations[ iOp ].pAction->idClient))
          continue;
       if (idCellSearch && (idCellSearch != l.aOperations[ iOp ].pAction->idCell))
          continue;
@@ -679,7 +698,7 @@ void AfsAdmSvr_Action_StopRefresh (ASID idScope)
 
 DWORD WINAPI AfsAdmSvr_AutoOpen_ThreadProc (PVOID lp)
 {
-   DWORD dwScope = (DWORD)lp;
+   DWORD dwScope = PtrToUlong(lp);
    ULONG status;
 
    if (!l.fOperational)
index d010713c84259ee939299f8dd33a09654f8696dc..3725ac1c9cb28bb618eaed322e66b45cd99508b1 100644 (file)
@@ -31,22 +31,24 @@ void AfsAdmSvr_Startup (void);
 void AfsAdmSvr_Shutdown (void);
 
 void AfsAdmSvr_EnableAutoShutdown (BOOL fEnable);
-size_t AfsAdmSvr_BeginOperation (DWORD idClient, LPASACTION pAction = NULL);
+size_t AfsAdmSvr_BeginOperation (UINT_PTR idClient, LPASACTION pAction = NULL);
 void AfsAdmSvr_EndOperation (size_t iOp);
 BOOL AfsAdmSvr_GetOperation (DWORD idAction, LPASACTION pAction);
-LPASACTIONLIST AfsAdmSvr_GetOperations (DWORD idClientSearch = 0, ASID idCellSearch = 0);
+LPASACTIONLIST AfsAdmSvr_GetOperations (UINT_PTR idClientSearch = 0, ASID idCellSearch = 0);
 void AfsAdmSvr_Action_StartRefresh (ASID idScope);
 void AfsAdmSvr_Action_StopRefresh (ASID idScope);
 
-BOOL AfsAdmSvr_fIsValidClient (DWORD idClient);
-BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, DWORD *pidClient, ULONG *pStatus);
-void AfsAdmSvr_DetachClient (DWORD idClient);
-LPCTSTR AfsAdmSvr_GetClientName (DWORD idClient);
-LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (DWORD idClient);
-void AfsAdmSvr_PingClient (DWORD idClient);
+BOOL AfsAdmSvr_fIsValidClient (UINT_PTR idClient);
+BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, PVOID *pidClient, ULONG *pStatus);
+void AfsAdmSvr_DetachClient (UINT_PTR idClient);
+LPCTSTR AfsAdmSvr_GetClientName (UINT_PTR idClient);
+LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (UINT_PTR idClient);
+void AfsAdmSvr_PingClient (UINT_PTR idClient);
 
 BOOL FALSE_ (ULONG status, ULONG *pStatus, size_t iOp = (size_t)-2);
 BOOL Leave_FALSE_ (ULONG status, ULONG *pStatus, size_t iOp = (size_t)-2);
+PVOID NULL_ (ULONG status, ULONG *pStatus, size_t iOp = (size_t)-2);
+PVOID Leave_NULL_ (ULONG status, ULONG *pStatus, size_t iOp = (size_t)-2);
 BOOL TRUE_ (ULONG *pStatus, size_t iOp = (size_t)-2);
 BOOL Leave_TRUE_ (ULONG *pStatus, size_t iOp = (size_t)-2);
 
index 4ad14b878c13b7e05cd349dfbebe4a826483ed6c..8a9faab7d6f5dbef8cc32c707a6262f58258b97b 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
       // AfsAdmSvr_ChangeGroup
       // ...changes a group account's properties.
       //
-extern "C" int AfsAdmSvr_ChangeGroup (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
+extern "C" int AfsAdmSvr_ChangeGroup (UINT_PTR idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_GROUP_CHANGE;
@@ -101,7 +101,7 @@ extern "C" int AfsAdmSvr_ChangeGroup (DWORD idClient, ASID idCell, ASID idGroup,
       // AfsAdmSvr_GetGroupMembers
       // ...retrieves the list of users which belong to a group
       //
-extern "C" int AfsAdmSvr_GetGroupMembers (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetGroupMembers (UINT_PTR idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -164,7 +164,7 @@ extern "C" int AfsAdmSvr_GetGroupMembers (DWORD idClient, ASID idCell, ASID idGr
       // AfsAdmSvr_GetGroupMembership
       // ...retrieves the list of groups to which a user or group belongs
       //
-extern "C" int AfsAdmSvr_GetGroupMembership (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetGroupMembership (UINT_PTR idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -229,7 +229,7 @@ extern "C" int AfsAdmSvr_GetGroupMembership (DWORD idClient, ASID idCell, ASID i
       // AfsAdmSvr_GetGroupOwnership
       // ...retrieves the list of groups which a user owns
       //
-extern "C" int AfsAdmSvr_GetGroupOwnership (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
+extern "C" int AfsAdmSvr_GetGroupOwnership (UINT_PTR idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    size_t iOp = AfsAdmSvr_BeginOperation (idClient);
 
@@ -294,7 +294,7 @@ extern "C" int AfsAdmSvr_GetGroupOwnership (DWORD idClient, ASID idCell, ASID id
       // AfsAdmSvr_AddGroupMember
       // ...adds a member to the specified group
       //
-extern "C" int AfsAdmSvr_AddGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
+extern "C" int AfsAdmSvr_AddGroupMember (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_GROUP_MEMBER_ADD;
@@ -324,7 +324,7 @@ extern "C" int AfsAdmSvr_AddGroupMember (DWORD idClient, ASID idCell, ASID idGro
       // AfsAdmSvr_RemoveGroupMember
       // ...removes a member from the specified group
       //
-extern "C" int AfsAdmSvr_RemoveGroupMember (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
+extern "C" int AfsAdmSvr_RemoveGroupMember (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_GROUP_MEMBER_REMOVE;
@@ -354,7 +354,7 @@ extern "C" int AfsAdmSvr_RemoveGroupMember (DWORD idClient, ASID idCell, ASID id
       // AfsAdmSvr_RenameGroup
       // ...changes a group's name
       //
-extern "C" int AfsAdmSvr_RenameGroup (DWORD idClient, ASID idCell, ASID idGroup, STRING szNewGroupName, ULONG *pStatus)
+extern "C" int AfsAdmSvr_RenameGroup (UINT_PTR idClient, ASID idCell, ASID idGroup, STRING szNewGroupName, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_GROUP_RENAME;
@@ -384,7 +384,7 @@ extern "C" int AfsAdmSvr_RenameGroup (DWORD idClient, ASID idCell, ASID idGroup,
       // AfsAdmSvr_CreateGroup
       // ...creates a new PTS group
       //
-extern "C" int AfsAdmSvr_CreateGroup (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
+extern "C" int AfsAdmSvr_CreateGroup (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_GROUP_CREATE;
@@ -429,7 +429,7 @@ extern "C" int AfsAdmSvr_CreateGroup (DWORD idClient, ASID idCell, LPAFSADMSVR_C
       // AfsAdmSvr_DeleteGroup
       // ...deletes a PTS group
       //
-extern "C" int AfsAdmSvr_DeleteGroup (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
+extern "C" int AfsAdmSvr_DeleteGroup (UINT_PTR idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_GROUP_DELETE;
index e9d67c3ba60daac82a030638be01cc96a32fe167..60268956ef02ac215c32562a63ed382bf13dba7c 100644 (file)
@@ -50,7 +50,7 @@ int cdecl main (int argc, char **argv)
 
    // Parse the command-line
    //
-   DWORD dwAutoScope = AFSADMSVR_SCOPE_VOLUMES | AFSADMSVR_SCOPE_USERS;
+   UINT_PTR dwAutoScope = AFSADMSVR_SCOPE_VOLUMES | AFSADMSVR_SCOPE_USERS;
 
    for (--argc,++argv; argc; --argc,++argv)
       {
index f24b7408edeed0ba11bafe81f803bb622c419be7..73f8ce0292005b3c5e51f30f781abd0e41728d9a 100644 (file)
@@ -357,8 +357,8 @@ BOOL AfsAdmSvr_ObtainFullProperties (LPASOBJPROP pProperties, ULONG *pStatus)
                   memcpy (&pProperties->u.VolumeProperties.timeLastBackup, &fs.timeLastBackup, sizeof(SYSTEMTIME));
                   memcpy (&pProperties->u.VolumeProperties.timeCopyCreation, &fs.timeCopyCreation, sizeof(SYSTEMTIME));
                   pProperties->u.VolumeProperties.nFiles = fs.nFiles;
-                  pProperties->u.VolumeProperties.ckQuota = fs.ckQuota;
-                  pProperties->u.VolumeProperties.ckUsed = fs.ckUsed;
+                  pProperties->u.VolumeProperties.ckQuota = (UINT_PTR)fs.ckQuota;
+                  pProperties->u.VolumeProperties.ckUsed = (UINT_PTR)fs.ckUsed;
                   pProperties->u.VolumeProperties.FilesetType = fs.Type;
                   pProperties->u.VolumeProperties.FilesetState = fs.State;
                   }
@@ -613,13 +613,13 @@ LPASOBJPROP AfsAdmSvr_GetCurrentProperties (ASID idObject, ULONG *pStatus)
          break;
 
       default:
-         return (LPASOBJPROP)FALSE_(ERROR_INVALID_PARAMETER,pStatus);
+         return (LPASOBJPROP)NULL_(ERROR_INVALID_PARAMETER,pStatus);
       }
 
    LPASOBJPROP pCurrentProperties;
    if ((pCurrentProperties = (LPASOBJPROP)((LPIDENT)idObject)->GetUserParam()) == NULL)
       {
-      return (LPASOBJPROP)FALSE_(ERROR_NOT_ENOUGH_MEMORY,pStatus);
+      return (LPASOBJPROP)NULL_(ERROR_NOT_ENOUGH_MEMORY,pStatus);
       }
 
    return pCurrentProperties;
index 7e5e333b2462b6e7238bb707f176d12e1f8299c5..c197e325df6037e1fdfc79c0bbe9cea9c47e5771 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
       // AfsAdmSvr_ChangeUser
       // ...changes a user account's properties.
       //
-extern "C" int AfsAdmSvr_ChangeUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus)
+extern "C" int AfsAdmSvr_ChangeUser (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_USER_CHANGE;
@@ -113,7 +113,7 @@ extern "C" int AfsAdmSvr_ChangeUser (DWORD idClient, ASID idCell, ASID idUser, L
       //    string in {keyString} to encrypt the specified string; otherwise,
       //    pass a valid encryption key in {keyData}.
       //
-extern "C" int AfsAdmSvr_SetUserPassword (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, STRING keyString, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus)
+extern "C" int AfsAdmSvr_SetUserPassword (UINT_PTR idClient, ASID idCell, ASID idUser, int keyVersion, STRING keyString, BYTE keyData[ ENCRYPTIONKEYLENGTH ], ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status = 0;
@@ -153,7 +153,7 @@ extern "C" int AfsAdmSvr_SetUserPassword (DWORD idClient, ASID idCell, ASID idUs
       // AfsAdmSvr_UnlockUser
       // ...unlocks a user's account
       //
-extern "C" int AfsAdmSvr_UnlockUser (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus)
+extern "C" int AfsAdmSvr_UnlockUser (UINT_PTR idClient, ASID idCell, ASID idUser, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_USER_UNLOCK;
@@ -182,7 +182,7 @@ extern "C" int AfsAdmSvr_UnlockUser (DWORD idClient, ASID idCell, ASID idUser, U
       // AfsAdmSvr_CreateUser
       // ...creates a new user account
       //
-extern "C" int AfsAdmSvr_CreateUser (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus)
+extern "C" int AfsAdmSvr_CreateUser (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_USER_CREATE;
@@ -222,7 +222,7 @@ extern "C" int AfsAdmSvr_CreateUser (DWORD idClient, ASID idCell, LPAFSADMSVR_CR
       // AfsAdmSvr_DeleteUser
       // ...deletes a user's account
       //
-extern "C" int AfsAdmSvr_DeleteUser (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus)
+extern "C" int AfsAdmSvr_DeleteUser (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus)
 {
    ASACTION Action;
    Action.Action = ACTION_USER_DELETE;
index 8164cd61513d835463dec034ae2e884c10309a67..56b6ba3f767f02e513c560e31bcc2f77771fc02a 100644 (file)
@@ -84,7 +84,7 @@ DLLLIBS = \
 
 DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib.dll
 
-!IF ("$(AFSVER_CL)"<"1400")
+!IF ($(AFSVER_CL) < 1400)
 DEFFILE = TaAfsAppLib.def
 !ELSE
 DEFFILE = TaAfsAppLib2005.def
@@ -98,7 +98,8 @@ LOCALLINKFLAGS = -IGNORE:4049
 
 # AfsAppLib needs to use an explicit .DEF file to get its entry points public
 
-LOCALLINKFLAGS = $(LOCALLINKFLAGS) /DEF:$(DEFFILE)
+#LOCALLINKFLAGS = $(LOCALLINKFLAGS) /DEF:$(DEFFILE)
+LOCALLINKFLAGS = $(LOCALLINKFLAGS)
 
 # Also, AfsAppLib has a specific DLL entry-point which should be used
 
@@ -126,6 +127,7 @@ primary : headers $(DLLFILE) lang
 
 $(DLLFILE) : $(DLLOBJS) $(DLLLIBS)
        $(DLLGUILINK) $(LOCALLINKFLAGS) $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index 92a71d2b316c007ee3db01c5a771f97e63f00345..959b770ceab629e325c33fd8986074c193637d2e 100644 (file)
@@ -93,8 +93,8 @@ BOOL CALLBACK AfsAppLib_MainHook (HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
       }
 
    if (oldProc)
-      return CallWindowProc ((WNDPROC)oldProc, hWnd, msg, wp, lp);
+      return (CallWindowProc ((WNDPROC)oldProc, hWnd, msg, wp, lp)==NULL?FALSE:TRUE);
    else
-      return DefWindowProc (hWnd, msg, wp, lp);
+      return (DefWindowProc (hWnd, msg, wp, lp)==NULL?FALSE:TRUE);
 }
 
index 7d0a559063e13bc0f6208f1872cc3174fe2a4996..5a247274fbad223460c0dbaee6c73be63290643a 100644 (file)
@@ -180,7 +180,7 @@ EXPORTED void AfsAppLib_CloseAdminServer (void);
          //    be used to obtain the client id which the administrative
          //    server has assigned to this process.
          //
-EXPORTED DWORD AfsAppLib_GetAdminServerClientID (void);
+EXPORTED UINT_PTR AfsAppLib_GetAdminServerClientID (void);
 
 
 /*
@@ -240,7 +240,7 @@ typedef struct
    int idsPrompt;      // [in] string ID for Edit prompt
    int idsNone;        // [in] string ID for checkbox (or 0)
    LPCELLLIST lpcl;    // [in] from AfsAppLib_GetCellList()
-   PVOID hCreds;       // [in] credentials for enumeration
+   UINT_PTR hCreds;    // [in] credentials for enumeration
    } BROWSEDLG_PARAMS, *LPBROWSEDLG_PARAMS;
 
 EXPORTED BOOL AfsAppLib_ShowBrowseDialog (LPBROWSEDLG_PARAMS lpp);
@@ -295,7 +295,7 @@ EXPORTED void AfsAppLib_Uncover (HWND hWnd);
          // ...obtains information about the specified credentials cookie.
          //    returns TRUE if the data could be successfully parsed.
          //
-EXPORTED BOOL AfsAppLib_CrackCredentials (PVOID hCreds, LPTSTR pszCell = NULL, LPTSTR pszUser = NULL, LPSYSTEMTIME pst = NULL, ULONG *pStatus = NULL);
+EXPORTED BOOL AfsAppLib_CrackCredentials (UINT_PTR hCreds, LPTSTR pszCell = NULL, LPTSTR pszUser = NULL, LPSYSTEMTIME pst = NULL, ULONG *pStatus = NULL);
 
          // AfsAppLib_GetCredentials
          // ...returns nonzero if the calling process has AFS credentials within
@@ -304,14 +304,14 @@ EXPORTED BOOL AfsAppLib_CrackCredentials (PVOID hCreds, LPTSTR pszCell = NULL, L
          //    a token handle which can be supplied to the AFS administrative
          //    functions.
          //
-EXPORTED PVOID AfsAppLib_GetCredentials (LPCTSTR pszCell = NULL, ULONG *pStatus = NULL);
+EXPORTED UINT_PTR AfsAppLib_GetCredentials (LPCTSTR pszCell = NULL, ULONG *pStatus = NULL);
 
          // AfsAppLib_SetCredentials
          // ...obtains new credentials for the calling process; performs no UI.
          //    If successful, returns a nonzero token handle which can be
          //    supplied to the AFS administrative functions.
          //
-EXPORTED PVOID AfsAppLib_SetCredentials (LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus = NULL);
+EXPORTED UINT_PTR AfsAppLib_SetCredentials (LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus = NULL);
 
          // AfsAppLib_IsUserAdmin
          // ...queries the KAS database for a particular cell to determine
@@ -319,7 +319,7 @@ EXPORTED PVOID AfsAppLib_SetCredentials (LPCTSTR pszCell, LPCTSTR pszUser, LPCTS
          //    The hCreds passed in should be for an admin, or for the user
          //    being queried.
          //
-EXPORTED BOOL AfsAppLib_IsUserAdmin (PVOID hCreds, LPTSTR pszUser);
+EXPORTED BOOL AfsAppLib_IsUserAdmin (UINT_PTR hCreds, LPTSTR pszUser);
 
          // AfsAppLib_ShowOpenCellDialog
          // ...presents a dialog which allows the user to select a cell,
@@ -349,7 +349,7 @@ typedef struct
    LPCELLLIST lpcl;    // [in] from AfsAppLib_GetCellList()
    BADCREDSDLG_PARAMS bcdp;    // [in] params for bad creds dialog
    TCHAR szCell[ cchNAME ];    // [out] selected cell
-   PVOID hCreds;       // [out] credentials in cell
+   UINT_PTR hCreds;    // [out] credentials in cell
    } OPENCELLDLG_PARAMS, *LPOPENCELLDLG_PARAMS;
 
 EXPORTED BOOL AfsAppLib_ShowOpenCellDialog (LPOPENCELLDLG_PARAMS lpp);
@@ -369,7 +369,7 @@ typedef struct
    BADCREDSDLG_PARAMS bcdp;    // [in] params for bad creds dialog
    TCHAR szIdentity[ cchNAME ];        // [out] current DCE identity in szCell
    TCHAR szPassword[ cchNAME ];        // [out] password entered (or "")
-   PVOID hCreds;       // [in out] credentials in cell
+   UINT_PTR hCreds;    // [in out] credentials in cell
    } CREDENTIALSDLG_PARAMS, *LPCREDENTIALSDLG_PARAMS;
 
 EXPORTED BOOL AfsAppLib_ShowCredentialsDialog (LPCREDENTIALSDLG_PARAMS lpp);
@@ -380,7 +380,7 @@ EXPORTED BOOL AfsAppLib_ShowCredentialsDialog (LPCREDENTIALSDLG_PARAMS lpp);
          //
 typedef struct
    {
-   PVOID hCreds;       // [in] credentials to query
+   UINT_PTR hCreds;    // [in] credentials to query
    BOOL fShowWarning;  // [in] TRUE to present warning dialog
    BADCREDSDLG_PARAMS bcdp;    // [in] params for bad creds dialog
    } CHECKCREDS_PARAMS, *LPCHECKCREDS_PARAMS;
@@ -549,8 +549,8 @@ EXPORTED void AfsAppLib_MainPump (void);
          //    the integer indices used by the Get/SetWindowLong routines,
          //    and can grow windows' data-space as necessary.
          //
-EXPORTED DWORD GetWindowData (HWND hWnd, LPTSTR pszField);
-EXPORTED DWORD SetWindowData (HWND hWnd, LPTSTR pszField, DWORD dwNewData);
+EXPORTED UINT_PTR GetWindowData (HWND hWnd, LPTSTR pszField);
+EXPORTED UINT_PTR SetWindowData (HWND hWnd, LPTSTR pszField, UINT_PTR dwNewData);
 
 
 /*
index ef8fb543f50a8bb1400091a1e17fda93134be28f..9f8bdff67c0ea8ec51a165190756142c0b5dd0cd 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
 static struct
    {
    BOOL fUseAdminServer;
-   DWORD idAdminServerClient;
+   UINT_PTR idAdminServerClient;
    } l = {0, 0};
 
 
@@ -68,7 +68,7 @@ void AfsAppLib_CloseAdminServer (void)
 }
 
 
-DWORD AfsAppLib_GetAdminServerClientID (void)
+UINT_PTR AfsAppLib_GetAdminServerClientID (void)
 {
    return (l.fUseAdminServer) ? l.idAdminServerClient : 0;
 }
@@ -190,159 +190,159 @@ EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListFree (LPASACTIONLIST *ppList)
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerOpen (LPCTSTR pszAddress, DWORD *pidClient, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerOpen (LPCTSTR pszAddress, UINT_PTR *pidClient, ULONG *pStatus)
 {
    return asc_AdminServerOpen (pszAddress, pidClient, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerClose (DWORD idClient, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerClose (UINT_PTR idClient, ULONG *pStatus)
 {
    return asc_AdminServerClose (idClient, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsCrack (UINT_PTR idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus)
 {
    return asc_CredentialsCrack (idClient, hCreds, pszCell, pszUser, pstExpiration, pStatus);
 }
 
-EXPORTED PVOID ADMINAPI AfsAppLib_asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStatus)
+EXPORTED UINT_PTR ADMINAPI AfsAppLib_asc_CredentialsGet (UINT_PTR idClient, LPCTSTR pszCell, ULONG *pStatus)
 {
    return asc_CredentialsGet (idClient, pszCell, pStatus);
 }
 
-EXPORTED PVOID ADMINAPI AfsAppLib_asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus)
+EXPORTED UINT_PTR ADMINAPI AfsAppLib_asc_CredentialsSet (UINT_PTR idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus)
 {
    return asc_CredentialsSet (idClient, pszCell, pszUser, pszPassword, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsPush (DWORD idClient, PVOID hCreds, ASID idCell, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsPush (UINT_PTR idClient, PVOID hCreds, ASID idCell, ULONG *pStatus)
 {
    return asc_CredentialsPush (idClient, hCreds, idCell, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_LocalCellGet (DWORD idClient, LPTSTR pszCell, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_LocalCellGet (UINT_PTR idClient, LPTSTR pszCell, ULONG *pStatus)
 {
    return asc_LocalCellGet (idClient, pszCell, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ErrorCodeTranslate (UINT_PTR idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus)
 {
    return asc_ErrorCodeTranslate (idClient, code, idLanguage, pszErrorText, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGet (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGet (UINT_PTR idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus)
 {
    return asc_ActionGet (idClient, idAction, pAction, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGetMultiple (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGetMultiple (UINT_PTR idClient, UINT_PTR idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus)
 {
    return asc_ActionGetMultiple (idClient, idClientSearch, idCellSearch, ppList, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListen (DWORD idClient, HWND hNotify, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListen (UINT_PTR idClient, HWND hNotify, ULONG *pStatus)
 {
    return asc_ActionListen (idClient, hNotify, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus)
 {
    return asc_ActionListenClear (idClient, hNotify, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellOpen (UINT_PTR idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus)
 {
    return asc_CellOpen (idClient, hCreds, pszCell, dwScope, pidCell, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellClose (DWORD idClient, ASID idCell, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellClose (UINT_PTR idClient, ASID idCell, ULONG *pStatus)
 {
    return asc_CellClose (idClient, idCell, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellChange (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellChange (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
 {
    return asc_CellChange (idClient, idCell, pChange, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellRefreshRateSet (DWORD idClient, ASID idCell, LONG cminRefreshRate, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellRefreshRateSet (UINT_PTR idClient, ASID idCell, LONG cminRefreshRate, ULONG *pStatus)
 {
    return asc_CellRefreshRateSet (idClient, idCell, cminRefreshRate, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFind (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFind (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus)
 {
    return asc_ObjectFind (idClient, idSearchScope, ObjectType, pszName, pidObject, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFindMultiple (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFindMultiple (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus)
 {
    return asc_ObjectFindMultiple (idClient, idSearchScope, ObjectType, pszPattern, pSearchParams, ppList, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
 {
    return asc_ObjectPropertiesGet (idClient, GetLevel, idCell, idObject, pProperties, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGetMultiple (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGetMultiple (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus)
 {
    return asc_ObjectPropertiesGetMultiple (idClient, GetLevel, idCell, pAsidList, ppPropertiesList, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListen (DWORD idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListen (UINT_PTR idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus)
 {
    return asc_ObjectListen (idClient, idCell, idObject, hNotify, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus)
 {
    return asc_ObjectListenClear (idClient, hNotify, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus)
 {
    return asc_ObjectListenMultiple (idClient, idCell, pAsidList, hNotify, pStatus);
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefresh (DWORD idClient, ASID idCell, ASID idObject, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefresh (UINT_PTR idClient, ASID idCell, ASID idObject, ULONG *pStatus)
 {
    return asc_ObjectRefresh (idClient, idCell, idObject, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefreshMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefreshMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus)
 {
    return asc_ObjectRefreshMultiple (idClient, idCell, pAsidList, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_RandomKeyGet (DWORD idClient, ASID idCell, PBYTE pkey, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_RandomKeyGet (UINT_PTR idClient, ASID idCell, PBYTE pkey, ULONG *pStatus)
 {
    return asc_RandomKeyGet (idClient, idCell, pkey, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellNameGet_Fast (DWORD idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellNameGet_Fast (UINT_PTR idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus)
 {
    return asc_CellNameGet_Fast (idClient, idCell, pszCell, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectNameGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectNameGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus)
 {
    return asc_ObjectNameGet_Fast (idClient, idCell, idObject, pszObject, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectTypeGet_Fast (DWORD idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectTypeGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus)
 {
    return asc_ObjectTypeGet_Fast (idClient, idCell, idObject, pObjectType, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus)
 {
    return asc_ObjectPropertiesGet_Fast (idClient, idCell, idObject, pProperties, pStatus);
 }
@@ -364,72 +364,72 @@ EXPORTED LPCRITICAL_SECTION ADMINAPI AfsAppLib_asc_GetCriticalSection (void)
 }
 
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserChange (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserChange (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus)
 {
    return asc_UserChange (idClient, idCell, idUser, pChange, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserPasswordSet (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserPasswordSet (UINT_PTR idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus)
 {
    return asc_UserPasswordSet (idClient, idCell, idUser, keyVersion, pkeyString, pkeyData, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserUnlock (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserUnlock (UINT_PTR idClient, ASID idCell, ASID idUser, ULONG *pStatus)
 {
    return asc_UserUnlock (idClient, idCell, idUser, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus)
 {
    return asc_UserCreate (idClient, idCell, pCreate, pidUser, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserDelete (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserDelete (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus)
 {
    return asc_UserDelete (idClient, idCell, idUser, pDelete, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupChange (UINT_PTR idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
 {
    return asc_GroupChange (idClient, idCell, idGroup, pChange, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembersGet (UINT_PTR idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    return asc_GroupMembersGet (idClient, idCell, idGroup, ppAsidList, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberAdd (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
 {
    return asc_GroupMemberAdd (idClient, idCell, idGroup, idMember, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberRemove (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
 {
    return asc_GroupMemberRemove (idClient, idCell, idGroup, idMember, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupRename (UINT_PTR idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus)
 {
    return asc_GroupRename (idClient, idCell, idGroup, pszNewName, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupOwnershipGet (UINT_PTR idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    return asc_GroupOwnershipGet (idClient, idCell, idMember, ppAsidList, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembershipGet (UINT_PTR idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
 {
    return asc_GroupMembershipGet (idClient, idCell, idOwner, ppAsidList, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
 {
    return asc_GroupCreate (idClient, idCell, pCreate, pidGroup, pStatus);
 }
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupDelete (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupDelete (UINT_PTR idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
 {
    return asc_GroupDelete (idClient, idCell, idGroup, pStatus);
 }
index d481f0255e4b2c2aaca9e187bd2bc47adf1f14b8..debc0047abd6ca9574760bc48644255a299b9065 100644 (file)
@@ -56,65 +56,65 @@ EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListRemoveEntry (LPASACTIONLIST *ppLi
 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListTest (LPASACTIONLIST *ppList, DWORD idAction, LPASACTION pAction = NULL);
 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListFree (LPASACTIONLIST *ppList);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerOpen (LPCTSTR pszAddress, DWORD *pidClient, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerClose (DWORD idClient, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerOpen (LPCTSTR pszAddress, UINT_PTR *pidClient, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerClose (UINT_PTR idClient, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus);
-EXPORTED PVOID ADMINAPI AfsAppLib_asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStatus);
-EXPORTED PVOID ADMINAPI AfsAppLib_asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsPush (DWORD idClient, PVOID hCreds, ASID idCell, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsCrack (UINT_PTR idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus);
+EXPORTED UINT_PTR ADMINAPI AfsAppLib_asc_CredentialsGet (UINT_PTR idClient, LPCTSTR pszCell, ULONG *pStatus);
+EXPORTED UINT_PTR ADMINAPI AfsAppLib_asc_CredentialsSet (UINT_PTR idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsPush (UINT_PTR idClient, PVOID hCreds, ASID idCell, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_LocalCellGet (DWORD idClient, LPTSTR pszCell, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_LocalCellGet (UINT_PTR idClient, LPTSTR pszCell, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ErrorCodeTranslate (UINT_PTR idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGet (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGetMultiple (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListen (DWORD idClient, HWND hNotify, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGet (UINT_PTR idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGetMultiple (UINT_PTR idClient, UINT_PTR idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListen (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellClose (DWORD idClient, ASID idCell, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellChange (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellRefreshRateSet (DWORD idClient, ASID idCell, LONG cminRefreshRate, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellOpen (UINT_PTR idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellClose (UINT_PTR idClient, ASID idCell, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellChange (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellRefreshRateSet (UINT_PTR idClient, ASID idCell, LONG cminRefreshRate, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFind (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFindMultiple (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGetMultiple (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFind (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFindMultiple (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGetMultiple (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListen (DWORD idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListen (UINT_PTR idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefresh (DWORD idClient, ASID idCell, ASID idObject, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefreshMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefresh (UINT_PTR idClient, ASID idCell, ASID idObject, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefreshMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_RandomKeyGet (DWORD idClient, ASID idCell, PBYTE pkey, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_RandomKeyGet (UINT_PTR idClient, ASID idCell, PBYTE pkey, ULONG *pStatus);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellNameGet_Fast (DWORD idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus = NULL);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectNameGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus = NULL);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectTypeGet_Fast (DWORD idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus = NULL);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus = NULL);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellNameGet_Fast (UINT_PTR idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus = NULL);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectNameGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus = NULL);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectTypeGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus = NULL);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus = NULL);
 
 EXPORTED void ADMINAPI AfsAppLib_asc_Enter (void);
 EXPORTED void ADMINAPI AfsAppLib_asc_Leave (void);
 EXPORTED LPCRITICAL_SECTION ADMINAPI AfsAppLib_asc_GetCriticalSection (void);
 
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserChange (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserPasswordSet (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserUnlock (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserDelete (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus);
-
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus);
-EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupDelete (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserChange (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserPasswordSet (UINT_PTR idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserUnlock (UINT_PTR idClient, ASID idCell, ASID idUser, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserDelete (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus);
+
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupChange (UINT_PTR idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembersGet (UINT_PTR idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberAdd (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberRemove (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupRename (UINT_PTR idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembershipGet (UINT_PTR idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupOwnershipGet (UINT_PTR idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus);
+EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupDelete (UINT_PTR idClient, ASID idCell, ASID idGroup, ULONG *pStatus);
 
 /*
  * Then, note that AfsAppLib remaps all the asc_* routines to call their
index daf1985050281ca2c84b3ee79efab02f804a941c..586fe6eb90e815629bd726ee107658145539e8b9 100644 (file)
@@ -54,7 +54,7 @@ typedef struct BROWSEDIALOGPARAMS {
    int idsNone;
 
    LPCELLLIST lpcl;
-   PVOID hCreds;
+   UINT_PTR hCreds;
 } BROWSEDIALOGPARAMS, *LPBROWSEDIALOGPARAMS;
 
 
@@ -68,7 +68,7 @@ BOOL DlgProc_Browse_StartSearch (BROWSEDIALOGPARAMS *pbdp, BOOL fCloseDlgIfFail)
 void DlgProc_Browse_StopSearch (BROWSEDIALOGPARAMS *pbdp);
 DWORD _stdcall DlgProc_Browse_ThreadProc (LPARAM lp);
 
-void EnumeratePrincipalsRemotely (LPBROWSEDIALOGPARAMS pbdp, DWORD idClient);
+void EnumeratePrincipalsRemotely (LPBROWSEDIALOGPARAMS pbdp, UINT_PTR idClient);
 void EnumeratePrincipalsLocally (LPBROWSEDIALOGPARAMS pbdp);
 
 
@@ -146,10 +146,10 @@ BOOL CALLBACK DlgProc_Browse (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
    if (msg == WM_INITDIALOG)
    {
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
    }
 
-   if ((pbdp = (BROWSEDIALOGPARAMS *)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((pbdp = (BROWSEDIALOGPARAMS *)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
    {
       switch (msg)
       {
@@ -597,7 +597,7 @@ DWORD _stdcall DlgProc_Browse_ThreadProc (LPARAM lp)
 
       PostMessage (pbdp->hDlg, WM_THREADSTART, 0, 0);
 
-      DWORD idClient;
+      UINT_PTR idClient;
       if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
       {
          EnumeratePrincipalsRemotely (pbdp, idClient);
@@ -633,7 +633,7 @@ void EnumeratePrincipalsLocally (LPBROWSEDIALOGPARAMS pbdp)
    CopyStringToAnsi (szCellA, pbdp->szCell);
 
    PVOID hCell;
-   if (afsclient_CellOpen (szCellA, pbdp->hCreds, &hCell, (afs_status_p)&status))
+   if (afsclient_CellOpen (szCellA, (PVOID)pbdp->hCreds, &hCell, (afs_status_p)&status))
    {
       // Enumerate the principals recognized by KAS.
       //
@@ -664,14 +664,14 @@ void EnumeratePrincipalsLocally (LPBROWSEDIALOGPARAMS pbdp)
 }
 
 
-void EnumeratePrincipalsRemotely (LPBROWSEDIALOGPARAMS pbdp, DWORD idClient)
+void EnumeratePrincipalsRemotely (LPBROWSEDIALOGPARAMS pbdp, UINT_PTR idClient)
 {
    ULONG status;
 
    // Open the relevant cell
    //
    ASID idCell;
-   if (asc_CellOpen (idClient, pbdp->hCreds, pbdp->szThreadCell, AFSADMSVR_SCOPE_USERS, &idCell, &status))
+   if (asc_CellOpen (idClient, (PVOID)pbdp->hCreds, pbdp->szThreadCell, AFSADMSVR_SCOPE_USERS, &idCell, &status))
    {
       // Obtain a list of ASIDs from the admin server, each representing
       // a principal which we want to show.
index d7b0c429d33a3d4a5c251509ad3984572c6205c6..590f5af22ea1b307516fa204a2276b39f831ef72 100644 (file)
@@ -60,10 +60,10 @@ BOOL CALLBACK BrowseSet_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPBROWSESETDLG_PARAMS lpp;
-   if ((lpp = (LPBROWSESETDLG_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSESETDLG_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
index 5a02c71fe38978c6a708137b39ba3886b23b31cc..29966f7a374e161d27cb59778b2bb4b63703fd14 100644 (file)
@@ -35,7 +35,7 @@ rwWindowData awdCover[] = {
  *
  */
 
-#define dwCOVER_SIGNATURE  0xC0E0C0E0  // SetWindowLong(hDlgCover,DWL_USER,#)
+#define dwCOVER_SIGNATURE  0xC0E0C0E0  // SetWindowLongPtr(hDlgCover,DWLP_USER,#)
 
 typedef struct // COVERPARAMS
    {
@@ -130,7 +130,7 @@ void OnCoverWindow (WPARAM wp, LPARAM lp)
             {
             if (!lstrcmp (szClassName, TEXT("#32770"))) // WC_DIALOG
                {
-               if (GetWindowLong (hChild, DWL_USER) == dwCOVER_SIGNATURE)
+               if (GetWindowLongPtr (hChild, DWLP_USER) == dwCOVER_SIGNATURE)
                   {
                   DestroyWindow (hChild);
                   break;
@@ -147,7 +147,7 @@ void OnCoverWindow (WPARAM wp, LPARAM lp)
                                          (LPARAM)lp);
 
       ShowWindow (hCover, TRUE);
-      SetWindowLong (hCover, DWL_USER, dwCOVER_SIGNATURE);
+      SetWindowLongPtr (hCover, DWLP_USER, dwCOVER_SIGNATURE);
 
       FreeString (lpcp->pszDesc);
       FreeString (lpcp->pszButton);
index f2f964dae7ccd79227c16de55c351a8222274712..3d5a64d62b13607b1c36d672d1b9e37170109e7b 100644 (file)
@@ -58,15 +58,15 @@ BOOL CALLBACK BadCreds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
  *
  */
 
-BOOL AfsAppLib_CrackCredentials (PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, LPSYSTEMTIME pst, ULONG *pStatus)
+BOOL AfsAppLib_CrackCredentials (UINT_PTR hCreds, LPTSTR pszCell, LPTSTR pszUser, LPSYSTEMTIME pst, ULONG *pStatus)
 {
    BOOL rc = FALSE;
    ULONG status = 0;
 
-   DWORD idClient;
+   UINT_PTR idClient;
    if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
       {
-      rc = asc_CredentialsCrack (idClient, hCreds, pszCell, pszUser, pst, &status);
+      rc = asc_CredentialsCrack (idClient, (PVOID) hCreds, pszCell, pszUser, pst, &status);
       }
    else 
        if (OpenClientLibrary())
@@ -76,7 +76,7 @@ BOOL AfsAppLib_CrackCredentials (PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, L
       unsigned long dateExpire;
       int fHasKasToken;
 
-      if (afsclient_TokenQuery (hCreds, &dateExpire, szUserA, szUser2A, szCellA, &fHasKasToken, (afs_status_p)&status))
+      if (afsclient_TokenQuery ((PVOID)hCreds, &dateExpire, szUserA, szUser2A, szCellA, &fHasKasToken, (afs_status_p)&status))
          {
          rc = TRUE;
          CopyAnsiToString (pszUser, szUserA);
@@ -93,12 +93,12 @@ BOOL AfsAppLib_CrackCredentials (PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, L
 }
 
 
-PVOID AfsAppLib_GetCredentials (LPCTSTR pszCell, ULONG *pStatus)
+UINT_PTR AfsAppLib_GetCredentials (LPCTSTR pszCell, ULONG *pStatus)
 {
-   PVOID hCreds = NULL;
+   UINT_PTR hCreds = 0;
    ULONG status = 0;
 
-   DWORD idClient;
+   UINT_PTR idClient;
    if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
       {
       hCreds = asc_CredentialsGet (idClient, pszCell, &status);
@@ -108,7 +108,7 @@ PVOID AfsAppLib_GetCredentials (LPCTSTR pszCell, ULONG *pStatus)
       {
       LPSTR pszCellA = StringToAnsi (pszCell);
 
-      afsclient_TokenGetExisting (pszCellA, &hCreds, (afs_status_p)&status);
+      afsclient_TokenGetExisting (pszCellA, (PVOID *)&hCreds, (afs_status_p)&status);
 
       FreeString (pszCellA, pszCell);
       CloseClientLibrary();
@@ -120,12 +120,12 @@ PVOID AfsAppLib_GetCredentials (LPCTSTR pszCell, ULONG *pStatus)
 }
 
 
-PVOID AfsAppLib_SetCredentials (LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus)
+UINT_PTR AfsAppLib_SetCredentials (LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus)
 {
-   PVOID hCreds = NULL;
+   UINT_PTR hCreds = 0;
    ULONG status = 0;
 
-   DWORD idClient;
+   UINT_PTR idClient;
    if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
       {
       hCreds = asc_CredentialsSet (idClient, pszCell, pszUser, pszPassword, &status);
@@ -140,7 +140,7 @@ PVOID AfsAppLib_SetCredentials (LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPas
       CopyStringToAnsi (szUserA, pszUser);
       CopyStringToAnsi (szPasswordA, pszPassword);
 
-      afsclient_TokenGetNew (szCellA, szUserA, szPasswordA, &hCreds, (afs_status_p)&status);
+      afsclient_TokenGetNew (szCellA, szUserA, szPasswordA, (PVOID *)&hCreds, (afs_status_p)&status);
 
       CloseClientLibrary();
       }
@@ -187,9 +187,9 @@ BOOL CALLBACK OpenCell_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 {
    LPOPENCELLDLG_PARAMS lpp;
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPOPENCELLDLG_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPOPENCELLDLG_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       if (lpp->hookproc)
          {
@@ -363,8 +363,8 @@ DWORD WINAPI OpenCell_OnCell_ThreadProc (PVOID lp)
    LPOPENCELL_ONCELL_PARAMS lpp;
    if ((lpp = (LPOPENCELL_ONCELL_PARAMS)lp) != NULL)
       {
-      PVOID hCreds = AfsAppLib_GetCredentials (lpp->szCell);
-      lpp->fGotCreds = AfsAppLib_CrackCredentials (hCreds, lpp->szCell, lpp->szUser, &lpp->stExpire);
+      UINT_PTR hCreds = AfsAppLib_GetCredentials (lpp->szCell);
+      lpp->fGotCreds = AfsAppLib_CrackCredentials (hCreds, lpp->szCell, lpp->szUser, &lpp->stExpire)?TRUE:FALSE;
       lpp->fValidCreds = FALSE;
 
       if (lpp->fGotCreds && AfsAppLib_IsTimeInFuture (&lpp->stExpire))
@@ -490,9 +490,9 @@ BOOL CALLBACK NewCreds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 {
    LPCREDENTIALSDLG_PARAMS lpp;
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPCREDENTIALSDLG_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPCREDENTIALSDLG_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       if (lpp->hookproc)
          {
@@ -699,6 +699,82 @@ void NewCreds_GetOutParams (HWND hDlg, LPCREDENTIALSDLG_PARAMS lpp)
  *
  */
 
+
+BOOL AfsAppLib_IsUserAdmin (UINT_PTR hCreds, LPTSTR pszUser)
+{
+#ifndef USE_KASERVER
+    return TRUE;
+#else
+   BOOL rc = FALSE;
+   afs_status_t status;
+
+   UINT_PTR idClient;
+   if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
+      {
+      TCHAR szCell[ cchRESOURCE ];
+      TCHAR szUser[ cchRESOURCE ];
+      SYSTEMTIME stExpire;
+      if (asc_CredentialsCrack (idClient, hCreds, szCell, szUser, &stExpire, (ULONG*)&status))
+         {
+         ASID idCell;
+         if (asc_CellOpen (idClient, hCreds, szCell, AFSADMSVR_SCOPE_USERS, &idCell, (ULONG*)&status))
+            {
+            ASID idUser;
+            if (asc_ObjectFind (idClient, idCell, TYPE_USER, pszUser, &idUser, (ULONG*)&status))
+               {
+               ASOBJPROP Info;
+               if (asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, idUser, &Info, (ULONG*)&status))
+                  {
+                  if (Info.u.UserProperties.fHaveKasInfo)
+                     {
+                     rc = Info.u.UserProperties.KASINFO.fIsAdmin;
+                     }
+                  }
+               }
+            asc_CellClose (idClient, idCell, (ULONG*)&status);
+            }
+         }
+      }
+   else if (OpenClientLibrary())
+      {
+      if (OpenKasLibrary())
+         {
+         char szUserA[ cchRESOURCE ], szUser2A[ cchRESOURCE ];
+         char szCellA[ cchRESOURCE ];
+         unsigned long dateExpire;
+         int fHasKasToken;
+
+         if (afsclient_TokenQuery (hCreds, &dateExpire, szUserA, szUser2A, szCellA, &fHasKasToken, (afs_status_p)&status))
+            {
+            PVOID hCell;
+            if (afsclient_CellOpen (szCellA, hCreds, &hCell, &status))
+               {
+               kas_identity_t Identity;
+               memset (&Identity, 0x00, sizeof(Identity));
+               CopyStringToAnsi (Identity.principal, pszUser);
+
+               kas_principalEntry_t Entry;
+               if (kas_PrincipalGet (hCell, NULL, &Identity, &Entry, &status))
+                  {
+                  if (Entry.adminSetting == KAS_ADMIN)
+                     rc = TRUE;
+                  }
+
+               afsclient_CellClose (hCell, (afs_status_p)&status);
+               }
+            }
+
+         CloseKasLibrary();
+         }
+
+      CloseClientLibrary();
+      }
+
+   return rc;
+#endif /* USE_KASERVER */
+}
+
+
 typedef struct
    {
    BADCREDSDLG_PARAMS bcdp;
@@ -776,8 +852,8 @@ BOOL CALLBACK BadCreds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 {
    LPREALBADCREDSDLG_PARAMS lpp;
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
-   if ((lpp = (LPREALBADCREDSDLG_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL) 
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
+   if ((lpp = (LPREALBADCREDSDLG_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL) 
       {
       if (lpp->bcdp.hookproc)
          {
@@ -831,7 +907,7 @@ BOOL CALLBACK BadCreds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void AfsAppLib_CheckForExpiredCredentials (LPCREDENTIALSDLG_PARAMS lpp)
 {
-   static PVOID hCredsPrevious = NULL;
+   static UINT_PTR hCredsPrevious = 0;
    static BOOL fHadGoodCredentials;
 
    TCHAR szCell[ cchNAME ];
@@ -839,7 +915,7 @@ void AfsAppLib_CheckForExpiredCredentials (LPCREDENTIALSDLG_PARAMS lpp)
    SYSTEMTIME stExpire;
 
    BOOL fHaveCredentials;
-   fHaveCredentials = AfsAppLib_CrackCredentials (lpp->hCreds, szCell, szUser, &stExpire);
+   fHaveCredentials = AfsAppLib_CrackCredentials (lpp->hCreds, szCell, szUser, &stExpire)?TRUE:FALSE;
 
    if (hCredsPrevious && (hCredsPrevious != lpp->hCreds))
       {
@@ -904,77 +980,3 @@ void OnExpiredCredentials (WPARAM wp, LPARAM lp)
 }
 
 
-BOOL AfsAppLib_IsUserAdmin (PVOID hCreds, LPTSTR pszUser)
-{
-#ifndef USE_KASERVER
-    return TRUE;
-#else
-   BOOL rc = FALSE;
-   afs_status_t status;
-
-   DWORD idClient;
-   if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
-      {
-      TCHAR szCell[ cchRESOURCE ];
-      TCHAR szUser[ cchRESOURCE ];
-      SYSTEMTIME stExpire;
-      if (asc_CredentialsCrack (idClient, hCreds, szCell, szUser, &stExpire, (ULONG*)&status))
-         {
-         ASID idCell;
-         if (asc_CellOpen (idClient, hCreds, szCell, AFSADMSVR_SCOPE_USERS, &idCell, (ULONG*)&status))
-            {
-            ASID idUser;
-            if (asc_ObjectFind (idClient, idCell, TYPE_USER, pszUser, &idUser, (ULONG*)&status))
-               {
-               ASOBJPROP Info;
-               if (asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, idUser, &Info, (ULONG*)&status))
-                  {
-                  if (Info.u.UserProperties.fHaveKasInfo)
-                     {
-                     rc = Info.u.UserProperties.KASINFO.fIsAdmin;
-                     }
-                  }
-               }
-            asc_CellClose (idClient, idCell, (ULONG*)&status);
-            }
-         }
-      }
-   else if (OpenClientLibrary())
-      {
-      if (OpenKasLibrary())
-         {
-         char szUserA[ cchRESOURCE ], szUser2A[ cchRESOURCE ];
-         char szCellA[ cchRESOURCE ];
-         unsigned long dateExpire;
-         int fHasKasToken;
-
-         if (afsclient_TokenQuery (hCreds, &dateExpire, szUserA, szUser2A, szCellA, &fHasKasToken, (afs_status_p)&status))
-            {
-            PVOID hCell;
-            if (afsclient_CellOpen (szCellA, hCreds, &hCell, &status))
-               {
-               kas_identity_t Identity;
-               memset (&Identity, 0x00, sizeof(Identity));
-               CopyStringToAnsi (Identity.principal, pszUser);
-
-               kas_principalEntry_t Entry;
-               if (kas_PrincipalGet (hCell, NULL, &Identity, &Entry, &status))
-                  {
-                  if (Entry.adminSetting == KAS_ADMIN)
-                     rc = TRUE;
-                  }
-
-               afsclient_CellClose (hCell, (afs_status_p)&status);
-               }
-            }
-
-         CloseKasLibrary();
-         }
-
-      CloseClientLibrary();
-      }
-
-   return rc;
-#endif /* USE_KASERVER */
-}
-
index 574af873fef64ab1bd7020310b693148bada367b..c861510551d195936aceadfb5672eb8e5da9f4cf 100644 (file)
@@ -61,7 +61,7 @@ EXPORTED void AfsAppLib_SetAppInstance (HINSTANCE hInst)
 }
 
 
-extern "C" BOOLEAN _stdcall DllEntryPoint (HANDLE hInst, DWORD dwReason, PVOID pReserved)
+EXPORTED extern "C" BOOLEAN _stdcall DllEntryPoint (HANDLE hInst, DWORD dwReason, PVOID pReserved)
 {
    switch (dwReason)
       {
index c50da55e40d695143ff18824625944e4b5f1faf0..6daa74e761d8197872d072003ef620a8a4430668 100644 (file)
@@ -54,7 +54,7 @@ PROGRESSDISPLAY::PROGRESSDISPLAY (HWND hParent, int iddTemplate, DLGPROC dlgproc
 PROGRESSDISPLAY::~PROGRESSDISPLAY (void)
 {
    m_fFinished = TRUE;
-   SetWindowLong (m_hWnd, DWL_USER, (LONG)0);
+   SetWindowLongPtr (m_hWnd, DWLP_USER, (LONG)0);
    DeleteCriticalSection (&m_cs);
    if (m_fCreatedWindow)
       DestroyWindow (m_hWnd);
@@ -63,7 +63,7 @@ PROGRESSDISPLAY::~PROGRESSDISPLAY (void)
 
 void PROGRESSDISPLAY::Init (HWND hWnd)
 {
-   SetWindowLong (hWnd, DWL_USER, (LONG)this);
+   SetWindowLongPtr (hWnd, DWLP_USER, (LONG)this);
    Subclass_AddHook (hWnd, PROGRESSDISPLAY::ProgressDisplay_HookProc);
 
    m_msgFinish = 0;
@@ -164,7 +164,7 @@ LPPROGRESSDISPLAY PROGRESSDISPLAY::GetProgressDisplay (HWND hWnd)
    LPPROGRESSDISPLAY ppd = NULL;
 
    try {
-      if ((ppd = (LPPROGRESSDISPLAY)(GetWindowLong (hWnd, DWL_USER))) != NULL) {
+      if ((ppd = (LPPROGRESSDISPLAY)(GetWindowLongPtr (hWnd, DWLP_USER))) != NULL) {
          if (ppd->m_hWnd != hWnd)
             ppd = NULL;
       }
index d5cb70c5e07c399d0938e8eaaeba107003437341..313f8dde895cdef07eb7d0fde359d5d26d4cc5ba 100644 (file)
@@ -52,7 +52,7 @@ static size_t cFields = 0;
 static struct
    {
    HWND hWnd;
-   DWORD *adwData;
+   UINT_PTR *adwData;
    size_t cdwData;
    } *aWindows = NULL;
 static size_t cWindows = 0;
@@ -260,9 +260,9 @@ size_t GetWindowDataField (LPTSTR pszField)
 }
 
 
-DWORD GetWindowData (HWND hWnd, LPTSTR pszField)
+UINT_PTR GetWindowData (HWND hWnd, LPTSTR pszField)
 {
-   DWORD rc = 0;
+   UINT_PTR rc = 0;
 
    if (pcsData == NULL)
       {
@@ -290,9 +290,9 @@ DWORD GetWindowData (HWND hWnd, LPTSTR pszField)
 }
 
 
-DWORD SetWindowData (HWND hWnd, LPTSTR pszField, DWORD dwNewData)
+UINT_PTR SetWindowData (HWND hWnd, LPTSTR pszField, UINT_PTR dwNewData)
 {
-   DWORD rc = 0;
+   UINT_PTR rc = 0;
 
    if (pcsData == NULL)
       {
index e5a167a2ffdaf163a03ddd605613fb79b8d44b3d..ec5b2bd988b142e1d008f1dd48a23734f254c6ea 100644 (file)
@@ -136,7 +136,7 @@ LPWIZARD WIZARD::GetWizard (HWND hWnd)
    LPWIZARD pWiz = NULL;
 
    try {
-      if ((pWiz = (LPWIZARD)GetWindowLong (hWnd, DWL_USER)) != NULL)
+      if ((pWiz = (LPWIZARD)GetWindowLongPtr (hWnd, DWLP_USER)) != NULL)
          {
          if ( (pWiz->m_hWnd != hWnd) && (pWiz->m_hBkg != hWnd) )
             pWiz = NULL;
@@ -649,9 +649,9 @@ BOOL WIZARD::SendStateCommand (int st, WIZARD_COMMAND wc)
 BOOL CALLBACK WIZARD::Template_DlgProc (HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
 {
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hWnd, DWL_USER, lp);
+      SetWindowLongPtr (hWnd, DWLP_USER, lp);
 
-   LPWIZARD pWiz = (LPWIZARD)GetWindowLong (hWnd, DWL_USER);
+   LPWIZARD pWiz = (LPWIZARD)GetWindowLongPtr (hWnd, DWLP_USER);
 
    switch (msg)
       {
@@ -928,9 +928,9 @@ void GetRectInParent (HWND hWnd, RECT *pr)
 BOOL CALLBACK WIZARD::Background_DlgProc (HWND hBkg, UINT msg, WPARAM wp, LPARAM lp)
 {
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hBkg, DWL_USER, lp);
+      SetWindowLongPtr (hBkg, DWLP_USER, lp);
 
-   LPWIZARD pWiz = (LPWIZARD)GetWindowLong (hBkg, DWL_USER);
+   LPWIZARD pWiz = (LPWIZARD)GetWindowLongPtr (hBkg, DWLP_USER);
 
    switch (msg)
       {
index 7dcd269a8d0bd337fe6191ccfe833b2a11db2636..7b2ef6e3754af08a53e17a8467e60522fa118d99 100644 (file)
@@ -125,7 +125,7 @@ BOOL RegisterCheckListClass (void)
       {
       WNDCLASS wc;
       GetClassInfo (THIS_HINST, TEXT("LISTBOX"), &wc);
-      procListbox = (LONG)wc.lpfnWndProc;
+      procListbox = PtrToLong(wc.lpfnWndProc);
 
       wc.style = CS_GLOBALCLASS;
       wc.lpfnWndProc = (WNDPROC)CheckListProc;
@@ -157,7 +157,9 @@ BOOL IsCheckList (HWND hList)
 
 BOOL CALLBACK CheckListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
-   switch (msg)
+    HRESULT hResult;
+
+    switch (msg)
       {
       case WM_CREATE:
          Subclass_AddHook (GetParent(hList), CheckList_DialogProc);
@@ -182,8 +184,8 @@ BOOL CALLBACK CheckListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
             if (procListbox)
                {
                ReleaseCapture ();
-               CallWindowProc ((WNDPROC)procListbox, hList, WM_LBUTTONDOWN, wp, lp);
-               CallWindowProc ((WNDPROC)procListbox, hList, WM_LBUTTONUP, wp, lp);
+               CallWindowProc ((WNDPROC)LongToPtr(procListbox), hList, WM_LBUTTONDOWN, wp, lp);
+               CallWindowProc ((WNDPROC)LongToPtr(procListbox), hList, WM_LBUTTONUP, wp, lp);
                SetCapture (hList);
                }
             return TRUE;
@@ -216,9 +218,11 @@ BOOL CALLBACK CheckListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
       }
 
    if (procListbox)
-      return CallWindowProc ((WNDPROC)procListbox, hList, msg, wp, lp);
+      hResult = CallWindowProc ((WNDPROC)LongToPtr(procListbox), hList, msg, wp, lp);
    else
-      return DefWindowProc (hList, msg, wp, lp);
+      hResult = DefWindowProc (hList, msg, wp, lp);
+
+    return (hResult?TRUE:FALSE);
 }
 
 
@@ -508,14 +512,14 @@ BOOL CheckList_OnHitTest (HWND hList, int id)
 
 BOOL CheckList_OnGetHit (HWND hList, WPARAM wp, LPARAM lp)
 {
-   return (BOOL)GetWindowLong (hList, GWL_USERDATA);
+   return (BOOL)GetWindowLongPtr (hList, GWLP_USERDATA);
 }
 
 
 BOOL CheckList_OnSetHit (HWND hList, WPARAM wp, LPARAM lp)
 {
    int iItem = (int)wp;
-   SetWindowLong (hList, GWL_USERDATA, iItem);
+   SetWindowLongPtr (hList, GWLP_USERDATA, iItem);
    return TRUE;
 }
 
index e66f277da6cb2fd7f9f5f6ba4c5ac1e6980161b6..809da3d5a5ae39e661efa140b1c937973d963869 100644 (file)
@@ -172,7 +172,7 @@ BOOL CALLBACK PropTab_HookProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          if (iTab < aPropSheets[ii].psh->cTabs)
             {
             aPropSheets[ii].psh->aTabs[iTab].hDlg = hDlg;
-            BOOL rc = CallWindowProc ((WNDPROC)(aPropSheets[ ii ].psh->aTabs[ iTab ].dlgproc), hDlg, msg, wp, lp);
+            BOOL rc = (CallWindowProc ((WNDPROC)(aPropSheets[ ii ].psh->aTabs[ iTab ].dlgproc), hDlg, msg, wp, lp)?TRUE:FALSE);
 
             switch (msg)
                {
@@ -258,9 +258,11 @@ BOOL PropSheet_AddTab (LPPROPSHEET psh, LONG idsTitle, int idd, DLGPROC dlgproc,
    if ((hp = CreatePropertySheetPage (&psp)) == 0)
       return FALSE;
 
-   if (!REALLOC( psh->sh.phpage, psh->sh.nPages, 1+psh->sh.nPages, 1))
+   size_t size = psh->sh.nPages;
+   if (!REALLOC( psh->sh.phpage, size, 1+psh->sh.nPages, 1))
       return FALSE;
 
+   psh->sh.nPages = (UINT) size;
    if (!REALLOC( psh->aTabs, psh->cTabs, psh->sh.nPages, 1))
       return FALSE;
 
index 8e77978366e619e7f052406dc6a592d9bbaae1e0..a6dbb60a544ce2c5ccf6445017f97e35323b66d0 100644 (file)
@@ -230,7 +230,7 @@ typedef class EXPORTED HASHLIST HASHLIST, *LPHASHLIST;
 typedef class EXPORTED HASHLISTKEY HASHLISTKEY, *LPHASHLISTKEY;
 typedef class EXPORTED ENUMERATION ENUMERATION, ENUM, *LPENUMERATION, *LPENUM;
 
-typedef DWORD HASHVALUE;
+typedef UINT_PTR HASHVALUE;
 typedef BOOL (CALLBACK * LPHASHFUNC_COMPAREOBJECTDATA)(LPHASHLISTKEY pKey, PVOID pObject, PVOID pData);
 typedef HASHVALUE (CALLBACK * LPHASHFUNC_HASHOBJECT)(LPHASHLISTKEY pKey, PVOID pObject);
 typedef HASHVALUE (CALLBACK * LPHASHFUNC_HASHDATA)(LPHASHLISTKEY pKey, PVOID pData);
index 1cab6b5d81b71b4bd1cd97922d1def0c5c2cb5b0..f6a16a54abef44e03a2c013da4b0d44553691a87 100644 (file)
@@ -44,6 +44,7 @@ DLLOBJS = $(RESFILE)
 
 $(DLLFILE) : $(DLLOBJS)
        $(DLLRESLINK)
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP) 
 
 install : $(DLLFILE)
index d92c2f5c4b1ef0bf9fefd60419becb316f92f4be..8ab9f0fb7631932e8176c880b5ca5a06e847023e 100644 (file)
@@ -475,7 +475,7 @@ void EnsureSplitterRegistered (void)
    fRegistered = TRUE;
 
    wc.style         = CS_HREDRAW | CS_VREDRAW;
-   wc.lpfnWndProc   = SplitterWndProc;
+   wc.lpfnWndProc   = (WNDPROC)SplitterWndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = sizeof(SplitterData *);
    wc.hInstance     = THIS_HINST;
index b4a1d01f24133981b126d06ab421cbca2670fc5f..26e2ab4376e45a88e8ffb6691d1b21685aad9f08 100644 (file)
@@ -141,8 +141,8 @@ BOOL Subclass_AddHook (HWND hTarget, PVOID wndProc)
 
    if (aTargets[ iTarget ].nHooksActive == 1)
       {
-      aTargets[ iTarget ].procOrig = (PVOID)GetWindowLong (hTarget, GWL_WNDPROC);
-      SetWindowLong (hTarget, GWL_WNDPROC, (LONG)Subclass_WndProc);
+      aTargets[ iTarget ].procOrig = (PVOID)GetWindowLongPtr (hTarget, GWLP_WNDPROC);
+      SetWindowLongPtr (hTarget, GWLP_WNDPROC, PtrToLong(Subclass_WndProc));
       }
 
    return TRUE;
@@ -177,7 +177,7 @@ void Subclass_RemoveHook (HWND hTarget, PVOID wndProc)
       aTargets[ iTarget ].nHooksActive --;
       if (aTargets[ iTarget ].nHooksActive == 0)
          {
-         SetWindowLong (aTargets[ iTarget ].hTarget, GWL_WNDPROC, (LONG)aTargets[ iTarget ].procOrig);
+         SetWindowLongPtr (aTargets[ iTarget ].hTarget, GWLP_WNDPROC, (LONG)aTargets[ iTarget ].procOrig);
          memset (&aTargets[ iTarget ], 0x00, sizeof(aTargets[ iTarget ]));
          }
       }
index 81be847dbd3e929e38ac73051e2e8efae4cd9dae..3d92214ba5a9e12d7f00248ca18f5f08928b5c60 100644 (file)
@@ -38,6 +38,7 @@ EXELIBS = \
 
 $(EXEFILE) : $(EXEOBJS) $(EXELIBS)
        $(EXEGUILINK) comctl32.lib shell32.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 test : $(EXEFILE)
index 5b862a89566e85c78ddd1b26891bd2458e8f26e9..b7429acc3c2665a9d2b82ca46ae8bffdab3d0961 100644 (file)
@@ -87,7 +87,7 @@ BOOL AfsClass_GetServerLogFile (LPIDENT lpiServer, LPTSTR pszLocal, LPTSTR pszRe
                   ;
                DWORD cbWrite;
                DWORD cbWrote;
-               if ((cbWrite = pszNext - psz) != 0)
+               if ((cbWrite = (DWORD)(pszNext - psz)) != 0)
                   WriteFile (fh, psz, cbWrite, &cbWrote, NULL);
                WriteFile (fh, TEXT("\r\n"), 2, &cbWrote, NULL);
                psz = (*pszNext == TEXT('\r')) ? (2+pszNext) : (*pszNext == TEXT('\n')) ? (1+pszNext) : NULL;
@@ -3744,7 +3744,7 @@ BOOL AfsClass_SetPtsProperties (LPIDENT lpiCell, LPPTSPROPERTIES pProperties, UL
 }
 
 
-LPIDENT AfsClass_CreateUser (LPIDENT lpiCell, LPTSTR pszUserName, LPTSTR pszInstance, LPTSTR pszPassword, int idUser, BOOL fCreateKAS, BOOL fCreatePTS, ULONG *pStatus)
+LPIDENT AfsClass_CreateUser (LPIDENT lpiCell, LPTSTR pszUserName, LPTSTR pszInstance, LPTSTR pszPassword, UINT_PTR idUser, BOOL fCreateKAS, BOOL fCreatePTS, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status;
@@ -3799,7 +3799,7 @@ LPIDENT AfsClass_CreateUser (LPIDENT lpiCell, LPTSTR pszUserName, LPTSTR pszInst
       WORKERPACKET wp;
       wp.wpPtsUserCreate.hCell = hCell;
       wp.wpPtsUserCreate.pszUser = szUserName;
-      wp.wpPtsUserCreate.idUser = idUser;
+      wp.wpPtsUserCreate.idUser = (int) idUser;
 
       AfsClass_Leave();
 
index 8cf44ddaf33f2ed0d8f122d61cea506f73d676de..3e8daf0b43011223befa193913e5474db387c692 100644 (file)
@@ -217,7 +217,7 @@ typedef struct
 #define MASK_USERPROP_aaGroupsOwned            0x00001000
 #define MASK_USERPROP_aaMembership             0x00002000
 
-LPIDENT AfsClass_CreateUser           (LPIDENT lpiCell, LPTSTR pszUserName, LPTSTR pszInstance, LPTSTR pszPassword, int idUser = 0, BOOL fCreateKAS = TRUE, BOOL fCreatePTS = TRUE, ULONG *pStatus = NULL);
+LPIDENT AfsClass_CreateUser           (LPIDENT lpiCell, LPTSTR pszUserName, LPTSTR pszInstance, LPTSTR pszPassword, UINT_PTR idUser = 0, BOOL fCreateKAS = TRUE, BOOL fCreatePTS = TRUE, ULONG *pStatus = NULL);
 BOOL    AfsClass_SetUserProperties    (LPIDENT lpiUser, LPUSERPROPERTIES pProperties, ULONG *pStatus = NULL);
 BOOL    AfsClass_SetUserPassword      (LPIDENT lpiUser, int keyVersion, LPTSTR pszPassword, ULONG *pStatus = NULL);
 BOOL    AfsClass_SetUserPassword      (LPIDENT lpiUser, int keyVersion, LPENCRYPTIONKEY pKey, ULONG *pStatus = NULL);
index 34b12cdc789ab26e65a8349436d0614a988d4867..cda0f0b68f28f1f9673f821c1cc35a63cd3054de 100644 (file)
@@ -291,9 +291,9 @@ BOOL AGGREGATE::RefreshStatus (BOOL fNotify, ULONG *pStatus)
 }
 
 
-ULONG AGGREGATE::CalculateAllocation (BOOL fNotify)
+size_t AGGREGATE::CalculateAllocation (BOOL fNotify)
 {
-   ULONG ckAllocated = 0;
+   size_t ckAllocated = 0;
 
    for (LPENUM pEnum = m_lFilesets->FindFirst(); pEnum; pEnum = pEnum->FindNext())
       {
index a91b61f2efa4bd2ac9221795073cfa69eeb2d264..b524065c220131a88af057a6114ec0c687137d40 100644 (file)
@@ -19,9 +19,9 @@
 typedef struct
    {
    ULONG dwID;
-   ULONG ckStorageTotal;
-   ULONG ckStorageFree;
-   ULONG ckStorageAllocated;
+   size_t ckStorageTotal;
+   size_t ckStorageFree;
+   size_t ckStorageAllocated;
    } AGGREGATESTATUS, *LPAGGREGATESTATUS;
 
 class AGGREGATE
@@ -67,7 +67,7 @@ class AGGREGATE
       ~AGGREGATE (void);
       void SendDeleteNotifications (void);
 
-      ULONG CalculateAllocation (BOOL fNotify);
+      size_t CalculateAllocation (BOOL fNotify);
 
       static BOOL CALLBACK AGGREGATE::KeyFilesetName_Compare (LPHASHLISTKEY pKey, PVOID pObject, PVOID pData);
       static HASHVALUE CALLBACK AGGREGATE::KeyFilesetName_HashObject (LPHASHLISTKEY pKey, PVOID pObject);
index feb27bf6c3e67ba8220b6c65b14574cc0c4dfa90..d49ddbd4c37b3eaa0a7a5fcabc72f99d1d17e680 100644 (file)
@@ -1459,7 +1459,7 @@ BOOL CELL::RefreshAll (ULONG *pStatus)
             }
          }
 
-      size_t nServersToRefresh = 0;
+      ULONG nServersToRefresh = 0;
 
       HENUM hEnum;
       for (LPSERVER lpServer = ServerFindFirst (&hEnum); lpServer; lpServer = ServerFindNext (&hEnum))
index d80d8c9f9cbbdae373c831cc4420b975d3da7d51..7d70c2eb571faa2d613cb2a105901f188c2d09fb 100644 (file)
@@ -121,9 +121,9 @@ Debugstr & Debugstr::operator<< (void *addr)
 {
    char  szTemp[40];
    if (HIWORD(addr) == 0x0000)
-      wsprintf (szTemp, "0x%04X", (ushort)LOWORD(addr));
+      wsprintf (szTemp, "0x%04X", (ushort)LOWORD(PtrToLong(addr)));
    else
-      wsprintf (szTemp, "0x%08lX", (LONG)addr);
+      wsprintf (szTemp, "0x%08lX", PtrToLong(addr));
    return (*this << szTemp);
 }
 
@@ -146,7 +146,7 @@ Debugstr & Debugstr::operator<< (char ch)
 Debugstr & Debugstr::operator<< (size_t l)
 {
    char  szTemp[40];
-   _ltoa (l, szTemp, 10);
+   _ltoa ((LONG)l, szTemp, 10);
    return (*this << szTemp);
 }
 
@@ -463,7 +463,7 @@ void Debugstr::OutString (char *str, BOOL fRecord)
             gy = minY;
             gcY = 0;
 
-            GetTextExtentPoint (hdc, gdata[gcY], strlen(gdata[gcY]), &siz);
+            GetTextExtentPoint (hdc, gdata[gcY], (int)strlen(gdata[gcY]), &siz);
 
             r2.top = gy;
             r2.bottom = gy + tm.tmHeight;
@@ -483,7 +483,7 @@ void Debugstr::OutString (char *str, BOOL fRecord)
 
       if (fRecord)
          {
-         GetTextExtentPoint (hdc, gdata[gcY+1], strlen(gdata[gcY+1]), &siz);
+         GetTextExtentPoint (hdc, gdata[gcY+1], (int)strlen(gdata[gcY+1]), &siz);
 
          r2.top = gy +tm.tmHeight;
          r2.bottom = gy +tm.tmHeight +tm.tmHeight;
@@ -507,15 +507,15 @@ void Debugstr::Output (HDC hdc, char *psz, BOOL fRec)
 {
    SIZE   siz;
 
-   TextOut (hdc, gx, gy, psz, strlen(psz));
+   TextOut (hdc, gx, gy, psz, (int)strlen(psz));
 
    if (fRec)
       strcat (gdata[gcY], psz);
 
-   GetTextExtentPoint (hdc, psz, strlen(psz), &siz);
+   GetTextExtentPoint (hdc, psz, (int)strlen(psz), &siz);
 
    gx += (ushort)siz.cx;
-   gcX += strlen(psz);
+   gcX += (int)strlen(psz);
 }
 
 
@@ -530,7 +530,7 @@ void Debugstr::Output (HDC hdc, char *psz, BOOL fRec)
  *
  */
 
-LONG APIENTRY Debugstr::DebugWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+LRESULT APIENTRY Debugstr::DebugWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
    ushort   x, y, cX, cY;
 
index ef1ee9b46c692be9671f3c2803c2dc0b2bc3538b..a9162a2c8f46d2b3857394f83eb4d8251427976a 100644 (file)
@@ -72,7 +72,7 @@
                Debugstr  (void);
                ~Debugstr (void);
 
-               static long APIENTRY DebugWndProc (HWND, UINT, WPARAM, LPARAM);
+               static LRESULT APIENTRY DebugWndProc (HWND, UINT, WPARAM, LPARAM);
 
                void          OutString   (char *str, BOOL fRecord);
 
index 9fd8eabe6a3eba4edfd4249acce40157a4cbf5f3..f260c8f6a6bbc96f7795f5b72de8893bd3f8abe5 100644 (file)
@@ -760,7 +760,7 @@ void AfsClass_SkipRefresh (int idSection)
 
 DWORD WINAPI SERVER::CanTalkToServer_ThreadProc (PVOID lp)
 {
-   int idSection = (int)lp;
+   int idSection = PtrToInt(lp);
 
    // Until we post a notification saying that we've entered
    // a section, we don't need to worry about the aRefSec[] entry
@@ -984,7 +984,7 @@ BOOL SERVER::CanTalkToServer (ULONG *pStatus)
    //
    DWORD dwThreadID;
    HANDLE hThread;
-   if ((hThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)CanTalkToServer_ThreadProc, (PVOID)idSection, 0, &dwThreadID)) == NULL)
+   if ((hThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)CanTalkToServer_ThreadProc, IntToPtr(idSection), 0, &dwThreadID)) == NULL)
       {
       EnterCriticalSection (pcsRefSec);
       aRefSec[ idSection ].fInUse = FALSE;
index 6232da3a89269ac48bb5158b49e3b2ee180d9da2..b81317d8d8f79353316f22cd8d51b1dbd50a1534 100644 (file)
@@ -222,7 +222,7 @@ void AfsClass_ParseRecurringTime (BOOL *pfEver, LPSYSTEMTIME pst, LPTSTR pszTime
       //
       pst->wDayOfWeek = (WORD)(-1); // daily until proven otherwise
 
-      for (size_t ii = 0; ii < 7; ++ii)
+      for (WORD ii = 0; ii < 7; ++ii)
          {
          if (!lstrncmpi (apszDays[ii], pszTime, 3))
             {
index 8ba157e2311108a0b60e92918af075bf74ed1a3a..9a4bcc69217502e1c07e3bc7b8301002dbeefe06 100644 (file)
@@ -670,7 +670,7 @@ DWORD Worker_PerformTask (WORKERTASK wtask, LPWORKERPACKET lpwp)
          {
          LPSTR pszVolumeA = StringToAnsi (lpwp->wpVosVolumeCreate.pszVolume);
 
-         if ((*lpVosVolumeCreate)(lpwp->wpVosVolumeCreate.hCell, lpwp->wpVosVolumeCreate.hServer, NULL, lpwp->wpVosVolumeCreate.idPartition, pszVolumeA, lpwp->wpVosVolumeCreate.ckQuota, (unsigned int *)&lpwp->wpVosVolumeCreate.idVolume, &status))
+         if ((*lpVosVolumeCreate)(lpwp->wpVosVolumeCreate.hCell, lpwp->wpVosVolumeCreate.hServer, NULL, lpwp->wpVosVolumeCreate.idPartition, pszVolumeA, (unsigned int)lpwp->wpVosVolumeCreate.ckQuota, (unsigned int *)&lpwp->wpVosVolumeCreate.idVolume, &status))
             status = 0;
 
          FreeString (pszVolumeA, lpwp->wpVosVolumeCreate.pszVolume);
@@ -812,7 +812,7 @@ DWORD Worker_PerformTask (WORKERTASK wtask, LPWORKERPACKET lpwp)
 
       case wtaskVosVolumeQuotaChange:
          {
-         if ((*lpVosVolumeQuotaChange)(lpwp->wpVosVolumeQuotaChange.hCell, lpwp->wpVosVolumeQuotaChange.hServer, NULL, lpwp->wpVosVolumeQuotaChange.idPartition, lpwp->wpVosVolumeQuotaChange.idVolume, lpwp->wpVosVolumeQuotaChange.ckQuota, &status))
+         if ((*lpVosVolumeQuotaChange)(lpwp->wpVosVolumeQuotaChange.hCell, lpwp->wpVosVolumeQuotaChange.hServer, NULL, lpwp->wpVosVolumeQuotaChange.idPartition, lpwp->wpVosVolumeQuotaChange.idVolume, (unsigned int)lpwp->wpVosVolumeQuotaChange.ckQuota, &status))
             status = 0;
          break;
          }
index ac61cc582d69466444aa37caae7abeb34fd1d264..f1e033d17eeead709e485d26f5bab1f50d2db11f 100644 (file)
@@ -342,7 +342,7 @@ typedef union // WORKERPACKET
          PVOID hServer;        // [in] token from VosServerOpen()
          int idPartition;      // [in] partition ID
          LPTSTR pszVolume;     // [in] volume name
-         ULONG ckQuota;        // [in] initial quota
+         size_t ckQuota;       // [in] initial quota
          VOLUMEID idVolume;    // [out] volume ID
       } wpVosVolumeCreate;
 
@@ -454,7 +454,7 @@ typedef union // WORKERPACKET
          PVOID hServer;        // [in] token from VosServerOpen()
          int idPartition;      // [in] partition ID
          VOLUMEID idVolume;    // [in] id of read/write volume
-         ULONG ckQuota;        // [in] new quota
+         size_t ckQuota;       // [in] new quota
       } wpVosVolumeQuotaChange;
 
       struct {
index 2e1fe6ee5a16f1116c662cd8486899b1a290d89f..7f66f374d4f3519b43bff9fb8d61dfd36b74b43b 100644 (file)
@@ -86,7 +86,7 @@ $(RXOBJS): $(RX)\$$(@B).c
        $(C2OBJ) -I$(RX) $**
 
 $(IDLFILES):afsrpc.idl
-       midl $(MIDL_FLAGS) /no_robust $(AFSDEV_AUXMIDLFLAGS) /app_config $?
+       midl $(MIDL_FLAGS) $(AFSDEV_AUXMIDLFLAGS) /app_config $?
 
 RPCOBJS = $(OUT)\ifs_rpc.obj
 
@@ -169,7 +169,6 @@ MIDL_FLAGS=/app_config \
           /Zp4 \
           /cpp_cmd $(cc) \
           /cpp_opt "-E" \
-          /no_robust \
            /nologo
 
 .SUFFIXES: .h .idl
@@ -188,6 +187,7 @@ CONF_DLLLIBS = \
 
 $(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS)
        $(DLLGUILINK) -def:libafsconf.def dnsapi.lib mpr.lib
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
@@ -251,6 +251,7 @@ LOGON_DLLSDKLIBS =\
 
 $(LOGON_DLLFILE): $(LOGON_DLLOBJS) $(LOGON_DLLLIBS)
        $(DLLGUILINK) $(LOGONLINKFLAGS) -def:afslogon.def $(LOGON_DLLSDKLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(DESTDIR)\lib
        $(DEL) $*.lib $*.exp
@@ -354,21 +355,25 @@ EXELIBS2 = \
 # klog.exe
 $(EXEDIR)\klog.exe: $(OUT)\cklog.obj $(OUT)\klog.res $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # tokens.exe
 $(EXEDIR)\tokens.exe: $(OUT)\ctokens.obj $(OUT)\tokens.res $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # unlog.exe
 $(EXEDIR)\unlog.exe: $(OUT)\cunlog.obj $(OUT)\unlog.res $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # afscpcc.exe
 $(EXEDIR)\afscpcc.exe: $(OUT)\afscpcc.obj $(OUT)\afscpcc.res $(LOGON_DLLLIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
@@ -401,36 +406,43 @@ AFSD_EXELIBS =\
 
 $(AFSD_EXEFILE): $(OUT)\afsd.obj $(AFSDOBJS) $(OUT)\afsd.res  $(RXOBJS) $(AFSD_EXELIBS)
        $(EXEGUILINK) $(AFSD_SDKLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # afsd_service.exe
 $(EXEDIR)\afsd_service.exe: $(OUT)\afsd_service.obj $(AFSDOBJS) $(OUT)\afsd_service.res  $(RXOBJS) $(AFSD_EXELIBS)
        $(EXECONLINK) $(AFSD_SDKLIBS) /MAP /LARGEADDRESSAWARE
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # fs.exe
 $(EXEDIR)\fs.exe: $(FSOBJS) $(OUT)\fs.res $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # cmdebug.exe
 $(EXEDIR)\cmdebug.exe: $(CMDBGOBJS) $(OUT)\cmdebug.res $(EXELIBS2)
        $(EXECONLINK) $(EXELIBS2) dnsapi.lib mpr.lib iphlpapi.lib rpcrt4.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # symlink.exe
 $(EXEDIR)\symlink.exe: $(SLOBJS) $(OUT)\symlink.res  $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # afsshare.exe
 $(EXEDIR)\afsshare.exe: $(OUT)\afsshare.obj $(OUT)\afsshare.res
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # afsdacl.exe
 $(EXEDIR)\afsdacl.exe: $(OUT)\afsdacl.obj $(OUT)\afsdacl.res
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 # kpasswd.exe - built in kauth, but rebuild here to make pthread-based,
@@ -471,6 +483,7 @@ $(OUT)\kpasswd.res: $(KAUTH)\kpasswd.rc
 $(DESTDIR)\bin\kpasswd.exe: $(KPASSWD_OBJS) $(KPASSWD_LIBS)
        $(DEL) $(DESTDIR)\bin\kpasswd.exe
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
index afc97d95ff02b77cd7ae6f1ece8d44a1a508d3ec..b30e88542fd8d5d759334115e9e28b5696d2abb3 100644 (file)
@@ -76,6 +76,8 @@ BOOL APIENTRY About(HWND, unsigned int, unsigned int, long);
 
 void afs_exit();
 
+extern void afsi_log(char *pattern, ...);
+
 /* globals from the base afsd */
 
 extern int cm_logChunkSize;
index a9f60f16e919a27954daafdfb7e4343a4dbbd5b5..f7f932ffcd638d65c1eafa96aa784dc3ae4fa407 100644 (file)
@@ -100,7 +100,7 @@ AddEventSource()
                                        0,                      // must be zero 
                                        REG_EXPAND_SZ,          // value type 
                                        (LPBYTE) szBuf,         // pointer to value data 
-                                       strlen(szBuf) + 1))     // length of value data
+                                       (DWORD)strlen(szBuf) + 1))      // length of value data
                        {
                                bRet = FALSE;
                                break;
index 5d90c7fbace7f0ac3c2ad6e748c25d2052165086..02300c007fea5982d964c8abbd7fb47835b1833b 100644 (file)
@@ -92,7 +92,7 @@ afsd_ServicePerformFlushVolumes()
         return FALSE;
     }
     pc = strrchr(pszShareName, SLASH);
-    if ((pc == NULL) || ((dwServerSize = pc - pszShareName) < 3))
+    if ((pc == NULL) || ((dwServerSize = (DWORD)(pc - pszShareName)) < 3))
     {
         LogEvent(EVENTLOG_ERROR_TYPE, MSG_FLUSH_BAD_SHARE_NAME,
                   pszShareName, NULL);
index 5f3c85625b6f7b9a62fcd31c5e1146e6473f1f56..56523dde407012b2b7d6ccbee8b9aa85b924cf6c 100644 (file)
@@ -116,13 +116,13 @@ afsi_log(char *pattern, ...)
         GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, d, sizeof(d));
         StringCbPrintfA(u, sizeof(u), "%s %s: %s\n", d, t, s);
         if (afsi_file != INVALID_HANDLE_VALUE)
-            WriteFile(afsi_file, u, strlen(u), &zilch, NULL);
+            WriteFile(afsi_file, u, (DWORD)strlen(u), &zilch, NULL);
 #ifdef NOTSERVICE
         printf("%s", u);
 #endif 
     } else {
         if (afsi_file != INVALID_HANDLE_VALUE)
-            WriteFile(afsi_file, s, strlen(s), &zilch, NULL);
+            WriteFile(afsi_file, s, (DWORD)strlen(s), &zilch, NULL);
     }
 }
 
@@ -179,15 +179,15 @@ afsi_start()
     GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, u, sizeof(u));
     StringCbCatA(t, sizeof(t), ": Create log file\n");
     StringCbCatA(u, sizeof(u), ": Created log file\n");
-    WriteFile(afsi_file, t, strlen(t), &zilch, NULL);
-    WriteFile(afsi_file, u, strlen(u), &zilch, NULL);
+    WriteFile(afsi_file, t, (DWORD)strlen(t), &zilch, NULL);
+    WriteFile(afsi_file, u, (DWORD)strlen(u), &zilch, NULL);
     p = "PATH=";
     code = GetEnvironmentVariable("PATH", NULL, 0);
     path = malloc(code);
     code = GetEnvironmentVariable("PATH", path, code);
-    WriteFile(afsi_file, p, strlen(p), &zilch, NULL);
-    WriteFile(afsi_file, path, strlen(path), &zilch, NULL);
-    WriteFile(afsi_file, "\n", 1, &zilch, NULL);
+    WriteFile(afsi_file, p, (DWORD)strlen(p), &zilch, NULL);
+    WriteFile(afsi_file, path, (DWORD)strlen(path), &zilch, NULL);
+    WriteFile(afsi_file, "\n", (DWORD)1, &zilch, NULL);
     free(path);
 
     /* Initialize C RTL Code Page conversion functions */
@@ -293,7 +293,7 @@ configureBackConnectionHostNames(void)
         }
              
         if ( !bNameFound ) {
-            int size = strlen(cm_NetbiosName) + 2;
+            size_t size = strlen(cm_NetbiosName) + 2;
             if ( !pHostNames ) {
                 pHostNames = malloc(size);
                 dwSize = 1;
@@ -304,7 +304,7 @@ configureBackConnectionHostNames(void)
             *pName = '\0';  /* add a second nul terminator */
 
             dwType = REG_MULTI_SZ;
-            dwSize += strlen(cm_NetbiosName) + 1;
+            dwSize += (DWORD)strlen(cm_NetbiosName) + 1;
             RegSetValueEx( hkMSV10, "BackConnectionHostNames", 0, dwType, pHostNames, dwSize);
 
             if ( RegOpenKeyEx( HKEY_LOCAL_MACHINE, 
@@ -531,7 +531,7 @@ static void afsd_InitServerPreferences(void)
 int afsd_InitCM(char **reasonP)
 {
     osi_uid_t debugID;
-    DWORD cacheBlocks;
+    afs_uint64 cacheBlocks;
     DWORD cacheSize;
     long logChunkSize;
     DWORD stats;
@@ -654,7 +654,7 @@ int afsd_InitCM(char **reasonP)
 
     /* setup and enable debug log */
     afsd_logp = osi_LogCreate("afsd", traceBufSize);
-    afsi_log("osi_LogCreate log addr %x", (int)afsd_logp);
+    afsi_log("osi_LogCreate log addr %x", PtrToUlong(afsd_logp));
     if ((TraceOption & 0x8)
 #ifdef DEBUG
         || 1
@@ -766,7 +766,7 @@ int afsd_InitCM(char **reasonP)
                             cm_mountRoot, &cm_mountRootLen);
     if (code == ERROR_SUCCESS) {
         afsi_log("Mount root %s", cm_mountRoot);
-        cm_mountRootLen = strlen(cm_mountRoot);
+        cm_mountRootLen = (DWORD)strlen(cm_mountRoot);
     } else {
         StringCbCopyA(cm_mountRoot, sizeof(cm_mountRoot), "/afs");
         cm_mountRootLen = 4;
@@ -1038,7 +1038,7 @@ int afsd_InitCM(char **reasonP)
         osi_panic(buf, __FILE__, __LINE__);
     }
 
-    cacheBlocks = (cacheSize * 1024) / CM_CONFIGDEFAULT_BLOCKSIZE;
+    cacheBlocks = ((afs_uint64)cacheSize * 1024) / CM_CONFIGDEFAULT_BLOCKSIZE;
         
     /* get network related info */
     cm_noIPAddr = CM_MAXINTERFACE_ADDR;
@@ -1057,7 +1057,7 @@ int afsd_InitCM(char **reasonP)
      */
     cm_initParams.nChunkFiles = 0;
     cm_initParams.nStatCaches = stats;
-    cm_initParams.nDataCaches = cacheBlocks;
+    cm_initParams.nDataCaches = (afs_uint32)(cacheBlocks > 0xFFFFFFFF ? 0xFFFFFFFF : cacheBlocks);
     cm_initParams.nVolumeCaches = stats/2;
     cm_initParams.firstChunkSize = cm_chunkSize;
     cm_initParams.otherChunkSize = cm_chunkSize;
@@ -1121,7 +1121,7 @@ int afsd_InitCM(char **reasonP)
     nullServerSecurityClassp = rxnull_NewServerSecurityObject();
     serverp = rx_NewService(0, 1, "AFS", &nullServerSecurityClassp, 1,
                              RXAFSCB_ExecuteRequest);
-    afsi_log("rx_NewService addr %x", (int)serverp);
+    afsi_log("rx_NewService addr %x", PtrToUlong(serverp));
     if (serverp == NULL) {
         *reasonP = "unknown error";
         return -1;
@@ -1130,7 +1130,7 @@ int afsd_InitCM(char **reasonP)
     nullServerSecurityClassp = rxnull_NewServerSecurityObject();
     serverp = rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats",
                              &nullServerSecurityClassp, 1, RXSTATS_ExecuteRequest);
-    afsi_log("rx_NewService addr %x", (int)serverp);
+    afsi_log("rx_NewService addr %x", PtrToUlong(serverp));
     if (serverp == NULL) {
         *reasonP = "unknown error";
         return -1;
@@ -1160,7 +1160,7 @@ int afsd_InitCM(char **reasonP)
     if (code == 0 && !cm_freelanceEnabled) 
     {
         cm_data.rootCellp = cm_GetCell(rootCellName, CM_FLAG_CREATE);
-        afsi_log("cm_GetCell addr %x", (int)cm_data.rootCellp);
+        afsi_log("cm_GetCell addr %x", PtrToUlong(cm_data.rootCellp));
         if (cm_data.rootCellp == NULL) 
         {
             *reasonP = "can't find root cell in afsdcell.ini";
@@ -1270,9 +1270,14 @@ int afsd_InitSMB(char **reasonP, void *aMBfunc)
 
 void afsd_printStack(HANDLE hThread, CONTEXT *c)
 {
+#if defined(_X86_)
     HANDLE hProcess = GetCurrentProcess();
     int frameNum;
+#if defined(_AMD64_)
+    DWORD64 offset;
+#elif defined(_X86_)
     DWORD offset;
+#endif
     DWORD symOptions;
     char functionName[MAXNAMELEN];
   
@@ -1311,6 +1316,11 @@ void afsd_printStack(HANDLE hThread, CONTEXT *c)
 #if defined (_ALPHA_) || defined (_MIPS_) || defined (_PPC_)
 #error The STACKFRAME initialization in afsd_printStack() for this platform
 #error must be properly configured
+#elif defined(_AMD64_)
+    s.AddrPC.Offset = 0;
+    s.AddrPC.Mode = AddrModeFlat;
+    s.AddrFrame.Offset = 0;
+    s.AddrFrame.Mode = AddrModeFlat;
 #else
     s.AddrPC.Offset = c->Eip;
     s.AddrPC.Mode = AddrModeFlat;
@@ -1409,6 +1419,7 @@ void afsd_printStack(HANDLE hThread, CONTEXT *c)
   
     SymCleanup(hProcess);
     GlobalFree(pSym);
+#endif /* _X86_ */
 }
 
 #ifdef _DEBUG
@@ -1552,8 +1563,9 @@ LONG __stdcall afsd_ExceptionFilter(EXCEPTION_POINTERS *ep)
             _CrtSetBreakAlloc(*afsd_crtDbgBreakCurrent);
         }
 #endif         
-    
+#if defined(_X86)    
         ep->ContextRecord->Eip++;
+#endif
         return EXCEPTION_CONTINUE_EXECUTION;
     }
     else
index 51e92ae7c267e746e4e444efd9bd933d49b3f94b..32c675294af2bdd2d34136b00e0f3aeb6c16aa1c 100644 (file)
@@ -95,7 +95,6 @@ static void afsd_notifier(char *msgp, char *filep, long line)
     char tbuffer[512];
     char *ptbuf[1];
     HANDLE h;
-       int i;
 
     if (filep)
         sprintf(tbuffer, "Error at file %s, line %d: %s",
@@ -1070,7 +1069,6 @@ afsd_Main(DWORD argc, LPTSTR *argv)
 #endif /* JUMP */
     HMODULE hHookDll;
     HMODULE hAdvApi32;
-       int cnt;
 
 #ifdef _DEBUG
     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_ALWAYS_DF*/ | 
index 4875ad566137166dca10fcbf9f12c172cca188f8..821ab45f6ef652e564e5a8c04f742b5a165fc443 100644 (file)
@@ -64,7 +64,7 @@ struct readdir_context                        /* temporary struct, allocated as necessary, for cm_App
 {
     char *matchString;                 /* for matching against */
     char *buf, *buf_pos;               /* filling buffer to length, currently at buf_pos */
-    ULONG length;
+    ULONG_PTR length;
     ULONG count;                       /* number of entries packed so far */
 };
 typedef struct readdir_context readdir_context_t;
@@ -243,7 +243,7 @@ cm_scache_t *ifs_FindScp(ULONG fid)         /* walk list to find scp<->fid mapping */
    unless network fails (it loops properly). */
 ifs_CheckAcl(cm_scache_t *scp, ULONG access, ULONG *granted)
 {
-    long outRights, code;
+    long code;
     cm_req_t req;
 
     cm_InitReq(&req);
@@ -416,7 +416,7 @@ uc_namei(WCHAR *name, ULONG *fid)   /* performs name<->fid mapping, and enters it
 
     cm_InitReq(&req);
 
-    len = wcslen(name)+20;                     /* characters *should* map 1<->1, but in case */
+    len = (short)wcslen(name)+20;                      /* characters *should* map 1<->1, but in case */
     buffer = malloc(len);
     code = ifs_ConvertFileName(name, -1, buffer, len);
     if (code)
@@ -551,7 +551,7 @@ uc_create(WCHAR *name, ULONG attribs, LARGE_INTEGER alloc, ULONG access, ULONG *
 
     cm_InitReq(&req);
 
-    len = wcslen(name)+20;                     /* characters *should* map 1<->1, but in case */
+    len = (short)wcslen(name)+20;                      /* characters *should* map 1<->1, but in case */
     buffer = malloc(len);
     code = ifs_ConvertFileName(name, -1, buffer, len);
     if (code)
@@ -649,21 +649,20 @@ uc_setinfo(ULONG fid, ULONG attribs, LARGE_INTEGER creation, LARGE_INTEGER acces
 /* FIXFIX: this code may not catch over-quota errors, because the end
  * of the file is not written to the server by the time this returns. */
 /* truncate or extend file, in cache and on server */
-uc_trunc(ULONG fid, LARGE_INTEGER size)
+long uc_trunc(ULONG fid, LARGE_INTEGER size)
 {
-    ULONG code, gr;
+    ULONG code;
     cm_scache_t *scp;
     cm_req_t req;
-    osi_hyper_t oldLen, writePos;
-    long written;
+    osi_hyper_t oldLen;
 
     scp = ifs_FindScp(fid);
     if (!scp)
        return IFSL_BAD_INPUT;
 
     /* we have already checked permissions in the kernel; but, if we do not
-        * have access as this userp, code will fail in rpc layer.
-        */
+     * have access as this userp, code will fail in rpc layer.
+     */
 
     cm_InitReq(&req);
     lock_ObtainMutex(&(scp->mx));
@@ -700,11 +699,10 @@ uc_trunc(ULONG fid, LARGE_INTEGER size)
 }
 
 /* read data from a file */
-uc_read(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *read, char *data)
+long uc_read(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *read, char *data)
 {
     ULONG code;
     cm_scache_t *scp;
-    cm_req_t req;
 
     *read = 0;
  
@@ -726,7 +724,7 @@ uc_read(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *read, char *data)
 /* write data to a file */
 uc_write(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *written, char *data)
 {
-    ULONG code, gr;
+    ULONG code;
     cm_scache_t *scp;
 
     scp = ifs_FindScp(fid);
@@ -745,13 +743,9 @@ uc_rename(ULONG fid, WCHAR *curr, WCHAR *new_dir, WCHAR *new_name, ULONG *new_fi
 {
     int code;
     cm_req_t req;
-    cm_attr_t attr;
-    wchar_t *buf;
     char *curdir, *curfile, *newdir, *newfile;
     cm_scache_t *dscp1, *dscp2, *scp;
     char b1[MAX_PATH], b2[MAX_PATH], b3[MAX_PATH];
-    ULONG fid2;
-
 
     code = !(scp = ifs_FindScp(fid));
     if (!code)
@@ -784,19 +778,18 @@ uc_rename(ULONG fid, WCHAR *curr, WCHAR *new_dir, WCHAR *new_name, ULONG *new_fi
             {
                 strcat(b3, "\\");
                 strcat(b3, b2);
+               // TODO: Must convert b3 to type WCHAR*
                 uc_namei(b3, new_fid);
             }
             else
             {
-                code = ifs_ConvertFileName(curr, -1, b1, MAX_PATH);
-                code = uc_namei(b1, new_fid);
+                code = uc_namei(curr, new_fid);
             }
             ifs_InternalClose(&dscp2);
         }
        else
         {
-            code = ifs_ConvertFileName(curr, -1, b1, MAX_PATH);
-            code = uc_namei(b1, new_fid);
+            code = uc_namei(curr, new_fid);
         }
        ifs_InternalClose(&dscp1);
     }
@@ -825,7 +818,7 @@ uc_flush(ULONG fid)
 ifs_ReaddirCallback(cm_scache_t *scp, cm_dirEntry_t *entry, void *param, osi_hyper_t *offset)
 {
     readdir_context_t *context;
-    ULONG name_len, gr;
+    ULONG name_len;
     readdir_data_t *info;
     char short_name[14], *endp;
     ULONG code;
@@ -836,7 +829,7 @@ ifs_ReaddirCallback(cm_scache_t *scp, cm_dirEntry_t *entry, void *param, osi_hyp
 
     context = param;
 
-    name_len = strlen(entry->name);
+    name_len = (ULONG) strlen(entry->name);
 
     info = (readdir_data_t *)context->buf_pos;
     if (context->length - (context->buf_pos - context->buf) < sizeof(readdir_data_t) + name_len * sizeof(WCHAR) + sizeof(LARGE_INTEGER))
@@ -894,7 +887,7 @@ ifs_ReaddirCallback(cm_scache_t *scp, cm_dirEntry_t *entry, void *param, osi_hyp
 
     cm_Gen8Dot3Name(entry, short_name, &endp);
     *endp = '\0';
-    info->short_name_length = sizeof(WCHAR)*((t=MultiByteToWideChar(CP_UTF8, 0, short_name, -1, info->short_name, 14))?t-1:0);
+    info->short_name_length = (CCHAR)sizeof(WCHAR)*((t=MultiByteToWideChar(CP_UTF8, 0, short_name, -1, info->short_name, 14))?t-1:0);
     info->name_length = sizeof(WCHAR)*((t=MultiByteToWideChar(CP_UTF8, 0, entry->name, -1, info->name, 600))?t-1:0);
 
     context->buf_pos = ((char*)info) + sizeof(readdir_data_t) + info->name_length;
@@ -906,7 +899,7 @@ ifs_ReaddirCallback(cm_scache_t *scp, cm_dirEntry_t *entry, void *param, osi_hyp
     return 0;
 }
 
-uc_readdir(ULONG fid, LARGE_INTEGER cookie_in, WCHAR *filter, ULONG *count, char *data, ULONG *len)
+long uc_readdir(ULONG fid, LARGE_INTEGER cookie_in, WCHAR *filter, ULONG *count, char *data, ULONG_PTR *len)
 {
     ULONG code;
     char buffer[2048];
@@ -956,7 +949,6 @@ uc_readdir(ULONG fid, LARGE_INTEGER cookie_in, WCHAR *filter, ULONG *count, char
 
 uc_close(ULONG fid)
 {
-    ULONG code;
     cm_scache_t *scp;
     cm_req_t req;
     scp_status_t *prev, *curr;
@@ -1000,11 +992,10 @@ uc_unlink(WCHAR *name)
 {
     char buffer[2048];
     long code;
-    cm_scache_t *scp, *dscp;
+    cm_scache_t *dscp;
     char *dirp, *filep;
     unsigned char removed;
     cm_req_t req;
-    scp_status_t *st;
 
     cm_InitReq(&req);
 
@@ -1029,10 +1020,8 @@ uc_unlink(WCHAR *name)
 }
 
 
-int uc_ioctl_write(ULONG length, char *data, ULONG *key)
+int uc_ioctl_write(ULONG length, char *data, ULONG_PTR *key)
 {
-    int code;
-    cm_req_t req;
     smb_ioctl_t *iop;
 
     iop = malloc(sizeof(smb_ioctl_t));
@@ -1041,15 +1030,13 @@ int uc_ioctl_write(ULONG length, char *data, ULONG *key)
 
     memcpy(iop->inDatap + iop->inCopied, data, length);
     iop->inCopied += length;
-    *key = (ULONG)iop;
+    *key = (ULONG_PTR)iop;
 
     return 0;
 }
 
-int uc_ioctl_read(ULONG key, ULONG *length, char *data)
+int uc_ioctl_read(ULONG_PTR key, ULONG *length, char *data)
 {
-    int code;
-    cm_req_t req;
     smb_ioctl_t *iop;
 
     iop = key;
@@ -1090,8 +1077,7 @@ int ifs_Init(char **reason)
 ifs_TransactRpc(char *outbuf, int outlen, char *inbuf, int *inlen)
 {
     HANDLE hf;
-    int ret;
-    DWORD err, read = 0;
+    DWORD read = 0;
     DWORD inmax;
 
     if (!outbuf || !inbuf)
@@ -1118,8 +1104,7 @@ DWORD WINAPI ifs_MainLoop(LPVOID param)
     HANDLE pipe;
     DWORD written;
     unsigned char *bufIn, *bufOut;
-    DWORD lenIn, lenOut, status;
-    DWORD err;
+    DWORD lenIn;
     rpc_t rpc;
     BOOL st;
 
@@ -1166,11 +1151,11 @@ DWORD WINAPI ifs_MainLoop(LPVOID param)
        /* ...and write it back */
        st = WriteFile(pipe, rpc.out_buf, rpc.out_pos - rpc.out_buf, &written, NULL);
        if (!st)
-                       if (GetLastError() == ERROR_INVALID_HANDLE)
-                               break;
-                       else
-                               continue;
-       }
+           if (GetLastError() == ERROR_INVALID_HANDLE)
+               break;
+           else
+               continue;
+    }
 
-       return 1;
+    return (DWORD)1;
 }
index 3a59dfe558aa70d7cdea7b1eaf696e579030c41e..99324f3b3cd1ef134d692f3614f61d1b5891076b 100644 (file)
@@ -2149,9 +2149,9 @@ MultiInputDialogProc( HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam)
 static LPWORD 
 lpwAlign( LPWORD lpIn )
 {
-    ULONG ul;
+    ULONG_PTR ul;
 
-    ul = (ULONG) lpIn;
+    ul = (ULONG_PTR) lpIn;
     ul += 3;
     ul >>=2;
     ul <<=2;
@@ -2265,7 +2265,7 @@ MultiInputDialog( HINSTANCE hinst, HWND hwndOwner,
         lpdit->dwExtendedStyle = 0;
         lpdit->x  = 10; 
         lpdit->y  = 10 + i * 14;
-        lpdit->cx = strlen(ptext[i]) * 4 + 10; 
+        lpdit->cx = (short)strlen(ptext[i]) * 4 + 10; 
         lpdit->cy = 14;
         lpdit->id = ID_TEXT + i;  // text identifier
 
@@ -2281,8 +2281,9 @@ MultiInputDialog( HINSTANCE hinst, HWND hwndOwner,
     }
     
     for ( i=0, pwid = 0; i<tb_cnt; i++) {
-        if ( pwid < strlen(tb[i].label) )
-            pwid = strlen(tb[i].label);
+       int len = (int)strlen(tb[i].label);
+        if ( pwid < len )
+            pwid = len;
     }
 
     for ( i=0; i<tb_cnt; i++) {
@@ -2361,7 +2362,7 @@ MultiInputDialog( HINSTANCE hinst, HWND hwndOwner,
 static int
 multi_field_dialog(HWND hParent, char * preface, int n, struct textField tb[])
 {
-       HINSTANCE hInst = 0;
+    HINSTANCE hInst = 0;
     int maxwidth = 0;
     int numlines = 0;
     int len;
@@ -2381,16 +2382,16 @@ multi_field_dialog(HWND hParent, char * preface, int n, struct textField tb[])
             *p++ = '\0';
         } 
         if ( strlen(plines[numlines-1]) > maxwidth )
-            maxwidth = strlen(plines[numlines-1]);
+            maxwidth = (int)strlen(plines[numlines-1]);
     }
 
     for ( i=0;i<n;i++ ) {
-        len = strlen(tb[i].label) + 1 + (tb[i].len > 40 ? 40 : tb[i].len);
+        len = (int)strlen(tb[i].label) + 1 + (tb[i].len > 40 ? 40 : tb[i].len);
         if ( maxwidth < len )
             maxwidth = len;
     }
 
-    return(MultiInputDialog(hInst, hParent, plines, numlines, maxwidth, n, tb));
+    return(MultiInputDialog(hInst, hParent, plines, numlines, maxwidth, n, tb)?1:0);
 }
 
 static krb5_error_code KRB5_CALLCONV
@@ -2408,10 +2409,10 @@ KRB5_prompter( krb5_context context,
        HWND hParent = (HWND)data;
 
     if (name)
-        nlen = strlen(name)+2;
+        nlen = (int)strlen(name)+2;
 
     if (banner)
-        blen = strlen(banner)+2;
+        blen = (int)strlen(banner)+2;
 
     tb = (struct textField *) malloc(sizeof(struct textField) * num_prompts);
     if ( tb != NULL ) {
@@ -2428,7 +2429,7 @@ KRB5_prompter( krb5_context context,
         ok = multi_field_dialog(hParent,(char *)banner,num_prompts,tb);
         if ( ok ) {
             for ( i=0; i < num_prompts; i++ )
-                prompts[i].reply->length = strlen(prompts[i].reply->data);
+                prompts[i].reply->length = (unsigned int)strlen(prompts[i].reply->data);
         } else
             errcode = -2;
     }
@@ -2757,7 +2758,7 @@ KFW_AFS_klog(
 
         /* First try service/cell@REALM */
         if (code = pkrb5_build_principal(ctx, &increds.server,
-                                          strlen(RealmName),
+                                          (int)strlen(RealmName),
                                           RealmName,
                                           ServiceName,
                                           CellName,
@@ -2793,7 +2794,7 @@ KFW_AFS_klog(
             pkrb5_free_principal(ctx,increds.server);
             increds.server = 0;
             code = pkrb5_build_principal(ctx, &increds.server,
-                                          strlen(RealmName),
+                                          (int)strlen(RealmName),
                                           RealmName,
                                           ServiceName,
                                           0);
@@ -2825,7 +2826,7 @@ KFW_AFS_klog(
             pkrb5_free_principal(ctx,increds.server);
             increds.server = 0;
             code = pkrb5_build_principal(ctx, &increds.server,
-                                         strlen(RealmName),
+                                         (int)strlen(RealmName),
                                          RealmName,
                                          ServiceName,
                                          CellName,
@@ -2856,7 +2857,7 @@ KFW_AFS_klog(
                 pkrb5_free_principal(ctx,increds.server);
                 increds.server = 0;
                 code = pkrb5_build_principal(ctx, &increds.server,
-                                              strlen(RealmName),
+                                              (int)strlen(RealmName),
                                               RealmName,
                                               ServiceName,
                                               0);
@@ -2942,7 +2943,7 @@ KFW_AFS_klog(
             char * p;
             strcat(aclient.name, ".");
             p = aclient.name + strlen(aclient.name);
-            len = min(k5creds->client->data[1].length,MAXKTCNAMELEN - strlen(aclient.name) - 1);
+            len = min(k5creds->client->data[1].length,MAXKTCNAMELEN - (int)strlen(aclient.name) - 1);
             strncpy(p, k5creds->client->data[1].data, len);
             p[len] = '\0';
         }
@@ -2950,13 +2951,13 @@ KFW_AFS_klog(
 
         strcpy(aclient.cell, realm_of_cell);
 
-        len = min(k5creds->client->realm.length,strlen(realm_of_cell));
+        len = min(k5creds->client->realm.length,(int)strlen(realm_of_cell));
         /* For Khimaira, always append the realm name */
         if ( 1 /* strncmp(realm_of_cell, k5creds->client->realm.data, len) */ ) {
             char * p;
             strcat(aclient.name, "@");
             p = aclient.name + strlen(aclient.name);
-            len = min(k5creds->client->realm.length,MAXKTCNAMELEN - strlen(aclient.name) - 1);
+            len = min(k5creds->client->realm.length,MAXKTCNAMELEN - (int)strlen(aclient.name) - 1);
             strncpy(p, k5creds->client->realm.data, len);
             p[len] = '\0';
         }
@@ -3384,7 +3385,7 @@ BOOL KFW_probe_kdc(struct afsconf_cell * cellconfig)
 
     realm = afs_realm_of_cell(ctx, cellconfig);  // do not free
 
-    code = pkrb5_build_principal(ctx, &principal, strlen(realm),
+    code = pkrb5_build_principal(ctx, &principal, (int)strlen(realm),
                                   realm, PROBE_USERNAME, NULL, NULL);
     if ( code ) goto cleanup;
 
@@ -3469,7 +3470,7 @@ KFW_AFS_get_lsa_principal(char * szUser, DWORD *dwSize)
         szUser[*dwSize-1] = '\0';
         success = 1;
     }
-    *dwSize = strlen(pname);
+    *dwSize = (DWORD)strlen(pname);
 
   cleanup:
     if (pname)
@@ -3554,9 +3555,7 @@ KFW_AFS_copy_cache_to_system_file(char * user, char * szLogonId)
 int
 KFW_AFS_copy_system_file_to_default_cache(char * filename)
 {
-    DWORD count;
     char cachename[264] = "FILE:";
-    HANDLE hFile;
     krb5_context               ctx = 0;
     krb5_error_code            code;
     krb5_principal              princ = 0;
index 8903bfede8f6b9c86bc597af1c8bcefe9f20d08f..dbe35ef42ee159d55c6e78dc743f36ae692febd4 100644 (file)
@@ -488,7 +488,7 @@ GetDomainLogonOptions( PLUID lpLogonId, char * username, char * domain, LogonOpt
         len ++;
 
         wuname = malloc(len * sizeof(WCHAR));
-        MultiByteToWideChar(CP_ACP,0,opt->smbName,-1,wuname,len*sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP,0,opt->smbName,-1,wuname,(int)(len*sizeof(WCHAR)));
 
         DebugEvent("Username is set for [%S]", wuname);
 
@@ -520,7 +520,7 @@ GetDomainLogonOptions( PLUID lpLogonId, char * username, char * domain, LogonOpt
         DebugEvent("After expanding env strings [%S]", regscript);
 
         if(wcsstr(regscript, L"%s")) {
-            dwSize += len * sizeof(WCHAR); /* make room for username expansion */
+            dwSize += (DWORD)(len * sizeof(WCHAR)); /* make room for username expansion */
             regexuscript = (WCHAR *) LocalAlloc(LMEM_FIXED, dwSize);
             hr = StringCbPrintfW(regexuscript, dwSize, regscript, wuname);
         } else {
@@ -1156,7 +1156,6 @@ static BOOL
 GetSecurityLogonSessionData(HANDLE hToken, PSECURITY_LOGON_SESSION_DATA * ppSessionData)
 {
     NTSTATUS Status = 0;
-    HANDLE  TokenHandle;
     TOKEN_STATISTICS Stats;
     DWORD   ReqLen;
     BOOL    Success;
@@ -1165,16 +1164,7 @@ GetSecurityLogonSessionData(HANDLE hToken, PSECURITY_LOGON_SESSION_DATA * ppSess
         return FALSE;
     *ppSessionData = NULL;
 
-#if 0
-    Success = OpenProcessToken( HANDLE GetCurrentProcess(), TOKEN_QUERY, &TokenHandle );
-    if ( !Success )
-        return FALSE;
-#endif
-
     Success = GetTokenInformation( hToken, TokenStatistics, &Stats, sizeof(TOKEN_STATISTICS), &ReqLen );
-#if 0
-    CloseHandle( TokenHandle );
-#endif
     if ( !Success )
         return FALSE;
 
@@ -1187,21 +1177,11 @@ GetSecurityLogonSessionData(HANDLE hToken, PSECURITY_LOGON_SESSION_DATA * ppSess
 
 VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
 {
-    DWORD code;
-
     WCHAR szUserW[128] = L"";
     char  szUserA[128] = "";
-    char  szClient[MAX_PATH];
     char szPath[MAX_PATH] = "";
     char szLogonId[128] = "";
-    NETRESOURCE nr;
-    DWORD res;
-    DWORD gle;
-    DWORD dwSize;
-    DWORD dwDisp;
-    DWORD dwType;
     DWORD count;
-    VOID * ticketData;
     char filename[256];
     char commandline[512];
     STARTUPINFO startupinfo;
index 843f345bc6d35b306f211fc13b3065fc6c14ef6e..3e6dd2728014872cd959de062dd36e584c973025 100644 (file)
@@ -17,7 +17,6 @@
 
 int
 main(int argc, char **argv) {
-    BOOL res;
     HKEY hkSubmounts;
     HKEY hkParameters;
     char mountRoot[64]="/afs";
@@ -67,7 +66,7 @@ main(int argc, char **argv) {
             else
                 mountstring = argv[2];
 
-            if (RegSetValueEx(hkSubmounts, argv[1], 0, REG_EXPAND_SZ, mountstring, strlen(mountstring)+1)) {
+            if (RegSetValueEx(hkSubmounts, argv[1], 0, REG_EXPAND_SZ, mountstring, (DWORD)strlen(mountstring)+1)) {
                 fprintf(stderr,"Submount Set failure for [%s]: %lX",
                          argv[1], GetLastError());
                 RegCloseKey(hkSubmounts);
index 9f3d901ac4b41599136b29089f3669e6e78f4cfc..54688fbb2a771494574189534e9b1174e68468b4 100644 (file)
@@ -97,7 +97,7 @@ static int good_gets (s, max)
        if (feof(stdin)) return EOF;    /* EOF on input, nothing read */
        else return -2;                 /* I don't think this can happen */
     }
-    l = strlen (s);
+    l = (int)strlen (s);
     if (l && (s[l-1] == '\n')) s[--l] = 0;
     return l;
 }
index 23d8041c7d90018889ef4d74ae0dadab3285eb03..700cb90a42f56951ad83b7561a18a790a6f6f04d 100644 (file)
@@ -25,22 +25,22 @@ int VL_GetEntryBYIDN(struct rx_connection *, afs_int32, afs_int32, struct nvldbe
 int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
 
 /* from .xg file */
-extern StartRXAFS_FetchData (struct rx_call *,
+int StartRXAFS_FetchData (struct rx_call *,
        struct AFSFid *Fid,
        afs_int32 Pos, 
        afs_int32 Length);
-extern EndRXAFS_FetchData (struct rx_call *,
+int EndRXAFS_FetchData (struct rx_call *,
        struct AFSFetchStatus *OutStatus, 
        struct AFSCallBack *CallBack, 
        struct AFSVolSync *Sync);
 
-extern RXAFS_FetchACL(struct rx_connection *,
+int RXAFS_FetchACL(struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSOpaque *AccessList, 
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
-extern RXAFS_FetchStatus (struct rx_connection *,
+int RXAFS_FetchStatus (struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSFetchStatus *OutStatus, 
        struct AFSCallBack *CallBack, 
@@ -57,6 +57,44 @@ int EndRXAFS_StoreData(struct rx_call *,
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
+int StartRXAFS_FetchData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       afs_int64 Pos,
+       afs_int64 Length);
+
+int EndRXAFS_FetchData64(struct rx_call *z_call,
+        struct AFSFetchStatus * OutStatus,
+       struct AFSCallBack * CallBack,
+       struct AFSVolSync * Sync);
+
+afs_int32 SRXAFS_FetchData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       afs_int64 Pos,
+       afs_int64 Length,
+       struct AFSFetchStatus * OutStatus,
+       struct AFSCallBack * CallBack,
+       struct AFSVolSync * Sync);
+
+int StartRXAFS_StoreData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       struct AFSStoreStatus * InStatus,
+       afs_uint64 Pos,
+       afs_uint64 Length,
+       afs_uint64 FileLength);
+
+int EndRXAFS_StoreData64(struct rx_call *z_call,
+       struct AFSFetchStatus * OutStatus,
+       struct AFSVolSync * Sync);
+
+afs_int32 SRXAFS_StoreData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       struct AFSStoreStatus * InStatus,
+       afs_uint64 Pos,
+       afs_uint64 Length,
+       afs_uint64 FileLength,
+       struct AFSFetchStatus * OutStatus,
+       struct AFSVolSync * Sync);
+
 int RXAFS_StoreACL (struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSOpaque *AccessList,  
index 23ea5e715e3c19ead5635cafed7a6fdecf2809d9..a2091124c72c132737cee06593e2abb30edaed5a 100644 (file)
@@ -35,7 +35,7 @@ extern long cm_InitACLCache(int newFile, long size);
 
 extern long cm_FindACLCache(struct cm_scache *scp, struct cm_user *userp, long *rightsp);
 
-static cm_aclent_t *GetFreeACLEnt(void);
+static cm_aclent_t *GetFreeACLEnt(cm_scache_t * scp);
 
 extern long cm_AddACLCache(struct cm_scache *scp, struct cm_user *userp, long rights);
 
index b4bfaaf926df03a4ebe70af4517d802562a60812..eaa8dc1309771c05dfa50c293ed8c32ce3fb52f8 100644 (file)
@@ -110,7 +110,7 @@ void buf_IncrSyncer(long parm)
     bp = cm_data.buf_allp;
     bp->refCount++;
     lock_ReleaseWrite(&buf_globalLock);
-    nAtOnce = (long)sqrt(cm_data.buf_nbuffers);
+    nAtOnce = (long)sqrt((double)cm_data.buf_nbuffers);
     while (buf_ShutdownFlag == 0) {
 #ifndef DJGPP
         i = SleepEx(5000, 1);
@@ -155,7 +155,7 @@ long
 buf_ValidateBuffers(void)
 {
     cm_buf_t * bp, *bpf, *bpa, *bpb;
-    afs_uint32 countb = 0, countf = 0, counta = 0;
+    afs_uint64 countb = 0, countf = 0, counta = 0;
 
     if (cm_data.buf_freeListp == NULL && cm_data.buf_freeListEndp != NULL ||
          cm_data.buf_freeListp != NULL && cm_data.buf_freeListEndp == NULL) {
@@ -235,7 +235,7 @@ void buf_Shutdown(void)
 /* initialize the buffer package; called with no locks
  * held during the initialization phase.
  */
-long buf_Init(int newFile, cm_buf_ops_t *opsp, long nbuffers)
+long buf_Init(int newFile, cm_buf_ops_t *opsp, afs_uint64 nbuffers)
 {
     static osi_once_t once;
     cm_buf_t *bp;
@@ -356,7 +356,7 @@ long buf_Init(int newFile, cm_buf_ops_t *opsp, long nbuffers)
 /* add nbuffers to the buffer pool, if possible.
  * Called with no locks held.
  */
-long buf_AddBuffers(long nbuffers)
+long buf_AddBuffers(afs_uint64 nbuffers)
 {
 #ifndef DJGPP
     /* The size of a virtual cache cannot be changed after it has
@@ -414,7 +414,7 @@ long buf_AddBuffers(long nbuffers)
 /* interface to set the number of buffers to an exact figure.
  * Called with no locks held.
  */
-long buf_SetNBuffers(long nbuffers)
+long buf_SetNBuffers(afs_uint64 nbuffers)
 {
     if (nbuffers < 10) 
         return CM_ERROR_INVAL;
@@ -455,18 +455,18 @@ void buf_WaitIO(cm_scache_t * scp, cm_buf_t *bp)
         if ( bp->flags & CM_BUF_WAITING ) {
             bp->waitCount++;
             bp->waitRequests++;
-            osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING already set for 0x%x", bp);
+            osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING already set for 0x%p", bp);
         } else {
-            osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING set for 0x%x", bp);
+            osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING set for 0x%p", bp);
             bp->flags |= CM_BUF_WAITING;
             bp->waitCount = bp->waitRequests = 1;
         }
-        osi_SleepM((long) bp, &bp->mx);
+        osi_SleepM((LONG_PTR)bp, &bp->mx);
         lock_ObtainMutex(&bp->mx);
-        osi_Log1(afsd_logp, "buf_WaitIO conflict wait done for 0x%x", bp);
+        osi_Log1(afsd_logp, "buf_WaitIO conflict wait done for 0x%p", bp);
         bp->waitCount--;
         if (bp->waitCount == 0) {
-            osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING reset for 0x%x", bp);
+            osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING reset for 0x%p", bp);
             bp->flags &= ~CM_BUF_WAITING;
             bp->waitRequests = 0;
         }
@@ -477,8 +477,8 @@ void buf_WaitIO(cm_scache_t * scp, cm_buf_t *bp)
         if ( scp ) {
             lock_ObtainMutex(&scp->mx);
             if (scp->flags & CM_SCACHEFLAG_WAITING) {
-                osi_Log1(afsd_logp, "buf_WaitIO waking scp 0x%x", scp);
-                osi_Wakeup((long)&scp->flags);
+                osi_Log1(afsd_logp, "buf_WaitIO waking scp 0x%p", scp);
+                osi_Wakeup((LONG_PTR)&scp->flags);
             }
            lock_ReleaseMutex(&scp->mx);
         }
@@ -488,10 +488,10 @@ void buf_WaitIO(cm_scache_t * scp, cm_buf_t *bp)
      * the I/O to complete.  Do so.
      */
     if (bp->flags & CM_BUF_WAITING) {
-        osi_Log1(afsd_logp, "buf_WaitIO Waking bp 0x%x", bp);
-        osi_Wakeup((long) bp);
+        osi_Log1(afsd_logp, "buf_WaitIO Waking bp 0x%p", bp);
+        osi_Wakeup((LONG_PTR) bp);
     }
-    osi_Log1(afsd_logp, "WaitIO finished wait for bp 0x%x", (long) bp);
+    osi_Log1(afsd_logp, "WaitIO finished wait for bp 0x%p", bp);
 }
 
 /* code to drop reference count while holding buf_globalLock */
@@ -563,11 +563,11 @@ void buf_LockedCleanAsync(cm_buf_t *bp, cm_req_t *reqp)
     while ((bp->flags & CM_BUF_DIRTY) == CM_BUF_DIRTY) {
         lock_ReleaseMutex(&bp->mx);
 
-       osi_Log1(afsd_logp, "buf_LockedCleanAsync starts I/O on 0x%x", bp);
+       osi_Log1(afsd_logp, "buf_LockedCleanAsync starts I/O on 0x%p", bp);
         code = (*cm_buf_opsp->Writep)(&bp->fid, &bp->offset,
                                        cm_data.buf_blockSize, 0, bp->userp,
                                        reqp);
-       osi_Log2(afsd_logp, "buf_LockedCleanAsync I/O on 0x%x, done=%d", bp, code);
+       osi_Log2(afsd_logp, "buf_LockedCleanAsync I/O on 0x%p, done=%d", bp, code);
                 
         lock_ObtainMutex(&bp->mx);
         if (code) 
@@ -587,8 +587,8 @@ void buf_LockedCleanAsync(cm_buf_t *bp, cm_req_t *reqp)
      */
     if (bp->flags & CM_BUF_WAITING) {
         /* turn off flags and wakeup users */
-        osi_Log1(buf_logp, "buf_WaitIO Waking bp 0x%x", bp);
-        osi_Wakeup((long) bp);
+        osi_Log1(buf_logp, "buf_WaitIO Waking bp 0x%p", bp);
+        osi_Wakeup((LONG_PTR) bp);
     }
 }
 
@@ -612,7 +612,7 @@ void buf_Recycle(cm_buf_t *bp)
      * have any lock conflicts, so we can grab the buffer lock out of
      * order in the locking hierarchy.
      */
-    osi_Log2( buf_logp, "buf_Recycle recycles 0x%x, off 0x%x",
+    osi_Log2( buf_logp, "buf_Recycle recycles 0x%p, off 0x%x",
               bp, bp->offset.LowPart);
 
     osi_assert(bp->refCount == 0);
@@ -885,8 +885,8 @@ long buf_GetNew(struct cm_scache *scp, osi_hyper_t *offsetp, cm_buf_t **bufpp)
      */
     lock_ReleaseMutex(&bp->mx);
     *bufpp = bp;
-    osi_Log3(buf_logp, "buf_GetNew returning bp 0x%x for file 0x%x, offset 0x%x",
-              bp, (long) scp, offsetp->LowPart);
+    osi_Log3(buf_logp, "buf_GetNew returning bp 0x%p for file 0x%p, offset 0x%x",
+              bp, scp, offsetp->LowPart);
     return 0;
 }
 
@@ -978,8 +978,8 @@ long buf_Get(struct cm_scache *scp, osi_hyper_t *offsetp, cm_buf_t **bufpp)
                 bp->flags |= CM_BUF_ERROR;
                 bp->flags &= ~CM_BUF_READING;
                 if (bp->flags & CM_BUF_WAITING) {
-                    osi_Log1(buf_logp, "buf_Get Waking bp 0x%x", bp);
-                    osi_Wakeup((long) bp);
+                    osi_Log1(buf_logp, "buf_Get Waking bp 0x%p", bp);
+                    osi_Wakeup((LONG_PTR) bp);
                 }
                 lock_ReleaseMutex(&bp->mx);
                 buf_Release(bp);
@@ -1001,8 +1001,8 @@ long buf_Get(struct cm_scache *scp, osi_hyper_t *offsetp, cm_buf_t **bufpp)
             }
             bp->flags &= ~CM_BUF_READING;
             if (bp->flags & CM_BUF_WAITING) {
-                osi_Log1(buf_logp, "buf_Get Waking bp 0x%x", bp);
-                osi_Wakeup((long) bp);
+                osi_Log1(buf_logp, "buf_Get Waking bp 0x%p", bp);
+                osi_Wakeup((LONG_PTR) bp);
             }
         }
 
@@ -1032,8 +1032,8 @@ long buf_Get(struct cm_scache *scp, osi_hyper_t *offsetp, cm_buf_t **bufpp)
     }
     lock_ReleaseWrite(&buf_globalLock);
 
-    osi_Log3(buf_logp, "buf_Get returning bp 0x%x for file 0x%x, offset 0x%x",
-              bp, (long) scp, offsetp->LowPart);
+    osi_Log3(buf_logp, "buf_Get returning bp 0x%p for file 0x%p, offset 0x%x",
+              bp, scp, offsetp->LowPart);
 #ifdef TESTING
     buf_ValidateBufQueues();
 #endif /* TESTING */
@@ -1096,7 +1096,7 @@ void buf_SetDirty(cm_buf_t *bp)
     osi_assert(bp->magic == CM_BUF_MAGIC);
     osi_assert(bp->refCount > 0);
        
-    osi_Log1(buf_logp, "buf_SetDirty 0x%x", bp);
+    osi_Log1(buf_logp, "buf_SetDirty 0x%p", bp);
 
     /* set dirty bit */
     bp->flags |= CM_BUF_DIRTY;
@@ -1164,14 +1164,14 @@ long buf_CleanAndReset(void)
 /* called without global lock being held, reserves buffers for callers
  * that need more than one held (not locked) at once.
  */
-void buf_ReserveBuffers(long nbuffers)
+void buf_ReserveBuffers(afs_uint64 nbuffers)
 {
     lock_ObtainWrite(&buf_globalLock);
     while (1) {
         if (cm_data.buf_reservedBufs + nbuffers > cm_data.buf_maxReservedBufs) {
             cm_data.buf_reserveWaiting = 1;
             osi_Log1(buf_logp, "buf_ReserveBuffers waiting for %d bufs", nbuffers);
-            osi_SleepW((long) &cm_data.buf_reservedBufs, &buf_globalLock);
+            osi_SleepW((LONG_PTR) &cm_data.buf_reservedBufs, &buf_globalLock);
             lock_ObtainWrite(&buf_globalLock);
         }
         else {
@@ -1182,7 +1182,7 @@ void buf_ReserveBuffers(long nbuffers)
     lock_ReleaseWrite(&buf_globalLock);
 }
 
-int buf_TryReserveBuffers(long nbuffers)
+int buf_TryReserveBuffers(afs_uint64 nbuffers)
 {
     int code;
 
@@ -1201,13 +1201,13 @@ int buf_TryReserveBuffers(long nbuffers)
 /* called without global lock held, releases reservation held by
  * buf_ReserveBuffers.
  */
-void buf_UnreserveBuffers(long nbuffers)
+void buf_UnreserveBuffers(afs_uint64 nbuffers)
 {
     lock_ObtainWrite(&buf_globalLock);
     cm_data.buf_reservedBufs -= nbuffers;
     if (cm_data.buf_reserveWaiting) {
         cm_data.buf_reserveWaiting = 0;
-        osi_Wakeup((long) &cm_data.buf_reservedBufs);
+        osi_Wakeup((LONG_PTR) &cm_data.buf_reservedBufs);
     }
     lock_ReleaseWrite(&buf_globalLock);
 }       
@@ -1513,7 +1513,7 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie, int lock)
   
     StringCbPrintfA(output, sizeof(output), "%s - dumping buf_HashTable - buf_hashSize=%d\n", 
                     cookie, cm_data.buf_hashSize);
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
   
     for (i = 0; i < cm_data.buf_hashSize; i++)
     {
@@ -1524,13 +1524,13 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie, int lock)
                 StringCbPrintfA(output, sizeof(output), "vnode=%d, unique=%d), size=%d refCount=%d\n", 
                         cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume, 
                         bp->fid.vnode, bp->fid.unique, bp->size, bp->refCount);
-                WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+                WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
             }
         }
     }
   
     StringCbPrintfA(output, sizeof(output), "%s - Done dumping buf_HashTable.\n", cookie);
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
 
     if (lock)
         lock_ReleaseRead(&buf_globalLock);
index 337435809d48f7986c4cfb0c234503fc6f7c4843..692c107f8ea9487c687d76ca944f8f49d4536bde 100644 (file)
@@ -134,7 +134,7 @@ typedef struct cm_buf_ops {
 /* global locks */
 extern osi_rwlock_t buf_globalLock;
 
-extern long buf_Init(int newFile, cm_buf_ops_t *, long nbuffers);
+extern long buf_Init(int newFile, cm_buf_ops_t *, afs_uint64 nbuffers);
 
 extern void buf_Shutdown(void);
 
@@ -172,11 +172,11 @@ extern void buf_SetDirty(cm_buf_t *);
 
 extern long buf_CleanAndReset(void);
 
-extern void buf_ReserveBuffers(long);
+extern void buf_ReserveBuffers(afs_uint64);
 
-extern int buf_TryReserveBuffers(long);
+extern int buf_TryReserveBuffers(afs_uint64);
 
-extern void buf_UnreserveBuffers(long);
+extern void buf_UnreserveBuffers(afs_uint64);
 
 #ifdef TESTING
 extern void buf_ValidateBufQueues(void);
@@ -193,7 +193,7 @@ extern long buf_CleanVnode(struct cm_scache *scp, cm_user_t *userp,
 extern long buf_FlushCleanPages(cm_scache_t *scp, cm_user_t *userp,
        cm_req_t *reqp);
 
-extern long buf_SetNBuffers(long nbuffers);
+extern long buf_SetNBuffers(afs_uint64 nbuffers);
 
 extern long buf_ValidateBuffers(void);
 
index 5e22237f984522da6235fc9e4269b829777cebd0..984c969149f06c862342a7984565ccfbed588acc 100644 (file)
@@ -204,7 +204,7 @@ void cm_RevokeCallback(struct rx_call *callp, AFSFid *fidp)
         {
             cm_HoldSCacheNoLock(scp);
             lock_ReleaseWrite(&cm_scacheLock);
-            osi_Log4(afsd_logp, "RevokeCallback Discarding SCache scp 0x%x vol %u vn %u uniq %u", 
+            osi_Log4(afsd_logp, "RevokeCallback Discarding SCache scp 0x%p vol %u vn %u uniq %u", 
                      scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
             lock_ObtainMutex(&scp->mx);
             cm_DiscardSCache(scp);
@@ -252,7 +252,7 @@ void cm_RevokeVolumeCallback(struct rx_call *callp, AFSFid *fidp)
                 cm_HoldSCacheNoLock(scp);
                 lock_ReleaseWrite(&cm_scacheLock);
                 lock_ObtainMutex(&scp->mx);
-                osi_Log4(afsd_logp, "RevokeVolumeCallback Discarding SCache scp 0x%x vol %u vn %u uniq %u", 
+                osi_Log4(afsd_logp, "RevokeVolumeCallback Discarding SCache scp 0x%p vol %u vn %u uniq %u", 
                           scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
                 cm_DiscardSCache(scp);
                 lock_ReleaseMutex(&scp->mx);
@@ -459,7 +459,7 @@ SRXAFSCB_InitCallBackState(struct rx_call *callp)
                 if (scp->cbExpires > 0 && scp->cbServerp != NULL) {
                     /* we have a callback, now decide if we should clear it */
                     if (scp->cbServerp == tsp || tsp == NULL) {
-                        osi_Log4(afsd_logp, "InitCallbackState Discarding SCache scp 0x%x vol %u vn %u uniq %u", 
+                        osi_Log4(afsd_logp, "InitCallbackState Discarding SCache scp 0x%p vol %u vn %u uniq %u", 
                                   scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
                         cm_DiscardSCache(scp);
                         discarded = 1;
@@ -1397,9 +1397,15 @@ int SRXAFSCB_GetCacheConfig(struct rx_call *callp,
     afs_MarshallCacheConfig(callerVersion, &cm_initParams, t_config);
 
     *serverVersion = AFS_CLIENT_RETRIEVAL_FIRST_EDITION;
-    *configCount = allocsize;
+#ifdef DEBUG
+#ifndef SIZE_MAX
+#define SIZE_MAX sizeof(afs_int32)
+#endif
+    osi_assert(allocsize < SIZE_MAX);
+#endif
+    *configCount = (afs_uint32)allocsize;
     config->cacheConfig_val = t_config;
-    config->cacheConfig_len = allocsize/sizeof(afs_uint32);
+    config->cacheConfig_len = (*configCount)/sizeof(afs_uint32);
 
     MUTEX_EXIT(&callp->lock);
     return 0;
@@ -1571,7 +1577,7 @@ void cm_EndCallbackGrantingCall(cm_scache_t *scp, cm_callbackRequest_t *cbrp,
                   (revp->flags & CM_RACINGFLAG_CANCELALL))) {
             /* this one matches */
             osi_Log4(afsd_logp,
-                      "Racing revoke scp 0x%x old cbc %d rev cbc %d cur cbc %d",
+                      "Racing revoke scp 0x%p old cbc %d rev cbc %d cur cbc %d",
                       scp,
                       cbrp->callbackCount, revp->callbackCount,
                       cm_callbackCount);
@@ -1619,7 +1625,7 @@ long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
     cm_fid_t sfid;
     struct rx_connection * callp;
 
-    osi_Log4(afsd_logp, "GetCallback scp 0x%x cell %d vol %d flags %lX", 
+    osi_Log4(afsd_logp, "GetCallback scp 0x%p cell %d vol %d flags %lX", 
              scp, scp->fid.cell, scp->fid.volume, flags);
 
 #ifdef AFS_FREELANCE_CLIENT
@@ -1665,7 +1671,7 @@ long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
     cm_AFSFidFromFid(&tfid, &scp->fid);
     while (1) {
         if (!mustCall && cm_HaveCallback(scp)) {
-            osi_Log3(afsd_logp, "GetCallback Complete scp 0x%x cell %d vol %d", 
+            osi_Log3(afsd_logp, "GetCallback Complete scp 0x%p cell %d vol %d", 
                       scp, scp->fid.cell, scp->fid.volume);
             return 0;
         }
@@ -1681,8 +1687,8 @@ long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
         lock_ReleaseMutex(&scp->mx);
                
         /* now make the RPC */
-        osi_Log4(afsd_logp, "CALL FetchStatus scp 0x%x cell %d vol %d uniq %d", 
-                 (long) scp, scp->fid.cell, scp->fid.volume, scp->fid.unique);
+        osi_Log4(afsd_logp, "CALL FetchStatus scp 0x%p cell %d vol %d uniq %d", 
+                 scp, scp->fid.cell, scp->fid.volume, scp->fid.unique);
         do {
             code = cm_Conn(&sfid, userp, reqp, &connp);
             if (code) 
@@ -1697,11 +1703,11 @@ long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
                             &cbr, code));
         code = cm_MapRPCError(code, reqp);
         if (code)
-            osi_Log4(afsd_logp, "CALL FetchStatus FAILURE code 0x%x scp 0x%x cell %d vol %d", 
-                     code, (long) scp, scp->fid.cell, scp->fid.volume);
+            osi_Log4(afsd_logp, "CALL FetchStatus FAILURE code 0x%x scp 0x%p cell %d vol %d", 
+                     code, scp, scp->fid.cell, scp->fid.volume);
         else
-            osi_Log4(afsd_logp, "CALL FetchStatus SUCCESS scp 0x%x cell %d vol %d uniq %d", 
-                     (long) scp, scp->fid.cell, scp->fid.volume, scp->fid.unique);
+            osi_Log4(afsd_logp, "CALL FetchStatus SUCCESS scp 0x%p cell %d vol %d uniq %d", 
+                     scp, scp->fid.cell, scp->fid.volume, scp->fid.unique);
 
         lock_ObtainMutex(&scp->mx);
         if (code == 0) {
@@ -1714,7 +1720,7 @@ long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
 
         /* now check to see if we got an error */
         if (code) {
-            osi_Log2(afsd_logp, "GetCallback Failed code 0x%x scp 0x%x -->",code, scp);
+            osi_Log2(afsd_logp, "GetCallback Failed code 0x%x scp 0x%p -->",code, scp);
             osi_Log4(afsd_logp, "            cell %d vol %d vn %d uniq %d",
                      scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
             return code;
@@ -1727,7 +1733,7 @@ void cm_CheckCBExpiration(void)
 {
     int i;
     cm_scache_t *scp;
-    unsigned long now;
+    time_t now;
         
     osi_Log0(afsd_logp, "CheckCBExpiration");
 
@@ -1738,7 +1744,7 @@ void cm_CheckCBExpiration(void)
             cm_HoldSCacheNoLock(scp);
             if (scp->cbExpires > 0 && (scp->cbServerp == NULL || now > scp->cbExpires)) {
                 lock_ReleaseWrite(&cm_scacheLock);
-                osi_Log4(afsd_logp, "Callback Expiration Discarding SCache scp 0x%x vol %u vn %u uniq %u", 
+                osi_Log4(afsd_logp, "Callback Expiration Discarding SCache scp 0x%p vol %u vn %u uniq %u", 
                           scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
                 lock_ObtainMutex(&scp->mx);
                 cm_DiscardSCache(scp);
index e3e13a0e573937e64284a025c9d9dff410d45dc8..013777e1c4f783ce6dea7191f68d850ecda00b4c 100644 (file)
@@ -14,7 +14,7 @@
 
 typedef struct cm_callbackRequest {
     long callbackCount;                /* callback count at start of the request */
-    unsigned long startTime;   /* time when we started the call */
+    time_t startTime;  /* time when we started the call */
     struct cm_server *serverp; /* server we really got the callback from */
 } cm_callbackRequest_t;
 
index c7df6db68619a57ce8b7850099e186afabb98a08..28512af707976ccda042f7911917e61ea3cadc1c 100644 (file)
@@ -483,7 +483,7 @@ long cm_GetCellServDB(char *cellNamep)
         strcpy(cellNamep, AFSDIR_CLIENT_ETC_DIRPATH);
 
     /* add trailing backslash, if required */
-    tlen = strlen(cellNamep);
+    tlen = (int)strlen(cellNamep);
     if (cellNamep[tlen-1] != '\\') 
         strcat(cellNamep, "\\");
 #else
@@ -560,63 +560,63 @@ long cm_GetRootCellName(char *cellNamep)
 
 cm_configFile_t *cm_CommonOpen(char *namep, char *rwp)
 {
-       char wdir[256];
+    char wdir[256];
     long tlen;
     FILE *tfilep;
 
 #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
     strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
         
-       /* add trailing backslash, if required */
-        tlen = strlen(wdir);
-        if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
+    /* add trailing backslash, if required */
+    tlen = (long)(strlen(wdir));
+    if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
 #else
 #ifdef DJGPP
-        strcpy(wdir,cm_confDir);
+    strcpy(wdir,cm_confDir);
 #else
-        DWORD dwSize;
-        char *afsconf_path;
+    DWORD dwSize;
+    char *afsconf_path;
     
-        dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
-        afsconf_path = malloc(dwSize);
-        dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
+    dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
+    afsconf_path = malloc(dwSize);
+    dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
 
-        if (!afsconf_path)
-            strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
-        else {
-            strcpy(wdir, afsconf_path);
-            free(afsconf_path);
-        }
+    if (!afsconf_path)
+       strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
+    else {
+       strcpy(wdir, afsconf_path);
+       free(afsconf_path);
+    }
 #endif /* !DJGPP */
-        strcat(wdir,"/");
+    strcat(wdir,"/");
 #endif /* DJGPP || WIN95 */
 
-        strcat(wdir, namep);
+    strcat(wdir, namep);
         
-        tfilep = fopen(wdir, rwp);
+    tfilep = fopen(wdir, rwp);
 
-       return ((cm_configFile_t *) tfilep);        
-}
+    return ((cm_configFile_t *) tfilep);        
+}      
 
 #ifndef DJGPP
 long cm_WriteConfigString(char *labelp, char *valuep)
 {
-       DWORD code, dummyDisp;
-       HKEY parmKey;
+    DWORD code, dummyDisp;
+    HKEY parmKey;
 
-       code = RegCreateKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
-                               0, "container", 0, KEY_SET_VALUE, NULL,
-                               &parmKey, &dummyDisp);
-       if (code != ERROR_SUCCESS)
-               return -1;
+    code = RegCreateKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
+                          0, "container", 0, KEY_SET_VALUE, NULL,
+                          &parmKey, &dummyDisp);
+    if (code != ERROR_SUCCESS)
+       return -1;
 
-       code = RegSetValueEx(parmKey, labelp, 0, REG_SZ,
-                            valuep, strlen(valuep) + 1);
-       RegCloseKey (parmKey);
-       if (code != ERROR_SUCCESS)
-               return -1;
+    code = RegSetValueEx(parmKey, labelp, 0, REG_SZ,
+                         valuep, (DWORD)strlen(valuep) + 1);
+    RegCloseKey (parmKey);
+    if (code != ERROR_SUCCESS)
+       return (long)-1;
 
-        return 0;
+    return (long)0;
 }
 #endif /* !DJGPP */
 
@@ -747,7 +747,7 @@ long cm_CloseCellFile(cm_configFile_t *filep)
     strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
         
        /* add trailing backslash, if required */
-    tlen = strlen(wdir);
+    tlen = (int)strlen(wdir);
     if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
 #else
 #ifdef DJGPP
@@ -801,7 +801,7 @@ void cm_GetConfigDir(char *dir)
     strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
         
        /* add trailing backslash, if required */
-    tlen = strlen(wdir);
+    tlen = (int)strlen(wdir);
     if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
 #else
 #ifdef DJGPP
index c7cc7eebe505538c938661e94f400abb1667dd4c..518f3b426e28d09252d032ae18688e018f5da49d 100644 (file)
@@ -28,8 +28,8 @@
 osi_rwlock_t cm_connLock;
 
 long RDRtimeout = CM_CONN_DEFAULTRDRTIMEOUT;
-long ConnDeadtimeout = CM_CONN_CONNDEADTIME;
-long HardDeadtimeout = CM_CONN_HARDDEADTIME;
+unsigned short ConnDeadtimeout = CM_CONN_CONNDEADTIME;
+unsigned short HardDeadtimeout = CM_CONN_HARDDEADTIME;
 
 #define LANMAN_WKS_PARAM_KEY "SYSTEM\\CurrentControlSet\\Services\\lanmanworkstation\\parameters"
 #define LANMAN_WKS_SESSION_TIMEOUT "SessTimeout"
@@ -154,8 +154,8 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
     long timeUsed, timeLeft;
     long code;
         
-    osi_Log2(afsd_logp, "cm_Analyze connp 0x%x, code 0x%x",
-             (long) connp, errorCode);
+    osi_Log2(afsd_logp, "cm_Analyze connp 0x%p, code 0x%x",
+             connp, errorCode);
 
     /* no locking required, since connp->serverp never changes after
      * creation */
@@ -714,7 +714,7 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, cm_conn_t **connpp)
     lock_ReleaseMutex(&userp->mx);
 
     /* return this pointer to our caller */
-    osi_Log1(afsd_logp, "cm_ConnByServer returning conn 0x%x", (long) tcp);
+    osi_Log1(afsd_logp, "cm_ConnByServer returning conn 0x%p", tcp);
     *connpp = tcp;
 
     return 0;
index e993edaabcee193db732c97345438a9ea932b288..8692c079d6109851f42304d04ae341e05e3e40ef 100644 (file)
@@ -14,8 +14,8 @@
 #define CM_CONN_CONNDEADTIME           60
 #define CM_CONN_HARDDEADTIME        120
 
-extern long ConnDeadtimeout;
-extern long HardDeadtimeout;
+extern unsigned short ConnDeadtimeout;
+extern unsigned short HardDeadtimeout;
 
 typedef struct cm_conn {
        struct cm_conn *nextp;          /* locked by cm_connLock */
index 8089847eaa825bf8ec2765353804fc4bcf66104f..6b719f5a587b75096cb4ceb55f4becf77c8f4905 100644 (file)
@@ -71,7 +71,7 @@ void cm_BkgDaemon(long parm)
     lock_ObtainWrite(&cm_daemonLock);
     while (daemon_ShutdownFlag == 0) {
         if (!cm_bkgListEndp) {
-            osi_SleepW((long) &cm_bkgListp, &cm_daemonLock);
+            osi_SleepW((LONG_PTR)&cm_bkgListp, &cm_daemonLock);
             lock_ObtainWrite(&cm_daemonLock);
             continue;
         }
@@ -119,7 +119,7 @@ void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, long p1, long p2,
         cm_bkgListEndp = rp;
     lock_ReleaseWrite(&cm_daemonLock);
 
-    osi_Wakeup((long) &cm_bkgListp);
+    osi_Wakeup((LONG_PTR) &cm_bkgListp);
 }
 
 static int
@@ -176,13 +176,13 @@ IsWindowsFirewallPresent(void)
 /* periodic check daemon */
 void cm_Daemon(long parm)
 {
-    unsigned long now;
-    unsigned long lastLockCheck;
-    unsigned long lastVolCheck;
-    unsigned long lastCBExpirationCheck;
-    unsigned long lastDownServerCheck;
-    unsigned long lastUpServerCheck;
-    unsigned long lastTokenCacheCheck;
+    time_t now;
+    time_t lastLockCheck;
+    time_t lastVolCheck;
+    time_t lastCBExpirationCheck;
+    time_t lastDownServerCheck;
+    time_t lastUpServerCheck;
+    time_t lastTokenCacheCheck;
     char thostName[200];
     unsigned long code;
     struct hostent *thp;
index ae7b9f2d3573b36b0c80f0e778bf020270994486..340a357836c5ccbee6f3bc74ac6b926eaaed89ce 100644 (file)
@@ -134,8 +134,8 @@ long cm_BufWrite(void *vfidp, osi_hyper_t *offsetp, long length, long flags,
         callp = rx_NewCall(rxconnp);
         rx_PutConnection(rxconnp);
 
-        osi_Log4(afsd_logp, "CALL StoreData scp 0x%x, offset 0x%x:%08x, length 0x%x",
-                 (long) scp, biod.offset.HighPart, biod.offset.LowPart, nbytes);
+        osi_Log4(afsd_logp, "CALL StoreData scp 0x%p, offset 0x%x:%08x, length 0x%x",
+                 scp, biod.offset.HighPart, biod.offset.LowPart, nbytes);
 
         code = StartRXAFS_StoreData(callp, &tfid, &inStatus,
                                     biod.offset.LowPart, nbytes, truncPos);
@@ -158,22 +158,22 @@ long cm_BufWrite(void *vfidp, osi_hyper_t *offsetp, long length, long flags,
                 /* write out wbytes of data from bufferp */
                 temp = rx_Write(callp, bufferp, wbytes);
                 if (temp != wbytes) {
-                    osi_Log3(afsd_logp, "rx_Write failed bp 0x%x, %d != %d",bufp,temp,wbytes);
+                    osi_Log3(afsd_logp, "rx_Write failed bp 0x%p, %d != %d",bufp,temp,wbytes);
                     code = -1;
                     break;
                 } else {
-                    osi_Log2(afsd_logp, "rx_Write succeeded bp 0x%x, %d",bufp,temp);
+                    osi_Log2(afsd_logp, "rx_Write succeeded bp 0x%p, %d",bufp,temp);
                 }       
                 nbytes -= wbytes;
             }  /* while more bytes to write */
         }              /* if RPC started successfully */
         else {
-            osi_Log2(afsd_logp, "StartRXAFS_StoreData scp 0x%x failed (%lX)",scp,code);
+            osi_Log2(afsd_logp, "StartRXAFS_StoreData scp 0x%p failed (%lX)",scp,code);
         }
         if (code == 0) {
             code = EndRXAFS_StoreData(callp, &outStatus, &volSync);
             if (code)
-                osi_Log2(afsd_logp, "EndRXAFS_StoreData scp 0x%x failed (%lX)",scp,code);
+                osi_Log2(afsd_logp, "EndRXAFS_StoreData scp 0x%p failed (%lX)",scp,code);
         }
         code = rx_EndCall(callp, code);
                 
@@ -181,9 +181,9 @@ long cm_BufWrite(void *vfidp, osi_hyper_t *offsetp, long length, long flags,
     code = cm_MapRPCError(code, reqp);
         
     if (code)
-        osi_Log2(afsd_logp, "CALL StoreData FAILURE scp 0x%x, code 0x%x", scp, code);
+        osi_Log2(afsd_logp, "CALL StoreData FAILURE scp 0x%p, code 0x%x", scp, code);
     else
-        osi_Log1(afsd_logp, "CALL StoreData SUCCESS scp 0x%x", scp);
+        osi_Log1(afsd_logp, "CALL StoreData SUCCESS scp 0x%p", scp);
 
     /* now, clean up our state */
     lock_ObtainMutex(&scp->mx);
@@ -359,7 +359,7 @@ long cm_ShutdownDCache(void)
     return 0;
 }
 
-int cm_InitDCache(int newFile, long chunkSize, long nbuffers)
+int cm_InitDCache(int newFile, long chunkSize, afs_uint64 nbuffers)
 {
     lock_InitializeMutex(&cm_bufGetMutex, "buf_Get mutex");
     return buf_Init(newFile, &cm_bufOps, nbuffers);
@@ -492,7 +492,7 @@ void cm_BkgStore(cm_scache_t *scp, long p1, long p2, long p3, long p4,
     toffset.HighPart = p2;
     length = p3;
 
-    osi_Log4(afsd_logp, "Starting BKG store scp 0x%x, offset 0x%x:%08x, length 0x%x", scp, p2, p1, p3);
+    osi_Log4(afsd_logp, "Starting BKG store scp 0x%p, offset 0x%x:%08x, length 0x%x", scp, p2, p1, p3);
 
     cm_BufWrite(&scp->fid, &toffset, length, /* flags */ 0, userp, &req);
 
@@ -536,7 +536,7 @@ void cm_BkgPrefetch(cm_scache_t *scp, long p1, long p2, long p3, long p4,
     base.HighPart = p2;
     length = p3;
         
-    osi_Log2(afsd_logp, "Starting BKG prefetch scp 0x%x, base 0x%x", scp, p1);
+    osi_Log2(afsd_logp, "Starting BKG prefetch scp 0x%p, base 0x%x", scp, p1);
 
     code = buf_Get(scp, &base, &bp);
 
@@ -592,7 +592,7 @@ void cm_ConsiderPrefetch(cm_scache_t *scp, osi_hyper_t *offsetp,
     if (code) 
         return;        /* can't find something to prefetch */
 
-    osi_Log2(afsd_logp, "BKG Prefetch request vp 0x%x, base 0x%x",
+    osi_Log2(afsd_logp, "BKG Prefetch request scp 0x%p, base 0x%x",
              scp, realBase.LowPart);
 
     cm_QueueBKGRequest(scp, cm_BkgPrefetch, realBase.LowPart,
@@ -1093,8 +1093,8 @@ void cm_ReleaseBIOD(cm_bulkIO_t *biop, int isStore)
         /* turn off writing and wakeup users */
         if (isStore) {
             if (bufp->flags & CM_BUF_WAITING) {
-                osi_Log2(afsd_logp, "cm_ReleaseBIOD Waking [scp 0x%x] bp 0x%x", scp, bufp);
-                osi_Wakeup((long) bufp);
+                osi_Log2(afsd_logp, "cm_ReleaseBIOD Waking [scp 0x%p] bp 0x%p", scp, bufp);
+                osi_Wakeup((LONG_PTR) bufp);
             }
             bufp->flags &= ~(CM_BUF_WRITING | CM_BUF_DIRTY);
         }
@@ -1263,8 +1263,8 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *up,
         callp = rx_NewCall(rxconnp);
         rx_PutConnection(rxconnp);
 
-        osi_Log3(afsd_logp, "CALL FetchData scp 0x%x, off 0x%x, size 0x%x",
-                  (long) scp, biod.offset.LowPart, biod.length);
+        osi_Log3(afsd_logp, "CALL FetchData scp 0x%p, off 0x%x, size 0x%x",
+                 scp, biod.offset.LowPart, biod.length);
 
         code = StartRXAFS_FetchData(callp, &tfid, biod.offset.LowPart,
                                     biod.length);
@@ -1317,8 +1317,8 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *up,
                 tbufp->cmFlags |= CM_BUF_CMFULLYFETCHED;
                 lock_ObtainMutex(&scp->mx);
                 if (scp->flags & CM_SCACHEFLAG_WAITING) {
-                    osi_Log1(afsd_logp, "CM GetBuffer Waking scp 0x%x", scp);
-                    osi_Wakeup((long) &scp->flags);
+                    osi_Log1(afsd_logp, "CM GetBuffer Waking scp 0x%p", scp);
+                    osi_Wakeup((LONG_PTR) &scp->flags);
                 }
                 if (cpffp && !*cpffp && !osi_QPrev(&qdp->q)) {
                     *cpffp = 1;
@@ -1349,7 +1349,9 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *up,
              * all of the rest of the pages.
              */
             /* bytes fetched */
-            rbytes = bufferp - tbufp->datap;
+           osi_assert((bufferp - tbufp->datap) < LONG_MAX);
+            rbytes = (long) (bufferp - tbufp->datap);
+
             /* bytes left to zero */
             rbytes = cm_data.buf_blockSize - rbytes;
             while(qdp) {
index 9853cd980f0c38901ad36dbdc359cda72b10c054..99513343d46c847f375d2331a918c5b0ce43e022 100644 (file)
@@ -24,7 +24,7 @@ typedef struct cm_bulkIO {
 
 extern long cm_StoreMini(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
 
-extern int cm_InitDCache(int newFile, long chunkSize, long nbuffers);
+extern int cm_InitDCache(int newFile, long chunkSize, afs_uint64 nbuffers);
 
 extern int cm_HaveBuffer(struct cm_scache *, struct cm_buf *, int haveBufLocked);
 
index c32de292e2ec1ebf73824eaa6bc57a54fd915912..a570479092a07320017cb5c3405bae7f56dee9d0 100644 (file)
 /* compute how many 32 byte entries an AFS 3 dir requires for storing
  * the specified name.
  */
-cm_NameEntries(char *namep, size_t *lenp)
+long cm_NameEntries(char *namep, long *lenp)
 {
-       int i;
+    long i;
         
-        i = strlen(namep);
-       if (lenp) *lenp = i;
-        return 1+((i+16)>>5);
-}
+    i = (long)strlen(namep);
+    if (lenp) *lenp = i;
+    return 1+((i+16)>>5);
+}      
index 1443b66778c17d1e06a2dc22be0e39f3b7c037cb..4348d71b3cb21610330a00ed4ac37e25fc0da71f 100644 (file)
@@ -82,6 +82,6 @@ typedef struct cm_dirPage1 {
 } cm_dirPage1_t;
 #endif /* UNUSED */
 
-extern int cm_NameEntries(char *namep, size_t *lenp);
+extern long cm_NameEntries(char *namep, long *lenp);
 
 #endif /*  __CM_DIR_ENV__ */
index 176f7705bf50dac548ce02bc3f431d9c0ef47fbf..f4e1b9db922d2eead637693346cde7b5c70a49bc 100644 (file)
 #include <windns.h>
 #define DNSAPI_ENV
 #endif
+#include <errno.h>
 
 /*extern void afsi_log(char *pattern, ...);*/
 
-extern int errno;
 static char dns_addr[30];
 #ifdef DJGPP
 extern char cm_confDir[];
index 4ab1d5ad53e8089c31ac0f55dd2f366e27524c3f..281f2f9cee64a6ffba52b46d405090b9bfc49039 100644 (file)
@@ -773,7 +773,7 @@ long cm_InitLocalMountPoints() {
             /* we are migrating to the registry */
             sprintf(szIndex,"%d",dwIndex++);
             dwType = REG_SZ;
-            dwSize = strlen(line) + 1;
+            dwSize = (DWORD)strlen(line) + 1;
             RegSetValueEx( hkFreelance, szIndex, 0, dwType, line, dwSize);
         }
 #endif 
@@ -1053,16 +1053,16 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw,
             if (RegQueryValueEx( hkFreelance, szIndex, 0, &dwType, szMount, &dwSize) != ERROR_SUCCESS) {
                 /* found an unused value */
                 dwType = REG_SZ;
-                dwSize = strlen(line) + 1;
+                dwSize = (DWORD)strlen(line) + 1;
                 RegSetValueEx( hkFreelance, szIndex, 0, dwType, line, dwSize);
                 break;
             } else {
-                int len = strlen(filename);
+                int len = (int)strlen(filename);
                 if ( dwType == REG_SZ && !strncmp(filename, szMount, len) && 
                      (szMount[len] == '%' || szMount[len] == '#')) {
                     /* Replace the existing value */
                     dwType = REG_SZ;
-                    dwSize = strlen(line) + 1;
+                    dwSize = (DWORD)strlen(line) + 1;
                     RegSetValueEx( hkFreelance, szIndex, 0, dwType, line, dwSize);
                     break;
                 }
@@ -1288,15 +1288,15 @@ long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp)
             if (RegQueryValueEx( hkFreelanceSymlinks, szIndex, 0, &dwType, szLink, &dwSize) != ERROR_SUCCESS) {
                 /* found an unused value */
                 dwType = REG_SZ;
-                dwSize = strlen(line) + 1;
+                dwSize = (DWORD)strlen(line) + 1;
                 RegSetValueEx( hkFreelanceSymlinks, szIndex, 0, dwType, line, dwSize);
                 break;
             } else {
-                int len = strlen(filename);
+                int len = (int)strlen(filename);
                 if ( dwType == REG_SZ && !strncmp(filename, szLink, len) && szLink[len] == ':') {
                     /* Replace the existing value */
                     dwType = REG_SZ;
-                    dwSize = strlen(line) + 1;
+                    dwSize = (DWORD)strlen(line) + 1;
                     RegSetValueEx( hkFreelanceSymlinks, szIndex, 0, dwType, line, dwSize);
                     break;
                 }
index 9c8cfbde2dd5acfc62df4143ae6719a0b4aa51a7..770bbf689ed8cf07be2acb47977b8a65ab8376dc 100644 (file)
@@ -144,12 +144,15 @@ void TranslateExtendedChars(char *str)
 long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
        cm_scache_t **scpp)
 {
-    long code, length;
+    long code;
     cm_scache_t *substRootp;
-    char * relativePath = ioctlp->inDatap, absRoot[MAX_PATH];
-       wchar_t absRoot_w[MAX_PATH];
-       HANDLE rootDir;
-
+    char * relativePath = ioctlp->inDatap;
+#ifdef AFSIFS
+    char * absRoot[MAX_PATH];
+    long length;
+    wchar_t absRoot_w[MAX_PATH];
+    HANDLE rootDir;
+#endif
     osi_Log1(afsd_logp, "cm_ParseIoctlPath %s", osi_LogSaveString(afsd_logp,relativePath));
 
     /* This is usually the file name, but for StatMountPoint it is the path. */
@@ -264,7 +267,7 @@ long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
     }
 
     /* # of bytes of path */
-    code = strlen(ioctlp->inDatap) + 1;
+    code = (long)strlen(ioctlp->inDatap) + 1;
     ioctlp->inDatap += code;
 
     /* This is usually nothing, but for StatMountPoint it is the file name. */
@@ -278,7 +281,7 @@ void cm_SkipIoctlPath(smb_ioctl_t *ioctlp)
 {
     long temp;
         
-    temp = strlen(ioctlp->inDatap) + 1;
+    temp = (long) strlen(ioctlp->inDatap) + 1;
     ioctlp->inDatap += temp;
 }       
 
@@ -425,7 +428,7 @@ long cm_ParseIoctlParent(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
     }
 
     /* # of bytes of path */
-    code = strlen(ioctlp->inDatap) + 1;
+    code = (long)strlen(ioctlp->inDatap) + 1;
     ioctlp->inDatap += code;
 
     /* and return success */
@@ -471,7 +474,7 @@ long cm_IoctlGetACL(smb_ioctl_t *ioctlp, cm_user_t *userp)
     if (code) return code;
 
     /* skip over return data */
-    tlen = strlen(ioctlp->outDatap) + 1;
+    tlen = (int)strlen(ioctlp->outDatap) + 1;
     ioctlp->outDatap += tlen;
 
     /* and return success */
@@ -538,7 +541,7 @@ long cm_IoctlSetACL(struct smb_ioctl *ioctlp, struct cm_user *userp)
     fid.Unique = scp->fid.unique;
     do {
         acl.AFSOpaque_val = ioctlp->inDatap;
-        acl.AFSOpaque_len = strlen(ioctlp->inDatap)+1;
+        acl.AFSOpaque_len = (u_int)strlen(ioctlp->inDatap)+1;
         code = cm_Conn(&scp->fid, userp, &req, &connp);
         if (code) continue;
 
@@ -1080,7 +1083,7 @@ long cm_IoctlCheckVolumes(struct smb_ioctl *ioctlp, struct cm_user *userp)
 
 long cm_IoctlSetCacheSize(struct smb_ioctl *ioctlp, struct cm_user *userp)
 {
-    long temp;
+    afs_uint64 temp;
     long code;
 
     cm_SkipIoctlPath(ioctlp);
@@ -1314,7 +1317,7 @@ long cm_IoctlSysName(struct smb_ioctl *ioctlp, struct cm_user *userp)
         cp2 = ioctlp->inDatap;
         for ( cp=ioctlp->inDatap, count = 0; count < setSysName; count++ ) {
             /* won't go past end of ioctlp->inDatap since maxsysname*num < ioctlp->inDatap length */
-            t = strlen(cp);
+            t = (int)strlen(cp);
             if (t >= MAXSYSNAME || t <= 0)
                 return EINVAL;
             /* check for names that can shoot us in the foot */
@@ -1326,7 +1329,7 @@ long cm_IoctlSysName(struct smb_ioctl *ioctlp, struct cm_user *userp)
 
         /* inname gets first entry in case we're being a translator */
         /* (we are never a translator) */
-        t = strlen(ioctlp->inDatap);
+        t = (int)strlen(ioctlp->inDatap);
         memcpy(inname, ioctlp->inDatap, t + 1);
         ioctlp->inDatap += t + 1;
         num = count;
@@ -1353,7 +1356,7 @@ long cm_IoctlSysName(struct smb_ioctl *ioctlp, struct cm_user *userp)
                 if (!cm_sysNameList[count])
                     osi_panic("cm_IoctlSysName: no cm_sysNameList entry to write\n",
                                __FILE__, __LINE__);
-                t = strlen(cp);
+                t = (int)strlen(cp);
                 StringCbCopyA(cm_sysNameList[count], MAXSYSNAME, cp);
                 cp += t + 1;
             }
@@ -1373,7 +1376,7 @@ long cm_IoctlSysName(struct smb_ioctl *ioctlp, struct cm_user *userp)
                 if ( !(*sysnamelist)[count] )
                     osi_panic("cm_IoctlSysName: no cm_sysNameList entry to read\n", 
                                __FILE__, __LINE__);
-                t = strlen((*sysnamelist)[count]);
+                t = (int)strlen((*sysnamelist)[count]);
                 if (t >= MAXSYSNAME)
                     osi_panic("cm_IoctlSysName: sysname entry garbled\n", 
                                __FILE__, __LINE__);
@@ -2262,7 +2265,7 @@ long cm_IoctlMakeSubmount(smb_ioctl_t *ioctlp, cm_user_t *userp)
                            (strlen(&afspath[strlen(cm_mountRoot)])) ?
                            &afspath[strlen(cm_mountRoot)]:"/",
                            (strlen(&afspath[strlen(cm_mountRoot)])) ?
-                           strlen(&afspath[strlen(cm_mountRoot)])+1:2);
+                           (DWORD)strlen(&afspath[strlen(cm_mountRoot)])+1:2);
 
             RegCloseKey( hkSubmounts );
             StringCbCopyA(ioctlp->outDatap, 999999, submountreqp);
@@ -2370,7 +2373,7 @@ long cm_IoctlMakeSubmount(smb_ioctl_t *ioctlp, cm_user_t *userp)
                    (strlen(&afspath[strlen(cm_mountRoot)])) ?
                    &afspath[strlen(cm_mountRoot)]:"/",
                    (strlen(&afspath[strlen(cm_mountRoot)])) ?
-                   strlen(&afspath[strlen(cm_mountRoot)])+1:2);
+                   (DWORD)strlen(&afspath[strlen(cm_mountRoot)])+1:2);
 
     ioctlp->outDatap += strlen(ioctlp->outDatap) +1;
     RegCloseKey(hkSubmounts);
index a9ad74feeebc0ff4e344344c1e1c84c4f385b9d7..63b2b8780a69a2ec0edfa2531b1a4f8076f709bd 100644 (file)
 extern void afsi_log(char *pattern, ...);
 extern DWORD cm_ValidateCache;
 
-DWORD
-GranularityAdjustment(DWORD size)
+afs_uint64
+GranularityAdjustment(afs_uint64 size)
 {
     SYSTEM_INFO sysInfo;
-    static DWORD dwGranularity = 0;
+    static afs_uint64 qwGranularity = 0;
 
-    if ( !dwGranularity ) {
+    if ( !qwGranularity ) {
         GetSystemInfo(&sysInfo);
         afsi_log("Granularity - %lX", sysInfo.dwAllocationGranularity);
-        dwGranularity = sysInfo.dwAllocationGranularity;
+        qwGranularity = sysInfo.dwAllocationGranularity;
     }
 
-    size = (size + (dwGranularity - 1)) & ~(dwGranularity - 1);
+    size = (size + (qwGranularity - 1)) & ~(qwGranularity - 1);
     return size;
 }
 
-DWORD 
+afs_uint64 
 ComputeSizeOfConfigData(void)
 {
-    DWORD size;
+    afs_uint64 size;
     size = sizeof(cm_config_data_t);
     return size;
 }
 
-DWORD
+afs_uint64
 ComputeSizeOfVolumes(DWORD maxvols)
 {
-    DWORD size;
+    afs_uint64 size;
     size = maxvols * sizeof(cm_volume_t);
     return size;
 }
 
-DWORD
+afs_uint64
 ComputeSizeOfCells(DWORD maxcells)
 {
-    DWORD size;
+    afs_uint64 size;
     size = maxcells * sizeof(cm_cell_t);
     return size;
 }
 
-DWORD 
+afs_uint64 
 ComputeSizeOfACLCache(DWORD stats)
 {
-    DWORD size;
+    afs_uint64 size;
     size = 2 * (stats + 10) * sizeof(cm_aclent_t);
     return size;
 }
 
-DWORD 
+afs_uint64 
 ComputeSizeOfSCache(DWORD stats)
 {
-    DWORD size;
+    afs_uint64 size;
     size = (stats + 10) * sizeof(cm_scache_t);
     return size;
 }
 
-DWORD 
+afs_uint64 
 ComputeSizeOfSCacheHT(DWORD stats)
 {
-    DWORD size;
+    afs_uint64 size;
     size = (stats + 10) / 2 * sizeof(cm_scache_t *);;
     return size;
 }
 
-DWORD 
+afs_uint64 
 ComputeSizeOfDNLCache(void)
 {
-    DWORD size;
+    afs_uint64 size;
     size = NHSIZE * sizeof(cm_nc_t *) + NCSIZE * sizeof(cm_nc_t);
     return size;
 }
 
-DWORD 
-ComputeSizeOfDataBuffers(DWORD cacheBlocks, DWORD blockSize)
+afs_uint64 
+ComputeSizeOfDataBuffers(afs_uint64 cacheBlocks, DWORD blockSize)
 {
-    DWORD size;
+    afs_uint64 size;
     size = cacheBlocks * blockSize;
     return size;
 }
 
-DWORD 
+afs_uint64 
 ComputeSizeOfDataHT(void)
 {
-    DWORD size;
+    afs_uint64 size;
     size = osi_PrimeLessThan(CM_BUF_HASHSIZE) * sizeof(cm_buf_t *);
     return size;
 }
 
-DWORD 
-ComputeSizeOfDataHeaders(DWORD cacheBlocks)
+afs_uint64 
+ComputeSizeOfDataHeaders(afs_uint64 cacheBlocks)
 {
-    DWORD size;
+    afs_uint64 size;
     size = cacheBlocks * sizeof(cm_buf_t);
     return size;
 }
 
-DWORD
-ComputeSizeOfMappingFile(DWORD stats, DWORD maxVols, DWORD maxCells, DWORD chunkSize, DWORD cacheBlocks, DWORD blockSize)
+afs_uint64
+ComputeSizeOfMappingFile(DWORD stats, DWORD maxVols, DWORD maxCells, DWORD chunkSize, afs_uint64 cacheBlocks, DWORD blockSize)
 {
-    DWORD size;
+    afs_uint64 size;
     
     size       =  ComputeSizeOfConfigData()
                +  ComputeSizeOfVolumes(maxVols) 
@@ -230,6 +230,7 @@ cm_ShutdownMappedMemory(void)
     hMemoryMappedFile = NULL;
 
     afsi_log("Memory Mapped File has been closed");
+    return 0;
 }
 
 int
@@ -239,7 +240,7 @@ cm_ValidateMappedMemory(char * cachePath)
     PSECURITY_ATTRIBUTES psa;
     BY_HANDLE_FILE_INFORMATION fileInfo;
     int newFile = 1;
-    DWORD mappingSize;
+    afs_uint64 mappingSize;
     char * baseAddress = NULL;
     cm_config_data_t * config_data_p;
         
@@ -338,7 +339,8 @@ cm_ValidateMappedMemory(char * cachePath)
     hm = CreateFileMapping( hf,
                             NULL,
                             PAGE_READWRITE,
-                            0, mappingSize,
+                           (DWORD)(mappingSize >> 32), 
+                           (DWORD)(mappingSize & 0xFFFFFFFF),
                             NULL);
     if (hm == NULL) {
         if (GetLastError() == ERROR_DISK_FULL) {
@@ -355,15 +357,15 @@ cm_ValidateMappedMemory(char * cachePath)
     
     baseAddress = MapViewOfFileEx( hm,
                                    FILE_MAP_ALL_ACCESS,
-                                   0, 0,   
-                                   mappingSize,
+                                   0, 0,
+                                  (SIZE_T)mappingSize,
                                    baseAddress );
     if (baseAddress == NULL) {
         fprintf(stderr, "Error mapping view of file: %d\n", GetLastError());
         baseAddress = MapViewOfFile( hm,
                                      FILE_MAP_ALL_ACCESS,
-                                     0, 0,   
-                                     mappingSize );
+                                     0, 0,
+                                    (SIZE_T)mappingSize);
         if (baseAddress == NULL) {
             CloseHandle(hm);
             if (hf != INVALID_HANDLE_VALUE)
@@ -381,7 +383,7 @@ cm_ValidateMappedMemory(char * cachePath)
     config_data_p = (cm_config_data_t *) baseAddress;
 
     fprintf(stderr,"AFS Cache data:\n");
-    fprintf(stderr,"  Base Address   = %lX\n",baseAddress);
+    fprintf(stderr,"  Base Address   = %p\n",baseAddress);
     fprintf(stderr,"  stats          = %d\n", config_data_p->stats);
     fprintf(stderr,"  chunkSize      = %d\n", config_data_p->chunkSize);
     fprintf(stderr,"  blockSize      = %d\n", config_data_p->blockSize);
@@ -583,12 +585,12 @@ GetMachineSid(PBYTE SidBuffer, DWORD SidSize)
 }
 
 int
-cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chunkSize, DWORD cacheBlocks)
+cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chunkSize, afs_uint64 cacheBlocks)
 {
     HANDLE hf = INVALID_HANDLE_VALUE, hm;
     PSECURITY_ATTRIBUTES psa;
     int newFile = 1;
-    DWORD mappingSize;
+    afs_uint64 mappingSize;
     DWORD maxVols = stats/2;
     DWORD maxCells = stats/4;
     DWORD volumeSerialNumber = 0;
@@ -629,10 +631,14 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu
             afsi_log("Cache File \"%s\" already exists", cachePath);
 
             if ( GetFileInformationByHandle(hf, &fileInfo) ) {
+               afs_uint64 filesize;
                 afsi_log("Existing File Size: %08X:%08X",
                           fileInfo.nFileSizeHigh,
                           fileInfo.nFileSizeLow);
-                if (fileInfo.nFileSizeLow > GranularityAdjustment(mappingSize)) {
+               filesize = fileInfo.nFileSizeHigh;
+               filesize <<= 32;
+               filesize += fileInfo.nFileSizeLow;
+                if (filesize > GranularityAdjustment(mappingSize)) {
                     psa = CreateCacheFileSA();
                     hf = CreateFile( cachePath,
                                      GENERIC_READ | GENERIC_WRITE,
@@ -655,7 +661,6 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu
                               fileInfo.nFileSizeHigh,
                               fileInfo.nFileSizeLow);
                 }
-
             }
 
             hm = CreateFileMapping( hf,
@@ -672,8 +677,8 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu
                     hm = CreateFileMapping( hf,
                                             NULL,
                                             PAGE_READWRITE,
-                                            0
-                                            mappingSize,
+                                            (DWORD)(mappingSize >> 32)
+                                            (DWORD)(mappingSize & 0xFFFFFFFF),
                                             NULL);
                     if (hm == NULL) {
                         if (GetLastError() == ERROR_DISK_FULL) {
@@ -734,7 +739,8 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu
     hm = CreateFileMapping( hf,
                             NULL,
                             PAGE_READWRITE,
-                            0, mappingSize,
+                           (DWORD)(mappingSize >> 32), 
+                           (DWORD)(mappingSize & 0xFFFFFFFF),
                             NULL);
     if (hm == NULL) {
         if (GetLastError() == ERROR_DISK_FULL) {
@@ -748,15 +754,17 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu
     }
     baseAddress = MapViewOfFileEx( hm,
                                    FILE_MAP_ALL_ACCESS,
-                                   0, 0,   
-                                   mappingSize,
+                                   0, 
+                                  0, 
+                                  (SIZE_T)mappingSize,
                                    baseAddress );
     if (baseAddress == NULL) {
         afsi_log("Error mapping view of file: %d", GetLastError());
         baseAddress = MapViewOfFile( hm,
                                      FILE_MAP_ALL_ACCESS,
-                                     0, 0,   
-                                     mappingSize );
+                                     0, 
+                                    0, 
+                                    (SIZE_T)mappingSize);
         if (baseAddress == NULL) {
             if (hf != INVALID_HANDLE_VALUE)
                 CloseHandle(hf);
index 18e2e61e1470def007e1743802e1f9fd6a84659d..687509d3748d4c3265f0673ce6e729d5d1abba83 100644 (file)
 #define CM_CONFIG_DATA_MAGIC            ('A' | 'F'<<8 | 'S'<<16 | 'D'<<24)
 
 typedef struct cm_config_data {
-    long                size;
-    long                magic;
+    afs_uint32          size;
+    afs_uint32          magic;
     CHAR *              baseAddress;
 
-    long                stats;
-    long                chunkSize;
-    long                blockSize;
-    long                bufferSize;
-    long                cacheType;
-    long                dirty;
+    afs_uint32          stats;
+    afs_uint32          chunkSize;
+    afs_uint32          blockSize;
+    afs_uint64          bufferSize;
+    afs_uint32          cacheType;
+    afs_uint32          dirty;
 
     cm_volume_t *       volumeBaseAddress;
     cm_cell_t   *       cellBaseAddress; 
@@ -34,12 +34,12 @@ typedef struct cm_config_data {
     char *              bufEndOfData;
 
     cm_volume_t        *       allVolumesp;
-    long                currentVolumes;
-    long                maxVolumes;
+    afs_uint32          currentVolumes;
+    afs_uint32          maxVolumes;
 
     cm_cell_t  *       allCellsp;
-    long                currentCells;
-    long                maxCells;
+    afs_uint32          currentCells;
+    afs_uint32          maxCells;
 
     cm_volume_t        *       rootVolumep;
     cm_cell_t   *       rootCellp;
@@ -52,10 +52,10 @@ typedef struct cm_config_data {
     cm_aclent_t        *       aclLRUEndp;
 
     cm_scache_t        **      hashTablep;
-    long               hashTableSize;
+    afs_uint32         hashTableSize;
 
-    long               currentSCaches;
-    long                maxSCaches;
+    afs_uint32         currentSCaches;
+    afs_uint32          maxSCaches;
     cm_scache_t *       scacheLRUFirstp;
     cm_scache_t *       scacheLRULastp;
 
@@ -68,13 +68,13 @@ typedef struct cm_config_data {
     cm_buf_t   **      buf_hashTablepp;
     cm_buf_t   **      buf_fileHashTablepp;
     cm_buf_t   *       buf_allp;
-    long               buf_nbuffers;
-    long               buf_blockSize;
-    long               buf_hashSize;
-    long               buf_nOrigBuffers;
-    long                buf_reservedBufs;
-    long                buf_maxReservedBufs;
-    long                buf_reserveWaiting;
+    afs_uint64         buf_nbuffers;
+    afs_uint32         buf_blockSize;
+    afs_uint32         buf_hashSize;
+    afs_uint64         buf_nOrigBuffers;
+    afs_uint64          buf_reservedBufs;
+    afs_uint64          buf_maxReservedBufs;
+    afs_uint64          buf_reserveWaiting;
 
     time_t              mountRootGen;
     afsUUID             Uuid;
@@ -84,21 +84,21 @@ typedef struct cm_config_data {
 
 extern cm_config_data_t cm_data;
 
-DWORD GranularityAdjustment(DWORD size);
-DWORD ComputeSizeOfConfigData(void);
-DWORD ComputeSizeOfVolumes(DWORD maxvols);
-DWORD ComputeSizeOfCells(DWORD maxcells);
-DWORD ComputeSizeOfACLCache(DWORD stats);
-DWORD ComputeSizeOfSCache(DWORD stats);
-DWORD ComputeSizeOfSCacheHT(DWORD stats);
-DWORD ComputeSizeOfDNLCache(void);
-DWORD ComputeSizeOfDataBuffers(DWORD cacheBlocks, DWORD blockSize);
-DWORD ComputeSizeOfDataHT(void);
-DWORD ComputeSizeOfDataHeaders(DWORD cacheBlocks);
-DWORD ComputeSizeOfMappingFile(DWORD stats, DWORD maxVols, DWORD maxCells, DWORD chunkSize, DWORD cacheBlocks, DWORD blockSize);
+afs_uint64 GranularityAdjustment(afs_uint64 size);
+afs_uint64 ComputeSizeOfConfigData(void);
+afs_uint64 ComputeSizeOfVolumes(DWORD maxvols);
+afs_uint64 ComputeSizeOfCells(DWORD maxcells);
+afs_uint64 ComputeSizeOfACLCache(DWORD stats);
+afs_uint64 ComputeSizeOfSCache(DWORD stats);
+afs_uint64 ComputeSizeOfSCacheHT(DWORD stats);
+afs_uint64 ComputeSizeOfDNLCache(void);
+afs_uint64 ComputeSizeOfDataBuffers(afs_uint64 cacheBlocks, DWORD blockSize);
+afs_uint64 ComputeSizeOfDataHT(void);
+afs_uint64 ComputeSizeOfDataHeaders(afs_uint64 cacheBlocks);
+afs_uint64 ComputeSizeOfMappingFile(DWORD stats, DWORD maxVols, DWORD maxCells, DWORD chunkSize, afs_uint64 cacheBlocks, DWORD blockSize);
 PSECURITY_ATTRIBUTES CreateCacheFileSA();
 VOID  FreeCacheFileSA(PSECURITY_ATTRIBUTES psa);
 int   cm_ShutdownMappedMemory(void);
 int   cm_ValidateMappedMemory(char * cachePath);
-int   cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chunkSize, DWORD cacheBlocks );
+int   cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chunkSize, afs_uint64 cacheBlocks );
 #endif /* CM_MEMMAP_H */
\ No newline at end of file
index 31ceeba02e19c07398c4aeacebf21517ded0482a..315cb1e2f10d6f19d1a58a15fff789518d257593 100644 (file)
@@ -491,7 +491,7 @@ long cm_GetSCache(cm_fid_t *fidp, cm_scache_t **outScpp, cm_user_t *userp,
             scp->fileType = CM_SCACHETYPE_INVALID;
 
         lock_ObtainMutex(&cm_Freelance_Lock);
-        scp->length.LowPart = strlen(mp)+4;
+        scp->length.LowPart = (DWORD)strlen(mp)+4;
         strncpy(scp->mountPointStringp,mp,MOUNTPOINTLEN);
         scp->mountPointStringp[MOUNTPOINTLEN-1] = '\0';
         lock_ReleaseMutex(&cm_Freelance_Lock);
@@ -681,7 +681,7 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING
                                | CM_SCACHEFLAG_SIZESTORING | CM_SCACHEFLAG_GETCALLBACK)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING|STORING|SIZESTORING|GETCALLBACK want FETCHSTATUS", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING|STORING|SIZESTORING|GETCALLBACK want FETCHSTATUS", scp);
                 goto sleep;
             }
         }
@@ -692,11 +692,11 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING |
                               CM_SCACHEFLAG_SIZESTORING | CM_SCACHEFLAG_GETCALLBACK)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING|STORING|SIZESTORING|GETCALLBACK want STORESIZE|STORESTATUS|SETSIZE|GETCALLBACK", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING|STORING|SIZESTORING|GETCALLBACK want STORESIZE|STORESTATUS|SETSIZE|GETCALLBACK", scp);
                 goto sleep;
             }
             if (scp->bufReadsp || scp->bufWritesp) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is bufRead|bufWrite want STORESIZE|STORESTATUS|SETSIZE|GETCALLBACK", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is bufRead|bufWrite want STORESIZE|STORESTATUS|SETSIZE|GETCALLBACK", scp);
                 goto sleep;
             }
         }
@@ -707,11 +707,11 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING
                                | CM_SCACHEFLAG_SIZESTORING | CM_SCACHEFLAG_GETCALLBACK)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING|STORING|SIZESTORING|GETCALLBACK want FETCHDATA", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING|STORING|SIZESTORING|GETCALLBACK want FETCHDATA", scp);
                 goto sleep;
             }
             if (bufp && (bufp->cmFlags & (CM_BUF_CMFETCHING | CM_BUF_CMSTORING))) {
-                osi_Log2(afsd_logp, "CM SyncOp scp 0x%x bufp 0x%x is BUF_CMFETCHING|BUF_CMSTORING want FETCHDATA", scp, bufp);
+                osi_Log2(afsd_logp, "CM SyncOp scp 0x%p bufp 0x%p is BUF_CMFETCHING|BUF_CMSTORING want FETCHDATA", scp, bufp);
                 goto sleep;
             }
         }
@@ -719,11 +719,11 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
             /* same as fetch data */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING
                                | CM_SCACHEFLAG_SIZESTORING | CM_SCACHEFLAG_GETCALLBACK)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING|STORING|SIZESTORING|GETCALLBACK want STOREDATA", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING|STORING|SIZESTORING|GETCALLBACK want STOREDATA", scp);
                 goto sleep;
             }
             if (bufp && (bufp->cmFlags & (CM_BUF_CMFETCHING | CM_BUF_CMSTORING))) {
-                osi_Log2(afsd_logp, "CM SyncOp scp 0x%x bufp 0x%x is BUF_CMFETCHING|BUF_CMSTORING want STOREDATA", scp, bufp);
+                osi_Log2(afsd_logp, "CM SyncOp scp 0x%p bufp 0x%p is BUF_CMFETCHING|BUF_CMSTORING want STOREDATA", scp, bufp);
                 goto sleep;
             }
         }
@@ -731,7 +731,7 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
         if (flags & CM_SCACHESYNC_STOREDATA_EXCL) {
             /* Don't allow concurrent StoreData RPC's */
             if (scp->flags & CM_SCACHEFLAG_DATASTORING) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is DATASTORING want STOREDATA_EXCL", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is DATASTORING want STOREDATA_EXCL", scp);
                 goto sleep;
             }
         }
@@ -739,7 +739,7 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
         if (flags & CM_SCACHESYNC_ASYNCSTORE) {
             /* Don't allow more than one BKG store request */
             if (scp->flags & CM_SCACHEFLAG_ASYNCSTORING) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is ASYNCSTORING want ASYNCSTORE", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is ASYNCSTORING want ASYNCSTORE", scp);
                 goto sleep;
             }
         }
@@ -747,7 +747,7 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
         if (flags & CM_SCACHESYNC_LOCK) {
             /* Don't allow concurrent fiddling with lock lists */
             if (scp->flags & CM_SCACHEFLAG_LOCKING) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is LOCKING want LOCK", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is LOCKING want LOCK", scp);
                 goto sleep;
             }
         }
@@ -758,7 +758,7 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              * bringing in new status.
              */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING want GETSTATUS", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING want GETSTATUS", scp);
                 goto sleep;
             }
         }
@@ -772,7 +772,7 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              * changing here.
              */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING | CM_SCACHEFLAG_SIZESTORING)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING|STORING|SIZESTORING want SETSTATUS", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING|STORING|SIZESTORING want SETSTATUS", scp);
                 goto sleep;
             }
         }
@@ -782,11 +782,11 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              * is OK to read while storing the data back.
              */
             if (scp->flags & CM_SCACHEFLAG_FETCHING) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING want READ", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING want READ", scp);
                 goto sleep;
             }
             if (bufp && ((bufp->cmFlags & (CM_BUF_CMFETCHING | CM_BUF_CMFULLYFETCHED)) == CM_BUF_CMFETCHING)) {
-                osi_Log2(afsd_logp, "CM SyncOp scp 0x%x bufp 0x%x is BUF_CMFETCHING want READ", scp, bufp);
+                osi_Log2(afsd_logp, "CM SyncOp scp 0x%p bufp 0x%p is BUF_CMFETCHING want READ", scp, bufp);
                 goto sleep;
             }
         }
@@ -796,11 +796,11 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
              */
             if (scp->flags & (CM_SCACHEFLAG_FETCHING | CM_SCACHEFLAG_STORING
                                | CM_SCACHEFLAG_SIZESTORING)) {
-                osi_Log1(afsd_logp, "CM SyncOp scp 0x%x is FETCHING|STORING|SIZESTORING want WRITE", scp);
+                osi_Log1(afsd_logp, "CM SyncOp scp 0x%p is FETCHING|STORING|SIZESTORING want WRITE", scp);
                 goto sleep;
             }
             if (bufp && (bufp->cmFlags & (CM_BUF_CMFETCHING | CM_BUF_CMSTORING))) {
-                osi_Log2(afsd_logp, "CM SyncOp scp 0x%x bufp 0x%x is BUF_CMFETCHING|BUF_CMSTORING want WRITE", scp, bufp);
+                osi_Log2(afsd_logp, "CM SyncOp scp 0x%p bufp 0x%p is BUF_CMFETCHING|BUF_CMSTORING want WRITE", scp, bufp);
                 goto sleep;
             }
         }
@@ -818,8 +818,8 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
 #endif /* AFS_FREELANCE_CLIENT */
              ) {
             if (!cm_HaveCallback(scp)) {
-                osi_Log1(afsd_logp, "CM SyncOp getting callback on scp %x",
-                          (long) scp);
+                osi_Log1(afsd_logp, "CM SyncOp getting callback on scp 0x%p",
+                          scp);
                 if (bufLocked) lock_ReleaseMutex(&bufp->mx);
                 code = cm_GetCallback(scp, up, reqp, 0);
                 if (bufLocked) {
@@ -869,28 +869,28 @@ long cm_SyncOp(cm_scache_t *scp, cm_buf_t *bufp, cm_user_t *up, cm_req_t *reqp,
             return CM_ERROR_WOULDBLOCK;
 
         /* wait here, then try again */
-        osi_Log1(afsd_logp, "CM SyncOp sleeping scp 0x%x", scp);
+        osi_Log1(afsd_logp, "CM SyncOp sleeping scp 0x%p", scp);
         if ( scp->flags & CM_SCACHEFLAG_WAITING ) {
             scp->waitCount++;
             scp->waitRequests++;
-            osi_Log3(afsd_logp, "CM SyncOp CM_SCACHEFLAG_WAITING already set for 0x%x; %d threads; %d requests", 
+            osi_Log3(afsd_logp, "CM SyncOp CM_SCACHEFLAG_WAITING already set for 0x%p; %d threads; %d requests", 
                      scp, scp->waitCount, scp->waitRequests);
         } else {
-            osi_Log1(afsd_logp, "CM SyncOp CM_SCACHEFLAG_WAITING set for 0x%x", scp);
+            osi_Log1(afsd_logp, "CM SyncOp CM_SCACHEFLAG_WAITING set for 0x%p", scp);
             scp->flags |= CM_SCACHEFLAG_WAITING;
             scp->waitCount = scp->waitRequests = 1;
         }
         if (bufLocked) 
             lock_ReleaseMutex(&bufp->mx);
-        osi_SleepM((long) &scp->flags, &scp->mx);
+        osi_SleepM((LONG_PTR) &scp->flags, &scp->mx);
         if (bufLocked) 
             lock_ObtainMutex(&bufp->mx);
         lock_ObtainMutex(&scp->mx);
         scp->waitCount--;
-        osi_Log3(afsd_logp, "CM SyncOp woke! scp 0x%x; still waiting %d threads of %d requests", 
+        osi_Log3(afsd_logp, "CM SyncOp woke! scp 0x%p; still waiting %d threads of %d requests", 
                  scp, scp->waitCount, scp->waitRequests);
         if (scp->waitCount == 0) {
-            osi_Log1(afsd_logp, "CM SyncOp CM_SCACHEFLAG_WAITING reset for 0x%x", scp);
+            osi_Log1(afsd_logp, "CM SyncOp CM_SCACHEFLAG_WAITING reset for 0x%p", scp);
             scp->flags &= ~CM_SCACHEFLAG_WAITING;
             scp->waitRequests = 0;
         }
@@ -992,8 +992,8 @@ void cm_SyncOpDone(cm_scache_t *scp, cm_buf_t *bufp, long flags)
         if (bufp) {
             bufp->cmFlags &= ~(CM_BUF_CMFETCHING | CM_BUF_CMFULLYFETCHED);
             if (bufp->flags & CM_BUF_WAITING) {
-                osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%x] bufp 0x%x", scp, bufp);
-                osi_Wakeup((long) &bufp);
+                osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%p] bufp 0x%p", scp, bufp);
+                osi_Wakeup((LONG_PTR) &bufp);
             }
             buf_Release(bufp);
         }
@@ -1013,8 +1013,8 @@ void cm_SyncOpDone(cm_scache_t *scp, cm_buf_t *bufp, long flags)
         if (bufp) {
             bufp->cmFlags &= ~CM_BUF_CMSTORING;
             if (bufp->flags & CM_BUF_WAITING) {
-                osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%x] bufp 0x%x", scp, bufp);
-                osi_Wakeup((long) &bufp);
+                osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%p] bufp 0x%p", scp, bufp);
+                osi_Wakeup((LONG_PTR) &bufp);
             }
             buf_Release(bufp);
         }
@@ -1022,8 +1022,8 @@ void cm_SyncOpDone(cm_scache_t *scp, cm_buf_t *bufp, long flags)
 
     /* and wakeup anyone who is waiting */
     if (scp->flags & CM_SCACHEFLAG_WAITING) {
-        osi_Log1(afsd_logp, "CM SyncOpDone Waking scp 0x%x", scp);
-        osi_Wakeup((long) &scp->flags);
+        osi_Log1(afsd_logp, "CM SyncOpDone Waking scp 0x%p", scp);
+        osi_Wakeup((LONG_PTR) &scp->flags);
     }
 }       
 
@@ -1260,7 +1260,7 @@ int cm_DumpSCache(FILE *outputFile, char *cookie, int lock)
         lock_ObtainRead(&cm_scacheLock);
   
     sprintf(output, "%s - dumping scache - cm_data.currentSCaches=%d, cm_data.maxSCaches=%d\n", cookie, cm_data.currentSCaches, cm_data.maxSCaches);
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
   
     for (scp = cm_data.scacheLRULastp; scp; scp = (cm_scache_t *) osi_QPrev(&scp->q)) 
     {
@@ -1269,12 +1269,12 @@ int cm_DumpSCache(FILE *outputFile, char *cookie, int lock)
             sprintf(output, "%s fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%u\n", 
                     cookie, scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique, 
                     scp->refCount);
-            WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+            WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
         }
     }
   
     sprintf(output, "%s - dumping cm_data.hashTable - cm_data.hashTableSize=%d\n", cookie, cm_data.hashTableSize);
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
   
     for (i = 0; i < cm_data.hashTableSize; i++)
     {
@@ -1282,16 +1282,16 @@ int cm_DumpSCache(FILE *outputFile, char *cookie, int lock)
         {
             if (scp->refCount != 0)
             {
-                sprintf(output, "%s scp=0x%08X, hash=%d, fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%u\n", 
-                         cookie, (void *)scp, i, scp->fid.cell, scp->fid.volume, scp->fid.vnode, 
+                sprintf(output, "%s scp=0x%p, hash=%d, fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%u\n", 
+                         cookie, scp, i, scp->fid.cell, scp->fid.volume, scp->fid.vnode, 
                          scp->fid.unique, scp->refCount);
-                WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+                WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
             }
         }
     }
 
     sprintf(output, "%s - Done dumping scache.\n", cookie);
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
   
     if (lock)
         lock_ReleaseRead(&cm_scacheLock);       
index 1ffb478fea81270f911b6c0905d501a30fc7608e..899058542c07086363cd9a0d68b8a025813e5b76 100644 (file)
@@ -87,66 +87,66 @@ typedef struct cm_prefetch {                /* last region scanned for prefetching */
 
 typedef struct cm_scache {
     osi_queue_t q;              /* lru queue; cm_scacheLock */
-        afs_uint32      magic;
-        struct cm_scache *nextp;       /* next in hash; cm_scacheLock */
-       cm_fid_t fid;
-        afs_uint32 flags;              /* flags; locked by mx */
-
-       /* synchronization stuff */
-        osi_mutex_t mx;                        /* mutex for this structure */
-        osi_rwlock_t bufCreateLock;    /* read-locked during buffer creation;
-                                        * write-locked to prevent buffers from
-                                         * being created during a truncate op, etc.
-                                         */
-        afs_uint32 refCount;           /* reference count; cm_scacheLock */
-        osi_queueData_t *bufReadsp;    /* queue of buffers being read */
-        osi_queueData_t *bufWritesp;   /* queue of buffers being written */
-
-       /* parent info for ACLs */
-        afs_uint32 parentVnode;                /* parent vnode for ACL callbacks */
-        afs_uint32 parentUnique;       /* for ACL callbacks */
-
-       /* local modification stat */
-        afs_uint32 mask;               /* for clientModTime, length and
-                                        * truncPos */
-
-       /* file status */
-       afs_uint32 fileType;            /* file type */
-       time_t clientModTime;           /* mtime */
-        time_t serverModTime;          /* at server, for concurrent call
-                                        * comparisons */
-        osi_hyper_t length;            /* file length */
-       cm_prefetch_t prefetch;         /* prefetch info structure */
-        afs_uint32 unixModeBits;       /* unix protection mode bits */
-        afs_uint32 linkCount;          /* link count */
-        afs_uint32 dataVersion;                /* data version */
-        afs_uint32 owner;              /* file owner */
-        afs_uint32 group;              /* file owning group */
-
-       /* pseudo file status */
-       osi_hyper_t serverLength;       /* length known to server */
-
-       /* aux file status */
-        osi_hyper_t truncPos;          /* file size to truncate to before
-                                        * storing data */
-
-       /* symlink and mount point info */
-        char mountPointStringp[MOUNTPOINTLEN]; /* the string stored in a mount point;
-                                        * first char is type, then vol name.
+    afs_uint32      magic;
+    struct cm_scache *nextp;   /* next in hash; cm_scacheLock */
+    cm_fid_t fid;
+    afs_uint32 flags;          /* flags; locked by mx */
+
+    /* synchronization stuff */
+    osi_mutex_t mx;            /* mutex for this structure */
+    osi_rwlock_t bufCreateLock;        /* read-locked during buffer creation;
+                                * write-locked to prevent buffers from
+                                 * being created during a truncate op, etc.
+                                 */
+    afs_uint32 refCount;               /* reference count; cm_scacheLock */
+    osi_queueData_t *bufReadsp;        /* queue of buffers being read */
+    osi_queueData_t *bufWritesp;       /* queue of buffers being written */
+
+    /* parent info for ACLs */
+    afs_uint32 parentVnode;            /* parent vnode for ACL callbacks */
+    afs_uint32 parentUnique;   /* for ACL callbacks */
+
+    /* local modification stat */
+    afs_uint32 mask;           /* for clientModTime, length and
+                                 * truncPos */
+
+    /* file status */
+    afs_uint32 fileType;               /* file type */
+    time_t clientModTime;              /* mtime */
+    time_t serverModTime;              /* at server, for concurrent call
+                                         * comparisons */
+    osi_hyper_t length;                /* file length */
+    cm_prefetch_t prefetch;            /* prefetch info structure */
+    afs_uint32 unixModeBits;   /* unix protection mode bits */
+    afs_uint32 linkCount;              /* link count */
+    afs_uint32 dataVersion;            /* data version */
+    afs_uint32 owner;          /* file owner */
+    afs_uint32 group;          /* file owning group */
+
+    /* pseudo file status */
+    osi_hyper_t serverLength;  /* length known to server */
+
+    /* aux file status */
+    osi_hyper_t truncPos;      /* file size to truncate to before
+                                 * storing data */
+
+    /* symlink and mount point info */
+    char mountPointStringp[MOUNTPOINTLEN];     /* the string stored in a mount point;
+                                                 * first char is type, then vol name.
                                          * If this is a normal symlink, we store
                                         * the link contents here.
                                          */
-       cm_fid_t  mountRootFid;         /* mounted on root */
-       time_t    mountRootGen;         /* time to update mountRootFidp? */
-       cm_fid_t  dotdotFid;            /* parent of volume root */
+    cm_fid_t  mountRootFid;            /* mounted on root */
+    time_t    mountRootGen;            /* time to update mountRootFidp? */
+    cm_fid_t  dotdotFid;               /* parent of volume root */
 
-       /* callback info */
-        struct cm_server *cbServerp;   /* server granting callback */
-        time_t cbExpires;              /* time callback expires */
+    /* callback info */
+    struct cm_server *cbServerp;       /* server granting callback */
+    time_t cbExpires;          /* time callback expires */
 
-       /* access cache */
-        long anyAccess;                        /* anonymous user's access */
-        struct cm_aclent *randomACLp;  /* access cache entries */
+    /* access cache */
+    long anyAccess;                    /* anonymous user's access */
+    struct cm_aclent *randomACLp;      /* access cache entries */
 
     /* file locks */
     afs_int32    serverLock;    /* current lock we have acquired on
@@ -164,21 +164,21 @@ typedef struct cm_scache {
                                   * ::fileLocks
                                   */
        
-       /* volume info */
-        struct cm_volume *volp;                /* volume info; held reference */
-  
-        /* bulk stat progress */
-        osi_hyper_t bulkStatProgress;  /* track bulk stats of large dirs */
-
-        /* open state */
-        afs_uint16 openReads;          /* open for reading */
-        afs_uint16 openWrites;         /* open for writing */
-        afs_uint16 openShares;         /* open for read excl */
-        afs_uint16 openExcls;          /* open for exclusives */
-
-        /* syncop state */
-        afs_uint32 waitCount;           /* number of threads waiting */
-        afs_uint32 waitRequests;        /* num of thread wait requests */
+    /* volume info */
+    struct cm_volume *volp;            /* volume info; held reference */
+
+    /* bulk stat progress */
+    osi_hyper_t bulkStatProgress;      /* track bulk stats of large dirs */
+
+    /* open state */
+    afs_uint16 openReads;              /* open for reading */
+    afs_uint16 openWrites;             /* open for writing */
+    afs_uint16 openShares;             /* open for read excl */
+    afs_uint16 openExcls;              /* open for exclusives */
+
+    /* syncop state */
+    afs_uint32 waitCount;           /* number of threads waiting */
+    afs_uint32 waitRequests;        /* num of thread wait requests */
 } cm_scache_t;
 
 /* mask field - tell what has been modified */
index d8b1faa1f7c8af3dbbe1e3d575fdeb7d6628171a..8337e66737877c9cc455cef9ebf6af20f7ee89d7 100644 (file)
@@ -41,7 +41,6 @@ void cm_CheckServers(long flags, cm_cell_t *cellp)
     long usecs;
     int doPing;
     int serverType;
-    unsigned long now;
     int wasDown;
     cm_conn_t *connp;
     struct rx_connection * callp;
@@ -54,9 +53,6 @@ void cm_CheckServers(long flags, cm_cell_t *cellp)
         /* now process the server */
         lock_ObtainMutex(&tsp->mx);
 
-        /* what time is it? */
-        now = osi_Time();
-
         serverType = tsp->type;
         doPing = 0;
         wasDown = tsp->flags & CM_SERVERFLAG_DOWN;
@@ -283,9 +279,9 @@ cm_serverRef_t *cm_NewServerRef(cm_server_t *serverp)
     return tsrp;
 }
 
-long cm_ChecksumServerList(cm_serverRef_t *serversp)
+LONG_PTR cm_ChecksumServerList(cm_serverRef_t *serversp)
 {
-    long sum = 0;
+    LONG_PTR sum = 0;
     int first = 1;
     cm_serverRef_t *tsrp;
 
@@ -295,7 +291,7 @@ long cm_ChecksumServerList(cm_serverRef_t *serversp)
             first = 0;
         else
             sum <<= 1;
-        sum ^= (long) tsrp->server;
+        sum ^= (LONG_PTR) tsrp->server;
     }
 
     lock_ReleaseWrite(&cm_serverLock);
index 5643512e0ebfc14b235b2821d9dcd7f20c1dc79e..e6b0952d9dfa9ef47e783b84a65d46ecd28248fd 100644 (file)
@@ -67,7 +67,7 @@ extern cm_server_t *cm_NewServer(struct sockaddr_in *addrp, int type,
 
 extern cm_serverRef_t *cm_NewServerRef(struct cm_server *serverp);
 
-extern long cm_ChecksumServerList(cm_serverRef_t *serversp);
+extern LONG_PTR cm_ChecksumServerList(cm_serverRef_t *serversp);
 
 extern void cm_GetServer(cm_server_t *);
 
index 6d7ba073f51c53579d18e265be66979b55ab9212..6cf8e969a31067a19f517a854b6461b4c68002c4 100644 (file)
@@ -143,7 +143,7 @@ void cm_ReleaseUserVCRef(cm_user_t *userp)
  * This routine is called by the cm_Daemon() ie. the periodic daemon.
  * every cm_daemonTokenCheckInterval seconds 
  */
-void cm_CheckTokenCache(long now)
+void cm_CheckTokenCache(time_t now)
 {
     extern smb_vc_t *smb_allVCsp; /* global vcp list */
     smb_vc_t   *vcp;
index 17453e11a9c91d3a4c5fa33a354414f53a6dfb45..48ea5ba8412873aa6ef0772090441deac8963a9a 100644 (file)
@@ -27,7 +27,7 @@ typedef struct cm_ucell {
     int ticketLen;                     /* by mx */
     struct ktc_encryptionKey sessionKey;/* by mx */
     long kvno;                         /* key version in ticket */
-    long expirationTime;               /* when tix expire */
+    time_t expirationTime;             /* when tix expire */
     int gen;                           /* generation number */
     int iterator;                      /* for use as ListTokens cookie */
     long flags;                                /* flags */
@@ -64,7 +64,7 @@ extern void cm_ReleaseUser(cm_user_t *up);
 
 extern void cm_ReleaseUserVCRef(cm_user_t *up);
 
-extern void cm_CheckTokenCache(long now);
+extern void cm_CheckTokenCache(time_t now);
 
 extern cm_user_t *cm_rootUserp;
 
index 16a7ebee163af3518674e52db7f7863b699576e3..67f781f49535015d9eda0443001f3f86cbef2a38 100644 (file)
@@ -969,7 +969,7 @@ long cm_FollowMountPoint(cm_scache_t *scp, cm_scache_t *dscp, cm_user_t *userp,
     /* parse the volume name */
     mpNamep = scp->mountPointStringp;
     osi_assert(mpNamep[0]);
-    tlen = strlen(scp->mountPointStringp);
+    tlen = (int)strlen(scp->mountPointStringp);
     mtType = *scp->mountPointStringp;
     cellNamep = malloc(tlen);
     volNamep = malloc(tlen);
@@ -1225,7 +1225,7 @@ int cm_ExpandSysName(char *inp, char *outp, long outSize, unsigned int index)
         return -1;
 
     /* otherwise generate the properly expanded @sys name */
-    prefixCount = tp - inp;
+    prefixCount = (int)(tp - inp);
 
     strncpy(outp, inp, prefixCount);   /* copy out "a." from "a.@sys" */
     outp[prefixCount] = 0;             /* null terminate the "a." */
@@ -1303,7 +1303,7 @@ long cm_Unlink(cm_scache_t *dscp, char *namep, cm_user_t *userp, cm_req_t *reqp)
     afsFid.Vnode = dscp->fid.vnode;
     afsFid.Unique = dscp->fid.unique;
 
-    osi_Log1(afsd_logp, "CALL RemoveFile scp 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "CALL RemoveFile scp 0x%p", dscp);
     do {
         code = cm_Conn(&dscp->fid, userp, reqp, &connp);
         if (code) 
@@ -1427,7 +1427,7 @@ long cm_AssembleLink(cm_scache_t *linkScp, char *pathSuffixp,
         *newRootScpp = cm_data.rootSCachep;
         cm_HoldSCache(cm_data.rootSCachep);
     } else if (linkp[0] == '\\' && linkp[1] == '\\') {
-        if (!strnicmp(&linkp[2], cm_NetbiosName, (len = strlen(cm_NetbiosName)))) 
+        if (!strnicmp(&linkp[2], cm_NetbiosName, (len = (long)strlen(cm_NetbiosName)))) 
         {
             char * p = &linkp[len + 3];
             if (strnicmp(p, "all", 3) == 0)
@@ -1446,7 +1446,7 @@ long cm_AssembleLink(cm_scache_t *linkScp, char *pathSuffixp,
             *newRootScpp = NULL;
             code = CM_ERROR_PATH_NOT_COVERED;
         }
-    } else if ( !strnicmp(linkp, "msdfs:", (len = strlen("msdfs:"))) ) {
+    } else if ( !strnicmp(linkp, "msdfs:", (len = (long)strlen("msdfs:"))) ) {
         linkScp->fileType = CM_SCACHETYPE_DFSLINK;
         strcpy(tsp->data, linkp);
         *newRootScpp = NULL;
@@ -1723,7 +1723,7 @@ long cm_EvaluateSymLink(cm_scache_t *dscp, cm_scache_t *linkScp,
     cm_space_t *spacep;
     cm_scache_t *newRootScp;
 
-    osi_Log1(afsd_logp, "Evaluating symlink scp 0x%x", linkScp);
+    osi_Log1(afsd_logp, "Evaluating symlink scp 0x%p", linkScp);
 
     code = cm_AssembleLink(linkScp, "", &newRootScp, &spacep, userp, reqp);
     if (code) 
@@ -1874,7 +1874,7 @@ void cm_TryBulkStat(cm_scache_t *dscp, osi_hyper_t *offsetp, cm_user_t *userp,
     cm_fid_t tfid;
     struct rx_connection * callp;
 
-    osi_Log1(afsd_logp, "cm_TryBulkStat dir 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "cm_TryBulkStat dir 0x%p", dscp);
 
     /* should be on a buffer boundary */
     osi_assert((offsetp->LowPart & (cm_data.buf_blockSize - 1)) == 0);
@@ -2145,7 +2145,7 @@ long cm_SetAttr(cm_scache_t *scp, cm_attr_t *attrp, cm_user_t *userp,
         return code;
 
     /* now make the RPC */
-    osi_Log1(afsd_logp, "CALL StoreStatus scp 0x%x", (long) scp);
+    osi_Log1(afsd_logp, "CALL StoreStatus scp 0x%p", scp);
     do {
         code = cm_Conn(&scp->fid, userp, reqp, &connp);
         if (code) 
@@ -2222,7 +2222,7 @@ long cm_Create(cm_scache_t *dscp, char *namep, long flags, cm_attr_t *attrp,
     cm_StatusFromAttr(&inStatus, NULL, attrp);
 
     /* try the RPC now */
-    osi_Log1(afsd_logp, "CALL CreateFile scp 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "CALL CreateFile scp 0x%p", dscp);
     do {
         code = cm_Conn(&dscp->fid, userp, reqp, &connp);
         if (code) 
@@ -2350,7 +2350,7 @@ long cm_MakeDir(cm_scache_t *dscp, char *namep, long flags, cm_attr_t *attrp,
     cm_StatusFromAttr(&inStatus, NULL, attrp);
 
     /* try the RPC now */
-    osi_Log1(afsd_logp, "CALL MakeDir scp 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "CALL MakeDir scp 0x%p", dscp);
     do {
         code = cm_Conn(&dscp->fid, userp, reqp, &connp);
         if (code) 
@@ -2441,7 +2441,7 @@ long cm_Link(cm_scache_t *dscp, char *namep, cm_scache_t *sscp, long flags,
         return code;
 
     /* try the RPC now */
-    osi_Log1(afsd_logp, "CALL Link scp 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "CALL Link scp 0x%p", dscp);
     do {
         code = cm_Conn(&dscp->fid, userp, reqp, &connp);
         if (code) continue;
@@ -2509,7 +2509,7 @@ long cm_SymLink(cm_scache_t *dscp, char *namep, char *contentsp, long flags,
     cm_StatusFromAttr(&inStatus, NULL, attrp);
 
     /* try the RPC now */
-    osi_Log1(afsd_logp, "CALL Symlink scp 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "CALL Symlink scp 0x%p", dscp);
     do {
         code = cm_Conn(&dscp->fid, userp, reqp, &connp);
         if (code) 
@@ -2591,7 +2591,7 @@ long cm_RemoveDir(cm_scache_t *dscp, char *namep, cm_user_t *userp,
     didEnd = 0;
 
     /* try the RPC now */
-    osi_Log1(afsd_logp, "CALL RemoveDir scp 0x%x", (long) dscp);
+    osi_Log1(afsd_logp, "CALL RemoveDir scp 0x%p", dscp);
     do {
         code = cm_Conn(&dscp->fid, userp, reqp, &connp);
         if (code) 
@@ -2742,8 +2742,8 @@ long cm_Rename(cm_scache_t *oldDscp, char *oldNamep, cm_scache_t *newDscp,
     didEnd = 0;
 
     /* try the RPC now */
-    osi_Log2(afsd_logp, "CALL Rename old scp 0x%x new scp 0x%x", 
-              (long) oldDscp, (long) newDscp);
+    osi_Log2(afsd_logp, "CALL Rename old scp 0x%p new scp 0x%p", 
+              oldDscp, newDscp);
     do {
         code = cm_Conn(&oldDscp->fid, userp, reqp, &connp);
         if (code) 
@@ -3423,7 +3423,7 @@ long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
 
                 lock_ReleaseMutex(&scp->mx);
 
-                osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
+                osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%p", scp);
 
                 do {
                     code = cm_Conn(&cfid, userp, reqp, &connp);
@@ -3465,7 +3465,7 @@ long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
 #else
             newLock = LockWrite;
 #endif
-            osi_Log3(afsd_logp, "CALL SetLock scp 0x%x from %d to %d", (long) scp, (int) scp->serverLock, newLock);
+            osi_Log3(afsd_logp, "CALL SetLock scp 0x%p from %d to %d", scp, (int) scp->serverLock, newLock);
 
             lock_ReleaseMutex(&scp->mx);
 
@@ -3497,8 +3497,8 @@ long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
                 /* am I sane? */
                 osi_assert(newLock == LockRead);
                 
-                osi_Log3(afsd_logp, "CALL SetLock AGAIN scp 0x%x from %d to %d", 
-                         (long) scp, (int) scp->serverLock, newLock);
+                osi_Log3(afsd_logp, "CALL SetLock AGAIN scp 0x%p from %d to %d", 
+                         scp, (int) scp->serverLock, newLock);
 
                 do {
                     code = cm_Conn(&cfid, userp, reqp, &connp);
@@ -3594,8 +3594,8 @@ long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
                 scp->exclusiveLocks++;
         }
 
-        osi_Log2(afsd_logp, "cm_Lock Lock added 0x%x flags 0x%x", (long) fileLock, fileLock->flags);
-        osi_Log4(afsd_logp, "   scp[0x%x] exclusives[%d] shared[%d] serverLock[%d]",
+        osi_Log2(afsd_logp, "cm_Lock Lock added 0x%p flags 0x%x", fileLock, fileLock->flags);
+        osi_Log4(afsd_logp, "   scp[0x%p] exclusives[%d] shared[%d] serverLock[%d]",
                  scp, scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
     }
 
@@ -3620,8 +3620,8 @@ long cm_UnlockByKey(cm_scache_t * scp,
     struct rx_connection * callp;
     int n_unlocks = 0;
 
-    osi_Log3(afsd_logp, "cm_UnlockByKey scp 0x%x key 0x%x:%x",
-             (long) scp, (unsigned long)(key >> 32), (unsigned long)(key & 0xffffffff));
+    osi_Log3(afsd_logp, "cm_UnlockByKey scp 0x%p key 0x%x:%x",
+             scp, (unsigned long)(key >> 32), (unsigned long)(key & 0xffffffff));
 
     lock_ObtainWrite(&cm_scacheLock);
 
@@ -3727,7 +3727,7 @@ long cm_UnlockByKey(cm_scache_t * scp,
 
         lock_ReleaseMutex(&scp->mx);
 
-        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
+        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%p", scp);
 
         do {
             code = cm_Conn(&cfid, userp, reqp, &connp);
@@ -3762,7 +3762,7 @@ long cm_UnlockByKey(cm_scache_t * scp,
         tfid.Unique = scp->fid.unique;
         cfid = scp->fid;
 
-        osi_Log3(afsd_logp, "CALL SetLock scp 0x%x from %d to %d", (long) scp, (int) scp->serverLock, LockRead);
+        osi_Log3(afsd_logp, "CALL SetLock scp 0x%p from %d to %d", scp, (int) scp->serverLock, LockRead);
 
         lock_ReleaseMutex(&scp->mx);
 
@@ -3815,7 +3815,7 @@ long cm_UnlockByKey(cm_scache_t * scp,
 
         lock_ReleaseMutex(&scp->mx);
 
-        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
+        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%p", scp);
 
         do {
             code = cm_Conn(&cfid, userp, reqp, &connp);
@@ -3867,8 +3867,8 @@ long cm_Unlock(cm_scache_t *scp,
     int release_userp = FALSE;
     struct rx_connection * callp;
 
-    osi_Log4(afsd_logp, "cm_Unlock scp 0x%x type 0x%x offset %d length %d",
-             (long) scp, sLockType, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart);
+    osi_Log4(afsd_logp, "cm_Unlock scp 0x%p type 0x%x offset %d length %d",
+             scp, sLockType, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart);
     osi_Log2(afsd_logp, "... key 0x%x:%x",
              (unsigned long) (key >> 32), (unsigned long) (key & 0xffffffff));
 
@@ -3970,7 +3970,7 @@ long cm_Unlock(cm_scache_t *scp,
 
         lock_ReleaseMutex(&scp->mx);
 
-        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
+        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%p", scp);
 
         do {
             code = cm_Conn(&cfid, userp, reqp, &connp);
@@ -4006,7 +4006,7 @@ long cm_Unlock(cm_scache_t *scp,
         tfid.Unique = scp->fid.unique;
         cfid = scp->fid;
 
-        osi_Log3(afsd_logp, "CALL SetLock scp 0x%x from %d to %d", (long) scp, (int) scp->serverLock, LockRead);
+        osi_Log3(afsd_logp, "CALL SetLock scp 0x%p from %d to %d", scp, (int) scp->serverLock, LockRead);
 
         lock_ReleaseMutex(&scp->mx);
 
@@ -4059,7 +4059,7 @@ long cm_Unlock(cm_scache_t *scp,
 
         lock_ReleaseMutex(&scp->mx);
 
-        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
+        osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%p", scp);
 
         do {
             code = cm_Conn(&cfid, userp, reqp, &connp);
@@ -4225,9 +4225,9 @@ void cm_CheckLocks()
                     cfid = scp->fid;
                     userp = fileLock->userp;
                     
-                    osi_Log3(afsd_logp, "CALL ExtendLock lock 0x%x for scp=0x%x with lock %d", 
-                             (long) fileLock,
-                             (long) scp,
+                    osi_Log3(afsd_logp, "CALL ExtendLock lock 0x%p for scp=0x%p with lock %d", 
+                             fileLock,
+                             scp,
                              (int) scp->serverLock);
 
                     lock_ReleaseMutex(&scp->mx);
@@ -4464,7 +4464,7 @@ long cm_RetryLock(cm_file_lock_t *oldFileLock, int client_is_dead)
         newLock = LockWrite;
 #endif
 
-        osi_Log1(afsd_logp, "CALL SetLock lock 0x%x", (long) oldFileLock);
+        osi_Log1(afsd_logp, "CALL SetLock lock 0x%p", oldFileLock);
 
         lock_ReleaseWrite(&cm_scacheLock);
         lock_ReleaseMutex(&scp->mx);
index 5d74150fddaa6665029e413b214cd519b59a5cb9..0aa31fcde573250ca1510d6ca067185bc2258437 100644 (file)
@@ -24,8 +24,8 @@ main(argc, argv)
 {
        int cellNum;
        int rc;
-       int current_time;
-       int tokenExpireTime;
+        time_t current_time;
+        time_t tokenExpireTime;
        char *expireString;
        char userName[100];
        struct ktc_principal serviceName, clientName;
index 2af31c05c5561a082bb876a177d6b029c18b497b..7b000bf2476efbcaf642da67b8bfa6324988f39f 100644 (file)
@@ -344,7 +344,7 @@ Convert(char *arights, int dfs, enum rtype *rtypep)
        *rtypep = destroy; /* Remove entire entry */
        return 0;
     }
-    len = strlen(arights);
+    len = (int)strlen(arights);
     mode = 0;
     for(i=0;i<len;i++) {
         tc = *arights++;
@@ -955,7 +955,7 @@ SetACLCmd(struct cmd_syndesc *as, char *arock)
        }
        blob.in = AclToString(ta);
        blob.out_size=0;
-       blob.in_size = 1+strlen(blob.in);
+       blob.in_size = 1+(long)strlen(blob.in);
        code = pioctl(ti->data, VIOCSETAL, &blob, 1);
        if (code) {
            if (errno == EINVAL) {
@@ -1080,7 +1080,7 @@ CopyACLCmd(struct cmd_syndesc *as, char *arock)
            ChangeList(ta, 0, tp->name, tp->rights);
        blob.in = AclToString(ta);
        blob.out_size=0;
-       blob.in_size = 1+strlen(blob.in);
+       blob.in_size = 1+(long)strlen(blob.in);
        code = pioctl(ti->data, VIOCSETAL, &blob, 1);
        if (code) {
            if (errno == EINVAL) {
@@ -1229,7 +1229,7 @@ CleanACLCmd(struct cmd_syndesc *as, char *arock)
        if (changes) {
            /* now set the acl */
            blob.in=AclToString(ta);
-           blob.in_size = strlen(blob.in)+1;
+           blob.in_size = (long)strlen(blob.in)+1;
            blob.out_size = 0;
            code = pioctl(ti->data, VIOCSETAL, &blob, 1);
            if (code) {
@@ -1458,7 +1458,7 @@ SetVolCmd(struct cmd_syndesc *as, char *arock) {
                 continue;
             }
            strcpy(input,offmsg);
-           blob.in_size += strlen(offmsg);
+           blob.in_size += (long)strlen(offmsg);
            input += strlen(offmsg) + 1;
        } else 
             *(input++) = '\0';
@@ -1469,7 +1469,7 @@ SetVolCmd(struct cmd_syndesc *as, char *arock) {
                 return code;
             }
            strcpy(input,motd);
-           blob.in_size += strlen(motd);
+           blob.in_size += (long)strlen(motd);
            input += strlen(motd) + 1;
        } else 
             *(input++) = '\0';
@@ -1786,7 +1786,7 @@ ListMountCmd(struct cmd_syndesc *as, char *arock)
 #ifdef WIN32
            if (!InAFS(parent_dir)) {
                const char * nbname = NetbiosName();
-               int len = strlen(nbname);
+               int len = (int)strlen(nbname);
 
                if (parent_dir[0] == '\\' && parent_dir[1] == '\\' &&
                    parent_dir[len+2] == '\\' &&
@@ -1816,7 +1816,7 @@ ListMountCmd(struct cmd_syndesc *as, char *arock)
        }
 
        blob.in = last_component;
-       blob.in_size = strlen(last_component)+1;
+       blob.in_size = (long)strlen(last_component)+1;
        blob.out_size = MAXSIZE;
        blob.out = space;
        memset(space, 0, MAXSIZE);
@@ -1886,7 +1886,7 @@ MakeMountCmd(struct cmd_syndesc *as, char *arock)
     if (!InAFS(parent)) {
 #ifdef WIN32
        const char * nbname = NetbiosName();
-       int len = strlen(nbname);
+       int len = (int)strlen(nbname);
 
        if (parent[0] == '\\' && parent[1] == '\\' &&
            parent[len+2] == '\\' &&
@@ -1967,7 +1967,7 @@ MakeMountCmd(struct cmd_syndesc *as, char *arock)
      * have a symlink system call.
      */
     blob.out_size = 0;
-    blob.in_size = 1 + strlen(space);
+    blob.in_size = 1 + (long)strlen(space);
     blob.in = space;
     blob.out = NULL;
     code = pioctl(path, VIOC_AFS_CREATE_MT_PT, &blob, 0);
@@ -2003,14 +2003,14 @@ RemoveMountCmd(struct cmd_syndesc *as, char *arock) {
        if (!tp)
            tp = (char *) strrchr(ti->data, '/');
        if (tp) {
-           strncpy(tbuffer, ti->data, code=tp-ti->data+1);  /* the dir name */
+           strncpy(tbuffer, ti->data, code=(afs_int32)(tp-ti->data+1));  /* the dir name */
             tbuffer[code] = 0;
            tp++;   /* skip the slash */
 
 #ifdef WIN32
            if (!InAFS(tbuffer)) {
                const char * nbname = NetbiosName();
-               int len = strlen(nbname);
+               int len = (int)strlen(nbname);
 
                if (tbuffer[0] == '\\' && tbuffer[1] == '\\' &&
                    tbuffer[len+2] == '\\' &&
@@ -2028,7 +2028,7 @@ RemoveMountCmd(struct cmd_syndesc *as, char *arock) {
             fs_StripDriveLetter(tp, tp, 0);
        }
        blob.in = tp;
-       blob.in_size = strlen(tp)+1;
+       blob.in_size = (long)strlen(tp)+1;
        blob.out = lsbuffer;
        blob.out_size = sizeof(lsbuffer);
        code = pioctl(tbuffer, VIOC_AFS_STAT_MT_PT, &blob, 0);
@@ -2050,7 +2050,7 @@ RemoveMountCmd(struct cmd_syndesc *as, char *arock) {
 
         blob.out_size = 0;
        blob.in = tp;
-       blob.in_size = strlen(tp)+1;
+       blob.in_size = (long)strlen(tp)+1;
        code = pioctl(tbuffer, VIOC_AFS_DELETE_MT_PT, &blob, 0);
        if (code) {
            Die(errno, ti->data);
@@ -2099,7 +2099,7 @@ CheckServersCmd(struct cmd_syndesc *as, char *arock)
            return 1;
        }
        strcpy(checkserv.tbuffer,info.name);
-       checkserv.tsize=strlen(info.name)+1;
+       checkserv.tsize=(int)strlen(info.name)+1;
     } else {
         strcpy(checkserv.tbuffer,"\0");
         checkserv.tsize=0;
@@ -2710,7 +2710,7 @@ SysNameCmd(struct cmd_syndesc *as, char *arock)
     input += sizeof(afs_int32);
     for (; ti; ti = ti->next) {
         setp++;
-        blob.in_size += strlen(ti->data) + 1;
+        blob.in_size += (long)strlen(ti->data) + 1;
         if (blob.in_size > MAXSIZE) {
             fprintf(stderr, "%s: sysname%s too long.\n", pn,
                      setp > 1 ? "s" : "");
@@ -2874,7 +2874,7 @@ GetCellCmd(struct cmd_syndesc *as, char *arock)
             error = 1;
            continue;
        }
-       blob.in_size = 1+strlen(info.name);
+       blob.in_size = 1+(long)strlen(info.name);
        blob.in = info.name;
        code = pioctl(0, VIOC_GETCELLSTATUS, &blob, 1);
        if (code) {
@@ -3037,7 +3037,7 @@ pokeServers(void)
     code = pioctl(0, VIOC_SETSPREFS, &gblob, 1);
 
     ssp = (cm_SSetPref_t *)space;
-    gblob.in_size = ((char *)&(ssp->servers[0])) - (char *)ssp;
+    gblob.in_size = (long)(((char *)&(ssp->servers[0])) - (char *)ssp);
     gblob.in = space;
     return code;
 }
@@ -3207,7 +3207,7 @@ SetPrefCmd(struct cmd_syndesc *as, char * arock)
     ssp = (cm_SSetPref_t *)space;
     ssp->flags = 0;
     ssp->num_servers = 0;
-    gblob.in_size = ((char*)&(ssp->servers[0])) - (char *)ssp;
+    gblob.in_size = (long)(((char*)&(ssp->servers[0])) - (char *)ssp);
     gblob.in = space;
     gblob.out = space;
     gblob.out_size = MAXSIZE;
@@ -3255,7 +3255,7 @@ SetPrefCmd(struct cmd_syndesc *as, char * arock)
         printf("now working on vlservers, code=%d, errno=%d\n",code,errno);
 
     ssp = (cm_SSetPref_t *)space;
-    gblob.in_size = ((char*)&(ssp->servers[0])) - (char *)ssp;
+    gblob.in_size = (long)(((char*)&(ssp->servers[0])) - (char *)ssp);
     gblob.in = space;
     ssp->flags = CM_SPREF_VLONLY;
     ssp->num_servers = 0;
@@ -3904,7 +3904,7 @@ CSCPolicyCmd(struct cmd_syndesc *asp, char *arock)
         if (asp->parms[4].items)
             policy = "disable";
                
-        RegSetValueEx( hkCSCPolicy, share, 0, REG_SZ, policy, strlen(policy)+1);
+        RegSetValueEx( hkCSCPolicy, share, 0, REG_SZ, policy, (DWORD)strlen(policy)+1);
                
         printf("CSC policy on share \"%s\" changed to \"%s\".\n\n", share, policy);
         printf("Close all applications that accessed files on this share or restart AFS Client for the change to take effect.\n"); 
@@ -4205,7 +4205,6 @@ RxStatProcCmd(struct cmd_syndesc *as, char *arock)
     afs_int32 code;
     afs_int32 flags = 0;
     struct ViceIoctl blob;
-    struct cmd_item *ti;
 
     if (as->parms[0].items) {  /* -enable */
        flags |= AFSCALL_RXSTATS_ENABLE;
@@ -4240,7 +4239,6 @@ RxStatPeerCmd(struct cmd_syndesc *as, char *arock)
     afs_int32 code;
     afs_int32 flags = 0;
     struct ViceIoctl blob;
-    struct cmd_item *ti;
 
     if (as->parms[0].items) {  /* -enable */
        flags |= AFSCALL_RXSTATS_ENABLE;
index aca4476db986f54cb76bbcacccdfffcbe6e1ba60..db1a2118090041c23381161c15954eaf424efbfa 100644 (file)
@@ -793,7 +793,11 @@ void smb_UnixTimeFromSearchTime(time_t *unixTimep, afs_uint32 searchTime)
 
 void smb_DosUTimeFromUnixTime(afs_uint32 *dosUTimep, time_t unixTime)
 {
-    *dosUTimep = unixTime - smb_localZero;
+    time_t diff_t = unixTime - smb_localZero;
+#if defined(DEBUG) && !defined(_USE_32BIT_TIME_T)
+    osi_assert(diff_t < _UI32_MAX);
+#endif
+    *dosUTimep = (afs_uint32)diff_t;
 }
 
 void smb_UnixTimeFromDosUTime(time_t *unixTimep, afs_uint32 dosTime)
@@ -980,8 +984,8 @@ smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags)
     for(uidp = vcp->usersp; uidp; uidp = uidp->nextp) {
         if (uid == uidp->userID) {
             uidp->refCount++;
-            osi_LogEvent("AFS smb_FindUID (Find by UID)",NULL," VCP[%x] found-uid[%d] name[%s]",
-                          (int)vcp, uidp->userID, 
+            osi_LogEvent("AFS smb_FindUID (Find by UID)",NULL," VCP[0x%p] found-uid[%d] name[%s]",
+                          vcp, uidp->userID, 
                           osi_LogSaveString(smb_logp, (uidp->unp) ? uidp->unp->name : ""));
             break;
         }
@@ -996,7 +1000,7 @@ smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags)
         vcp->usersp = uidp;
         lock_InitializeMutex(&uidp->mx, "user_t mutex");
         uidp->userID = uid;
-        osi_LogEvent("AFS smb_FindUID (Find by UID)",NULL,"VCP[%x] new-uid[%d] name[%s]",(int)vcp,uidp->userID,(uidp->unp ? uidp->unp->name : ""));
+        osi_LogEvent("AFS smb_FindUID (Find by UID)",NULL,"VCP[0x%p] new-uid[%d] name[%s]",vcp,uidp->userID,(uidp->unp ? uidp->unp->name : ""));
     }
     lock_ReleaseWrite(&smb_rctLock);
     return uidp;
@@ -1038,7 +1042,7 @@ smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern)
             continue;
         if (stricmp(uidp->unp->name, usern) == 0) {
             uidp->refCount++;
-            osi_LogEvent("AFS smb_FindUserByNameThisSession",NULL,"VCP[%x] uid[%d] match-name[%s]",(int)vcp,uidp->userID,usern);
+            osi_LogEvent("AFS smb_FindUserByNameThisSession",NULL,"VCP[0x%x] uid[%d] match-name[%s]",vcp,uidp->userID,usern);
             break;
         } else
             continue;
@@ -1877,9 +1881,9 @@ smb_packet_t *smb_CopyPacket(smb_packet_t *pkt)
     smb_packet_t *tbp;
     tbp = GetPacket();
     memcpy(tbp, pkt, sizeof(smb_packet_t));
-    tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data);
-       if (tbp->vcp)
-               smb_HoldVC(tbp->vcp);
+    tbp->wctp = tbp->data + (unsigned int)(pkt->wctp - pkt->data);
+    if (tbp->vcp)
+       smb_HoldVC(tbp->vcp);
     return tbp;
 }
 
@@ -2238,7 +2242,7 @@ void smb_SendPacket(smb_vc_t *vcp, smb_packet_t *inp)
     extra = 2 * (*inp->wctp);  /* space used by parms, in bytes */
     tp = inp->wctp + 1+ extra; /* points to count of data bytes */
     extra += tp[0] + (tp[1]<<8);
-    extra += ((unsigned int)inp->wctp - (unsigned int)inp->data);      /* distance to last wct field */
+    extra += (unsigned int)(inp->wctp - inp->data);    /* distance to last wct field */
     extra += 3;                        /* wct and length fields */
         
     ncbp->ncb_length = extra;  /* bytes to send */
@@ -2899,7 +2903,7 @@ long smb_ReceiveNegotiate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
         }
 
         /* compute size of protocol entry */
-        entryLength = strlen(namep+1);
+        entryLength = (int)strlen(namep+1);
         entryLength += 2;      /* 0x02 bytes and null termination */
 
         /* advance over this protocol entry */
@@ -3114,7 +3118,7 @@ void smb_WaitingLocksDaemon()
         lock_ObtainWrite(&smb_globalLock);
         nwlRequest = smb_allWaitingLocks;
         if (nwlRequest == NULL) {
-            osi_SleepW((long)&smb_allWaitingLocks, &smb_globalLock);
+            osi_SleepW((LONG_PTR)&smb_allWaitingLocks, &smb_globalLock);
             thrd_Sleep(1000);
             continue;
         } else 
@@ -3981,10 +3985,10 @@ long smb_ReceiveCoreSearchDir(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *ou
             *op++ = resByte;
             memcpy(op, mask, 11); op += 11;
             *op++ = (char) dsp->cookie;        /* they say it must be non-zero */
-            *op++ = nextEntryCookie & 0xff;
-            *op++ = (nextEntryCookie>>8) & 0xff;
-            *op++ = (nextEntryCookie>>16) & 0xff;
-            *op++ = (nextEntryCookie>>24) & 0xff;
+            *op++ = (char)(nextEntryCookie & 0xff);
+            *op++ = (char)((nextEntryCookie>>8) & 0xff);
+            *op++ = (char)((nextEntryCookie>>16) & 0xff);
+            *op++ = (char)((nextEntryCookie>>24) & 0xff);
             memcpy(op, &clientCookie, 4); op += 4;
 
             /* now we emit the attribute.  This is sort of tricky,
@@ -4085,8 +4089,8 @@ long smb_ReceiveCoreSearchDir(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *ou
      */
     temp -= 3;         /* deduct vbl block info */
     osi_assert(temp == (43 * returnedNames));
-    origOp[1] = temp & 0xff;
-    origOp[2] = (temp>>8) & 0xff;
+    origOp[1] = (char)(temp & 0xff);
+    origOp[2] = (char)((temp>>8) & 0xff);
     if (returnedNames == 0) 
         smb_DeleteDirSearch(dsp);
     smb_ReleaseDirSearch(dsp);
@@ -6795,11 +6799,11 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
                 code = smb_ReceiveCoreWriteRaw (vcp, inp, outp,
                                                  rwcp);
             else {
-                osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp 0x%x lana %d lsn %d",(int)vcp,vcp->lana,vcp->lsn);
-                osi_Log4(smb_logp,"Dispatch %s vcp 0x%x lana %d lsn %d",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn);
+                osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp 0x%p lana %d lsn %d",vcp,vcp->lana,vcp->lsn);
+                osi_Log4(smb_logp,"Dispatch %s vcp 0x%p lana %d lsn %d",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn);
                 code = (*(dp->procp)) (vcp, inp, outp);
                 osi_LogEvent("AFS Dispatch return",NULL,"Code 0x%x",code);
-                osi_Log4(smb_logp,"Dispatch return  code 0x%x vcp 0x%x lana %d lsn %d",code,vcp,vcp->lana,vcp->lsn);
+                osi_Log4(smb_logp,"Dispatch return  code 0x%x vcp 0x%p lana %d lsn %d",code,vcp,vcp->lana,vcp->lsn);
 #ifdef LOG_PACKET
                 if ( code == CM_ERROR_BADSMB ||
                      code == CM_ERROR_BADOP )
@@ -6954,7 +6958,7 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
         /* tp now points to the new output record; go back and patch the
          * second parameter (off2) to point to the new record.
          */
-        temp = (unsigned int)tp - ((unsigned int) outp->data);
+        temp = (unsigned int)(tp - outp->data);
         outWctp[3] = (unsigned char) (temp & 0xff);
         outWctp[4] = (unsigned char) ((temp >> 8) & 0xff);
         outWctp[2] = 0;        /* padding */
@@ -7189,7 +7193,7 @@ void smb_ServerWaiter(void *parmp)
  */
 void smb_Server(VOID *parmp)
 {
-    int myIdx = (int) parmp;
+    INT_PTR myIdx = (INT_PTR) parmp;
     NCB *ncbp;
     NCB *outncbp;
     smb_packet_t *bufp;
@@ -7697,7 +7701,7 @@ void smb_Listener(void *parmp)
     dos_ptr dos_ncb;
     time_t now;
 #endif /* DJGPP */
-    int lana = (int) parmp;
+    INT_PTR lana = (INT_PTR) parmp;
 
     ncbp = GetNCB();
 #ifdef DJGPP
@@ -7717,14 +7721,14 @@ void smb_Listener(void *parmp)
         ncbp->ncb_sto = 0;     /* No send timeout */
 
         /* pad out with spaces instead of null termination */
-        len = strlen(smb_localNamep);
+        len = (long)strlen(smb_localNamep);
         strncpy(ncbp->ncb_name, smb_localNamep, NCBNAMSZ);
         for (i=len; i<NCBNAMSZ; i++) ncbp->ncb_name[i] = ' ';
         
         strcpy(ncbp->ncb_callname, "*");
         for (i=1; i<NCBNAMSZ; i++) ncbp->ncb_callname[i] = ' ';
         
-        ncbp->ncb_lana_num = lana;
+        ncbp->ncb_lana_num = (UCHAR)lana;
 
 #ifndef DJGPP
         code = Netbios(ncbp);
@@ -8099,7 +8103,7 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
 {
     thread_t phandle;
     int lpid;
-    int i;
+    INT_PTR i;
     int len;
     struct tm myTime;
 #ifdef DJGPP
@@ -8139,7 +8143,7 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
     smb_logp = logp;
         
     /* remember the name */
-    len = strlen(snamep);
+    len = (int)strlen(snamep);
     smb_localNamep = malloc(len+1);
     strcpy(smb_localNamep, snamep);
     afsi_log("smb_localNamep is >%s<", smb_localNamep);
@@ -8235,7 +8239,7 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
         smb_ServerShutdown[i] = thrd_CreateEvent(NULL, FALSE, FALSE, eventName);
         if ( GetLastError() == ERROR_ALREADY_EXISTS )
             afsi_log("Event Object Already Exists: %s", eventName);
-        InitNCBslot(i+1);
+        InitNCBslot((int)(i+1));
     }
     numNCBs = smb_NumServerThreads + 1;
 
@@ -8354,7 +8358,7 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
         LSA_OPERATIONAL_MODE dummy; /*junk*/
 
         afsProcessName.Buffer = "OpenAFSClientDaemon";
-        afsProcessName.Length = strlen(afsProcessName.Buffer);
+        afsProcessName.Length = (USHORT)strlen(afsProcessName.Buffer);
         afsProcessName.MaximumLength = afsProcessName.Length + 1;
 
         nts = LsaRegisterLogonProcess(&afsProcessName, &smb_lsaHandle, &dummy);
@@ -8363,7 +8367,7 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
             LSA_STRING packageName;
             /* we are registered. Find out the security package id */
             packageName.Buffer = MSV1_0_PACKAGE_NAME;
-            packageName.Length = strlen(packageName.Buffer);
+            packageName.Length = (USHORT)strlen(packageName.Buffer);
             packageName.MaximumLength = packageName.Length + 1;
             nts = LsaLookupAuthenticationPackage(smb_lsaHandle, &packageName , &smb_lsaSecPackage);
             if (nts == STATUS_SUCCESS) {
@@ -8406,10 +8410,10 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
                 /* END - code from Larry */
 
                 smb_lsaLogonOrigin.Buffer = "OpenAFS";
-                smb_lsaLogonOrigin.Length = strlen(smb_lsaLogonOrigin.Buffer);
+                smb_lsaLogonOrigin.Length = (USHORT)strlen(smb_lsaLogonOrigin.Buffer);
                 smb_lsaLogonOrigin.MaximumLength = smb_lsaLogonOrigin.Length + 1;
             } else {
-                afsi_log("Can't determine security package name for NTLM!! NTSTATUS=[%l]",nts);
+                afsi_log("Can't determine security package name for NTLM!! NTSTATUS=[%lX]",nts);
 
                 /* something went wrong. We report the error and revert back to no authentication
                 because we can't perform any auth requests without a successful lsa handle
@@ -8418,7 +8422,7 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
                 smb_authType = SMB_AUTH_NONE;
             }
         } else {
-            afsi_log("Can't register logon process!! NTSTATUS=[%l]",nts);
+            afsi_log("Can't register logon process!! NTSTATUS=[%lX]",nts);
 
             /* something went wrong. We report the error and revert back to no authentication
             because we can't perform any auth requests without a successful lsa handle
@@ -8540,7 +8544,7 @@ void smb_Shutdown(void)
         /*fprintf(stderr, "NCBHANGUP session %d LSN %d\n", i, LSNs[i]);*/
         ncbp->ncb_command = NCBHANGUP;
         ncbp->ncb_lana_num = lanas[i];  /*smb_LANadapter;*/
-        ncbp->ncb_lsn = LSNs[i];
+        ncbp->ncb_lsn = (UCHAR)LSNs[i];
 #ifndef DJGPP
         code = Netbios(ncbp);
 #else
@@ -8722,34 +8726,34 @@ int smb_DumpVCP(FILE *outputFile, char *cookie, int lock)
         lock_ObtainRead(&smb_rctLock);
   
     sprintf(output, "begin dumping smb_vc_t\n");
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
 
     for (vcp = smb_allVCsp; vcp; vcp=vcp->nextp) 
     {
         smb_fid_t *fidp;
       
-        sprintf(output, "%s vcp=0x%08X, refCount=%d, flags=%d, vcID=%d, lsn=%d, uidCounter=%d, tidCounter=%d, fidCounter=%d\n",
+        sprintf(output, "%s vcp=0x%p, refCount=%d, flags=%d, vcID=%d, lsn=%d, uidCounter=%d, tidCounter=%d, fidCounter=%d\n",
                  cookie, vcp, vcp->refCount, vcp->flags, vcp->vcID, vcp->lsn, vcp->uidCounter, vcp->tidCounter, vcp->fidCounter);
-        WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+        WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
       
         sprintf(output, "begin dumping smb_fid_t\n");
-        WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+        WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
 
         for (fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q))
         {
-            sprintf(output, "%s -- smb_fidp=0x%08X, refCount=%d, fid=%d, vcp=0x%08X, scp=0x%08X, ioctlp=0x%08X, NTopen_pathp=%s, NTopen_wholepathp=%s\n", 
+            sprintf(output, "%s -- smb_fidp=0x%p, refCount=%d, fid=%d, vcp=0x%p, scp=0x%p, ioctlp=0x%p, NTopen_pathp=%s, NTopen_wholepathp=%s\n", 
                      cookie, fidp, fidp->refCount, fidp->fid, fidp->vcp, fidp->scp, fidp->ioctlp, 
                      fidp->NTopen_pathp ? fidp->NTopen_pathp : "NULL", 
                      fidp->NTopen_wholepathp ? fidp->NTopen_wholepathp : "NULL");
-            WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+            WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
         }
       
         sprintf(output, "done dumping smb_fid_t\n");
-        WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+        WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
     }
 
     sprintf(output, "done dumping smb_vc_t\n");
-    WriteFile(outputFile, output, strlen(output), &zilch, NULL);
+    WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
   
     if (lock)
         lock_ReleaseRead(&smb_rctLock);
index c40c707e1a4623d88d8e4351ed13076060c35350..b3736394569588ef819c3c02de78f90d619d3192 100644 (file)
@@ -386,7 +386,7 @@ typedef struct smb_dirSearch {
     unsigned long refCount;            /* reference count */
     long cookie;                       /* value returned to the caller */
     struct cm_scache *scp;             /* vnode of the dir we're searching */
-    unsigned long lastTime;            /* last time we used this (osi_Time) */
+    time_t lastTime;                   /* last time we used this (osi_Time) */
     long flags;                                /* flags (see below);
                                         * locked by smb_globalLock */
     unsigned short attribute;          /* search attribute
index fd98701ad35bffbd1a2e10f56a0563a93b0f0327..10d58a82ab68b949c2f859d62a0d60979709af1d 100644 (file)
@@ -531,19 +531,19 @@ long smb_AuthenticateUserLM(smb_vc_t *vcp, char * accountName, char * primaryDom
        
     lmAuth.lmlogon.LogonDomainName.Buffer = lmAuth.primaryDomainW;
     mbstowcs(lmAuth.primaryDomainW, primaryDomain, P_LEN);
-    lmAuth.lmlogon.LogonDomainName.Length = wcslen(lmAuth.primaryDomainW) * sizeof(WCHAR);
+    lmAuth.lmlogon.LogonDomainName.Length = (USHORT)(wcslen(lmAuth.primaryDomainW) * sizeof(WCHAR));
     lmAuth.lmlogon.LogonDomainName.MaximumLength = P_LEN * sizeof(WCHAR);
 
     lmAuth.lmlogon.UserName.Buffer = lmAuth.accountNameW;
     mbstowcs(lmAuth.accountNameW, accountName, P_LEN);
-    lmAuth.lmlogon.UserName.Length = wcslen(lmAuth.accountNameW) * sizeof(WCHAR);
+    lmAuth.lmlogon.UserName.Length = (USHORT)(wcslen(lmAuth.accountNameW) * sizeof(WCHAR));
     lmAuth.lmlogon.UserName.MaximumLength = P_LEN * sizeof(WCHAR);
 
     lmAuth.lmlogon.Workstation.Buffer = lmAuth.workstationW;
     lmAuth.lmlogon.Workstation.MaximumLength = (MAX_COMPUTERNAME_LENGTH + 1) * sizeof(WCHAR);
     size = MAX_COMPUTERNAME_LENGTH + 1;
     GetComputerNameW(lmAuth.workstationW, &size);
-    lmAuth.lmlogon.Workstation.Length = wcslen(lmAuth.workstationW) * sizeof(WCHAR);
+    lmAuth.lmlogon.Workstation.Length = (USHORT)(wcslen(lmAuth.workstationW) * sizeof(WCHAR));
 
     memcpy(lmAuth.lmlogon.ChallengeToClient, vcp->encKey, MSV1_0_CHALLENGE_LENGTH);
 
@@ -563,8 +563,8 @@ long smb_AuthenticateUserLM(smb_vc_t *vcp, char * accountName, char * primaryDom
     lmAuth.tgroups.Groups[0].Sid = NULL;
     lmAuth.tgroups.Groups[0].Attributes = 0;
 
-    lmAuth.tsource.SourceIdentifier.HighPart = 0;
-    lmAuth.tsource.SourceIdentifier.LowPart = (DWORD) vcp;
+    lmAuth.tsource.SourceIdentifier.HighPart = (DWORD)((LONG_PTR)vcp << 32);
+    lmAuth.tsource.SourceIdentifier.LowPart = (DWORD)((LONG_PTR)vcp & _UI32_MAX);
     strcpy(lmAuth.tsource.SourceName,"OpenAFS"); /* 8 char limit */
 
     nts = LsaLogonUser( smb_lsaHandle,
@@ -869,8 +869,8 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
         uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
         lock_ObtainMutex(&uidp->mx);
         uidp->unp = unp;
-        osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",(int)vcp,vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, usern));
-        osi_Log4(smb_logp,"smb_ReceiveV3SessionSetupX MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d]",vcp,vcp->lana,vcp->lsn,newUid);
+        osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%p],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",vcp,vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, usern));
+        osi_Log4(smb_logp,"smb_ReceiveV3SessionSetupX MakeNewUser:VCP[%p],Lana[%d],lsn[%d],userid[%d]",vcp,vcp->lana,vcp->lsn,newUid);
         lock_ReleaseMutex(&uidp->mx);
         smb_ReleaseUID(uidp);
     }
@@ -1377,15 +1377,15 @@ long smb_ReceiveV3Trans(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
         rapOp = asp->parmsp[0];
 
         if ( rapOp >= 0 && rapOp < SMB_RAP_NOPCODES && smb_rapDispatchTable[rapOp].procp) {
-            osi_LogEvent("AFS-Dispatch-RAP[%s]",myCrt_RapDispatch(rapOp),"vcp[%x] lana[%d] lsn[%d]",(int)vcp,vcp->lana,vcp->lsn);
-            osi_Log4(smb_logp,"AFS Server - Dispatch-RAP %s vcp[%x] lana[%d] lsn[%d]",myCrt_RapDispatch(rapOp),vcp,vcp->lana,vcp->lsn);
+            osi_LogEvent("AFS-Dispatch-RAP[%s]",myCrt_RapDispatch(rapOp),"vcp[%p] lana[%d] lsn[%d]",vcp,vcp->lana,vcp->lsn);
+            osi_Log4(smb_logp,"AFS Server - Dispatch-RAP %s vcp[%p] lana[%d] lsn[%d]",myCrt_RapDispatch(rapOp),vcp,vcp->lana,vcp->lsn);
             code = (*smb_rapDispatchTable[rapOp].procp)(vcp, asp, outp);
             osi_LogEvent("AFS-Dispatch-RAP return",myCrt_RapDispatch(rapOp),"Code 0x%x",code);
             osi_Log4(smb_logp,"AFS Server - Dispatch-RAP return  code 0x%x vcp[%x] lana[%d] lsn[%d]",code,vcp,vcp->lana,vcp->lsn);
         }
         else {
-            osi_LogEvent("AFS-Dispatch-RAP [invalid]", NULL, "op[%x] vcp[%x] lana[%d] lsn[%d]", rapOp, vcp, vcp->lana, vcp->lsn);
-            osi_Log4(smb_logp,"AFS Server - Dispatch-RAP [INVALID] op[%x] vcp[%x] lana[%d] lsn[%d]", rapOp, vcp, vcp->lana, vcp->lsn);
+            osi_LogEvent("AFS-Dispatch-RAP [invalid]", NULL, "op[%x] vcp[%p] lana[%d] lsn[%d]", rapOp, vcp, vcp->lana, vcp->lsn);
+            osi_Log4(smb_logp,"AFS Server - Dispatch-RAP [INVALID] op[%x] vcp[%p] lana[%d] lsn[%d]", rapOp, vcp, vcp->lana, vcp->lsn);
             code = CM_ERROR_BADOP;
         }
 
@@ -1551,7 +1551,7 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
 
     cm_ReleaseUser(userp);
 
-    nShares = rootShares.cShare + nRegShares + allSubmount;
+    nShares = (USHORT)(rootShares.cShare + nRegShares + allSubmount);
 
 #define REMARK_LEN 1
     outParmsTotal = 8; /* 4 dwords */
@@ -1574,7 +1574,7 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
 
     if (allSubmount) {
         strcpy( shares[cshare].shi1_netname, "all" );
-        shares[cshare].shi1_remark = cstrp - outp->datap;
+        shares[cshare].shi1_remark = (DWORD)(cstrp - outp->datap);
         /* type and pad are zero already */
         cshare++;
         cstrp+=REMARK_LEN;
@@ -1587,7 +1587,7 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
             if (rv == ERROR_SUCCESS && strlen(thisShare) && (!allSubmount || stricmp(thisShare,"all"))) {
                 strncpy(shares[cshare].shi1_netname, thisShare, sizeof(shares->shi1_netname)-1);
                 shares[cshare].shi1_netname[sizeof(shares->shi1_netname)-1] = 0; /* unfortunate truncation */
-                shares[cshare].shi1_remark = cstrp - outp->datap;
+                shares[cshare].shi1_remark = (DWORD)(cstrp - outp->datap);
                 cshare++;
                 cstrp+=REMARK_LEN;
             }
@@ -1612,7 +1612,7 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
         }
 
         strcpy(shares[cshare].shi1_netname, rootShares.shares[i].shi0_netname);
-        shares[cshare].shi1_remark = cstrp - outp->datap;
+        shares[cshare].shi1_remark = (DWORD)(cstrp - outp->datap);
         cshare++;
         cstrp+=REMARK_LEN;
     }
@@ -1622,7 +1622,7 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
     outp->parmsp[2] = cshare;
     outp->parmsp[3] = nShares;
 
-    outp->totalData = cstrp - outp->datap;
+    outp->totalData = (int)(cstrp - outp->datap);
     outp->totalParms = outParmsTotal;
 
     smb_SendTran2Packet(vcp, outp, op);
@@ -1717,16 +1717,16 @@ long smb_ReceiveRAPNetShareGetInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_pack
         smb_rap_share_info_1_t * info = (smb_rap_share_info_1_t *) outp->datap;
         strncpy(info->shi1_netname, shareName, sizeof(info->shi1_netname)-1);
         info->shi1_netname[sizeof(info->shi1_netname)-1] = 0;
-        info->shi1_remark = ((unsigned char *) (info + 1)) - outp->datap;
+        info->shi1_remark = (DWORD)(((unsigned char *) (info + 1)) - outp->datap);
         /* type and pad are already zero */
     } else { /* infoLevel==2 */
         smb_rap_share_info_2_t * info = (smb_rap_share_info_2_t *) outp->datap;
         strncpy(info->shi2_netname, shareName, sizeof(info->shi2_netname)-1);
         info->shi2_netname[sizeof(info->shi2_netname)-1] = 0;
-        info->shi2_remark = ((unsigned char *) (info + 1)) - outp->datap;
+        info->shi2_remark = (DWORD)(((unsigned char *) (info + 1)) - outp->datap);
         info->shi2_permissions = ACCESS_ALL;
         info->shi2_max_uses = (unsigned short) -1;
-        info->shi2_path = 1 + (((unsigned char *) (info + 1)) - outp->datap);
+        info->shi2_path = (DWORD)(1 + (((unsigned char *) (info + 1)) - outp->datap));
     }
 
     outp->totalData = totalData;
@@ -1906,7 +1906,7 @@ long smb_ReceiveRAPNetServerGetInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_pac
         cstrp += smb_ServerCommentLen;
     }
 
-    totalData = cstrp - outp->datap;
+    totalData = (DWORD)(cstrp - outp->datap);
     outp->totalData = min(bufsize,totalData); /* actual data size */
     outp->parmsp[0] = (outp->totalData == totalData)? 0 : ERROR_MORE_DATA;
     outp->parmsp[2] = totalData;
@@ -2017,13 +2017,13 @@ long smb_ReceiveV3Tran2A(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
 
         /* now dispatch it */
         if ( asp->opcode >= 0 && asp->opcode < 20 && smb_tran2DispatchTable[asp->opcode].procp) {
-            osi_LogEvent("AFS-Dispatch-2[%s]",myCrt_2Dispatch(asp->opcode),"vcp[%x] lana[%d] lsn[%d]",(int)vcp,vcp->lana,vcp->lsn);
-            osi_Log4(smb_logp,"AFS Server - Dispatch-2 %s vcp[%x] lana[%d] lsn[%d]",myCrt_2Dispatch(asp->opcode),vcp,vcp->lana,vcp->lsn);
+            osi_LogEvent("AFS-Dispatch-2[%s]",myCrt_2Dispatch(asp->opcode),"vcp[%p] lana[%d] lsn[%d]",vcp,vcp->lana,vcp->lsn);
+            osi_Log4(smb_logp,"AFS Server - Dispatch-2 %s vcp[%p] lana[%d] lsn[%d]",myCrt_2Dispatch(asp->opcode),vcp,vcp->lana,vcp->lsn);
             code = (*smb_tran2DispatchTable[asp->opcode].procp)(vcp, asp, outp);
         }
         else {
-            osi_LogEvent("AFS-Dispatch-2 [invalid]", NULL, "op[%x] vcp[%x] lana[%d] lsn[%d]", asp->opcode, vcp, vcp->lana, vcp->lsn);
-            osi_Log4(smb_logp,"AFS Server - Dispatch-2 [INVALID] op[%x] vcp[%x] lana[%d] lsn[%d]", asp->opcode, vcp, vcp->lana, vcp->lsn);
+            osi_LogEvent("AFS-Dispatch-2 [invalid]", NULL, "op[%x] vcp[%p] lana[%d] lsn[%d]", asp->opcode, vcp, vcp->lana, vcp->lsn);
+            osi_Log4(smb_logp,"AFS Server - Dispatch-2 [INVALID] op[%x] vcp[%p] lana[%d] lsn[%d]", asp->opcode, vcp, vcp->lana, vcp->lsn);
             code = CM_ERROR_BADOP;
         }
 
@@ -2949,7 +2949,7 @@ long smb_ReceiveTran2QFileInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
             name = fidp->NTopen_wholepathp;
         else
             name = "\\";       /* probably can't happen */
-        len = strlen(name);
+        len = (unsigned long)strlen(name);
         outp->totalData = (len*2) + 4; /* this is actually what we want to return */
         *((u_long *)op) = len * 2; op += 4;
         mbstowcs((unsigned short *)op, name, len); op += (len * 2);
@@ -4301,7 +4301,7 @@ long smb_ReceiveTran2SearchDir(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
                     strcpy(op + 70, shortName);
                     if (smb_StoreAnsiFilenames)
                         CharToOem(op + 70, op + 70);
-                    *(op + 68) = shortNameEnd - shortName;
+                    *(op + 68) = (char)(shortNameEnd - shortName);
                 }
             }
 
@@ -4971,8 +4971,8 @@ long smb_ReceiveV3LockingX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
             osi_QAdd((osi_queue_t **) &wlRequest->locks,
                      &wLock->q);
 
-            osi_Log1(smb_logp, "smb_ReceiveV3Locking WaitingLock created 0x%x",
-                     (long) wLock);
+            osi_Log1(smb_logp, "smb_ReceiveV3Locking WaitingLock created 0x%p",
+                     wLock);
 
             code = 0;
             continue;
@@ -5032,7 +5032,7 @@ long smb_ReceiveV3LockingX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
             lock_ObtainWrite(&smb_globalLock);
             osi_QAdd((osi_queue_t **)&smb_allWaitingLocks,
                      &wlRequest->q);
-            osi_Wakeup((long) &smb_allWaitingLocks);
+            osi_Wakeup((LONG_PTR)&smb_allWaitingLocks);
             lock_ReleaseWrite(&smb_globalLock);
 
             /* don't send reply immediately */
@@ -5826,10 +5826,10 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
             tp = strchr(pp, '\\');
             if (!tp) {
                 strcpy(cp,pp);
-                clen = strlen(cp);
+                clen = (int)strlen(cp);
                 isLast = 1; /* indicate last component.  the supplied path never ends in a slash */
             } else {
-                clen = tp - pp;
+                clen = (int)(tp - pp);
                 strncpy(cp,pp,clen);
                 *(cp + clen) = 0;
                 tp++;
@@ -6944,11 +6944,11 @@ void smb_NotifyChange(DWORD action, DWORD notifyFilter,
         if (filename == NULL)
             parmCount = 0;
         else {
-            nameLen = strlen(filename);
+            nameLen = (ULONG)strlen(filename);
             parmCount = 3*4 + nameLen*2;
             parmCount = (parmCount + 3) & ~3;  /* pad to 4 */
             if (twoEntries) {
-                otherNameLen = strlen(otherFilename);
+                otherNameLen = (ULONG)strlen(otherFilename);
                 oldParmCount = parmCount;
                 parmCount += 3*4 + otherNameLen*2;
                 parmCount = (parmCount + 3) & ~3; /* pad to 4 */
index 072bb1fccc1518191a9a5f330bec02b13fdacfee..cce66350d679edd2bf9ebdb5f150db9173fab9f0 100644 (file)
@@ -207,7 +207,7 @@ long smb_IoctlRead(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
                return code;
         }
 
-       leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
+       leftToCopy = (long)((iop->outDatap - iop->outAllocp) - iop->outCopied);
         if (count > leftToCopy) count = leftToCopy;
         
         /* now set the parms for a read of count bytes */
@@ -329,7 +329,7 @@ long smb_IoctlV3Read(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_pack
                return code;
     }
 
-       leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
+       leftToCopy = (long)((iop->outDatap - iop->outAllocp) - iop->outCopied);
     if (count > leftToCopy) count = leftToCopy;
         
        /* 0 and 1 are reserved for request chaining, were setup by our caller,
@@ -428,7 +428,7 @@ long smb_IoctlReadRaw(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
                return code;
        }
 
-       leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
+       leftToCopy = (long)((iop->outDatap - iop->outAllocp) - iop->outCopied);
 
        ncbp = outp->ncbp;
        memset((char *)ncbp, 0, sizeof(NCB));
index 86b576e0891255c9f68eb24990c9b495d61160ea..179efd443faf97a6ed7f171c2ca76f5f412816e0 100644 (file)
@@ -364,7 +364,7 @@ register struct cmd_syndesc *as; {
 #ifdef WIN32
            if (!InAFS(parent_dir)) {
                const char * nbname = NetbiosName();
-               int len = strlen(nbname);
+               int len = (int)strlen(nbname);
 
                if (parent_dir[0] == '\\' && parent_dir[1] == '\\' &&
                    parent_dir[len+2] == '\\' &&
@@ -394,7 +394,7 @@ register struct cmd_syndesc *as; {
            continue;
        }
        blob.in = last_component;
-       blob.in_size = strlen(last_component)+1;
+       blob.in_size = (long)strlen(last_component)+1;
        blob.out_size = MAXSIZE;
        blob.out = space;
        memset(space, 0, MAXSIZE);
@@ -433,7 +433,7 @@ register struct cmd_syndesc *as; {
     if (!InAFS(parent)) {
 #ifdef WIN32
        const char * nbname = NetbiosName();
-       int len = strlen(nbname);
+       int len = (int)strlen(nbname);
 
        if (parent[0] == '\\' && parent[1] == '\\' &&
            parent[len+2] == '\\' &&
@@ -464,7 +464,7 @@ register struct cmd_syndesc *as; {
      * have a symlink system call.
      */
     blob.out_size = 0;
-    blob.in_size = 1 + strlen(as->parms[1].items->data);
+    blob.in_size = 1 + (long)strlen(as->parms[1].items->data);
     blob.in = as->parms[1].items->data;
     blob.out = NULL;
     code = pioctl(path, VIOC_SYMLINK, &blob, 0);
@@ -499,14 +499,14 @@ register struct cmd_syndesc *as; {
        if (!tp)
            tp = (char *) strrchr(ti->data, '/');
        if (tp) {
-           strncpy(tbuffer, ti->data, code=tp-ti->data+1);  /* the dir name */
+           strncpy(tbuffer, ti->data, code=(afs_int32)(tp-ti->data+1));  /* the dir name */
             tbuffer[code] = 0;
            tp++;   /* skip the slash */
 
 #ifdef WIN32
            if (!InAFS(tbuffer)) {
                const char * nbname = NetbiosName();
-               int len = strlen(nbname);
+               int len = (int)strlen(nbname);
 
                if (tbuffer[0] == '\\' && tbuffer[1] == '\\' &&
                     tbuffer[len+2] == '\\' &&
@@ -525,7 +525,7 @@ register struct cmd_syndesc *as; {
             fs_StripDriveLetter(tp, tp, 0);
        }
        blob.in = tp;
-       blob.in_size = strlen(tp)+1;
+       blob.in_size = (int)strlen(tp)+1;
        blob.out = lsbuffer;
        blob.out_size = sizeof(lsbuffer);
        code = pioctl(tbuffer, VIOC_LISTSYMLINK, &blob, 0);
@@ -546,7 +546,7 @@ register struct cmd_syndesc *as; {
 
        blob.out_size = 0;
        blob.in = tp;
-       blob.in_size = strlen(tp)+1;
+       blob.in_size = (long)strlen(tp)+1;
        code = pioctl(tbuffer, VIOC_DELSYMLINK, &blob, 0);
        if (code) {
            Die(errno, ti->data);
index 522230e70e1dfed3e6d2c10b6d9009d1ec2f0af2..e9089dfcb413c0438d7ccebfc37657aa65a426f1 100644 (file)
@@ -28,6 +28,7 @@ EXELIBS = \
 
 $(EXEFILE) : $(EXEOBJS)
        $(EXEGUILINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
index 0eac2d7292196a52691913c38f12dd754d5f6f77..278e5ce38a17e3941c099f352a24f848c950354d 100644 (file)
@@ -90,23 +90,23 @@ typedef struct readdir_data readdir_data_t;
 
 
 /* upcalls */
-uc_namei(WCHAR *name, ULONG *fid);
-uc_check_access(ULONG fid, ULONG access, ULONG *granted);
-uc_create(WCHAR *str, ULONG attribs, LARGE_INTEGER alloc, ULONG access, ULONG *granted, ULONG *fid);
-uc_stat(ULONG fid, ULONG *attribs, LARGE_INTEGER *size, LARGE_INTEGER *creation, LARGE_INTEGER *access, LARGE_INTEGER *change, LARGE_INTEGER *written);
-uc_setinfo(ULONG fid, ULONG attribs, LARGE_INTEGER creation, LARGE_INTEGER access, LARGE_INTEGER change, LARGE_INTEGER written);
-uc_trunc(ULONG fid, LARGE_INTEGER size);
-uc_read(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *read, char *data);
-uc_write(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *written, char *data);
-uc_readdir(ULONG fid, LARGE_INTEGER cookie_in, WCHAR *filter, ULONG *count, char *data, ULONG *len);
-uc_close(ULONG fid);
-uc_unlink(WCHAR *name);
-uc_ioctl_write(ULONG length, char *data, ULONG *key);
-uc_ioctl_read(ULONG key, ULONG *length, char *data);
-uc_rename(ULONG fid, WCHAR *curr, WCHAR *new_dir, WCHAR *new_name, ULONG *new_fid);
-uc_flush(ULONG fid);
+long uc_namei(WCHAR *name, ULONG *fid);
+long uc_check_access(ULONG fid, ULONG access, ULONG *granted);
+long uc_create(WCHAR *str, ULONG attribs, LARGE_INTEGER alloc, ULONG access, ULONG *granted, ULONG *fid);
+long uc_stat(ULONG fid, ULONG *attribs, LARGE_INTEGER *size, LARGE_INTEGER *creation, LARGE_INTEGER *access, LARGE_INTEGER *change, LARGE_INTEGER *written);
+long uc_setinfo(ULONG fid, ULONG attribs, LARGE_INTEGER creation, LARGE_INTEGER access, LARGE_INTEGER change, LARGE_INTEGER written);
+long uc_trunc(ULONG fid, LARGE_INTEGER size);
+long uc_read(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *read, char *data);
+long uc_write(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *written, char *data);
+long uc_readdir(ULONG fid, LARGE_INTEGER cookie_in, WCHAR *filter, ULONG *count, char *data, ULONG_PTR *len);
+long uc_close(ULONG fid);
+long uc_unlink(WCHAR *name);
+long uc_ioctl_write(ULONG length, char *data, ULONG_PTR *key);
+long uc_ioctl_read(ULONG_PTR key, ULONG *length, char *data);
+long uc_rename(ULONG fid, WCHAR *curr, WCHAR *new_dir, WCHAR *new_name, ULONG *new_fid);
+long uc_flush(ULONG fid);
 
 
 /* downcalls */
-dc_break_callback(ULONG fid);
-dc_release_hooks();
+long dc_break_callback(ULONG fid);
+long dc_release_hooks();
index ffe63508e47d4210a17a006af626b7418f192a61..3bd5bf1425a85ef1a05d03b0a5d3d5e3b332f848 100644 (file)
@@ -249,7 +249,7 @@ StringDataWrite(const char *keyName, const char *valueName, const char *data)
     if (status == ERROR_SUCCESS) {
        status = RegSetValueEx(key,
                               valueName,
-                              0, REG_SZ, data, strlen(data) + 1);
+                              0, REG_SZ, data, (DWORD)strlen(data) + 1);
 
        (void)RegCloseKey(key);
     }
index eafcd7fec31da2485e8c5aa6e55d1c91db5652bc..a980ca8fd6f3a270cac8ed6244a4390201f471f0 100644 (file)
@@ -21,6 +21,7 @@
 #include "syscfg.h"
 
 static int IsLoopback(char * guid);
+int syscfg_GetIFInfo_2000(int *count, int *addrs, int *masks, int *mtus, int *flags);
 
 /* syscfg_GetIFInfo
  *
@@ -44,9 +45,6 @@ static int IsLoopback(char * guid);
 int syscfg_GetIFInfo(int *count, int *addrs, int *masks, int *mtus, int *flags)
 {
     PMIB_IPADDRTABLE pIpAddrTable = NULL;
-    ULONG            dwSize;
-    DWORD            code;
-    DWORD            index;
     DWORD            validAddrs = 0;
 
     int maxCount = *count;
@@ -390,7 +388,7 @@ static int GetIP(HKEY skey, char *ifname, int *addr, int *mask)
     DWORD dwLease;
     DWORD dwSize;
 
-    len = strlen(ifname) + 1 + sizeof(AFSREG_IPSRV_ADAPTER_PARAM_SUBKEY);
+    len = (int) strlen(ifname) + 1 + sizeof(AFSREG_IPSRV_ADAPTER_PARAM_SUBKEY);
     s = malloc(len);
     if (!s)
        return -1;
@@ -405,7 +403,7 @@ static int GetIP(HKEY skey, char *ifname, int *addr, int *mask)
 
     dwSize = sizeof(DWORD);
     status = RegQueryValueEx(key, "EnableDHCP", NULL,
-                            &valType, &dwDHCP, &dwSize);
+                            &valType, (LPBYTE) &dwDHCP, &dwSize);
     if (status || (valType != REG_DWORD))
         dwDHCP = 0;
 
@@ -428,7 +426,7 @@ static int GetIP(HKEY skey, char *ifname, int *addr, int *mask)
        /* adapter configured via DHCP; address/mask in alternate values */
         dwSize = sizeof(DWORD);
         status = RegQueryValueEx(key, "Lease", NULL,
-                                 &valType, &dwLease, &dwSize);
+                                 &valType, (LPBYTE)&dwLease, &dwSize);
         if (status || (valType != REG_DWORD) || dwLease == 0) {
             (void) RegCloseKey(key);
             return -1;
index 62b8749bfc0a627ad4e5a5dde5d8cbf3351851cb..991974652251c43158160221e5aa93acca78b3f8 100644 (file)
@@ -12,9 +12,11 @@ test tests: $(OUT)\getifinfo.exe $(OUT)\regman.exe $(OUT)\dupkey.exe
 
 $(OUT)\getifinfo.exe: $(OUT)\getifinfo.obj $(DESTDIR)\lib\afs\afsreg.lib 
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\dupkey.exe: $(OUT)\dupkey.obj $(DESTDIR)\lib\afs\afsreg.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 REGMAN_EXELIBS =\
        $(DESTDIR)\lib\afs\afsreg.lib \
@@ -24,6 +26,7 @@ REGMAN_EXELIBS =\
 
 $(OUT)\regman.exe: $(OUT)\regman.obj $(REGMAN_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 9cb3f1d0a6d84aed81b7d9727749bddee03302ad..951c59bb82d4f66d14ecf623aa2de82b4127299c 100644 (file)
@@ -245,7 +245,7 @@ vpt_AddEntry(const struct vptab *vptabp)
        if (status == ERROR_SUCCESS) {
            /* write partition attributes */
            status = RegSetValueEx(vpKey, AFSREG_SVR_SVC_AFSTAB_DEVNAME_VALUE,
-                                  0, REG_SZ, vpDev, strlen(vpDev) + 1);
+                                  0, REG_SZ, vpDev, (DWORD)strlen(vpDev) + 1);
 
            RegCloseKey(vpKey);
        }
index 8ce0056b99a101ee2c6e50ff8aab1ce5e1ae882a..6b494b185991592b3c4bfb031f860ff6a870bfc2 100644 (file)
@@ -63,6 +63,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS) 
        $(EXEGUILINK)  $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)     
 
 
index f02231f9a86f60a05dd84531ece4ca27d84d9791..2f92ecc56920f67199abd010615b944b7b8c4611 100644 (file)
@@ -28,6 +28,7 @@ DEFFILE = afssvrcpa.def
 
 $(DLLFILE): $(DLLOBJS)
        $(DLLGUILINK)  $(DLLLIBS) /DEF:$(DEFFILE)
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 
index cbe226b564b6c57bb429b650a22443d3f261472b..f109f90a17ec6b7b4cb42eddf6a9ce09e8d87e11 100644 (file)
@@ -105,6 +105,7 @@ EXELIBS = \
 
 $(EXEFILE) : $(EXEOBJS) $(EXELIBS)
        $(EXEGUILINK) $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 lang ::
index ae0c9d2cf28220d1b0168957897dc49cdbec5a51..c45ab114fef32ebe9bb52b8a5fd1e130d5170c61 100644 (file)
@@ -1426,13 +1426,13 @@ void Action_Refresh_SetSection (HWND hDlg, BOOL fStart, int idSection)
 {
    // Are we ending a section that we don't care about?
    //
-   if ((!fStart) && (idSection != (int)GetWindowLong (hDlg, DWL_USER)))
+   if ((!fStart) && (idSection != (int)GetWindowLongPtr (hDlg, DWLP_USER)))
       return;
 
    if (!fStart)
       idSection = -1;  // ending a section means new section = -1 (invalid)
 
-   SetWindowLong (hDlg, DWL_USER, idSection);
+   SetWindowLongPtr (hDlg, DWLP_USER, idSection);
    EnableWindow (GetDlgItem (hDlg, IDC_REFRESH_SKIP), (idSection == -1) ? FALSE : TRUE);
 }
 
@@ -1440,7 +1440,7 @@ void Action_Refresh_SetSection (HWND hDlg, BOOL fStart, int idSection)
 void Action_Refresh_SkipSection (HWND hDlg)
 {
    int idSection;
-   if ((idSection = (int)GetWindowLong (hDlg, DWL_USER)) != -1)
+   if ((idSection = (int)GetWindowLongPtr (hDlg, DWLP_USER)) != -1)
       {
       AfsClass_SkipRefresh (idSection);
       Action_Refresh_SetSection (hDlg, FALSE, idSection);
@@ -1704,7 +1704,7 @@ BOOL CALLBACK Action_OpenCell_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
    static int iFrameLast = 0;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    switch (msg)
       {
index eadbd139a991835507f8edad6ab7257345247008..f4e7c3cf514454339eb4574d20c1ae2490e8a787 100644 (file)
@@ -96,9 +96,9 @@ BOOL CALLBACK Aggregates_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -162,7 +162,7 @@ BOOL CALLBACK Aggregates_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM
 
 void Aggregates_General_OnInitDialog (HWND hDlg)
 {
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    TCHAR szSvrName[ cchNAME ];
    TCHAR szAggName[ cchNAME ];
@@ -188,7 +188,7 @@ void Aggregates_General_OnApply (HWND hDlg)
    LPAGG_PROP_APPLY_PACKET lpp;
    if ((lpp = New (AGG_PROP_APPLY_PACKET)) != NULL)
       {
-      lpp->lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+      lpp->lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
       lpp->fIDC_AGG_WARNALLOC = IsDlgButtonChecked (hDlg, IDC_AGG_WARNALLOC);
       lpp->fIDC_AGG_WARN = IsDlgButtonChecked (hDlg, IDC_AGG_WARN);
       lpp->fIDC_AGG_WARN_AGGFULL_DEF = IsDlgButtonChecked (hDlg, IDC_AGG_WARN_AGGFULL_DEF);
@@ -228,7 +228,7 @@ void Aggregates_General_OnWarnings (HWND hDlg)
 
 void Aggregates_General_OnEndTask_InitDialog (HWND hDlg, LPTASKPACKET ptp)
 {
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    if (!ptp->rc)
       {
@@ -317,7 +317,7 @@ void Aggregates_General_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
 {
    if (!ptp->rc)
       {
-      LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+      LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
       TCHAR szSvrName[ cchNAME ];
       TCHAR szAggName[ cchNAME ];
index a4ac9150d7c38aec308b152937eaa6b005cf8c36..ce6ea592279de3e6e70e98c5a06dbaa95c40721f 100644 (file)
@@ -64,7 +64,7 @@ BOOL CALLBACK Aggregates_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          ResizeWindow (hDlg, awdAggregates, rwaMoveToHere, &rTab);
 
          FL_RestoreView (GetDlgItem (hDlg, IDC_AGG_LIST), &gr.viewAgg);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, (DWORD)&gr.viewAgg);
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, &gr.viewAgg);
 
          Aggregates_SubclassList (hDlg);
          }
@@ -188,7 +188,7 @@ void Aggregates_OnNotifyFromDispatch (LPNOTIFYSTRUCT lpns)
 }
 
 
-static LONG procAggregatesList = 0;
+static UINT_PTR procAggregatesList = 0;
 
 LRESULT CALLBACK Aggregates_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -203,7 +203,7 @@ LRESULT CALLBACK Aggregates_SubclassListProc (HWND hList, UINT msg, WPARAM wp, L
       {
       case WM_DESTROY:
          if (procAggregatesList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procAggregatesList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procAggregatesList);
          break;
 
       case WM_COMMAND:
@@ -221,8 +221,8 @@ LRESULT CALLBACK Aggregates_SubclassListProc (HWND hList, UINT msg, WPARAM wp, L
 void Aggregates_SubclassList (HWND hDlg)
 {
    HWND hList = GetDlgItem (hDlg, IDC_AGG_LIST);
-   procAggregatesList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Aggregates_SubclassListProc);
+   procAggregatesList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Aggregates_SubclassListProc);
 }
 
 
index ce02c2e518871a83f5a7b581f8b9243c027ec415..2d7f1b136ff50605646c89f66c63a7dea91da133 100644 (file)
@@ -82,8 +82,8 @@ typedef struct
          } aiBADCREDS;
 
          struct {
-            ULONG ckAllocated;
-            ULONG ckCapacity;
+            size_t ckAllocated;
+            size_t ckCapacity;
          } aiOVERALLOC;
 
          struct {
index c86bd8e84ede4d83e5833d06d944fbeb0a0cd339..03c15c116b6165337dd64f576c27d3d82f55df22 100644 (file)
@@ -135,10 +135,10 @@ BOOL CALLBACK Columns_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
    ShowColumnsParams *pscp;
-   pscp = (ShowColumnsParams *)GetWindowLong (hDlg, DWL_USER);
+   pscp = (ShowColumnsParams *)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -306,7 +306,7 @@ void Columns_OnSelShown (HWND hDlg)
       }
    else
       {
-      int iAvail = LB_GetData (hList, ii);
+      int iAvail = (int) LB_GetData (hList, ii);
       EnableWindow (GetDlgItem (hDlg, IDC_COL_DELETE), (iAvail != 0));
 
       int ci = (int)SendMessage (hList, LB_GETCOUNT, 0, 0);
index b7cc625d701597a334f59eed9a6169f1d95bcf53..c0adbaa6fb5ea9b1171cc1e6164c63c884a0e09b 100644 (file)
@@ -193,7 +193,7 @@ void OpenCell_OnCellChange (HWND hDlg, BOOL fMoveCaret)
 {
    HWND hCombo = GetDlgItem (hDlg, IDC_MON_SUBSET);
    CB_StartChange (hCombo, TRUE);
-   int iSel = 0;
+   size_t iSel = 0;
    BOOL fAddedAny = FALSE;
 
    TCHAR szCell[ cchNAME ];
@@ -334,7 +334,7 @@ BOOL CALLBACK OpenCellDlg_Hook (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          switch (LOWORD(wp))
             {
             case IDOK:
-               OpenCellDlg_Hook_OnOK (hDlg, (LPOPENCELLDLG_PARAMS)GetWindowLong (hDlg, DWL_USER));
+               OpenCellDlg_Hook_OnOK (hDlg, (LPOPENCELLDLG_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER));
                return TRUE;
 
             case IDC_OPENCELL_CELL:
index dae9a376075a645098eb37d85784bef11b306061..17329254ea438b36fa85054c40676906bf06c5ff 100644 (file)
@@ -507,7 +507,7 @@ void Display_Aggregates_Internal_Clean (LPDISPLAYREQUEST pdr)
          {
          size_t iMax = SendMessage (pdr->hList, CB_GETCOUNT, 0, 0);
 
-         for (size_t iItem = 0; iItem < iMax; )
+         for (UINT iItem = 0; iItem < iMax; )
             {
             BOOL fDelete = FALSE;
 
@@ -773,7 +773,7 @@ void Display_Filesets_Internal_Clean (LPDISPLAYREQUEST pdr)
          {
          size_t iMax = SendMessage (pdr->hList, CB_GETCOUNT, 0, 0);
 
-         for (size_t iItem = 0; iItem < iMax; )
+         for (UINT iItem = 0; iItem < iMax; )
             {
             BOOL fDelete = FALSE;
 
index b8da0dae6c2fd80f4c7fb9e5ed8431ba74109233..80e2ac96520d8b42b9e4b7dadf48164c1722abc1 100644 (file)
@@ -74,7 +74,7 @@ BOOL DisplayQueueFilter (size_t idqVictim, size_t idqKiller);
  *
  */
 
-BOOL CALLBACK GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, DWORD dwCookie)
+BOOL CALLBACK GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, UINT_PTR dwCookie)
 { 
    LPVIEWINFO lpvi = (LPVIEWINFO)dwCookie;
    LPIDENT lpi = (LPIDENT)(pfln->item.lParam);
@@ -697,7 +697,7 @@ BOOL HandleColumnNotify (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp, LPVIEWINFO p
 {
    if (msg == WM_NOTIFY)
       {
-      HWND hList = GetDlgItem (hDlg, ((LPNMHDR)lp)->idFrom);
+      HWND hList = GetDlgItem (hDlg, (int)((LPNMHDR)lp)->idFrom);
       if (fIsFastList (hList))
          {
          switch (((LPNMHDR)lp)->code)
index eb2c7cc32af1537807e15616f2bb107680cf15e8..6fd7bb1c560b4fad521bf6f05e009f19abdbf4c1 100644 (file)
@@ -54,7 +54,7 @@ typedef struct
 
 ICONVIEW Display_GetServerIconView (void);
 
-BOOL CALLBACK GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, DWORD dwCookie);
+BOOL CALLBACK GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, UINT_PTR dwCookie);
 
 /*
  *** HandleColumnNotify
index 058e3d673f5c346763ee15791dfb84b39fbd1eb9..e973849e6f3d6491e03378c59fd44b91f97b4488 100644 (file)
@@ -284,7 +284,7 @@ BOOL Help_FindCommand_OnOK (HWND hDlg)
 
    LPTSTR pszKeyword = Help_FindCommand_Search (&uu, szText);
 
-   for (size_t ii = 0; (iiDisplay == -1) && ii < nCOMMANDS; ++ii)
+   for (int ii = 0; (iiDisplay == -1) && ii < nCOMMANDS; ++ii)
       {
       TCHAR szCommand[ cchRESOURCE ];
       GetString (szCommand, aCOMMANDS[ ii ].ids);
@@ -464,7 +464,7 @@ void Help_FindError_Shrink (HWND hDlg, BOOL fShrink)
 BOOL CALLBACK Help_About_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
 void Help_About_OnInitDialog (HWND hDlg);
 void Help_About_OnSysCommand (HWND hDlg, int &cmd);
-LONG procAbout;
+LONG_PTR procAbout;
 
 void Help_About (void)
 {
@@ -519,15 +519,15 @@ BOOL CALLBACK Help_About_Proc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          SetTimer (GetParent(hDlg), 1000, 1000/8, NULL);
          }
       }
-   return CallWindowProc ((WNDPROC)procAbout, hDlg, msg, wp, lp);
+   return CallWindowProc ((WNDPROC)procAbout, hDlg, msg, wp, lp)?TRUE:FALSE;
 }
 
 
 void Help_About_OnInitDialog (HWND hDlg)
 {
    HWND hAbout = GetDlgItem (hDlg, IDOK);
-   procAbout = (LONG)GetWindowLong (hAbout, GWL_WNDPROC);
-   SetWindowLong (hAbout, GWL_WNDPROC, (LONG)Help_About_Proc);
+   procAbout = GetWindowLongPtr (hAbout, GWLP_WNDPROC);
+   SetWindowLongPtr (hAbout, GWLP_WNDPROC, (LONG_PTR)Help_About_Proc);
 
    LPTSTR pszText = FormatString (IDS_HELPABOUT_DESC1);
    SetDlgItemText (hDlg, IDC_HELPABOUT_DESC, pszText);
index 2363acdec92456cea8fbf476be75dd3006cf2723..d787e3fb19e6cf0f8ea19473fa6b870bc67d0bd5 100644 (file)
@@ -149,13 +149,13 @@ void ErasePreferences (LPTSTR pszCell, LPTSTR pszServer)
       else
          {
          TCHAR szFound[ MAX_PATH ];
-         for (size_t ii = 0; RegEnumKey (hk, ii, szFound, MAX_PATH) == 0; ++ii)
+         for (int ii = 0; RegEnumKey (hk, ii, szFound, MAX_PATH) == 0; ++ii)
             {
             if (lstrncmpi (szFound, pszDelete, lstrlen(pszDelete)))
                continue;
 
             if (RegDeltreeKey (hk, szFound))
-               ii = (size_t)-1; // restart search
+               ii = -1; // restart search
             }
          }
 
index 59151b82a4293dd0ff3fbe5d5a2352cc63425079..c3411927b87c6c208e7180db1c72298481fee446 100644 (file)
@@ -43,9 +43,9 @@ BOOL CALLBACK Problems_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -77,7 +77,7 @@ BOOL CALLBACK Problems_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          if ((HWND)lp == GetDlgItem (hDlg, IDC_PROBLEM_TEXT))
             {
             SetBkColor ((HDC)wp, GetSysColor (COLOR_WINDOW));
-            return (BOOL)CreateSolidBrush (GetSysColor (COLOR_WINDOW));
+            return CreateSolidBrush (GetSysColor (COLOR_WINDOW))?TRUE:FALSE;
             }
          break;
 
@@ -230,7 +230,7 @@ void Problems_OnRefresh (HWND hDlg, LPIDENT lpi)
          si.cbSize = sizeof(si);
          si.fMask = SIF_RANGE | SIF_POS | SIF_PAGE;
          si.nMin = 0;
-         si.nMax = nAlerts-1;
+         si.nMax = (int)(nAlerts-1);
          si.nPage = 1;
          si.nPos = 0;
          si.nTrackPos = 0;
index b0dbc3fe64ab5833af895e78ddc1782ad7a0a539..e80fdd6ebad0bf7a53e6a9a247edb1821fe9242a 100644 (file)
@@ -51,7 +51,7 @@ void Filesets_Clone (LPIDENT lpi)
    memset (pcsp, 0x00, sizeof(SET_CLONESYS_PARAMS));
    pcsp->lpi = (lpi == NULL) ? g.lpiCell : lpi;
 
-   int rc;
+   INT_PTR rc;
    if (pcsp->lpi && pcsp->lpi->fIsFileset())
       rc = ModalDialogParam (IDD_SET_CLONE, NULL, (DLGPROC)Filesets_Clone_DlgProc, (LPARAM)pcsp);
    else
@@ -81,9 +81,9 @@ BOOL CALLBACK Filesets_Clone_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   LPSET_CLONESYS_PARAMS pcsp = (LPSET_CLONESYS_PARAMS)GetWindowLong (hDlg, DWL_USER);
+   LPSET_CLONESYS_PARAMS pcsp = (LPSET_CLONESYS_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER);
 
    if (pcsp != NULL)
       {
@@ -138,9 +138,9 @@ BOOL CALLBACK Filesets_Clonesys_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   LPSET_CLONESYS_PARAMS pcsp = (LPSET_CLONESYS_PARAMS)GetWindowLong (hDlg, DWL_USER);
+   LPSET_CLONESYS_PARAMS pcsp = (LPSET_CLONESYS_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER);
 
    if (pcsp != NULL)
       {
index 49337811b5f56b1eac13f737f858a65912ba9211..e64a498f0c023a94983a4dd40cef01e8f89c7f9d 100644 (file)
@@ -51,7 +51,7 @@ void Filesets_Create (LPIDENT lpiParent)
 
    // Show the Create dialog.
    //
-   int rc = ModalDialogParam (IDD_SET_CREATE, GetActiveWindow(), (DLGPROC)Filesets_Create_DlgProc, (LPARAM)pscp);
+   INT_PTR rc = ModalDialogParam (IDD_SET_CREATE, GetActiveWindow(), (DLGPROC)Filesets_Create_DlgProc, (LPARAM)pscp);
 
    if (rc != IDOK)
       {
@@ -89,7 +89,7 @@ BOOL CALLBACK Filesets_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
       switch (msg)
          {
          case WM_INITDIALOG:
-            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, (DWORD)&gr.viewAggCreate);
+            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, &gr.viewAggCreate);
             Filesets_Create_OnInitDialog (hDlg, pscp);
             break;
 
@@ -208,7 +208,7 @@ BOOL CALLBACK Filesets_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
 }
 
 
-static LONG procFilesetsCreateList = 0;
+static LONG_PTR procFilesetsCreateList = 0;
 
 LRESULT CALLBACK Filesets_Create_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -223,7 +223,7 @@ LRESULT CALLBACK Filesets_Create_SubclassListProc (HWND hList, UINT msg, WPARAM
       {
       case WM_DESTROY:
          if (procFilesetsCreateList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procFilesetsCreateList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procFilesetsCreateList);
          break;
 
       case WM_COMMAND: 
@@ -244,8 +244,8 @@ void Filesets_Create_OnInitDialog (HWND hDlg, LPSET_CREATE_PARAMS pscp)
 {
    HWND hList = GetDlgItem (hDlg, IDC_AGG_LIST);
    if (procFilesetsCreateList == 0)
-      procFilesetsCreateList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Filesets_Create_SubclassListProc);
+      procFilesetsCreateList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Filesets_Create_SubclassListProc);
 
    if (gr.viewAggCreate.lvsView == 0)  // never initialized this?
       {
@@ -302,7 +302,7 @@ void Filesets_Create_StartDisplay_Aggregates (HWND hDlg, LPIDENT *plpiTarget)
    if (*plpiTarget && ((*plpiTarget)->GetServer() != lpiServerNew))
       *plpiTarget = NULL;
 
-   SetWindowLong (hDlg, DWL_USER, (LONG)lpiServerNew);
+   SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)lpiServerNew);
 
    LPAGG_ENUM_TO_LISTVIEW_PACKET lpp = New (AGG_ENUM_TO_LISTVIEW_PACKET);
    lpp->lpiServer = lpiServerNew;
@@ -344,7 +344,7 @@ void Filesets_Create_OnEndTask_FindQuotaLimits (HWND hDlg, LPTASKPACKET ptp, LPS
    HWND hQuota = GetDlgItem (hDlg, IDC_SET_QUOTA);
    if (!fHasSpinner (hQuota))
       {
-      CreateSpinner (hQuota, 10, FALSE, cMin, cNow, cMax);
+      CreateSpinner (hQuota, 10, FALSE, (DWORD)cMin, (DWORD)cNow, (DWORD)cMax);
       }
    else
       {
index c5b275eae2b7fec36f276f125ca334e655e6e926..9cd3a14c65b049a904e99176115ca3fbea4a0319 100644 (file)
@@ -43,7 +43,7 @@ void Filesets_CreateReplica (LPIDENT lpiSource, LPIDENT lpiTarget)
    pscp->lpiSource = lpiSource;
    pscp->lpiTarget = lpiTarget;
 
-   int rc = ModalDialogParam (IDD_SET_CREATEREP, NULL, (DLGPROC)Filesets_CreateReplica_DlgProc, (LPARAM)pscp);
+   INT_PTR rc = ModalDialogParam (IDD_SET_CREATEREP, NULL, (DLGPROC)Filesets_CreateReplica_DlgProc, (LPARAM)pscp);
    if (rc != IDOK)
       {
       Delete (pscp);
@@ -76,7 +76,7 @@ BOOL CALLBACK Filesets_CreateReplica_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LP
       switch (msg)
          {
          case WM_INITDIALOG:
-            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, (DWORD)&gr.viewAggMove);
+            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, &gr.viewAggMove);
             Filesets_CreateReplica_OnInitDialog (hDlg, pscp);
             break;
 
@@ -165,7 +165,7 @@ BOOL CALLBACK Filesets_CreateReplica_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LP
 }
 
 
-static LONG procFilesetsCreateReplicaList = 0;
+static LONG_PTR procFilesetsCreateReplicaList = 0;
 
 LRESULT CALLBACK Filesets_CreateReplica_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -174,13 +174,13 @@ LRESULT CALLBACK Filesets_CreateReplica_SubclassListProc (HWND hList, UINT msg,
    if (procFilesetsCreateReplicaList == 0)
       rc = DefWindowProc (hList, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procFilesetsCreateReplicaList, hList, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procFilesetsCreateReplicaList, hList, msg, wp, lp);
 
    switch (msg)
       {
       case WM_DESTROY:
          if (procFilesetsCreateReplicaList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procFilesetsCreateReplicaList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)procFilesetsCreateReplicaList);
          break;
 
       case WM_COMMAND: 
@@ -214,8 +214,8 @@ void Filesets_CreateReplica_OnInitDialog (HWND hDlg, LPSET_CREATEREP_PARAMS pscp
 
    HWND hList = GetDlgItem (hDlg, IDC_AGG_LIST);
    if (procFilesetsCreateReplicaList == 0)
-      procFilesetsCreateReplicaList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Filesets_CreateReplica_SubclassListProc);
+      procFilesetsCreateReplicaList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Filesets_CreateReplica_SubclassListProc);
 
    if (gr.viewAggMove.lvsView == 0) // never initialized this?
       {
@@ -244,7 +244,7 @@ void Filesets_CreateReplica_OnSelectServer (HWND hDlg, LPIDENT *plpiTarget)
 {
    LPIDENT lpiServerNew = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SET_SERVER));
 
-   SetWindowLong (hDlg, DWL_USER, (LONG)lpiServerNew);
+   SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)lpiServerNew);
 
    if (*plpiTarget && (*plpiTarget)->fIsServer())
       *plpiTarget = NULL;
index b67507253cd832fe1ff2f61939d3d561ddc40cc8..68bdfa6b62c1663cdf494aed627f01c436456b55 100644 (file)
@@ -59,8 +59,8 @@ BOOL CALLBACK Filesets_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
 {
    LPSET_DELETE_PARAMS psdp;
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
-   if ((psdp = (LPSET_DELETE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
+   if ((psdp = (LPSET_DELETE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       if (AfsAppLib_HandleHelp (psdp->iddHelp, hDlg, msg, wp, lp))
          return TRUE;
@@ -111,7 +111,7 @@ BOOL CALLBACK Filesets_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
 
          case WM_DESTROY:
             PropCache_Delete (hDlg);
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             psdp = NULL;
             break;
          }
index e8579cd2e8bf7103b9bb9426fb1aa4ab3dcaecd7..31b6198c1607871164e868516e506cf57b316925 100644 (file)
@@ -43,7 +43,7 @@ void Filesets_Dump (LPIDENT lpi)
    memset (psdp, 0x00, sizeof(SET_DUMP_PARAMS));
    psdp->lpi = lpi;
 
-   int rc = ModalDialogParam (IDD_SET_DUMP, NULL, (DLGPROC)Filesets_Dump_DlgProc, (LPARAM)psdp);
+   INT_PTR rc = ModalDialogParam (IDD_SET_DUMP, NULL, (DLGPROC)Filesets_Dump_DlgProc, (LPARAM)psdp);
 
    if (rc != IDOK)
       {
index f8fd061e36ff10059aff4a3c8c933fd4f8350592..c82b86661fabbd67c413ab10409f43f5a1a5de7c 100644 (file)
@@ -44,7 +44,7 @@ void Filesets_ShowMoveTo (LPIDENT lpiSource, LPIDENT lpiTarget)
    psmp->lpiSource = lpiSource;
    psmp->lpiTarget = lpiTarget;
 
-   int rc = ModalDialogParam (IDD_SET_MOVETO, GetActiveWindow(), (DLGPROC)Filesets_MoveTo_DlgProc, (LPARAM)psmp);
+   INT_PTR rc = ModalDialogParam (IDD_SET_MOVETO, GetActiveWindow(), (DLGPROC)Filesets_MoveTo_DlgProc, (LPARAM)psmp);
    if (rc != IDOK)
       {
       Delete (psmp);
@@ -77,7 +77,7 @@ BOOL CALLBACK Filesets_MoveTo_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
       switch (msg)
          {
          case WM_INITDIALOG:
-            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, (DWORD)&gr.viewAggMove);
+            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, &gr.viewAggMove);
             Filesets_MoveTo_OnInitDialog (hDlg, psmp);
             StartTask (taskSET_MOVETO_INIT, hDlg, psmp->lpiSource);
             break;
@@ -169,7 +169,7 @@ BOOL CALLBACK Filesets_MoveTo_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
 }
 
 
-static LONG procFilesetsMoveToList = 0;
+static LONG_PTR procFilesetsMoveToList = 0;
 
 LRESULT CALLBACK Filesets_MoveTo_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -178,13 +178,13 @@ LRESULT CALLBACK Filesets_MoveTo_SubclassListProc (HWND hList, UINT msg, WPARAM
    if (procFilesetsMoveToList == 0)
       rc = DefWindowProc (hList, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procFilesetsMoveToList, hList, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procFilesetsMoveToList, hList, msg, wp, lp);
 
    switch (msg)
       {
       case WM_DESTROY:
          if (procFilesetsMoveToList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procFilesetsMoveToList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procFilesetsMoveToList);
          break;
 
       case WM_COMMAND: 
@@ -205,8 +205,8 @@ void Filesets_MoveTo_OnInitDialog (HWND hDlg, LPSET_MOVE_PARAMS psmp)
 {
    HWND hList = GetDlgItem (hDlg, IDC_AGG_LIST);
    if (procFilesetsMoveToList == 0)
-      procFilesetsMoveToList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Filesets_MoveTo_SubclassListProc);
+      procFilesetsMoveToList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Filesets_MoveTo_SubclassListProc);
 
    if (gr.viewAggMove.lvsView == 0) // never initialized this?
       {
@@ -259,7 +259,7 @@ void Filesets_MoveTo_OnSelectServer (HWND hDlg, LPIDENT *plpiTarget)
 {
    LPIDENT lpiServerNew = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_MOVESET_SERVER));
 
-   SetWindowLong (hDlg, DWL_USER, (LONG)lpiServerNew);
+   SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)lpiServerNew);
 
    if (*plpiTarget && (*plpiTarget)->fIsServer())
       *plpiTarget = NULL;
index 85114fa17a1b52e0fc47f6fcd041f7c4af339086..723578df873635f1a8b7b6598bc008cbf1145ecc 100644 (file)
@@ -91,9 +91,9 @@ BOOL CALLBACK Filesets_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
index e7d562ce09707438129abb8efc444c87bb7f2a7d..3f0fbe1f052cf37ee90fcd026e695ec8a0dc7bb3 100644 (file)
@@ -55,7 +55,7 @@ size_t Filesets_PickQuota (LPIDENT lpiFileset)
    memset (&ssp, 0x00, sizeof(ssp));
    ssp.lpiFileset = lpiFileset;
 
-   int rc = ModalDialogParam (IDD_SET_SETQUOTA, GetActiveWindow(), (DLGPROC)Filesets_SetQuota_DlgProc, (LPARAM)&ssp);
+   INT_PTR rc = ModalDialogParam (IDD_SET_SETQUOTA, GetActiveWindow(), (DLGPROC)Filesets_SetQuota_DlgProc, (LPARAM)&ssp);
    if (rc != IDOK)
       return 0;
    else
@@ -198,7 +198,7 @@ void Filesets_SetQuota_OnEndTask_InitDialog (HWND hDlg, LPTASKPACKET ptp, LPSET_
       EnableWindow (GetDlgItem (hDlg, IDC_SET_QUOTA), TRUE);
 
       if (!fBeenHereBefore)
-         CreateSpinner (GetDlgItem (hDlg, IDC_SET_QUOTA), 10, FALSE, cMin, cNow, cMax);
+         CreateSpinner (GetDlgItem (hDlg, IDC_SET_QUOTA), 10, FALSE, (int)cMin, (int)cNow, (int)cMax);
       else
          {
          SP_SetRange (GetDlgItem (hDlg, IDC_SET_QUOTA), cMin, cMax);
index 50238c1082cf8cdbb0774a527b00b1ff17336d87..cdde93303f0edae4b6ed957e1bcc33a64dc39c7c 100644 (file)
@@ -59,10 +59,10 @@ BOOL CALLBACK Filesets_Release_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPIDENT lpi;
-   if ((lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
index fd37966cf93869c6cc10fe9164cbe32dcf19b4da..674633ea2e356558052f3a4038b3f9151e659ba9 100644 (file)
@@ -66,7 +66,7 @@ void Filesets_OnEndTask_ShowRename (LPTASKPACKET ptp)
       memset (psrp, 0x00, sizeof(SET_RENAME_APPLY_PARAMS));
       psrp->lpiFileset = lpp->lpiRW;
 
-      int rc = ModalDialogParam (IDD_SET_RENAME, GetActiveWindow(), (DLGPROC)Filesets_Rename_DlgProc, (LPARAM)psrp);
+      INT_PTR rc = ModalDialogParam (IDD_SET_RENAME, GetActiveWindow(), (DLGPROC)Filesets_Rename_DlgProc, (LPARAM)psrp);
       if (rc != IDOK)
          {
          Delete (psrp);
index 4556bc9cb6cb416249c8fcace7d88c5c8fb9021d..722bb0b0c8dc924d1ed004d772b8fa13218a7bdf 100644 (file)
@@ -118,7 +118,7 @@ BOOL CALLBACK Filesets_RepSites_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
    if (msg == WM_INITDIALOG_SHEET)
       {
@@ -131,19 +131,19 @@ BOOL CALLBACK Filesets_RepSites_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM
    else
       {
       LPSET_REPPROP_PARAMS prp;
-      if ((prp = (LPSET_REPPROP_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+      if ((prp = (LPSET_REPPROP_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
          {
          switch (msg)
             {
             case WM_INITDIALOG:
-               FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SET_REP_LIST), GetItemText, (DWORD)&gr.viewRep);
+               FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SET_REP_LIST), GetItemText, &gr.viewRep);
                Filesets_RepSites_OnInitDialog (hDlg, prp);
                NotifyMe (WHEN_SETS_CHANGE, NULL, hDlg, 0);
                break;
 
             case WM_DESTROY:
                DontNotifyMeEver (hDlg);
-               SetWindowLong (hDlg, DWL_USER, 0);
+               SetWindowLongPtr (hDlg, DWLP_USER, 0);
                Delete (prp);
                break;
 
@@ -224,7 +224,7 @@ BOOL CALLBACK Filesets_RepSites_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM
 }
 
 
-static LONG procRepSitesList = 0;
+static LONG_PTR procRepSitesList = 0;
 
 LRESULT CALLBACK Filesets_RepSites_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -239,7 +239,7 @@ LRESULT CALLBACK Filesets_RepSites_SubclassListProc (HWND hList, UINT msg, WPARA
       {
       case WM_DESTROY:
          if (procRepSitesList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procRepSitesList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procRepSitesList);
          break;
 
       case WM_COMMAND: 
@@ -260,8 +260,8 @@ void Filesets_RepSites_OnInitDialog (HWND hDlg, LPSET_REPPROP_PARAMS prp)
 {
    HWND hList = GetDlgItem (hDlg, IDC_SET_REP_LIST);
    if (procRepSitesList == 0)
-      procRepSitesList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Filesets_RepSites_SubclassListProc);
+      procRepSitesList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Filesets_RepSites_SubclassListProc);
 
    TCHAR szServer[ cchNAME ];
    TCHAR szFileset[ cchNAME ];
index 51455a5703ced1fd930a46fb106120d7f8ccafeb..485b225157202668c44c05996f144be0e2aa2a3c 100644 (file)
@@ -55,7 +55,7 @@ void Filesets_Restore (LPIDENT lpiParent)
    if (lpiParent && lpiParent->fIsFileset())
       lpiParent->GetFilesetName (psrp->szFileset);
 
-   int rc = ModalDialogParam (IDD_SET_RESTORE, GetActiveWindow(), (DLGPROC)Filesets_Restore_DlgProc, (LPARAM)psrp);
+   INT_PTR rc = ModalDialogParam (IDD_SET_RESTORE, GetActiveWindow(), (DLGPROC)Filesets_Restore_DlgProc, (LPARAM)psrp);
    if (rc != IDOK)
       {
       Delete (psrp);
@@ -96,7 +96,7 @@ BOOL CALLBACK Filesets_Restore_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
       switch (msg)
          {
          case WM_INITDIALOG:
-            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, (DWORD)&gr.viewAggRestore);
+            FastList_SetTextCallback (GetDlgItem (hDlg, IDC_AGG_LIST), GetItemText, &gr.viewAggRestore);
             Filesets_Restore_OnInitDialog (hDlg, psrp);
             break;
 
@@ -192,7 +192,7 @@ BOOL CALLBACK Filesets_Restore_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
 }
 
 
-static LONG procFilesetsRestoreList = 0;
+static LONG_PTR procFilesetsRestoreList = 0;
 
 LRESULT CALLBACK Filesets_Restore_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -201,13 +201,13 @@ LRESULT CALLBACK Filesets_Restore_SubclassListProc (HWND hList, UINT msg, WPARAM
    if (procFilesetsRestoreList == 0)
       rc = DefWindowProc (hList, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procFilesetsRestoreList, hList, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procFilesetsRestoreList, hList, msg, wp, lp);
 
    switch (msg)
       {
       case WM_DESTROY:
          if (procFilesetsRestoreList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procFilesetsRestoreList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procFilesetsRestoreList);
          break;
 
       case WM_COMMAND: 
@@ -228,8 +228,8 @@ void Filesets_Restore_OnInitDialog (HWND hDlg, LPSET_RESTORE_PARAMS psrp)
 {
    HWND hList = GetDlgItem (hDlg, IDC_AGG_LIST);
    if (procFilesetsRestoreList == 0)
-      procFilesetsRestoreList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Filesets_Restore_SubclassListProc);
+      procFilesetsRestoreList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Filesets_Restore_SubclassListProc);
 
    if (gr.viewAggRestore.lvsView == 0)  // never initialized this?
       {
@@ -272,7 +272,7 @@ void Filesets_Restore_OnSelectServer (HWND hDlg, LPSET_RESTORE_PARAMS psrp)
          lpiSelect = psrp->lpi->GetAggregate();
       }
 
-   SetWindowLong (hDlg, DWL_USER, (LONG)lpiServerNew);
+   SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)lpiServerNew);
 
    LPAGG_ENUM_TO_LISTVIEW_PACKET lpp = New (AGG_ENUM_TO_LISTVIEW_PACKET);
    lpp->lpiServer = lpiServerNew;
index 9d6cab3cba891bd7e34c2c5888105eae47964b78..1480f73bfd49d10b0c0fec315fe722e63dcc669f 100644 (file)
@@ -108,7 +108,7 @@ BOOL CALLBACK Filesets_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          ResizeWindow (hDlg, awdFilesets, rwaMoveToHere, &rTab);
 
          FL_RestoreView (GetDlgItem (hDlg, IDC_SET_LIST), &gr.viewSet);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SET_LIST), GetItemText, (DWORD)&gr.viewSet);
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SET_LIST), GetItemText, &gr.viewSet);
 
          Filesets_SubclassList (hDlg);
 
@@ -381,7 +381,7 @@ void Filesets_OnNotifyFromDispatch (LPNOTIFYSTRUCT lpns)
 }
 
 
-static LONG procFilesetsList = 0;
+static LONG_PTR procFilesetsList = 0;
 
 LRESULT CALLBACK Filesets_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -390,13 +390,13 @@ LRESULT CALLBACK Filesets_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPA
    if (procFilesetsList == 0)
       rc = DefWindowProc (hList, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procFilesetsList, hList, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procFilesetsList, hList, msg, wp, lp);
 
    switch (msg)
       {
       case WM_DESTROY:
          if (procFilesetsList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procFilesetsList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procFilesetsList);
          break;
 
       case WM_COMMAND: 
@@ -459,8 +459,8 @@ void Filesets_Subclass_OnCommand (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 void Filesets_SubclassList (HWND hDlg)
 {
    HWND hList = GetDlgItem (hDlg, IDC_SET_LIST);
-   procFilesetsList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Filesets_SubclassListProc);
+   procFilesetsList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Filesets_SubclassListProc);
 }
 
 
@@ -560,7 +560,7 @@ void Filesets_ContinueDrag (HWND hDlg)
 
          if (l.hItemTarget)
             {
-            DWORD dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
+            LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
             FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags & (~FLIF_DROPHIGHLIGHT));
             l.hItemTarget = NULL;
             l.lpiTarget = NULL;
@@ -570,7 +570,7 @@ void Filesets_ContinueDrag (HWND hDlg)
             {
             l.hwndTarget = hTarget;
             l.hItemTarget = hItemTarget;
-            DWORD dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
+            LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
             FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags | FLIF_DROPHIGHLIGHT);
             }
 
@@ -642,7 +642,7 @@ void Filesets_CancelDrag (HWND hDlg)
 {
    if (l.hItemTarget != NULL)
       {
-      DWORD dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
+      LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
       FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags & (~FLIF_DROPHIGHLIGHT));
       l.hItemTarget = NULL;
       }
index e810a04a754c02882eeea84ce8001c44b594be69..599bb22a7dc71c5043ea9ef553a14d6ccca2f180 100644 (file)
@@ -183,9 +183,9 @@ BOOL CALLBACK Subsets_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPSUBSET sub = (LPSUBSET)GetWindowLong (hDlg, DWL_USER);
+   LPSUBSET sub = (LPSUBSET)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -220,7 +220,7 @@ BOOL CALLBACK Subsets_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
                   {
                   if (sub)
                      Subsets_FreeSubset (sub);
-                  SetWindowLong (hDlg, DWL_USER, (LONG)subNew);
+                  SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)subNew);
                   }
                break;
 
@@ -233,7 +233,7 @@ BOOL CALLBACK Subsets_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
                      {
                      if (sub)
                         Subsets_FreeSubset (sub);
-                     SetWindowLong (hDlg, DWL_USER, (LONG)subNew);
+                     SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)subNew);
                      }
                   }
                break;
@@ -249,7 +249,7 @@ BOOL CALLBACK Subsets_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
                   {
                   if (sub)
                      Subsets_FreeSubset (sub);
-                  SetWindowLong (hDlg, DWL_USER, (LONG)subNew);
+                  SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)subNew);
                   }
                break;
             }
@@ -336,7 +336,7 @@ void Subsets_GetSubsetFromDialog (HWND hDlg, LPSUBSET sub)
 
    // Is there only one server box checked?
    //
-   int iiMax = SendMessage (hList, LB_GETCOUNT, 0, 0);
+   int iiMax = (int) SendMessage (hList, LB_GETCOUNT, 0, 0);
 
    size_t cChecked = 0;
    int iiChecked;
@@ -410,7 +410,7 @@ LPSUBSET Subsets_OnCheckAll (HWND hDlg, LPSUBSET subOld, BOOL fCheck)
          }
       }
 
-   int iiMax = SendMessage (hList, LB_GETCOUNT, 0, 0);
+   int iiMax = (int) SendMessage (hList, LB_GETCOUNT, 0, 0);
 
    for (int ii = 0; ii < iiMax; ++ii)
       {
@@ -537,7 +537,7 @@ BOOL Subsets_EnumSubsets (LPTSTR pszCell, size_t iIndex, LPTSTR pszSubset)
    HKEY hk;
    if ((hk = OpenSubsetsKey (pszCell, FALSE)) != NULL)
       {
-      if (RegEnumKey (hk, iIndex, pszSubset, cchNAME) == 0)
+      if (RegEnumKey (hk, (DWORD)iIndex, pszSubset, cchNAME) == 0)
          rc = TRUE;
 
       RegCloseKey (hk);
@@ -602,7 +602,7 @@ LPSUBSET Subsets_LoadSubset (LPTSTR pszCell, LPTSTR pszSubset)
             TCHAR szServer[ cchNAME ];
             dwSize = sizeof(szServer);
 
-            if (RegEnumValue (hk, iIndex, szServer, &dwSize, 0, NULL, NULL, NULL) != 0)
+            if (RegEnumValue (hk, (DWORD)iIndex, szServer, &dwSize, 0, NULL, NULL, NULL) != 0)
                break;
 
             if (szServer[0] && lstrcmpi (szServer, REGVAL_INCLUSIVE))
@@ -708,8 +708,7 @@ BOOL Subsets_GetLoadName (HWND hParent, LPTSTR pszSubset)
    if (g.lpiCell)
       g.lpiCell->GetCellName (lpp.szCell);
 
-   int rc;
-   rc = ModalDialogParam (IDD_SUBSET_LOADSAVE,
+   INT_PTR rc = ModalDialogParam (IDD_SUBSET_LOADSAVE,
                           hParent, (DLGPROC)Subsets_OpenSave_DlgProc,
                           (LPARAM)&lpp);
 
@@ -732,8 +731,7 @@ BOOL Subsets_GetSaveName (HWND hParent, LPTSTR pszSubset)
    if (g.lpiCell)
       g.lpiCell->GetCellName (lpp.szCell);
 
-   int rc;
-   rc = ModalDialogParam (IDD_SUBSET_LOADSAVE,
+   INT_PTR rc = ModalDialogParam (IDD_SUBSET_LOADSAVE,
                           hParent, (DLGPROC)Subsets_OpenSave_DlgProc,
                           (LPARAM)&lpp);
 
@@ -751,10 +749,10 @@ BOOL CALLBACK Subsets_OpenSave_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
    static BOOL fEditing = FALSE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPSUBSET_OPENSAVE_PARAMS lpp;
-   if ((lpp = (LPSUBSET_OPENSAVE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPSUBSET_OPENSAVE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
index bf622b4a8c8cfce433e76eb5e4ff3d5dcca146b7..40bfee9b884ad15dc6b6de68b0dc27d116a5ee34 100644 (file)
@@ -32,7 +32,7 @@ void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi);
 
 void Services_Delete (LPIDENT lpiService)
 {
-   int rc = ModalDialogParam (IDD_SVC_DELETE, GetActiveWindow(), (DLGPROC)Services_Delete_DlgProc, (LPARAM)lpiService);
+   INT_PTR rc = ModalDialogParam (IDD_SVC_DELETE, GetActiveWindow(), (DLGPROC)Services_Delete_DlgProc, (LPARAM)lpiService);
    if (rc == IDOK)
       {
       StartTask (taskSVC_DELETE, NULL, lpiService);
index dc9ed2ae8eb9c54ecfe290fd2899c4b324b2bbf0..5944d8451ff27212bc13926529110793fa2f6c0b 100644 (file)
@@ -93,9 +93,9 @@ BOOL CALLBACK Services_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -217,7 +217,7 @@ void Services_General_OnInitDialog (HWND hDlg, LPIDENT lpi)
 
 void Services_General_OnEndTask_InitDialog (HWND hDlg, LPTASKPACKET ptp)
 {
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    TCHAR szUnknown[ cchRESOURCE ];
    GetString (szUnknown, IDS_UNKNOWN);
@@ -338,7 +338,7 @@ void Services_General_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
 {
    if (!ptp->rc)
       {
-      LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+      LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
       TCHAR szSvrName[ cchNAME ];
       TCHAR szSvcName[ cchNAME ];
@@ -355,9 +355,9 @@ BOOL CALLBACK Services_BOS_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
index 4dfc9748acffa2343407fce6711c9eb125787816..c19d2bc3f77892d904c6db1ce351c4c5aa17d612 100644 (file)
@@ -71,7 +71,7 @@ BOOL CALLBACK Services_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          ResizeWindow (hDlg, awdServices, rwaMoveToHere, &rTab);
 
          FL_RestoreView (GetDlgItem (hDlg, IDC_SVC_LIST), &gr.viewSvc);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SVC_LIST), GetItemText, (DWORD)&gr.viewSvc);
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SVC_LIST), GetItemText, &gr.viewSvc);
 
          Services_SubclassList (hDlg);
          Services_OnSelect (hDlg);
@@ -241,7 +241,7 @@ void Services_OnNotifyFromDispatch (LPNOTIFYSTRUCT lpns)
 }
 
 
-static LONG procServicesList = 0;
+static LONG_PTR procServicesList = 0;
 
 LRESULT CALLBACK Services_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -250,13 +250,13 @@ LRESULT CALLBACK Services_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPA
    if (procServicesList == 0)
       rc = DefWindowProc (hList, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procServicesList, hList, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procServicesList, hList, msg, wp, lp);
 
    switch (msg)
       {
       case WM_DESTROY:
          if (procServicesList != 0)
-            SetWindowLong (hList, GWL_WNDPROC, procServicesList);
+            SetWindowLongPtr (hList, GWLP_WNDPROC, procServicesList);
          break;
 
       case WM_COMMAND:
@@ -274,8 +274,8 @@ LRESULT CALLBACK Services_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPA
 void Services_SubclassList (HWND hDlg)
 {
    HWND hList = GetDlgItem (hDlg, IDC_SVC_LIST);
-   procServicesList = GetWindowLong (hList, GWL_WNDPROC);
-   SetWindowLong (hList, GWL_WNDPROC, (LONG)Services_SubclassListProc);
+   procServicesList = GetWindowLongPtr (hList, GWLP_WNDPROC);
+   SetWindowLongPtr (hList, GWLP_WNDPROC, (LONG_PTR)Services_SubclassListProc);
 }
 
 
index 7cbc57d133d749126f154158e7a43f3def59da35..c2ab7613812821bfa452797b58d048cdf0228444 100644 (file)
@@ -99,10 +99,10 @@ BOOL CALLBACK Services_ShowLog_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPSVC_VIEWLOG_PACKET lpp;
-   if ((lpp = (LPSVC_VIEWLOG_PACKET)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPSVC_VIEWLOG_PACKET)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -118,7 +118,7 @@ BOOL CALLBACK Services_ShowLog_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
             if (lpp->szLocal[0] != TEXT('\0'))
                DeleteFile (lpp->szLocal);
             GetWindowRect (hDlg, &gr.rViewLog);
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             Delete (lpp);
             break;
 
@@ -158,7 +158,7 @@ BOOL CALLBACK Services_ShowLog_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
             if ((HWND)lp == GetDlgItem (hDlg, IDC_VIEWLOG_TEXT))
                {
                SetBkColor ((HDC)wp, GetSysColor (COLOR_WINDOW));
-               return (BOOL)CreateSolidBrush (GetSysColor (COLOR_WINDOW));
+               return CreateSolidBrush (GetSysColor (COLOR_WINDOW))?TRUE:FALSE;
                }
             break;
          }
@@ -424,10 +424,10 @@ BOOL CALLBACK Services_PickLog_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM l
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPSVC_VIEWLOG_PACKET lpp;
-   if ((lpp = (LPSVC_VIEWLOG_PACKET)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPSVC_VIEWLOG_PACKET)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
index 5fd36c556077a98c0c00408ebfdf0bcd6a19325a..0ffd54fe151579d5ad9c6fd336c138cd62e5117a 100644 (file)
@@ -107,10 +107,10 @@ BOOL CALLBACK ChangeAddr_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPSVR_CHANGEADDR_PARAMS lpp;
-   if ((lpp = (LPSVR_CHANGEADDR_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_CHANGEADDR_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -338,10 +338,10 @@ BOOL CALLBACK NewAddr_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPSOCKADDR_IN pAddr;
-   if ((pAddr = (LPSOCKADDR_IN)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((pAddr = (LPSOCKADDR_IN)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
index 6615ee6ee9344adecc96879cf8a6277a742f697c..df951aca72b3d636c13503baaa77317b7a44175c 100644 (file)
@@ -62,9 +62,9 @@ BOOL WINAPI Server_Execute_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    LPSVR_EXECUTE_PARAMS lpp;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPSVR_EXECUTE_PARAMS)GetWindowLong(hDlg,DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_EXECUTE_PARAMS)GetWindowLongPtr(hDlg,DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -104,7 +104,7 @@ BOOL WINAPI Server_Execute_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
          case WM_DESTROY:
             Delete (lpp);
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             PropCache_Delete (pcSVR_EXECUTE, NULL);
             break;
          }
index daaa0ec9d1c1a4ad92bea6bcbc4f820fff6752e5..228e1cef98eca79066207ee7fc3e44350a5dc086 100644 (file)
@@ -67,9 +67,9 @@ BOOL WINAPI Server_GetDates_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    LPSVR_GETDATES_PARAMS lpp;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPSVR_GETDATES_PARAMS)GetWindowLong(hDlg,DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_GETDATES_PARAMS)GetWindowLongPtr(hDlg,DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -108,7 +108,7 @@ BOOL WINAPI Server_GetDates_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
          case WM_DESTROY:
             Delete (lpp);
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             PropCache_Delete (pcSVR_GETDATES, NULL);
             break;
          }
index 7f63ac3bad525ce1d145eb37e9ddce1a8b523a47..98272bf640f0e2add8b5d167d7120ef93743c25d 100644 (file)
@@ -79,7 +79,7 @@ void Server_Hosts (LPIDENT lpiServer)
       lpiServer->GetServerName (szServer);
       LPTSTR pszTitle = FormatString (IDS_SVR_HOSTS_TITLE, TEXT("%s"), szServer);
       LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE);
-      PropSheet_AddTab (psh, IDS_SVR_HOST_TAB, IDD_SVR_HOSTS, (DLGPROC)Server_Hosts_DlgProc, (LONG)lpp, TRUE);
+      PropSheet_AddTab (psh, IDS_SVR_HOST_TAB, IDD_SVR_HOSTS, (DLGPROC)Server_Hosts_DlgProc, (LONG_PTR)lpp, TRUE);
       PropSheet_ShowModeless (psh);
       FreeString (pszTitle);
       }
@@ -325,10 +325,10 @@ BOOL CALLBACK Server_AddHost_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPSVR_ADDHOST_PARAMS lpp;
-   if ((lpp = (LPSVR_ADDHOST_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_ADDHOST_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
index 385dcb3fa454bcbaa8dff461e23242a3ab45c09d..3fb528b4c96907d3f9235cdd795da656ae8a0f3f 100644 (file)
@@ -64,9 +64,9 @@ BOOL WINAPI Server_Install_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    LPSVR_INSTALL_PARAMS lpp;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+       SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPSVR_INSTALL_PARAMS)GetWindowLong(hDlg,DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_INSTALL_PARAMS)GetWindowLongPtr(hDlg,DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -109,7 +109,7 @@ BOOL WINAPI Server_Install_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             break;
 
          case WM_DESTROY:
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             PropCache_Delete (pcSVR_INSTALL, NULL);
             Delete (lpp);
             break;
index 429758b46fde8a9efeee6c00fb9006ec636580b7..6548bac4d70a48d55d251013e4827d3ffbba5148 100644 (file)
@@ -81,9 +81,9 @@ BOOL CALLBACK Server_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpiServer = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -101,7 +101,7 @@ BOOL CALLBACK Server_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          break;
 
       case WM_DESTROY:
-         SetWindowLong (hDlg, DWL_USER, 0);
+         SetWindowLongPtr (hDlg, DWLP_USER, 0);
          break;
 
       case WM_ENDTASK:
@@ -139,7 +139,7 @@ BOOL CALLBACK Server_General_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          if ((HWND)lp == GetDlgItem (hDlg, IDC_SVR_ADDRESSES))
             {
             SetBkColor ((HDC)wp, GetSysColor (COLOR_BTNFACE));
-            return (BOOL)CreateSolidBrush (GetSysColor (COLOR_BTNFACE));
+            return CreateSolidBrush (GetSysColor (COLOR_BTNFACE))?TRUE:FALSE;
             }
          break;
       }
@@ -241,9 +241,9 @@ BOOL CALLBACK Server_Scout_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
-   LPIDENT lpiServer = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -327,7 +327,7 @@ void Server_Scout_OnInitDialog (HWND hDlg, LPIDENT lpiServer)
 
 void Server_Scout_OnEndTask_InitDialog (HWND hDlg, LPTASKPACKET ptp)
 {
-   LPIDENT lpiServer = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
    if (!ptp->rc)
       {
@@ -422,7 +422,7 @@ void Server_Scout_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
 {
    if (!ptp->rc)
       {
-      LPIDENT lpiServer = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+      LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 
       TCHAR szText[ cchNAME ];
       lpiServer->GetServerName (szText);
index 2e5f7999727d740e5a2b51d68d703ecd58910558..4226236fb955db1070690e40946781d088608f37 100644 (file)
@@ -64,9 +64,9 @@ BOOL WINAPI Server_Prune_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    LPSVR_PRUNE_PARAMS lpp;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPSVR_PRUNE_PARAMS)GetWindowLong(hDlg,DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_PRUNE_PARAMS)GetWindowLongPtr(hDlg,DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -105,7 +105,7 @@ BOOL WINAPI Server_Prune_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             break;
 
          case WM_DESTROY:
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             PropCache_Delete (pcSVR_PRUNE, NULL);
             Delete (lpp);
             break;
index 2cc46ba14034b805407574b52ea8d5ed08bb7167..3c2ea5084c35b03c62d362f654df0021878f0922 100644 (file)
@@ -89,10 +89,10 @@ BOOL CALLBACK Server_Salvage_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPIDENT lpi;
-   if ((lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -326,7 +326,7 @@ void Server_Salvage_OnOK (HWND hDlg)
    lpp->fRebuildDirs = IsDlgButtonChecked (hDlg, IDC_SALVAGE_FIXDIRS);
    lpp->fReadBlocks = IsDlgButtonChecked (hDlg, IDC_SALVAGE_BLOCK);
    if (IsDlgButtonChecked (hDlg, IDC_SALVAGE_SIMUL))
-      lpp->nProcesses = SP_GetPos (GetDlgItem (hDlg, IDC_SALVAGE_NUM));
+      lpp->nProcesses = (int)SP_GetPos (GetDlgItem (hDlg, IDC_SALVAGE_NUM));
 
    lpp->lpiSalvage = NULL;
    if (!IsDlgButtonChecked (hDlg, IDC_FILESET_ALL))
@@ -415,10 +415,10 @@ BOOL CALLBACK Server_Salvage_Results_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LP
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPIDENT lpi;
-   if ((lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -460,7 +460,7 @@ BOOL CALLBACK Server_Salvage_Results_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LP
             if ((HWND)lp == GetDlgItem (hDlg, IDC_SALVAGE_DETAILS))
                {
                SetBkColor ((HDC)wp, GetSysColor (COLOR_WINDOW));
-               return (BOOL)CreateSolidBrush (GetSysColor (COLOR_WINDOW));
+               return CreateSolidBrush (GetSysColor (COLOR_WINDOW))?TRUE:FALSE;
                }
             break;
          }
index 89391854683f7397b9cb2adbf42276a6b1d8e978..2e7a5a0a0c3fea150761a4f280d6f7efeee5c4b2 100644 (file)
@@ -134,8 +134,8 @@ void Server_Security (LPIDENT lpiServer, BOOL fJumpToKeys)
       lpiServer->GetServerName (szServer);
       LPTSTR pszTitle = FormatString (IDS_SVR_SECURITY_TITLE, TEXT("%s"), szServer);
       LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE);
-      PropSheet_AddTab (psh, IDS_SVR_LIST_TAB, IDD_SVR_LISTS, (DLGPROC)Server_Lists_DlgProc, (LONG)lpp, TRUE, !fJumpToKeys);
-      PropSheet_AddTab (psh, IDS_SVR_KEY_TAB,  IDD_SVR_KEYS,  (DLGPROC)Server_Keys_DlgProc,  (LONG)lpp, TRUE,  fJumpToKeys);
+      PropSheet_AddTab (psh, IDS_SVR_LIST_TAB, IDD_SVR_LISTS, (DLGPROC)Server_Lists_DlgProc, (LONG_PTR)lpp, TRUE, !fJumpToKeys);
+      PropSheet_AddTab (psh, IDS_SVR_KEY_TAB,  IDD_SVR_KEYS,  (DLGPROC)Server_Keys_DlgProc,  (LONG_PTR)lpp, TRUE,  fJumpToKeys);
       PropSheet_ShowModeless (psh);
       FreeString (pszTitle);
       }
@@ -811,7 +811,7 @@ BOOL CreateKey_OnOK (HWND hDlg, LPKEY_CREATE_PARAMS lpp)
          return FALSE;
       }
 
-   lpp->keyVersion = SP_GetPos (GetDlgItem (hDlg, IDC_KEY_VERSION));
+   lpp->keyVersion = (int) SP_GetPos (GetDlgItem (hDlg, IDC_KEY_VERSION));
    return TRUE;
 }
 
index 81a2d323e09dae384433bd238707ef631a2b87a4..d9602514eecb4fc1e82ddb4653d6e8d0eb5dcae4 100644 (file)
@@ -59,10 +59,10 @@ BOOL CALLBACK Server_SyncVLDB_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
    LPIDENT lpi;
-   if ((lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -163,7 +163,7 @@ void Server_SyncVLDB_OnEndTask_Init (HWND hDlg, LPTASKPACKET ptp)
 void Server_SyncVLDB_OnOK (HWND hDlg, LPIDENT lpi)
 {
    LPSVR_SYNCVLDB_PARAMS lpp = New (SVR_SYNCVLDB_PARAMS);
-   lpp->lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   lpp->lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
    lpp->fForce = TRUE;
    StartTask (taskSVR_SYNCVLDB, NULL, lpp);
 }
index 840d72488b965a03ef167c523f37247212194a10..9b1ce4bc25e2300229b134d7242553834e20f7ca 100644 (file)
@@ -62,9 +62,9 @@ BOOL WINAPI Server_Uninstall_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    LPSVR_UNINSTALL_PARAMS lpp;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, lp);
+      SetWindowLongPtr (hDlg, DWLP_USER, lp);
 
-   if ((lpp = (LPSVR_UNINSTALL_PARAMS)GetWindowLong(hDlg,DWL_USER)) != NULL)
+   if ((lpp = (LPSVR_UNINSTALL_PARAMS)GetWindowLongPtr(hDlg,DWLP_USER)) != NULL)
       {
       switch (msg)
          {
@@ -103,7 +103,7 @@ BOOL WINAPI Server_Uninstall_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             break;
 
          case WM_DESTROY:
-            SetWindowLong (hDlg, DWL_USER, 0);
+            SetWindowLongPtr (hDlg, DWLP_USER, 0);
             PropCache_Delete (pcSVR_UNINSTALL, NULL);
             Delete (lpp);
             break;
index d57f07008c22815ca233608f883f7ba0efa54888..71535ada87004eeee8e7d9fc312d2f8058ad1840 100644 (file)
@@ -201,7 +201,7 @@ void Server_SelectServer (HWND hDlg, LPIDENT lpiNew, BOOL fForceRedraw)
    LPIDENT lpiOld = Server_GetServer (hDlg);
    if (lpiNew != lpiOld)
       {
-      SetWindowLong (hDlg, DWL_USER, (LONG)lpiNew);
+      SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)lpiNew);
 
       if (hDlg != g.hMain)
          {
@@ -231,7 +231,7 @@ void Server_SelectServer (HWND hDlg, LPIDENT lpiNew, BOOL fForceRedraw)
 
 LPIDENT Server_GetServer (HWND hDlg)
 {
-   return (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+   return (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
 }
 
 LPIDENT Server_GetServerForChild (HWND hChild)
@@ -337,7 +337,7 @@ BOOL CALLBACK Server_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 }
 
 
-static LONG procTabControl = 0;
+static LONG_PTR procTabControl = 0;
 
 LRESULT CALLBACK Server_SubclassTabControlProc (HWND hTab, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -346,7 +346,7 @@ LRESULT CALLBACK Server_SubclassTabControlProc (HWND hTab, UINT msg, WPARAM wp,
    if (procTabControl == 0)
       rc = DefWindowProc (hTab, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procTabControl, hTab, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procTabControl, hTab, msg, wp, lp);
 
    switch (msg)
       {
@@ -364,7 +364,7 @@ LRESULT CALLBACK Server_SubclassTabControlProc (HWND hTab, UINT msg, WPARAM wp,
 
       case WM_DESTROY:
          if (procTabControl != 0)
-            SetWindowLong (hTab, GWL_WNDPROC, procTabControl);
+            SetWindowLongPtr (hTab, GWLP_WNDPROC, procTabControl);
          break;
       }
 
@@ -392,8 +392,8 @@ void Server_PrepareTabControl (HWND hTab)
    // subclass the TCN_ window, so that it will start sending WM_SIZE
    // messages to its child window.
    //
-   procTabControl = GetWindowLong (hTab, GWL_WNDPROC);
-   SetWindowLong (hTab, GWL_WNDPROC, (LONG)Server_SubclassTabControlProc);
+   procTabControl = GetWindowLongPtr (hTab, GWLP_WNDPROC);
+   SetWindowLongPtr (hTab, GWLP_WNDPROC, (LONG_PTR)Server_SubclassTabControlProc);
 
    // Since we just subclassed this control, our new wndproc wasn't around
    // when the window was created.  Any WM_CREATE processing we'd ordinarily
index ed3f4477e746f4bcb4c6a84511e7d4f78d83f8ac..ab32daf1f0eefbf2e282c577181cca7b0b4b6905 100644 (file)
@@ -177,7 +177,7 @@ typedef struct
    LPIDENT lpiCell;
 
    LPSUBSET sub;
-   PVOID hCreds;
+   UINT_PTR hCreds;
    } GLOBALS;
 
 typedef struct
index 775d2675e131c28cab26378ea77076591c197268..50fc579c8074a8b8c64326d019ed238d8e8efa8d 100644 (file)
@@ -646,7 +646,7 @@ void Task_ExportCell_LineAddr (HANDLE fh, LPTSTR eck, SOCKADDR_IN *pAddr)
    FreeString (pszLine);
 }
 
-void Task_ExportCell_LineInt (HANDLE fh, LPTSTR eck, int dw)
+void Task_ExportCell_LineInt (HANDLE fh, LPTSTR eck, size_t dw)
 {
    TCHAR szLine[256];
    wsprintf (szLine, TEXT("%lu"), dw);
@@ -823,7 +823,7 @@ void Task_OpenCell (LPTASKPACKET ptp)
    LPSUBSET subOld = g.sub;
    g.sub = lpp->sub;
 
-   if ((TASKDATA(ptp)->lpiCell = CELL::OpenCell (lpp->szCell, lpp->hCreds, &ptp->status)) == NULL)
+   if ((TASKDATA(ptp)->lpiCell = CELL::OpenCell (lpp->szCell, (PVOID)lpp->hCreds, &ptp->status)) == NULL)
       {
       ptp->rc = FALSE;
 
@@ -952,7 +952,7 @@ void Task_Refresh (LPTASKPACKET ptp, BOOL fNewCreds)
       else
          {
          if (fNewCreds)
-            lpCell->SetCurrentCredentials (g.hCreds);
+            lpCell->SetCurrentCredentials ((PVOID)g.hCreds);
 
          lpCell->Invalidate();
          if ((ptp->rc = lpCell->RefreshAll (&ptp->status)) != TRUE)
@@ -1207,7 +1207,7 @@ void Task_Svr_Scout_Apply (LPTASKPACKET ptp)
       if (!lpp->fIDC_SVR_AUTOREFRESH)
          lpsp->oa.cTickRefresh = 0;
       else
-         lpsp->oa.cTickRefresh = cmsec1MINUTE * lpp->dwIDC_SVR_AUTOREFRESH_MINUTES;
+         lpsp->oa.cTickRefresh = (DWORD)(cmsec1MINUTE * lpp->dwIDC_SVR_AUTOREFRESH_MINUTES);
 
       if (!Server_SavePreferences (lpp->lpiServer))
          {
@@ -2195,7 +2195,7 @@ void Task_Set_Create (LPTASKPACKET ptp)
    LPSET_CREATE_PARAMS lpp = (LPSET_CREATE_PARAMS)(ptp->lpUser);
 
    LPIDENT lpiFileset;
-   if ((lpiFileset = AfsClass_CreateFileset (lpp->lpiParent, lpp->szName, lpp->ckQuota, &ptp->status)) == NULL)
+   if ((lpiFileset = AfsClass_CreateFileset (lpp->lpiParent, lpp->szName, (ULONG)lpp->ckQuota, &ptp->status)) == NULL)
       ptp->rc = FALSE;
 
    if (ptp->rc && lpp->fCreateClone)
index 073991a8ad440056984452cb82108fe8b92d39fc..fa3fd3ebb3aa9c387383ee07adf5f36b826906c0 100644 (file)
@@ -62,7 +62,7 @@ typedef struct
    TCHAR szCell[ cchNAME ];
    LPSUBSET sub;
    BOOL fCloseAppOnFail;
-   PVOID hCreds;
+   UINT_PTR hCreds;
    } OPENCELL_PACKET, *LPOPENCELL_PACKET;
 
 typedef struct
index 4b830b1b74358480203d814425da0a02f59e9315..0a61f61efcdc076ed9e49a923554338a267d9521 100644 (file)
@@ -158,7 +158,7 @@ BOOL CALLBACK Main_DialogProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          // and context-menu requests
          //
          Main_SubclassServers (hDlg);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SERVERS), GetItemText, (DWORD)((gr.fPreview && !gr.fVert) ? &gr.diHorz.viewSvr : &gr.diVert.viewSvr));
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SERVERS), GetItemText, ((gr.fPreview && !gr.fVert) ? &gr.diHorz.viewSvr : &gr.diVert.viewSvr));
 
          // Create the preview pane and rearrange the children of this dialog.
          // This also fixes the Servers display--was it in Large Icons view?
@@ -254,7 +254,7 @@ BOOL CALLBACK Main_DialogProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          break;
 
       case WM_REFRESHED_CREDENTIALS:
-         g.hCreds = (PVOID)lp;
+         g.hCreds = (UINT_PTR)lp;
          UpdateDisplay_Cell(FALSE);
          StartTask (taskREFRESH_CREDS, NULL, g.lpiCell);
          break;
@@ -527,7 +527,7 @@ DWORD WINAPI Main_OnOpenServers_ThreadProc (PVOID lp)
 
 DWORD WINAPI Main_Redraw_ThreadProc (PVOID lp)
 {
-   BOOL fInvalidate = (BOOL)lp;
+   BOOL fInvalidate = (BOOL)(UINT_PTR)lp;
    AfsClass_Enter();
 
    if (g.lpiCell == NULL)
@@ -694,7 +694,7 @@ void Main_OnServerView (int lvsNew)
       FL_RestoreView (hServers, &gr.diVert.viewSvr);
 
    Main_SetServerViewMenus();
-   FastList_SetTextCallback (GetDlgItem (g.hMain, IDC_SERVERS), GetItemText, (DWORD)((gr.fPreview && !gr.fVert) ? &gr.diHorz.viewSvr : &gr.diVert.viewSvr));
+   FastList_SetTextCallback (GetDlgItem (g.hMain, IDC_SERVERS), GetItemText, ((gr.fPreview && !gr.fVert) ? &gr.diHorz.viewSvr : &gr.diVert.viewSvr));
    UpdateDisplay_Servers (FALSE, NULL, 0);
 }
 
@@ -841,7 +841,7 @@ void Main_RearrangeChildren (BOOL fPreviewNew, BOOL fVertNew)
 
    // Now move the children to their new places!
    //
-   size_t nWindows = 1;
+   int nWindows = 1;
    if (GetDlgItem (g.hMain, IDC_COVERDLG))
       ++nWindows;
    if (GetDlgItem (g.hMain, IDC_TABS))
@@ -874,7 +874,7 @@ void Main_RearrangeChildren (BOOL fPreviewNew, BOOL fVertNew)
 
 
 
-static LONG procServers = 0;
+static LONG_PTR procServers = 0;
 
 LRESULT CALLBACK Main_SubclassServersProc (HWND hServers, UINT msg, WPARAM wp, LPARAM lp)
 {
@@ -883,13 +883,13 @@ LRESULT CALLBACK Main_SubclassServersProc (HWND hServers, UINT msg, WPARAM wp, L
    if (procServers == 0)
       rc = DefWindowProc (hServers, msg, wp, lp);
    else
-      rc = CallWindowProc ((WNDPROC)procServers, hServers, msg, wp, lp);
+      rc = (LRESULT) CallWindowProc ((WNDPROC)procServers, hServers, msg, wp, lp);
 
    switch (msg)
       {
       case WM_DESTROY:
          if (procServers != 0)
-            SetWindowLong (hServers, GWL_WNDPROC, procServers);
+            SetWindowLongPtr (hServers, GWLP_WNDPROC, procServers);
          break;
 
       case WM_COMMAND:
@@ -928,8 +928,8 @@ LRESULT CALLBACK Main_SubclassServersProc (HWND hServers, UINT msg, WPARAM wp, L
 void Main_SubclassServers (HWND hDlg)
 {
    HWND hServers = GetDlgItem (hDlg, IDC_SERVERS);
-   procServers = GetWindowLong (hServers, GWL_WNDPROC);
-   SetWindowLong (hServers, GWL_WNDPROC, (LONG)Main_SubclassServersProc);
+   procServers = GetWindowLongPtr (hServers, GWLP_WNDPROC);
+   SetWindowLongPtr (hServers, GWLP_WNDPROC, (LONG_PTR)Main_SubclassServersProc);
 }
 
 
index cf958239d7593bad8221e1c9c5fe74f3e490113a..5b16745059c096d3ee8a99c9f7ece01d933a31af 100644 (file)
@@ -77,6 +77,7 @@ EXELIBS = \
 
 $(EXEFILE) : $(EXEOBJS) $(EXELIBS)
        $(EXEGUILINK) $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 lang ::
index 368335e865ef57c34a76cbcc0ea6a6a4f3b2bd96..a77f49c89952aa03fd3388caa334d3a287986386 100644 (file)
@@ -87,9 +87,9 @@ typedef struct
    HACCEL hAccel;
    int rc;
 
-   DWORD idClient;
+   UINT_PTR idClient;
    ASID idCell;
-   PVOID hCreds;
+   UINT_PTR hCreds;
 
    TCHAR szPatternUsers[ cchNAME ];
    TCHAR szPatternGroups[ cchNAME ];
@@ -116,9 +116,9 @@ typedef struct
    BOOL fWarnBadCreds;
    BOOL fShowActions;
    BOOL fWindowsRegexp;
-   LONG cminRefreshRate;
+   DWORD cminRefreshRate;
 
-   int iTabLast;
+   size_t iTabLast;
 
    // What user preferences have been chosen?
    //
index 4a86bcc02264ab2d08a0b8ae80c43a5249e0e92e..40719b8cd5e1fce857249ab3adb9d49edb238350 100644 (file)
@@ -77,7 +77,7 @@ BOOL ShowBrowseDialog (LPBROWSE_PARAMS lpp)
 BOOL CALLBACK Browse_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 {
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       if (AfsAppLib_HandleHelp (lpp->iddForHelp, hDlg, msg, wp, lp))
          return FALSE;
@@ -86,7 +86,7 @@ BOOL CALLBACK Browse_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Browse_OnInitDialog (hDlg);
          l.dwTickLastType = 0;
          break;
@@ -194,7 +194,7 @@ BOOL CALLBACK Browse_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 void Browse_OnInitDialog (HWND hDlg)
 {
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       // First, the text of the dialog is woefully ugly right now. Put
       // in the strings which the caller supplied.
@@ -273,7 +273,7 @@ void Browse_OnInitDialog (HWND hDlg)
 void Browse_OnSelect (HWND hDlg)
 {
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       if (!lpp->fQuerying)
          {
@@ -319,7 +319,7 @@ void Browse_OnSelect (HWND hDlg)
 void Browse_OnOK (HWND hDlg)
 {
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       LPTSTR pszNames = GetEditText (GetDlgItem (hDlg, IDC_BROWSE_NAMED));
 
@@ -342,7 +342,7 @@ void Browse_OnEndTask_EnumObjects (HWND hDlg, LPTASKPACKET ptp)
 {
    LPBROWSE_PARAMS lpp;
    size_t ii;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       HWND hList = GetDlgItem (hDlg, IDC_BROWSE_LIST);
       FastList_Begin (hList);
@@ -407,7 +407,7 @@ void Browse_OnEndTask_EnumObjects (HWND hDlg, LPTASKPACKET ptp)
 void Browse_OnEndTask_Translate (HWND hDlg, LPTASKPACKET ptp)
 {
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+    if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       if (!ptp->rc || !TASKDATA(ptp)->pAsidList || !TASKDATA(ptp)->pAsidList->cEntries)
          {
@@ -440,7 +440,7 @@ void Browse_OnEndTask_Translate (HWND hDlg, LPTASKPACKET ptp)
 void Browse_UpdateDialog (HWND hDlg)
 {
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       lpp->fQuerying ++;
 
@@ -499,7 +499,7 @@ ASOBJTYPE Browse_GetSelectedType (HWND hDlg)
       }
 
    LPBROWSE_PARAMS lpp;
-   if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
       {
       return lpp->TypeToShow;
       }
index f91a0c997b29edfbe2f598d77b200e7b006ea86d..97a7b1fd080d43a59b343278f8cbb4c77d77a36c 100644 (file)
@@ -125,10 +125,10 @@ BOOL CALLBACK Columns_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
       return TRUE;
 
    if (msg == WM_INITDIALOG)
-      SetWindowLong (hDlg, DWL_USER, ((LPPROPSHEETPAGE)lp)->lParam);
+      SetWindowLongPtr (hDlg, DWLP_USER, ((LPPROPSHEETPAGE)lp)->lParam);
 
    ShowColumnsParams *pscp;
-   pscp = (ShowColumnsParams *)GetWindowLong (hDlg, DWL_USER);
+   pscp = (ShowColumnsParams *)GetWindowLongPtr (hDlg, DWLP_USER);
 
    switch (msg)
       {
@@ -277,7 +277,7 @@ void Columns_OnSelShown (HWND hDlg)
       }
    else
       {
-      int iAvail = LB_GetData (hList, ii);
+      UINT_PTR iAvail = LB_GetData (hList, ii);
       EnableWindow (GetDlgItem (hDlg, IDC_COL_DELETE), (iAvail != 0));
 
       int ci = (int)SendMessage (hList, LB_GETCOUNT, 0, 0);
index b1f0e5ead1384ce7fca5ebd28b6403851285a75b..242a1f04809b105e87f8531bb51716e74418cea4 100644 (file)
@@ -133,7 +133,7 @@ BOOL CALLBACK OpenCell_Hook (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          switch (LOWORD(wp))
             {
             case IDOK:
-               OpenCell_Hook_OnOK (hDlg, (LPOPENCELLDLG_PARAMS)GetWindowLong (hDlg, DWL_USER));
+               OpenCell_Hook_OnOK (hDlg, (LPOPENCELLDLG_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER));
                return TRUE;
             }
          break;
index 3c21a2e46041f1ec51732c875e7f9390c4240cc3..5162a937fe4ca267ea51114d60e356f21b3adf02 100644 (file)
@@ -541,7 +541,7 @@ BOOL Display_HandleColumnNotify (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp, LPVI
 {
    if (msg == WM_NOTIFY)
       {
-      HWND hList = GetDlgItem (hDlg, ((LPNMHDR)lp)->idFrom);
+      HWND hList = GetDlgItem (hDlg, (int)((LPNMHDR)lp)->idFrom);
       if (fIsFastList (hList))
          {
          switch (((LPNMHDR)lp)->code)
@@ -572,7 +572,7 @@ BOOL Display_HandleColumnNotify (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp, LPVI
 }
 
 
-BOOL CALLBACK Display_GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, DWORD dwCookie)
+BOOL CALLBACK Display_GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, UINT_PTR dwCookie)
 { 
    LPVIEWINFO lpvi = (LPVIEWINFO)dwCookie;
    ASID idObject = (ASID)(pfln->item.lParam);
index 2f7c11c8d03ee9907c0a3361cd0879266bd99106..a323ca7e87cd35191a9084ecc7e4eaebcaee2348 100644 (file)
@@ -50,7 +50,7 @@ size_t Display_GetSelectedCount (void);
 TABTYPE Display_GetActiveTab (void);
 
 BOOL Display_HandleColumnNotify (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp, LPVIEWINFO pvi);
-BOOL CALLBACK Display_GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, DWORD dwCookie);
+BOOL CALLBACK Display_GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, UINT_PTR dwCookie);
 void Display_GetImageIcons (DWORD dwStyle, ICONVIEW iv, ASID idObject, int iImageNormal, int iImageAlert, int *piFirstImage, int *piSecondImage);
 
 
index b6fdd8f27bd9a8b1cfe33e77224cacb4926a2161..29f5fefa7547c64d9001a5ad679d4c645419d8c1 100644 (file)
@@ -215,7 +215,7 @@ int CALLBACK General_ListSortFunction (HWND hList, HLISTITEM hItem1, LPARAM lpIt
    // we'll only gather this information when we start a sort
    //
    static TABTYPE tt;
-   static int iCol;
+   static LONG iCol;
    static BOOL fReverse;
    static COLUMNTYPE ct;
    static GetColumnFunction fnGetColumn = NULL;
@@ -239,11 +239,11 @@ int CALLBACK General_ListSortFunction (HWND hList, HLISTITEM hItem1, LPARAM lpIt
       switch (tt)
          {
          case ttUSERS:
-            iCol = gr.viewUsr.aColumns[ iColumn ];
+           iCol = (LONG) gr.viewUsr.aColumns[ iColumn ];
             fnGetColumn = (GetColumnFunction)User_GetColumn;
             break;
          case ttGROUPS:
-            iCol = gr.viewGrp.aColumns[ iColumn ];
+            iCol = (LONG) gr.viewGrp.aColumns[ iColumn ];
             fnGetColumn = (GetColumnFunction)Group_GetColumn;
             break;
          }
@@ -310,7 +310,7 @@ LPTSTR GetEditText (HWND hEdit)
 {
    size_t cch = 1 + SendMessage (hEdit, EM_LINELENGTH, 0, 0);
    LPTSTR psz = AllocateString (cch);
-   cch = GetWindowText (hEdit, psz, cch);
+   cch = GetWindowText (hEdit, psz, (int)cch);
    psz[cch] = TEXT('\0');
    return psz;
 }
index 033654d5a18b6387738f4f8aed183a8d3cdd8a91..55205792ae6a147a455e4853626eaeb86a699166 100644 (file)
@@ -95,7 +95,7 @@ BOOL CALLBACK Group_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Group_Create_OnInitDialog (hDlg);
          break;
 
@@ -143,7 +143,7 @@ BOOL CALLBACK Group_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Group_Create_OnInitDialog (HWND hDlg)
 {
-   LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fix the title of the dialog
    //
@@ -205,7 +205,7 @@ void Group_Create_OnID (HWND hDlg)
 
 void Group_Create_OnAdvanced (HWND hDlg)
 {
-   LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLongPtr (hDlg, DWLP_USER);
    lpp->Advanced.pGroupList = NULL;
    lpp->Advanced.fDeleteMeOnClose = FALSE;
    lpp->Advanced.fShowModal = TRUE;
@@ -217,7 +217,7 @@ void Group_Create_OnAdvanced (HWND hDlg)
 
 BOOL Group_Create_OnOK (HWND hDlg)
 {
-   LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Start a background task to do all the work.
    //
index 066e8727038858648c4d6db61cef5fa5fe338a21..f90dd266daa9bf5adccd8f651cefbbbea212c47a 100644 (file)
@@ -52,7 +52,7 @@ BOOL CALLBACK Group_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Group_Delete_OnInitDialog (hDlg);
          break;
 
@@ -81,7 +81,7 @@ BOOL CALLBACK Group_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Group_Delete_OnInitDialog (HWND hDlg)
 {
-   LPASIDLIST pGroupList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pGroupList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fix the title of the dialog
    //
@@ -113,14 +113,14 @@ void Group_Delete_OnInitDialog (HWND hDlg)
 
 void Group_Delete_OnDestroy (HWND hDlg)
 {
-   LPASIDLIST pGroupList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pGroupList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
    asc_AsidListFree (&pGroupList);
 }
 
 
 void Group_Delete_OnOK (HWND hDlg)
 {
-   LPASIDLIST pGroupList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pGroupList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Start a background task to do all the work.
    //
index dabcb69b7e4033ca322a3182ba776307aeefd1cd..e108cf7cc7667f80731cbceb61a0419ec881f7a9 100644 (file)
@@ -586,8 +586,8 @@ void GroupProp_Member_OnInitDialog (HWND hDlg)
    // If we've come in here with a valid set of groups to display,
    // copy those. We'll need the copies if the user cancels the dialog.
    //
-   SetWindowData (hDlg, GWD_ASIDLIST_MEMBER, (LPARAM)(lpp->pMembers));
-   SetWindowData (hDlg, GWD_ASIDLIST_OWNER,  (LPARAM)(lpp->pGroupsOwner));
+   SetWindowData (hDlg, GWD_ASIDLIST_MEMBER, (UINT_PTR)(lpp->pMembers));
+   SetWindowData (hDlg, GWD_ASIDLIST_OWNER,  (UINT_PTR)(lpp->pGroupsOwner));
 
    LPASIDLIST pList;
    if ((pList = lpp->pMembers) != NULL)
index f7cb7712e223c46950e7d86ed5f59a7f7660befd..27e6587b1bb517d8e37545430992aebb7422e9c1 100644 (file)
@@ -56,7 +56,7 @@ BOOL CALLBACK Group_Rename_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Group_Rename_OnInitDialog (hDlg);
          break;
 
@@ -97,7 +97,7 @@ BOOL CALLBACK Group_Rename_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Group_Rename_OnInitDialog (HWND hDlg)
 {
-   ASID idGroup = (ASID)GetWindowLong (hDlg, DWL_USER);
+   ASID idGroup = (ASID)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Indicate we want to know if anything changes with this group
    //
@@ -146,7 +146,7 @@ void Group_Rename_OnNewName (HWND hDlg)
 
 void Group_Rename_OnChangeOwner (HWND hDlg)
 {
-   ASID idGroup = (ASID)GetWindowLong (hDlg, DWL_USER);
+   ASID idGroup = (ASID)GetWindowLongPtr (hDlg, DWLP_USER);
 
    BROWSE_PARAMS pp;
    memset (&pp, 0x00, sizeof(pp));
@@ -185,7 +185,7 @@ void Group_Rename_OnChangeOwner (HWND hDlg)
 
 void Group_Rename_OnOK (HWND hDlg)
 {
-   ASID idGroup = (ASID)GetWindowLong (hDlg, DWL_USER);
+   ASID idGroup = (ASID)GetWindowLongPtr (hDlg, DWLP_USER);
 
    LPGROUP_RENAME_PARAMS lpp = New (GROUP_RENAME_PARAMS);
    memset (lpp, 0x00, sizeof(GROUP_RENAME_PARAMS));
@@ -198,7 +198,7 @@ void Group_Rename_OnOK (HWND hDlg)
 
 void Group_Rename_UpdateDialog (HWND hDlg)
 {
-   ASID idGroup = (ASID)GetWindowLong (hDlg, DWL_USER);
+   ASID idGroup = (ASID)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Get the current properties for this group
    //
index 024f234cecfe9888e469d1c703aabfefe763532c..3abe73ccaf61b3d640192720a2814a0f7e9d1e82 100644 (file)
@@ -87,7 +87,7 @@ BOOL CALLBACK Groups_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          FastList_SetSortFunction (GetDlgItem (hDlg, IDC_GROUPS_LIST), General_ListSortFunction);
 
          FL_RestoreView (GetDlgItem (hDlg, IDC_GROUPS_LIST), &gr.viewGrp);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_GROUPS_LIST), Display_GetItemText, (DWORD)&gr.viewGrp);
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_GROUPS_LIST), Display_GetItemText, &gr.viewGrp);
          SetDlgItemText (hDlg, IDC_GROUPS_PATTERN, g.szPatternGroups);
          Groups_EnableButtons(hDlg);
          Display_PopulateGroupList();
index e267f88cf9e2afdaa83781fa9d8f9ae27d7bd679..1d43f60374126d7da22de879e2525307d77381d1 100644 (file)
@@ -216,7 +216,7 @@ DWORD NextSearch (int &ii)
 BOOL Help_FindCommand_OnOK (HWND hDlg)
 {
    HWND hCombo = GetDlgItem (hDlg, IDC_FIND_COMMAND);
-   int iiDisplay = -1;
+   size_t iiDisplay = -1;
 
    UNIXUTIL uu = uuUNSPECIFIED;
    TCHAR szText[ cchRESOURCE ];
@@ -410,7 +410,7 @@ void Help_FindError_Shrink (HWND hDlg, BOOL fShrink)
 BOOL CALLBACK Help_About_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
 void Help_About_OnInitDialog (HWND hDlg);
 void Help_About_OnSysCommand (HWND hDlg, int &cmd);
-LONG procAbout;
+UINT_PTR procAbout;
 
 void Help_About (void)
 {
@@ -465,15 +465,15 @@ BOOL CALLBACK Help_About_Proc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          SetTimer (GetParent(hDlg), 1000, 1000/8, NULL);
          }
       }
-   return CallWindowProc ((WNDPROC)procAbout, hDlg, msg, wp, lp);
+   return CallWindowProc ((WNDPROC)procAbout, hDlg, msg, wp, lp)?TRUE:FALSE;
 }
 
 
 void Help_About_OnInitDialog (HWND hDlg)
 {
    HWND hAbout = GetDlgItem (hDlg, IDOK);
-   procAbout = (LONG)GetWindowLong (hAbout, GWL_WNDPROC);
-   SetWindowLong (hAbout, GWL_WNDPROC, (LONG)Help_About_Proc);
+   procAbout = (UINT_PTR)GetWindowLongPtr (hAbout, GWLP_WNDPROC);
+   SetWindowLongPtr (hAbout, GWLP_WNDPROC, (LONG_PTR)Help_About_Proc);
 
    LPTSTR pszText = FormatString (IDS_HELPABOUT_DESC1);
    SetDlgItemText (hDlg, IDC_HELPABOUT_DESC, pszText);
index 6dc82158afb813650900709bfaaed59a218c9b0c..2773b00d3c1223d17b1a6fcc9a8a7ed1cfc6de66 100644 (file)
@@ -103,7 +103,7 @@ BOOL CALLBACK Machine_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Machine_Create_OnInitDialog (hDlg);
          break;
 
@@ -151,7 +151,7 @@ BOOL CALLBACK Machine_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Machine_Create_OnInitDialog (HWND hDlg)
 {
-   LPCREATEMACHINEDLG lpp = (LPCREATEMACHINEDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEMACHINEDLG lpp = (LPCREATEMACHINEDLG)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fix the title of the dialog
    //
@@ -213,7 +213,7 @@ void Machine_Create_OnID (HWND hDlg)
 
 void Machine_Create_OnAdvanced (HWND hDlg)
 {
-   LPCREATEMACHINEDLG lpp = (LPCREATEMACHINEDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEMACHINEDLG lpp = (LPCREATEMACHINEDLG)GetWindowLongPtr (hDlg, DWLP_USER);
    lpp->Advanced.pUserList = NULL;
    lpp->Advanced.fDeleteMeOnClose = FALSE;
    lpp->Advanced.fShowModal = TRUE;
@@ -227,7 +227,7 @@ void Machine_Create_OnAdvanced (HWND hDlg)
 
 BOOL Machine_Create_OnOK (HWND hDlg)
 {
-   LPCREATEMACHINEDLG lpp = (LPCREATEMACHINEDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEMACHINEDLG lpp = (LPCREATEMACHINEDLG)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Start a background task to do all this work.
    //
index dfdb722c4647ced0f2c34de0840fcf90f0822d4f..f70f25c41cde578a3804a2c2f47d6959de8852e6 100644 (file)
@@ -40,7 +40,7 @@ void Machine_Delete_OnOK (HWND hDlg);
 
 void Machine_ShowDelete (LPASIDLIST pMachineList)
 {
-   ModalDialogParam (IDD_MACHINE_DELETE, g.hMain, Machine_Delete_DlgProc, (LPARAM)pMachineList);
+   ModalDialogParam (IDD_MACHINE_DELETE, g.hMain, (DLGPROC)Machine_Delete_DlgProc, (LPARAM)pMachineList);
 }
 
 
@@ -52,7 +52,7 @@ BOOL CALLBACK Machine_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Machine_Delete_OnInitDialog (hDlg);
          break;
 
@@ -81,7 +81,7 @@ BOOL CALLBACK Machine_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Machine_Delete_OnInitDialog (HWND hDlg)
 {
-   LPASIDLIST pMachineList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pMachineList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fix the title of the dialog
    //
@@ -113,14 +113,14 @@ void Machine_Delete_OnInitDialog (HWND hDlg)
 
 void Machine_Delete_OnDestroy (HWND hDlg)
 {
-   LPASIDLIST pMachineList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pMachineList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
    asc_AsidListFree (&pMachineList);
 }
 
 
 void Machine_Delete_OnOK (HWND hDlg)
 {
-   LPASIDLIST pMachineList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pMachineList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Start a background task to do all the work.
    //
index 116117a03cd2198eee4fb5a16fd29c93e0f2efdd..e0e015a3b300471ea7a3dad5f73b9425e369e5d5 100644 (file)
@@ -87,7 +87,7 @@ BOOL CALLBACK Machines_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          FastList_SetSortFunction (GetDlgItem (hDlg, IDC_MACHINES_LIST), General_ListSortFunction);
 
          FL_RestoreView (GetDlgItem (hDlg, IDC_MACHINES_LIST), &gr.viewMch);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_MACHINES_LIST), Display_GetItemText, (DWORD)&gr.viewMch);
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_MACHINES_LIST), Display_GetItemText, &gr.viewMch);
          SetDlgItemText (hDlg, IDC_MACHINES_PATTERN, g.szPatternMachines);
          Machines_EnableButtons(hDlg);
          Display_PopulateMachineList();
index adf9e03d586177ea46aa6e98d2e57c4e771e62cc..3fcebee9ced547c77158b074a6cfecf8b99f6294 100644 (file)
@@ -87,7 +87,7 @@ void Options_OnInitDialog (HWND hDlg)
 
    CheckDlgButton (hDlg, IDC_REFRESH, (gr.cminRefreshRate != 0));
 
-   LONG cminShow = (gr.cminRefreshRate != 0) ? gr.cminRefreshRate : cminREFRESH_DEFAULT;
+   DWORD cminShow = (gr.cminRefreshRate != 0) ? gr.cminRefreshRate : cminREFRESH_DEFAULT;
    CreateSpinner (GetDlgItem (hDlg, IDC_REFRESH_RATE), 10, FALSE, cminREFRESH_MIN, cminShow, cminREFRESH_MAX);
 
    EnableWindow (GetDlgItem (hDlg, IDC_REFRESH_RATE), IsDlgButtonChecked (hDlg, IDC_REFRESH));
@@ -100,12 +100,12 @@ void Options_OnApply (HWND hDlg)
 
    gr.fWarnBadCreds = IsDlgButtonChecked (hDlg, IDC_WARN_BADCREDS);
 
-   LONG cminRateOld = gr.cminRefreshRate;
+   DWORD cminRateOld = gr.cminRefreshRate;
 
    if (!IsDlgButtonChecked (hDlg, IDC_REFRESH))
       gr.cminRefreshRate = 0;
    else
-      gr.cminRefreshRate = SP_GetPos (GetDlgItem (hDlg, IDC_REFRESH_RATE));
+      gr.cminRefreshRate = (DWORD) SP_GetPos (GetDlgItem (hDlg, IDC_REFRESH_RATE));
 
    if ((cminRateOld != gr.cminRefreshRate) && (g.idCell))
       {
index a384b6cc582d636b9d36674459112576db7bc2c2..77a802c4a717c3376b169766bf97078c1195a314 100644 (file)
@@ -299,7 +299,7 @@ void Task_OpenCell (LPTASKPACKET ptp)
 
    // Try to open the cell for administration
    //
-   ptp->rc = asc_CellOpen (g.idClient, lpp->hCreds, lpp->szCell, AFSADMSVR_SCOPE_USERS, &TASKDATA(ptp)->idCell, &ptp->status);
+   ptp->rc = asc_CellOpen (g.idClient, (PVOID)lpp->hCreds, lpp->szCell, AFSADMSVR_SCOPE_USERS, &TASKDATA(ptp)->idCell, &ptp->status);
 
    if (ptp->rc)
       {
@@ -368,7 +368,7 @@ void Task_UpdCreds (LPTASKPACKET ptp)
 
    // Tell the admin server to use our new credentials, and refresh everything
    //
-   if (!asc_CredentialsPush (g.idClient, g.hCreds, g.idCell, &ptp->status))
+   if (!asc_CredentialsPush (g.idClient, (PVOID)g.hCreds, g.idCell, &ptp->status))
       ptp->rc = FALSE;
    else
       ptp->rc = PerformRefresh (ptp, g.idCell, &ptp->status);
@@ -1488,7 +1488,7 @@ void Task_Group_Create (LPTASKPACKET ptp)
 
       AFSADMSVR_CREATEGROUP_PARAMS pp;
       memset (&pp, 0x00, sizeof(AFSADMSVR_CREATEGROUP_PARAMS));
-      pp.idGroup = lpp->idGroup;
+      pp.idGroup = (int) lpp->idGroup;
       lstrcpy (pp.szName, pszName);
       lstrcpy (pp.szOwner, lpp->szOwner);
       if (!pp.szOwner[0])
index 561faeda55a479da248ac07b5a920e4cd03fbbb0..6e9860a2de2b7760893ed5001d7cd8191ebf993d 100644 (file)
@@ -20,7 +20,7 @@ typedef struct
    {
    TCHAR szCell[ cchNAME ];
    BOOL fCloseAppOnFail;
-   PVOID hCreds;
+   UINT_PTR hCreds;
    } OPENCELL_PARAMS, *LPOPENCELL_PARAMS;
 
 typedef struct
@@ -48,7 +48,7 @@ typedef struct
    {
    LPTSTR mszNames;
    TCHAR szPassword[ cchRESOURCE ];
-   int idUser;
+   UINT_PTR idUser;
    AFSADMSVR_CHANGEUSER_PARAMS Properties;
    LPASIDLIST pGroupsMember;
    LPASIDLIST pGroupsOwner;
@@ -97,7 +97,7 @@ typedef struct
    {
    LPTSTR mszNames;
    TCHAR szOwner[ cchNAME ];
-   int idGroup;
+   UINT_PTR idGroup;
    AFSADMSVR_CHANGEGROUP_PARAMS Properties;
    LPASIDLIST pMembers;
    LPASIDLIST pGroupsOwner;
@@ -118,8 +118,8 @@ typedef struct
 typedef struct
    {
    ASID idCell;
-   int idUserMax;
-   int idGroupMax;
+   UINT_PTR idUserMax;
+   UINT_PTR idGroupMax;
    } CELL_CHANGE_PARAMS, *LPCELL_CHANGE_PARAMS;
 
 typedef enum
index 40e2e25a1a50ed2b294b899e5e10860855341181..44d1edcadaa82ac546997794e3ae2e8ca6a9743c 100644 (file)
@@ -57,7 +57,7 @@ BOOL CALLBACK User_Password_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          User_Password_OnInitDialog (hDlg);
          break;
 
@@ -111,7 +111,7 @@ BOOL CALLBACK User_Password_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void User_Password_OnInitDialog (HWND hDlg)
 {
-   ASID idUser = (ASID)GetWindowLong (hDlg, DWL_USER);
+   ASID idUser = (ASID)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Get the current properties for this user
    //
@@ -194,14 +194,14 @@ void User_Password_OnRandom (HWND hDlg)
 
 BOOL User_Password_OnOK (HWND hDlg)
 {
-   ASID idUser = (ASID)GetWindowLong (hDlg, DWL_USER);
+   ASID idUser = (ASID)GetWindowLongPtr (hDlg, DWLP_USER);
 
    LPUSER_CPW_PARAMS lpp = New (USER_CPW_PARAMS);
    memset (lpp, 0x00, sizeof(USER_CPW_PARAMS));
    lpp->idUser = idUser;
 
    if (IsDlgButtonChecked (hDlg, IDC_CPW_VERSION_MANUAL))
-      lpp->keyVersion = SP_GetPos (GetDlgItem (hDlg, IDC_CPW_VERSION));
+      lpp->keyVersion = (int) SP_GetPos (GetDlgItem (hDlg, IDC_CPW_VERSION));
    else // (IsDlgButtonChecked (hDlg, IDC_CPW_VERSION_AUTO))
       lpp->keyVersion = 0;
 
index 0efd600b0ed71a2f2813d78e939c516f856a10ba..73a58d8e15627cf56d3b37280c6f684d70a0f35e 100644 (file)
@@ -100,7 +100,7 @@ BOOL CALLBACK User_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          User_Create_OnInitDialog (hDlg);
          break;
 
@@ -148,7 +148,7 @@ BOOL CALLBACK User_Create_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void User_Create_OnInitDialog (HWND hDlg)
 {
-   LPCREATEUSERDLG lpp = (LPCREATEUSERDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEUSERDLG lpp = (LPCREATEUSERDLG)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fix the title of the dialog
    //
@@ -210,7 +210,7 @@ void User_Create_OnID (HWND hDlg)
 
 void User_Create_OnAdvanced (HWND hDlg)
 {
-   LPCREATEUSERDLG lpp = (LPCREATEUSERDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEUSERDLG lpp = (LPCREATEUSERDLG)GetWindowLongPtr (hDlg, DWLP_USER);
    lpp->Advanced.pUserList = NULL;
    lpp->Advanced.fDeleteMeOnClose = FALSE;
    lpp->Advanced.fShowModal = TRUE;
@@ -224,7 +224,7 @@ void User_Create_OnAdvanced (HWND hDlg)
 
 BOOL User_Create_OnOK (HWND hDlg)
 {
-   LPCREATEUSERDLG lpp = (LPCREATEUSERDLG)GetWindowLong (hDlg, DWL_USER);
+   LPCREATEUSERDLG lpp = (LPCREATEUSERDLG)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // First do a little validation of the dialog's entries
    //
index 22c6a85103cb4cecbbd68b3f1205488da3771996..793cd02e90444da7511b52b600d12cf94d73c2ed 100644 (file)
@@ -42,7 +42,7 @@ void User_Delete_OnOK (HWND hDlg);
 
 void User_ShowDelete (LPASIDLIST pUserList)
 {
-   ModalDialogParam (IDD_USER_DELETE, g.hMain, User_Delete_DlgProc, (LPARAM)pUserList);
+   ModalDialogParam (IDD_USER_DELETE, g.hMain, (DLGPROC)User_Delete_DlgProc, (LPARAM)pUserList);
 }
 
 
@@ -54,7 +54,7 @@ BOOL CALLBACK User_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          User_Delete_OnInitDialog (hDlg);
          break;
 
@@ -88,7 +88,7 @@ BOOL CALLBACK User_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void User_Delete_OnInitDialog (HWND hDlg)
 {
-   LPASIDLIST pUserList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pUserList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fix the title of the dialog
    //
@@ -124,7 +124,7 @@ void User_Delete_OnInitDialog (HWND hDlg)
 
 void User_Delete_OnDestroy (HWND hDlg)
 {
-   LPASIDLIST pUserList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pUserList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
    asc_AsidListFree (&pUserList);
 }
 
@@ -142,7 +142,7 @@ void User_Delete_OnCheck (HWND hDlg)
 
 void User_Delete_OnOK (HWND hDlg)
 {
-   LPASIDLIST pUserList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+   LPASIDLIST pUserList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Start a background task to do all the work.
    //
index c4ebfde3699f8ae8504e7ceb2090845b7f1b9ed0..5d51d21841dc657f760e478515196ea49f2dc866 100644 (file)
@@ -664,13 +664,13 @@ void UserProp_General_OnApply (HWND hDlg)
    if (!IsDlgButtonChecked (hDlg, IDC_USER_PWEXPIRES))
       lpp->cdayPwExpires = 0;
    else
-      lpp->cdayPwExpires = SP_GetPos (GetDlgItem (hDlg, IDC_USER_PWEXPIRATION));
+      lpp->cdayPwExpires = (LONG) SP_GetPos (GetDlgItem (hDlg, IDC_USER_PWEXPIRATION));
    lpp->fPwExpires_Mixed = (IsDlgButtonChecked (hDlg, IDC_USER_PWEXPIRES) == BST_INDETERMINATE);
 
    if (!IsDlgButtonChecked (hDlg, IDC_USER_FAILLOCK))
       lpp->cFailLock = 0;
    else
-      lpp->cFailLock = SP_GetPos (GetDlgItem (hDlg, IDC_USER_FAILLOCK_COUNT));
+      lpp->cFailLock = (LONG) SP_GetPos (GetDlgItem (hDlg, IDC_USER_FAILLOCK_COUNT));
    lpp->fFailLock_Mixed = (IsDlgButtonChecked (hDlg, IDC_USER_FAILLOCK) == BST_INDETERMINATE);
 
    if (!IsDlgButtonChecked (hDlg, IDC_USER_FAILLOCK_FINITE))
@@ -1040,7 +1040,7 @@ void UserProp_Advanced_OnApply (HWND hDlg)
       if (!IsDlgButtonChecked (hDlg, IDC_USER_GROUP_HASQUOTA))
          lpp->cGroupQuota = cGROUPQUOTA_INFINITE;
       else // (IsDlgButtonChecked (hDlg, IDC_USER_GROUP_HASQUOTA))
-         lpp->cGroupQuota = SP_GetPos (GetDlgItem (hDlg, IDC_USER_GROUP_QUOTA));
+         lpp->cGroupQuota = (LONG) SP_GetPos (GetDlgItem (hDlg, IDC_USER_GROUP_QUOTA));
       lpp->fGroupQuota_Mixed = (IsDlgButtonChecked (hDlg, IDC_USER_GROUP_HASQUOTA) == BST_INDETERMINATE);
       }
 
index d8541bd3d61668ff572096a125955aefd65c6407..38457629eab49ef3a244b5414392218a520f8ae9 100644 (file)
@@ -88,7 +88,7 @@ BOOL CALLBACK Users_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          FastList_SetSortFunction (GetDlgItem (hDlg, IDC_USERS_LIST), General_ListSortFunction);
 
          FL_RestoreView (GetDlgItem (hDlg, IDC_USERS_LIST), &gr.viewUsr);
-         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_USERS_LIST), Display_GetItemText, (DWORD)&gr.viewUsr);
+         FastList_SetTextCallback (GetDlgItem (hDlg, IDC_USERS_LIST), Display_GetItemText, &gr.viewUsr);
          SetDlgItemText (hDlg, IDC_USERS_PATTERN, g.szPatternUsers);
          Users_EnableButtons(hDlg);
          Display_PopulateUserList();
index f6e6f8d8ea81cef1ff2af84eb3b555e7d7f8a918..d99dfe437c73f3a1c624dbd49d24193b256b6099 100644 (file)
@@ -117,7 +117,7 @@ BOOL CALLBACK Main_DialogProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
       case WM_EXPIRED_CREDENTIALS:
       case WM_REFRESHED_CREDENTIALS:
-         g.hCreds = (PVOID)lp;
+         g.hCreds = (UINT_PTR)lp;
          StartTask (taskUPD_CREDS);
          break;
 
@@ -259,7 +259,7 @@ LRESULT CALLBACK Main_TabHookProc (HWND hTab, UINT msg, WPARAM wp, LPARAM lp)
 }
 
 
-void Main_PrepareTabChild (int iTabNew)
+void Main_PrepareTabChild (size_t iTabNew)
 {
    HWND hTab = GetDlgItem (g.hMain, IDC_TAB);
    int iTabOld = TabCtrl_GetCurSel (hTab);
index 7de6eba8ce666aff61c9fd12f0ff8c5c19f72209..2ffa5508830897637f7070d764f1872f297b40dd 100644 (file)
@@ -18,7 +18,7 @@
 
 BOOL CALLBACK Main_DialogProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
 
-void Main_PrepareTabChild (int iTabNew = -1);
+void Main_PrepareTabChild (size_t iTabNew = -1);
 
 void Main_SetMenus (void);
 void Main_SetViewMenus (HMENU hm);
index bf6a1327c202722ff6109f2c876431d364f514f2..939b71bd0b2107cfb98175193cdac532616d80e2 100644 (file)
@@ -49,10 +49,12 @@ $(ASETKEYOBJS): $$(@B).c
 
 $(AKLOG) : $(AKLOGOBJS) $(EXELIBS) $(OUT)\aklog.res
        $(EXECONLINK) $(EXELIBS) $(OTHERLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 $(ASETKEY) : $(ASETKEYOBJS) $(EXELIBS) $(OUT)\asetkey.res
        $(EXECONLINK) $(EXELIBS) $(OTHERLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 install : $(COPYHEADERS) $(AKLOG) $(ASETKEY)
index 1d0197fa655f3b941eff9813a02e41b94e42cf5a..ae876dae512eeefc837c3462dac4d44b9d93e137 100644 (file)
@@ -31,6 +31,7 @@ EXESDKLIBS=\
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK) $(EXESDKLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 ############################################################################
index 1fce523fc4ee9cfb041a93a7e6388fb5bd5ab595..74c1a1dc8c61bb093d77f4e5dfa514b2dce1cd4a 100644 (file)
@@ -120,6 +120,7 @@ $(EXEOBJSc): $$(@B).c
 
 $(EXEFILE) : $(EXEOBJS) $(EXEOBJSc) $(EXERES) $(AFSAPPLIBOBJS) $(AFSDOBJS) $(EXELIBS)
        $(EXEGUILINK) $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 install : $(COPYHEADERS) $(EXEFILE) lang
index 842e98364e635c7b883babd36bc15a48b08fcc64..b90d8c5095e6cf24bd493699a9dae596223b6339 100644 (file)
@@ -377,7 +377,7 @@ BOOL CALLBACK AutoMapEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          AutoMapEdit_OnInitDialog (hDlg);
          break;
 
@@ -412,7 +412,7 @@ BOOL CALLBACK AutoMapEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void AutoMapEdit_OnInitDialog (HWND hDlg)
 {
-   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
 
    DWORD dwDrives = GetLogicalDrives() | 0x07; // Always pretend A,B,C: are used
 
@@ -462,7 +462,7 @@ void AutoMapEdit_OnInitDialog (HWND hDlg)
 
 void AutoMapEdit_OnOK (HWND hDlg)
 {
-   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
 
    int iItem = SendDlgItemMessage (hDlg, IDC_DRIVE, CB_GETCURSEL, 0, 0);
    int iDrive = SendDlgItemMessage (hDlg, IDC_DRIVE, CB_GETITEMDATA, iItem, 0);
index b0e17b15cb491a1493f6f43a8e4fff754fc84aa8..9103013aa6baf1e0337d8aa9d303aa219e14f5cc 100644 (file)
@@ -193,6 +193,7 @@ static void FreeStringMemory (LPTSTR pszString)
    Free (pszString);
 }
 
+#if 0
 static int lstrncmpi (LPCTSTR pszA, LPCTSTR pszB, size_t cch)
 {
    if (!pszA || !pszB)
@@ -214,7 +215,7 @@ static int lstrncmpi (LPCTSTR pszA, LPCTSTR pszB, size_t cch)
 
    return 0;  // no differences before told to stop comparing, so A==B
 }
-
+#endif
 
 /*
  * REALLOC ____________________________________________________________________
index a746735e35691c3ba994cf87d7d6a104696d6f5d..527f0b472fee66d2ea853aae0111b68d27bffdf3 100644 (file)
@@ -92,7 +92,7 @@ BOOL CALLBACK AdvancedTab_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
                static HBRUSH hbrStatic = CreateSolidBrush (GetSysColor (COLOR_WINDOW));
                SetTextColor ((HDC)wp, GetSysColor (COLOR_WINDOWTEXT));
                SetBkColor ((HDC)wp, GetSysColor (COLOR_WINDOW));
-               return (BOOL)hbrStatic;
+               return hbrStatic?TRUE:FALSE;
                }
             }
          break;
@@ -102,7 +102,7 @@ BOOL CALLBACK AdvancedTab_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             {
             case IDAPPLY:
                if (!AdvancedTab_OnApply (hDlg))
-                  SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+                  SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
                break;
 
             case IDC_REFRESH:
@@ -186,10 +186,10 @@ BOOL AdvancedTab_CommitChanges (BOOL fForce)
    if ((hDlg = PropSheet_FindTabWindow (g.psh, (DLGPROC)AdvancedTab_DlgProc)) == NULL)
       return TRUE;
    if (fForce)
-      SetWindowLong (hDlg, DWL_MSGRESULT, FALSE); // Make sure we try to apply
+      SetWindowLongPtr (hDlg, DWLP_MSGRESULT, FALSE); // Make sure we try to apply
    if (AdvancedTab_OnApply (hDlg))
       return TRUE;
-   SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+   SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
    return FALSE;
 }
 
@@ -197,10 +197,10 @@ BOOL AdvancedTab_CommitChanges (BOOL fForce)
 BOOL AdvancedTab_OnApply (HWND hDlg)
 {
    // Don't try to do anything if we've already failed the apply
-   if (GetWindowLong (hDlg, DWL_MSGRESULT))
+   if (GetWindowLongPtr (hDlg, DWLP_MSGRESULT))
       return FALSE;
 
-   ULONG Value = SP_GetPos (GetDlgItem (hDlg, IDC_CACHE_SIZE));
+   ULONG_PTR Value = SP_GetPos (GetDlgItem (hDlg, IDC_CACHE_SIZE));
    if (Value != g.Configuration.ckCache)
       {
       if (!Config_SetCacheSize (Value))
index 39c56d43165dc0efb3764401cb16c78bd12218e0..5044ecf57f3cfef3287b98c6b3a1fbb711d10d2b 100644 (file)
@@ -373,7 +373,7 @@ BOOL CALLBACK DriveEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          DriveEdit_OnInitDialog (hDlg);
          break;
 
@@ -407,7 +407,7 @@ BOOL CALLBACK DriveEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void DriveEdit_OnInitDialog (HWND hDlg)
 {
-   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fill in the combo box
    //
@@ -463,7 +463,7 @@ void DriveEdit_OnInitDialog (HWND hDlg)
 
 void DriveEdit_OnOK (HWND hDlg)
 {
-   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
 
    int iItem = SendDlgItemMessage (hDlg, IDC_DRIVE, CB_GETCURSEL, 0, 0);
    int iDrive = SendDlgItemMessage (hDlg, IDC_DRIVE, CB_GETITEMDATA, iItem, 0);
@@ -781,7 +781,7 @@ BOOL CALLBACK SubEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          SubEdit_OnInitDialog (hDlg);
          SubEdit_Enable (hDlg);
          break;
@@ -820,7 +820,7 @@ BOOL CALLBACK SubEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 void SubEdit_OnInitDialog (HWND hDlg)
 {
     CHAR msg[256], msgf[256];
-    PSUBMOUNT pSubmount = (PSUBMOUNT)GetWindowLong (hDlg, DWL_USER);
+    PSUBMOUNT pSubmount = (PSUBMOUNT)GetWindowLongPtr (hDlg, DWLP_USER);
     if (GetDlgItemText(hDlg,IDC_STATICSUBMOUNT,(LPSTR)msg,sizeof(msg)-1)>0)
     {
                wsprintf(msgf,msg,cm_back_slash_mount_root,cm_back_slash_mount_root);
@@ -835,7 +835,7 @@ void SubEdit_OnInitDialog (HWND hDlg)
 
 void SubEdit_OnOK (HWND hDlg)
 {
-   PSUBMOUNT pSubmount = (PSUBMOUNT)GetWindowLong (hDlg, DWL_USER);
+   PSUBMOUNT pSubmount = (PSUBMOUNT)GetWindowLongPtr (hDlg, DWLP_USER);
    GetDlgItemText (hDlg, IDC_SUBMOUNT, pSubmount->szSubmount, MAX_PATH);
    GetDlgItemText (hDlg, IDC_MAPPING, pSubmount->szMapping, MAX_PATH);
    EndDialog (hDlg, IDOK);
index 450ad7d7069d12a089fe76b07aa1fbfe837c450b..b4caf2fdf881e3df77a0793ef662950a16f7dda0 100644 (file)
@@ -101,9 +101,9 @@ BOOL CALLBACK GeneralTab_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             {
             case IDAPPLY:
                if (!GeneralTab_OnApply (hDlg, FALSE, TRUE))
-                  SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+                  SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
                else if (g.fIsWinNT && !GeneralTab_AskIfStopped (hDlg))
-                  SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+                  SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
                break;
 
             case IDC_REFRESH:
@@ -228,7 +228,7 @@ BOOL GeneralTab_OnApply (HWND hDlg, BOOL fForce, BOOL fComplainIfInvalid)
    if (!fForce)
       {
       // Don't try to do anything if we've already failed the apply
-      if (GetWindowLong (hDlg, DWL_MSGRESULT))
+      if (GetWindowLongPtr (hDlg, DWLP_MSGRESULT))
          return FALSE;
       }
 
index 4f270535d7c63ef716d258cca7b8713afddfa3d9..54faea7bc65f034400ca3a8a0a86495e6de05c9e 100644 (file)
@@ -70,7 +70,7 @@ BOOL CALLBACK HostsTab_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             {
             case IDAPPLY:
                if (!HostsTab_OnApply (hDlg))
-                  SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+                  SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
                break;
 
             case IDC_ADD:
@@ -146,10 +146,10 @@ BOOL HostsTab_CommitChanges (BOOL fForce)
    if ((hDlg = PropSheet_FindTabWindow (g.psh, (DLGPROC)HostsTab_DlgProc)) == NULL)
       return TRUE;
    if (fForce)
-      SetWindowLong (hDlg, DWL_MSGRESULT, FALSE); // Make sure we try to apply
+      SetWindowLongPtr (hDlg, DWLP_MSGRESULT, FALSE); // Make sure we try to apply
    if (HostsTab_OnApply (hDlg))
       return TRUE;
-   SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+   SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
    return FALSE;
 }
 
@@ -157,7 +157,7 @@ BOOL HostsTab_CommitChanges (BOOL fForce)
 BOOL HostsTab_OnApply (HWND hDlg)
 {
    // Don't try to do anything if we've already failed the apply
-   if (GetWindowLong (hDlg, DWL_MSGRESULT))
+   if (GetWindowLongPtr (hDlg, DWLP_MSGRESULT))
       return FALSE;
 
    if (!CSDB_WriteFile (&g.Configuration.CellServDB))
@@ -654,7 +654,7 @@ BOOL CALLBACK ServerEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          ServerEdit_OnInitDialog (hDlg);
          break;
 
@@ -683,7 +683,7 @@ BOOL CALLBACK ServerEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
       case WM_HELP:
          PCELLDBLINE pLine;
-         pLine = (PCELLDBLINE)GetWindowLong (hDlg, DWL_USER);
+         pLine = (PCELLDBLINE)GetWindowLongPtr (hDlg, DWLP_USER);
 
          CELLDBLINEINFO Info;
          if (!CSDB_CrackLine (&Info, pLine->szLine))
@@ -699,7 +699,7 @@ BOOL CALLBACK ServerEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void ServerEdit_OnInitDialog (HWND hDlg)
 {
-   PCELLDBLINE pLine = (PCELLDBLINE)GetWindowLong (hDlg, DWL_USER);
+    PCELLDBLINE pLine = (PCELLDBLINE)GetWindowLongPtr (hDlg, DWLP_USER);
 
    TCHAR szTitle[ cchRESOURCE ];
    CELLDBLINEINFO Info;
@@ -725,7 +725,7 @@ void ServerEdit_OnInitDialog (HWND hDlg)
 
 BOOL ServerEdit_OnOK (HWND hDlg)
 {
-   PCELLDBLINE pLine = (PCELLDBLINE)GetWindowLong (hDlg, DWL_USER);
+   PCELLDBLINE pLine = (PCELLDBLINE)GetWindowLongPtr (hDlg, DWLP_USER);
 
    TCHAR szComment[ cchCELLDBLINE ];
    GetDlgItemText (hDlg, IDC_COMMENT, szComment, cchCELLDBLINE);
index bbae69a339aa9f706ff9ecc4dafbe043165e644f..3a702c398f7d7fac01194096c1e8ad22cc6fe52b 100644 (file)
@@ -97,7 +97,7 @@ BOOL CALLBACK PrefsTab_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
             {
             case IDAPPLY:
                if (!PrefsTab_OnApply (hDlg))
-                  SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+                  SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
                break;
 
             case IDC_REFRESH:
@@ -195,10 +195,10 @@ BOOL PrefsTab_CommitChanges (BOOL fForce)
    if ((hDlg = PropSheet_FindTabWindow (g.psh, (DLGPROC)PrefsTab_DlgProc)) == NULL)
       return TRUE;
    if (fForce)
-      SetWindowLong (hDlg, DWL_MSGRESULT, FALSE); // Make sure we try to apply
+      SetWindowLongPtr (hDlg, DWLP_MSGRESULT, FALSE); // Make sure we try to apply
    if (PrefsTab_OnApply (hDlg))
       return TRUE;
-   SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+   SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
    return FALSE;
 }
 
@@ -206,7 +206,7 @@ BOOL PrefsTab_CommitChanges (BOOL fForce)
 BOOL PrefsTab_OnApply (HWND hDlg)
 {
    // Don't try to do anything if we've already failed the apply
-   if (GetWindowLong (hDlg, DWL_MSGRESULT))
+   if (GetWindowLongPtr (hDlg, DWLP_MSGRESULT))
       return FALSE;
 
    if (g.Configuration.pFServers && g.Configuration.fChangedPrefs)
@@ -827,7 +827,7 @@ BOOL CALLBACK PrefsEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          PrefsEdit_OnInitDialog (hDlg);
          PrefsEdit_Enable (hDlg);
          break;
@@ -864,7 +864,7 @@ BOOL CALLBACK PrefsEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void PrefsEdit_OnInitDialog (HWND hDlg)
 {
-   PSERVERPREF pPref = (PSERVERPREF)GetWindowLong (hDlg, DWL_USER);
+   PSERVERPREF pPref = (PSERVERPREF)GetWindowLongPtr (hDlg, DWLP_USER);
 
    if (pPref->ipServer)
       EnableWindow (GetDlgItem (hDlg, IDC_SERVER), FALSE);
@@ -884,7 +884,7 @@ void PrefsEdit_OnInitDialog (HWND hDlg)
 
 void PrefsEdit_OnOK (HWND hDlg)
 {
-   PSERVERPREF pPref = (PSERVERPREF)GetWindowLong (hDlg, DWL_USER);
+   PSERVERPREF pPref = (PSERVERPREF)GetWindowLongPtr (hDlg, DWLP_USER);
    pPref->iRank = SP_GetPos (GetDlgItem (hDlg, IDC_RANK));
 
    if (IsWindowEnabled (GetDlgItem (hDlg, IDC_SERVER)))
index d4c18936e3867aed70fabec07774d1afe94c01cf..ec28c1066a2d0338ddad65b94ea22d27044acdb9 100644 (file)
@@ -28,6 +28,7 @@ DEFFILE = afs_cpa.def
 
 $(DLLFILE): $(DLLOBJS)
        $(DLLGUILINK)  $(DLLLIBS) /DEF:$(DEFFILE)
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 
index 40033383b08c1c54c3204dc3ef0208e32979cb22..0c8151f5304ae159b74ffdba5c2afed447ea96c2 100644 (file)
@@ -111,6 +111,7 @@ $(EXECOBJS): $$(@B).c
 
 $(EXEFILE) : $(EXEOBJS) $(EXECOBJS) $(EXERES) $(AFSAPPLIBOBJS) $(AFSDOBJS) $(CLIENTOBJS) $(EXELIBS) 
        $(EXEGUILINK) $(VCLIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 install : $(COPYHEADERS) $(EXEFILE) lang
index b31639531696d6887232993489a0bdcf00a9bbad..ac23ad850dabc7f2b5953d87b00ae2c5be2ca43f 100644 (file)
@@ -164,9 +164,9 @@ void Advanced_OnServiceTimer (HWND hDlg)
    TestAndDoMapShare(Status.dwCurrentState);
    SetDlgItemText (hDlg, IDC_SERVICE_STATUS, szStatus);
 
-   if (fFinal && GetWindowLong (hDlg, DWL_USER))
+   if (fFinal && GetWindowLongPtr (hDlg, DWLP_USER))
       {
-      SetWindowLong (hDlg, DWL_USER, 0);
+      SetWindowLongPtr (hDlg, DWLP_USER, 0);
       Main_RepopulateTabs (FALSE);
       }
 
@@ -252,7 +252,7 @@ void Advanced_OnChangeService (HWND hDlg, WORD wCmd)
    if (fSuccess)
       {
       if (wCmd == IDC_SERVICE_STOP)
-         SetWindowLong (hDlg, DWL_USER, TRUE);
+         SetWindowLongPtr (hDlg, DWLP_USER, TRUE);
       Advanced_OnServiceTimer (hDlg);
       Advanced_StartTimer (hDlg);
 #ifdef USE_KFW
index 876302aa05d46368170d74fb5ea18f1a8bfd6559..2dbb734e954125ee048f2a6a0ba169f1fd2d43e2 100644 (file)
@@ -75,12 +75,12 @@ typedef enum
    } WIZSTEP;
 
 static WIZARD_STATE aStates[] = {
-   { STEP_START,     IDD_WIZ_START,     WizStart_DlgProc,      0 },
-   { STEP_STARTING,  IDD_WIZ_STARTING,  WizStarting_DlgProc,   0 },
-   { STEP_CREDS,     IDD_WIZ_CREDS,     WizCreds_DlgProc,      0 },
-   { STEP_MOUNT,     IDD_WIZ_MOUNT,     WizMount_DlgProc,      0 },
-   { STEP_MOUNTING,  IDD_WIZ_MOUNTING,  WizMounting_DlgProc,   0 },
-   { STEP_FINISH,    IDD_WIZ_FINISH,    WizFinish_DlgProc,     0 }
+   { STEP_START,     IDD_WIZ_START,     (DLGPROC)WizStart_DlgProc,     0 },
+   { STEP_STARTING,  IDD_WIZ_STARTING,  (DLGPROC)WizStarting_DlgProc,  0 },
+   { STEP_CREDS,     IDD_WIZ_CREDS,     (DLGPROC)WizCreds_DlgProc,     0 },
+   { STEP_MOUNT,     IDD_WIZ_MOUNT,     (DLGPROC)WizMount_DlgProc,     0 },
+   { STEP_MOUNTING,  IDD_WIZ_MOUNTING,  (DLGPROC)WizMounting_DlgProc,  0 },
+   { STEP_FINISH,    IDD_WIZ_FINISH,    (DLGPROC)WizFinish_DlgProc,    0 }
 };
 
 static const int cStates = sizeof(aStates) / sizeof(aStates[0]);
index 24f044f62715598c247e0b1ef3d86941b8181f79..24d88cbdcc5642d00f9e9bff9d0f1b8562517763 100644 (file)
@@ -47,7 +47,7 @@ BOOL CALLBACK Creds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
          TabCtrl_AdjustRect (GetParent (hDlg), FALSE, &rTab); 
          SetWindowPos (hDlg, NULL, rTab.left, rTab.top, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
 
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Creds_OnUpdate (hDlg);
          break;
 
@@ -88,7 +88,7 @@ BOOL CALLBACK Creds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Creds_OnCheckRemind (HWND hDlg)
 {
-   LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+   LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
    lock_ObtainMutex(&g.credsLock);
    size_t iCreds;
    for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
@@ -108,7 +108,7 @@ void Creds_OnCheckRemind (HWND hDlg)
 
 void Creds_OnUpdate (HWND hDlg)
 {
-   LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+   LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
    if (!pszCell || !*pszCell)
       {
       BOOL fRunning = IsServiceRunning();
@@ -195,7 +195,7 @@ void Creds_OnUpdate (HWND hDlg)
 
 void Creds_OnClickObtain (HWND hDlg)
 {
-   LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+   LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
 
    InterlockedIncrement (&g.fShowingMessage);
    ShowObtainCreds (FALSE, pszCell);
@@ -204,7 +204,7 @@ void Creds_OnClickObtain (HWND hDlg)
 
 void Creds_OnClickDestroy (HWND hDlg)
 {
-   LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+   LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
    if (pszCell && *pszCell)
       {
       DestroyCurrentCredentials (pszCell);
@@ -257,7 +257,7 @@ BOOL CALLBACK NewCreds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          NewCreds_OnInitDialog (hDlg);
          break;
 
@@ -299,7 +299,7 @@ BOOL CALLBACK NewCreds_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void NewCreds_OnInitDialog (HWND hDlg)
 {
-   LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+   LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
    if (!pszCell)
       pszCell = TEXT("");
 
@@ -406,7 +406,7 @@ void NewCreds_OnCancel (HWND hDlg)
    }
 
    if ( !pszCell )
-       pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+       pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
    if (pszCell)
       {
       HWND hTab = GetDlgItem (g.hMain, IDC_TABS);
index d82a81b7b139087684e3fb363f64ceb4960a339d..b4e9f7a73a4fb2a7bcff28b219ba6d31ae36967f 100644 (file)
@@ -350,7 +350,7 @@ BOOL CALLBACK Mapping_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
    switch (msg)
       {
       case WM_INITDIALOG:
-         SetWindowLong (hDlg, DWL_USER, lp);
+         SetWindowLongPtr (hDlg, DWLP_USER, lp);
          Mapping_OnInitDialog (hDlg);
          break;
 
@@ -385,7 +385,7 @@ BOOL CALLBACK Mapping_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
 
 void Mapping_OnInitDialog (HWND hDlg)
 {
-   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
 
    // Fill in the combo box
    //
@@ -440,7 +440,7 @@ void Mapping_OnInitDialog (HWND hDlg)
 
 void Mapping_OnOK (HWND hDlg)
 {
-   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+   PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
 
    int iItem = SendDlgItemMessage (hDlg, IDC_MAP_LETTER, CB_GETCURSEL, 0, 0);
    int iDrive = SendDlgItemMessage (hDlg, IDC_MAP_LETTER, CB_GETITEMDATA, iItem, 0);
index ebfc7b6890096c13f4c7d4bc63532781f00b3d37..71ccdd91373f31cd09cdd0e9deb513c8fb8d6de1 100644 (file)
@@ -64,6 +64,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:afs_shl_ext.def $(DLLSDKLIBS)
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 ############################################################################
index 7324561ef365b7f31044c0337d94cba874a6540d..0ab470492bd116ab6c473507e8b846a146ef0749 100644 (file)
@@ -419,7 +419,7 @@ STDMETHODIMP CShellExt::XMenuExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
     return NOERROR;
 }
 
-STDMETHODIMP CShellExt::XMenuExt::GetCommandString(UINT idCmd, UINT uType,
+STDMETHODIMP CShellExt::XMenuExt::GetCommandString(UINT_PTR idCmd, UINT uType,
     UINT* pwReserved, LPSTR pszName, UINT cchMax)
 {
        if (uType != GCS_HELPTEXT)
index 9265644a7d6d77332a99a0aaf490760e93645045..edfc60de41db4e2f74a0603f128bcc3412eefab8 100644 (file)
@@ -81,7 +81,7 @@ protected:
         STDMETHOD(QueryContextMenu)( HMENU hmenu,UINT indexMenu,UINT idCmdFirst,
             UINT idCmdLast,UINT uFlags);
         STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
-        STDMETHOD(GetCommandString)(UINT idCmd,UINT uType,UINT* pwReserved,LPSTR pszName,
+        STDMETHOD(GetCommandString)(UINT_PTR idCmd,UINT uType,UINT* pwReserved,LPSTR pszName,
             UINT cchMax);
     END_INTERFACE_PART(MenuExt)
 
index 47199b97b501c178fa64dc5873b82ed93eb0b880..c939f1bbe584dd216ab5133dd65bea0985d21212 100644 (file)
@@ -77,6 +77,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) 
        $(DLLGUILINK) $(DLLLIBS) -def:libosi.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
@@ -106,12 +107,13 @@ $(EXEOBJS) : osidebug.c
 
 $(EXEFILE) : $(EXEOBJS)
        $(EXEGUILINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 ############################################################################
 # midl on dbrpc.idl
 
 dbrpc.h dbrpc_c.c dbrpc_s.c: dbrpc.idl
-       $(MIDL) $(AFSDEV_AUXMIDLFLAGS) -Zp4 -cpp_cmd $(cc) -cpp_opt "-E" /no_robust $**
+       $(MIDL) $(AFSDEV_AUXMIDLFLAGS) -Zp4 -cpp_cmd $(cc) -cpp_opt "-E" $**
 ############################################################################
 # generate versioninfo resources
 
index 7c5295375b2c1c6a9c8fc92a1a6a812afa67b0db..5f4e6f804916eb7ecdf54ca20954d7d763285944 100644 (file)
@@ -53,8 +53,8 @@ typedef char osi_remString_t[OSI_DBRPC_STRLEN];
 typedef struct osi_remGetInfoParms {
        long icount;
        long scount;
-/*     [length_is (icount)] long idata[OSI_DBRPC_NUMINTS]; */
-       long idata[OSI_DBRPC_NUMINTS];
+/*     [length_is (icount)] __int64 idata[OSI_DBRPC_NUMINTS]; */
+       __int64 idata[OSI_DBRPC_NUMINTS];
        [length_is (scount)] osi_remString_t sdata[OSI_DBRPC_NUMSTRS];
 } osi_remGetInfoParms_t;
 
index eca25bf066b1ad3c7a7dd73b77999d473f2258c3..b8d4ac2e07f8ac92ac20286fb6f97c3a0d5965e2 100644 (file)
@@ -306,7 +306,7 @@ int lock_TryMutex(struct osi_mutex *lockp) {
        return i;
 }
 
-void osi_SleepR(long sleepVal, struct osi_rwlock *lockp)
+void osi_SleepR(LONG_PTR sleepVal, struct osi_rwlock *lockp)
 {
        long i;
         CRITICAL_SECTION *csp;
@@ -333,7 +333,7 @@ void osi_SleepR(long sleepVal, struct osi_rwlock *lockp)
        osi_SleepSpin(sleepVal, csp);
 }
 
-void osi_SleepW(long sleepVal, struct osi_rwlock *lockp)
+void osi_SleepW(LONG_PTR sleepVal, struct osi_rwlock *lockp)
 {
        long i;
         CRITICAL_SECTION *csp;
@@ -358,7 +358,7 @@ void osi_SleepW(long sleepVal, struct osi_rwlock *lockp)
        osi_SleepSpin(sleepVal, csp);
 }
 
-void osi_SleepM(long sleepVal, struct osi_mutex *lockp)
+void osi_SleepM(LONG_PTR sleepVal, struct osi_mutex *lockp)
 {
        long i;
         CRITICAL_SECTION *csp;
index 7467f06e73dd479630b964c5c1a05655fdbfc209..f5482b472c87bd2b71860bbc824adb88e1a29d8e 100644 (file)
@@ -31,7 +31,7 @@ typedef struct osi_mutex {
        char type;                      /* for all types; type 0 uses atomic count */
        char flags;                     /* flags for base type */
        unsigned short atomicIndex;     /* index of lock for low-level sync */
-        thread_t tid;                  /* tid of thread that owns the lock */
+        DWORD tid;                     /* tid of thread that owns the lock */
        unsigned short waiters;         /* waiters */
         unsigned short pad;
        union {
@@ -82,15 +82,15 @@ extern int lock_TryWrite (struct osi_rwlock *);
 
 extern int lock_TryMutex (struct osi_mutex *);
 
-extern void osi_SleepR (long, struct osi_rwlock *);
+extern void osi_SleepR (LONG_PTR, struct osi_rwlock *);
 
-extern void osi_SleepW (long, struct osi_rwlock *);
+extern void osi_SleepW (LONG_PTR, struct osi_rwlock *);
 
-extern void osi_SleepM (long, struct osi_mutex *);
+extern void osi_SleepM (LONG_PTR, struct osi_mutex *);
 
-extern void osi_Sleep (long);
+extern void osi_Sleep (LONG_PTR);
 
-extern void osi_Wakeup (long);
+extern void osi_Wakeup (LONG_PTR);
 
 extern void lock_FinalizeRWLock(struct osi_rwlock *);
 
index c68dc46d9edc1c3e7b3a4c5c8281c7299858cfd3..563fd64da9dfee98b2f108bbfe17a9bb20a4e5cf 100644 (file)
@@ -20,7 +20,7 @@ typedef struct osi_remLockInfo {
        long type;
 
        /* the addr */
-       long lockAddr;
+       LONG_PTR lockAddr;
 
        /* raw state */
        long readers;
@@ -43,8 +43,8 @@ typedef struct osi_remLockInfo {
 
 /* mapped over remote debugging integer array */
 typedef struct osi_remSleepInfo {
-       long tid;               /* thread id of the blocked thread */
-       long sleepValue;        /* the value we're sleeping at */
+       thread_t tid;           /* thread id of the blocked thread */
+       LONG_PTR sleepValue;    /* the value we're sleeping at */
 } osi_remSleepInfo_t;
 
 #define OSI_MAXRPCCALLS 2      /* one for osidb, one for AFS RPC */
index 43561aa8285698d2d8a60c1f8d09985ab9a45a13..7466b6636f08a298ad4c3e615f99df43b7eea5ac 100644 (file)
@@ -128,7 +128,7 @@ osi_log_t *osi_LogCreate(char *namep, long size)
 /* we just panic'd.  Turn off all logging adding special log record
  * to all enabled logs.  Be careful not to wait for a lock.
  */
-void osi_LogPanic(char *filep, long lineNumber)
+void osi_LogPanic(char *filep, size_t lineNumber)
 {
        osi_log_t *tlp;
 
@@ -137,7 +137,7 @@ void osi_LogPanic(char *filep, long lineNumber)
 
                /* otherwise, proceed */
                if (filep)
-                       osi_LogAdd(tlp, "**PANIC** (file %s:%d)", (long) filep, lineNumber, 0, 0);
+                       osi_LogAdd(tlp, "**PANIC** (file %s:%d)", (size_t) filep, lineNumber, 0, 0);
                else
                        osi_LogAdd(tlp, "**PANIC**", 0, 0, 0, 0);
                
@@ -172,7 +172,7 @@ void osi_LogFree(osi_log_t *logp)
 }
 
 /* add an element to a log */
-void osi_LogAdd(osi_log_t *logp, char *formatp, long p0, long p1, long p2, long p3)
+void osi_LogAdd(osi_log_t *logp, char *formatp, size_t p0, size_t p1, size_t p2, size_t p3)
 {
        osi_logEntry_t *lep;
         long ix;
index e2284d6fff262e3872130e4829a46b90b43b4777..3c4e43f2c1d0af958b5a1952a43fe6a7ecc2dc4b 100644 (file)
@@ -23,7 +23,7 @@
 #define OSI_LOG_MAXPARMS       4       /* max # of int parms */
 
 typedef struct osi_logEntry {
-       long tid;                       /* thread ID */
+       size_t tid;                     /* thread ID */
         unsigned long micros;          /* microsecond-based time stamp */
         char *formatp;                 /* format string */
         long parms[OSI_LOG_MAXPARMS];  /* parms */
@@ -32,10 +32,10 @@ typedef struct osi_logEntry {
 typedef struct osi_log {
        osi_queue_t q;                  /* queue of all logs */
        char *namep;                    /* name */
-       long alloc;                     /* allocated size */
+       size_t alloc;                   /* allocated size */
         long nused;                    /* number currently in use */
         long first;                    /* index of first entry */
-        Crit_Sec cs;           /* use this, rather than a higher-level
+        Crit_Sec cs;                   /* use this, rather than a higher-level
                                         * lock, so we can log stuff from
                                         * osi lock pkg */
         osi_logEntry_t *datap;         /* data for the log */
@@ -55,11 +55,11 @@ typedef struct osi_logFD {
 
 extern long osi_logSize;
 
-extern osi_log_t *osi_LogCreate(char *, long);
+extern osi_log_t *osi_LogCreate(char *, size_t);
 
 extern void osi_LogFree(osi_log_t *);
 
-extern void osi_LogAdd(osi_log_t *, char *, long, long, long, long);
+extern void osi_LogAdd(osi_log_t *, char *, size_t, size_t, size_t, size_t);
 
 extern void osi_LogReset(osi_log_t *);
 
@@ -75,7 +75,7 @@ extern void osi_LogEnable(osi_log_t *);
 
 extern void osi_LogDisable(osi_log_t *);
 
-extern void osi_LogPanic(char *filep, long line);
+extern void osi_LogPanic(char *filep, size_t line);
 
 extern void osi_LogPrint(osi_log_t *logp, FILE_HANDLE handle);
 
@@ -87,11 +87,11 @@ extern char *osi_HexifyString(char *s);
 
 /* define macros */
 #define osi_Log0(l,f)          osi_LogAdd((l), (f), 0, 0, 0, 0)
-#define osi_Log1(l,f,a)                osi_LogAdd((l), (f), (long) (a), 0, 0, 0)
-#define osi_Log2(l,f,a,b)      osi_LogAdd((l), (f), (long) (a), (long) (b), 0, 0)
-#define osi_Log3(l,f,a,b,c)    osi_LogAdd((l), (f), (long) (a), (long) (b), (long) (c), 0)
-#define osi_Log4(l,f,a,b,c,d)  osi_LogAdd((l), (f), (long) (a), (long) (b), (long) (c), (long) (d))
-#define osi_Log5(l,f,a,b,c,d,e)        osi_LogAdd((l), (f), (long) (a), (long) (b), (long) (c), (long) (d), (long) (e))
+#define osi_Log1(l,f,a)                osi_LogAdd((l), (f), (size_t) (a), 0, 0, 0)
+#define osi_Log2(l,f,a,b)      osi_LogAdd((l), (f), (size_t) (a), (size_t) (b), 0, 0)
+#define osi_Log3(l,f,a,b,c)    osi_LogAdd((l), (f), (size_t) (a), (size_t) (b), (size_t) (c), 0)
+#define osi_Log4(l,f,a,b,c,d)  osi_LogAdd((l), (f), (size_t) (a), (size_t) (b), (size_t) (c), (size_t) (d))
+#define osi_Log5(l,f,a,b,c,d,e)        osi_LogAdd((l), (f), (size_t) (a), (size_t) (b), (size_t) (c), (size_t) (d), (size_t) (e))
 
 #ifdef DEBUG_VERBOSE
 #define DEBUG_EVENT1(a,b,c) {HANDLE h; char *ptbuf[1],buf[132];\
index a7a1c31de86f0a386cb289f38daa0afad51b934b..801fccf3783a31c15e89d475ad1092d5ec37aed1 100644 (file)
@@ -27,9 +27,9 @@ typedef struct osi_lockOps {
        int (*TryReadProc)(struct osi_rwlock *);
        int (*TryWriteProc)(struct osi_rwlock *);
        int (*TryMutexProc)(struct osi_mutex *);
-       void (*SleepRProc)(long, struct osi_rwlock *);
-       void (*SleepWProc)(long, struct osi_rwlock *);
-       void (*SleepMProc)(long, struct osi_mutex *);
+       void (*SleepRProc)(LONG_PTR, struct osi_rwlock *);
+       void (*SleepWProc)(LONG_PTR, struct osi_rwlock *);
+       void (*SleepMProc)(LONG_PTR, struct osi_mutex *);
        void (*InitializeMutexProc)(struct osi_mutex *, char *);
        void (*InitializeRWLockProc)(struct osi_rwlock *, char *);
        void (*FinalizeMutexProc)(struct osi_mutex *);
index 1d9524491c2f0670891a151ac01dbedfb6277f4e..b8ca754a8b5fed69f0716052566e9d464b57a870 100644 (file)
@@ -97,28 +97,28 @@ void osi_ReleaseSleepInfo(osi_sleepInfo_t *ap)
  */
 void osi_FreeSleepInfo(osi_sleepInfo_t *ap)
 {
-       long idx;
-
-       if (ap->refCount > 0) {
-               TlsSetValue(osi_SleepSlot, NULL);       /* don't reuse me */
-               ap->states |= OSI_SLEEPINFO_DELETED;
-               return;
-       }
-
-       /* remove from hash if still there */
-       if (ap->states & OSI_SLEEPINFO_INHASH) {
-               ap->states &= ~OSI_SLEEPINFO_INHASH;
-               idx = osi_SLEEPHASH(ap->value);
-               osi_QRemove((osi_queue_t **) &osi_sleepers[idx], &ap->q);
-       }
-
-       if (ap->states & OSI_SLEEPINFO_DELETED) {
-               EnterCriticalSection(&osi_sleepInfoAllocCS);
-               ap->q.nextp = (osi_queue_t *) osi_sleepInfoFreeListp;
-               osi_sleepInfoFreeListp = ap;
-               osi_sleepInfoCount++;
-               LeaveCriticalSection(&osi_sleepInfoAllocCS);
-       }
+    LONG_PTR idx;
+
+    if (ap->refCount > 0) {
+       TlsSetValue(osi_SleepSlot, NULL);       /* don't reuse me */
+       ap->states |= OSI_SLEEPINFO_DELETED;
+       return;
+    }
+
+    /* remove from hash if still there */
+    if (ap->states & OSI_SLEEPINFO_INHASH) {
+       ap->states &= ~OSI_SLEEPINFO_INHASH;
+       idx = osi_SLEEPHASH(ap->value);
+       osi_QRemove((osi_queue_t **) &osi_sleepers[idx], &ap->q);
+    }
+
+    if (ap->states & OSI_SLEEPINFO_DELETED) {
+       EnterCriticalSection(&osi_sleepInfoAllocCS);
+       ap->q.nextp = (osi_queue_t *) osi_sleepInfoFreeListp;
+       osi_sleepInfoFreeListp = ap;
+       osi_sleepInfoCount++;
+       LeaveCriticalSection(&osi_sleepInfoAllocCS);
+    }
 }
 
 /* allocate a new sleep structure from the free list */
@@ -269,7 +269,7 @@ void osi_TWait(osi_turnstile_t *turnp, int waitFor, void *patchp, CRITICAL_SECTI
                sp->states = 0;
        sp->refCount = 0;
         sp->waitFor = waitFor;
-        sp->value = (long) patchp;
+        sp->value = (LONG_PTR) patchp;
         osi_QAdd((osi_queue_t **) &turnp->firstp, &sp->q);
         if (!turnp->lastp) turnp->lastp = sp;
         LeaveCriticalSection(releasep);
@@ -413,78 +413,78 @@ void osi_TSignalForMLs(osi_turnstile_t *turnp, int stillHaveReaders, CRITICAL_SE
  * address (value).
  * Called with no locks held.
  */
-void osi_SleepSpin(long sleepValue, CRITICAL_SECTION *releasep)
+void osi_SleepSpin(LONG_PTR sleepValue, CRITICAL_SECTION *releasep)
 {
-       register int idx;
-       int code;
-       osi_sleepInfo_t *sp;
-       CRITICAL_SECTION *csp;
-
-       sp = TlsGetValue(osi_SleepSlot);
-       if (sp == NULL) {
-               sp = osi_AllocSleepInfo();
-               TlsSetValue(osi_SleepSlot, sp);
-       }
-       else
-               sp->states = 0;
-       sp->refCount = 0;
-       sp->value = sleepValue;
-       idx = osi_SLEEPHASH(sleepValue);
-       csp = &osi_critSec[idx];
-       EnterCriticalSection(csp);
-       osi_QAdd((osi_queue_t **) &osi_sleepers[idx], &sp->q);
-       sp->states |= OSI_SLEEPINFO_INHASH;
-       LeaveCriticalSection(releasep);
-       LeaveCriticalSection(csp);
-       osi_totalSleeps++;      /* stats */
-       while(1) {
-               /* wait */
-               code = WaitForSingleObject(sp->sema,
-                       /* timeout */ INFINITE);
-
-               /* if the reason for the wakeup was that we were signalled,
-                * break out, otherwise try again, since the semaphore count is
-                * decreased only when we get WAIT_OBJECT_0 back.
-                */
-               if (code == WAIT_OBJECT_0) break;
-       }
-
-       /* now clean up */
-       EnterCriticalSection(csp);
-
-       /* must be signalled */
-       osi_assert(sp->states & OSI_SLEEPINFO_SIGNALLED);
-
-       /* free the sleep structure, must be done under bucket lock
-        * so that we can check reference count and serialize with
-        * those who change it.
-        */
-       osi_FreeSleepInfo(sp);
-
-       LeaveCriticalSection(csp);
+    register LONG_PTR idx;
+    int code;
+    osi_sleepInfo_t *sp;
+    CRITICAL_SECTION *csp;
+
+    sp = TlsGetValue(osi_SleepSlot);
+    if (sp == NULL) {
+       sp = osi_AllocSleepInfo();
+       TlsSetValue(osi_SleepSlot, sp);
+    }
+    else
+       sp->states = 0;
+    sp->refCount = 0;
+    sp->value = sleepValue;
+    idx = osi_SLEEPHASH(sleepValue);
+    csp = &osi_critSec[idx];
+    EnterCriticalSection(csp);
+    osi_QAdd((osi_queue_t **) &osi_sleepers[idx], &sp->q);
+    sp->states |= OSI_SLEEPINFO_INHASH;
+    LeaveCriticalSection(releasep);
+    LeaveCriticalSection(csp);
+    osi_totalSleeps++; /* stats */
+    while(1) {
+       /* wait */
+       code = WaitForSingleObject(sp->sema,
+                                   /* timeout */ INFINITE);
+
+       /* if the reason for the wakeup was that we were signalled,
+       * break out, otherwise try again, since the semaphore count is
+       * decreased only when we get WAIT_OBJECT_0 back.
+       */
+       if (code == WAIT_OBJECT_0) break;
+    }
+
+    /* now clean up */
+    EnterCriticalSection(csp);
+
+    /* must be signalled */
+    osi_assert(sp->states & OSI_SLEEPINFO_SIGNALLED);
+
+    /* free the sleep structure, must be done under bucket lock
+     * so that we can check reference count and serialize with
+     * those who change it.
+     */
+    osi_FreeSleepInfo(sp);
+
+    LeaveCriticalSection(csp);
 }
 
 /* utility function to wakeup someone sleeping in SleepSched */
-void osi_WakeupSpin(long sleepValue)
+void osi_WakeupSpin(LONG_PTR sleepValue)
 {
-       register int idx;
-       register CRITICAL_SECTION *csp;
-       register osi_sleepInfo_t *tsp;
-       
-       idx = osi_SLEEPHASH(sleepValue);
-       csp = &osi_critSec[idx];
-       EnterCriticalSection(csp);
-       for(tsp=osi_sleepers[idx]; tsp; tsp=(osi_sleepInfo_t *) osi_QNext(&tsp->q)) {
-               if ((!(tsp->states & (OSI_SLEEPINFO_DELETED|OSI_SLEEPINFO_SIGNALLED)))
-                       && tsp->value == sleepValue) {
-                       ReleaseSemaphore(tsp->sema, 1, (long *) 0);
-                       tsp->states |= OSI_SLEEPINFO_SIGNALLED;
-               }
-       }
-       LeaveCriticalSection(csp);
-}
+    register LONG_PTR idx;
+    register CRITICAL_SECTION *csp;
+    register osi_sleepInfo_t *tsp;
 
-void osi_Sleep(long sleepVal)
+    idx = osi_SLEEPHASH(sleepValue);
+    csp = &osi_critSec[idx];
+    EnterCriticalSection(csp);
+       for(tsp=osi_sleepers[idx]; tsp; tsp=(osi_sleepInfo_t *) osi_QNext(&tsp->q)) {
+           if ((!(tsp->states & (OSI_SLEEPINFO_DELETED|OSI_SLEEPINFO_SIGNALLED)))
+                && tsp->value == sleepValue) {
+               ReleaseSemaphore(tsp->sema, 1, (long *) 0);
+               tsp->states |= OSI_SLEEPINFO_SIGNALLED;
+           }
+       }       
+    LeaveCriticalSection(csp);
+}      
+
+void osi_Sleep(LONG_PTR sleepVal)
 {
        CRITICAL_SECTION *csp;
         
@@ -494,7 +494,7 @@ void osi_Sleep(long sleepVal)
        osi_SleepSpin(sleepVal, csp);
 }
 
-void osi_Wakeup(long sleepVal)
+void osi_Wakeup(LONG_PTR sleepVal)
 {
        /* how do we do osi_Wakeup on a per-lock package type? */
 
@@ -578,37 +578,37 @@ void osi_AdvanceSleepFD(osi_sleepFD_t *cp)
 
 long osi_SleepFDGetInfo(osi_fd_t *ifdp, osi_remGetInfoParms_t *parmsp)
 {
-       osi_sleepFD_t *fdp = (osi_sleepFD_t *) ifdp;
-       osi_sleepInfo_t *sip;
-       long code;
-
-       /* now, grab a mutex serializing all iterations over FDs, so that
-        * if the RPC screws up and sends us two calls on the same FD, we don't
-        * crash and burn advancing the same FD concurrently.  Probably paranoia,
-        * but you generally shouldn't trust stuff coming over the network.
-        */
-       EnterCriticalSection(&osi_sleepFDCS);
-
-       /* this next call advances the FD to the next guy, and simultaneously validates
-        * that the info from the network is valid.  If it isn't, we do our best to
-        * resynchronize our position, but we might return some info multiple times.
-        */
-       osi_AdvanceSleepFD(fdp);
-
-       /* now copy out info */
-       if (sip = fdp->sip) {   /* one '=' */
-               parmsp->idata[0] = sip->value;
-               parmsp->idata[1] = sip->tid;
-               parmsp->idata[2] = sip->states;
-               parmsp->icount = 3;
-               parmsp->scount = 0;
-               code = 0;
-       }
-       else code = OSI_DBRPC_EOF;
-
-       LeaveCriticalSection(&osi_sleepFDCS);
-
-       return code;
+    osi_sleepFD_t *fdp = (osi_sleepFD_t *) ifdp;
+    osi_sleepInfo_t *sip;
+    long code;
+
+    /* now, grab a mutex serializing all iterations over FDs, so that
+     * if the RPC screws up and sends us two calls on the same FD, we don't
+     * crash and burn advancing the same FD concurrently.  Probably paranoia,
+     * but you generally shouldn't trust stuff coming over the network.
+     */
+    EnterCriticalSection(&osi_sleepFDCS);
+
+    /* this next call advances the FD to the next guy, and simultaneously validates
+     * that the info from the network is valid.  If it isn't, we do our best to
+     * resynchronize our position, but we might return some info multiple times.
+     */
+    osi_AdvanceSleepFD(fdp);
+
+    /* now copy out info */
+    if (sip = fdp->sip) {      /* one '=' */
+       parmsp->idata[0] = sip->value;
+       parmsp->idata[1] = sip->tid;
+       parmsp->idata[2] = sip->states;
+       parmsp->icount = 3;
+       parmsp->scount = 0;
+       code = 0;
+    }
+    else code = OSI_DBRPC_EOF;
+
+    LeaveCriticalSection(&osi_sleepFDCS);
+
+    return code;
 }
 
 /* finally, DLL-specific code for NT */
@@ -675,28 +675,32 @@ void osi_panic(char *msgp, char *filep, long line)
 }
 
 /* get time in seconds since some relatively recent time */
-unsigned long osi_Time(void)
+time_t osi_Time(void)
 {
-       FILETIME fileTime;
-        SYSTEMTIME sysTime;
-        unsigned long remainder;
-        LARGE_INTEGER bootTime;
-
-       /* setup boot time values */
-        GetSystemTime(&sysTime);
-        SystemTimeToFileTime(&sysTime, &fileTime);
-
-       /* change the base of the time so it won't be negative for a long time */
-       fileTime.dwHighDateTime -= 28000000;
-
-        bootTime.HighPart = fileTime.dwHighDateTime;
-        bootTime.LowPart = fileTime.dwLowDateTime;
-        /* now, bootTime is in 100 nanosecond units, and we'd really rather
-         * have it in 1 second units, units 10,000,000 times bigger.
-         * So, we divide.
-         */
-        bootTime = ExtendedLargeIntegerDivide(bootTime, 10000000, &remainder);
-        return bootTime.LowPart;
+    FILETIME fileTime;
+    SYSTEMTIME sysTime;
+    unsigned long remainder;
+    LARGE_INTEGER bootTime;
+
+    /* setup boot time values */
+    GetSystemTime(&sysTime);
+    SystemTimeToFileTime(&sysTime, &fileTime);
+
+    /* change the base of the time so it won't be negative for a long time */
+    fileTime.dwHighDateTime -= 28000000;
+
+    bootTime.HighPart = fileTime.dwHighDateTime;
+    bootTime.LowPart = fileTime.dwLowDateTime;
+    /* now, bootTime is in 100 nanosecond units, and we'd really rather
+     * have it in 1 second units, units 10,000,000 times bigger.
+     * So, we divide.
+     */
+    bootTime = ExtendedLargeIntegerDivide(bootTime, 10000000, &remainder);
+#ifdef __WIN64
+    return bootTime.QuadPart;
+#else
+    return bootTime.LowPart;
+#endif
 }
 
 /* get time in seconds since some relatively recent time */
index 4bf61751d03f5df781189fb54d297333482c92cc..3467eea0a547c735bb23541c9845799928aa5dc7 100644 (file)
 #define OSI_SLEEPINFO_W4WRITE  2       /* waiting for a write lock */
 typedef struct osi_sleepInfo {
        osi_queue_t q;
-       long value;             /* sleep value when in a sleep queue, patch addr for turnstiles */
-       unsigned long tid;      /* thread ID of sleeper */
-       EVENT_HANDLE sema;              /* semaphore for this entry */
+       LONG_PTR value;         /* sleep value when in a sleep queue, patch addr for turnstiles */
+       size_t tid;             /* thread ID of sleeper */
+       EVENT_HANDLE sema;      /* semaphore for this entry */
        unsigned short states;  /* states bits */
        unsigned short idx;     /* sleep hash table we're in, if in hash */
         unsigned short waitFor;        /* what are we waiting for; used for bulk wakeups */
-       unsigned long refCount;/* reference count from FDs */
+       unsigned long refCount; /* reference count from FDs */
 } osi_sleepInfo_t;
 
 /* first guy is the most recently added process */
@@ -63,7 +63,7 @@ typedef struct osi_once {
 /* size of mutex hash table; should be a prime number; used for mutex and lock hashing */
 #define OSI_MUTEXHASHSIZE      251     /* prime number */
 
-#define osi_MUTEXHASH(x) ((unsigned short) (((unsigned long) x) % (unsigned) OSI_MUTEXHASHSIZE))
+#define osi_MUTEXHASH(x) ((unsigned short) (((LONG_PTR) x) % (intptr_t) OSI_MUTEXHASHSIZE))
 
 /* size of sleep value hash table.  Must be power of 2 */
 #define OSI_SLEEPHASHSIZE      128
@@ -78,14 +78,14 @@ typedef struct osi_once {
 extern Crit_Sec osi_sleepCookieCS;
 
 /* spin lock version of atomic sleep, used internally only */
-extern void osi_SleepSpin(long value, Crit_Sec *counterp);
+extern void osi_SleepSpin(LONG_PTR value, Crit_Sec *counterp);
 
 /* spin lock version of wakeup, used internally only */
-extern void osi_WakeupSpin(long value);
+extern void osi_WakeupSpin(LONG_PTR value);
 
 #ifndef DJGPP
 /* exported function to sleep on a value */
-extern void osi_Sleep (long);
+extern void osi_Sleep (LONG_PTR);
 #endif
 
 extern void osi_FreeSleepInfo(osi_sleepInfo_t *);
@@ -113,7 +113,7 @@ extern void osi_EndOnce(osi_once_t *);
 
 #ifndef DJGPP
 /* exported function to wakeup those sleeping on a value */
-extern void osi_Wakeup (long);
+extern void osi_Wakeup (LONG_PTR);
 
 extern void osi_Init (void);
 #endif /* !DJGPP */
@@ -155,7 +155,7 @@ unsigned long osi_GetBootTime(void);
 void osi_InitPanic(void *anotifFunc);
 void osi_panic(char *, char *, long);
 
-unsigned long osi_Time(void);
+time_t osi_Time(void);
 
 extern void osi_TWait(osi_turnstile_t *turnp, int waitFor, void *patchp,
        Crit_Sec *releasep);
index 405acc31591c4cd651cd8aedc773489f2676a647..34692a8009d67faa2071134b31023a526a802005 100644 (file)
@@ -798,7 +798,7 @@ long osi_StatFDGetInfo(osi_fd_t *ifdp, osi_remGetInfoParms_t *parmsp)
 
                memset((void *) parmsp, 0, sizeof(*parmsp));
                backMutexp = mp->qi.backp;
-               parmsp->idata[0] = (long) backMutexp;
+               parmsp->idata[0] = backMutexp;
                parmsp->idata[1] = (backMutexp->flags & OSI_LOCKFLAG_EXCL)? 1 : 0;
                /* reader count [2] is 0 */
                parmsp->idata[3] = (backMutexp->waiters > 0)? 1 : 0;
@@ -816,7 +816,7 @@ long osi_StatFDGetInfo(osi_fd_t *ifdp, osi_remGetInfoParms_t *parmsp)
 
                memset((void *) parmsp, 0, sizeof(*parmsp));
                 backRWLockp = rwp->qi.backp;
-               parmsp->idata[0] = (long) backRWLockp;
+               parmsp->idata[0] = backRWLockp;
                parmsp->idata[1] = (backRWLockp->flags & OSI_LOCKFLAG_EXCL)? 1 : 0;
                parmsp->idata[2] = backRWLockp->readers;
                parmsp->idata[3] = (backRWLockp->waiters > 0)? 1 : 0;
index 8bc89c0a01723dc06eefdb782b6b4de47107436a..9d5a91e83632b9a50a30e8ca1659446885743ca6 100644 (file)
@@ -96,8 +96,8 @@ LARGE_INTEGER LargeIntegerSubtract(LARGE_INTEGER a, LARGE_INTEGER b)
 }
 LARGE_INTEGER ExtendedLargeIntegerDivide(LARGE_INTEGER a, unsigned long b, unsigned long *remainder)
 {
-       LARGE_INTEGER result;
-       ULONGLONG a1,q1,r1;
+    LARGE_INTEGER result;
+    ULONGLONG a1,q1,r1;
 
     result.HighPart=0;
     result.LowPart=0;
@@ -107,27 +107,27 @@ LARGE_INTEGER ExtendedLargeIntegerDivide(LARGE_INTEGER a, unsigned long b, unsig
     a1 = a.HighPart;
     a1 <<= 32;
     a1 |= a.LowPart;
-       q1=a1/b;
-       r1=a1-(q1*b);
-       if (r1 > ULONG_MAX) /*XXX */;
-       result.HighPart=q1 >> 32;
-       result.LowPart=q1 & 0xffffffff;
-       *remainder=r1 & 0xffffffff;
-       return result;
+    q1=a1/b;
+    r1=a1-(q1*b);
+    if (r1 > ULONG_MAX) /*XXX */;
+    result.HighPart=(LONG)(q1 >> 32);
+    result.LowPart=(DWORD)(q1 & 0xffffffff);
+    *remainder=(unsigned long)(r1 & 0xffffffff);
+    return result;
 }
 LARGE_INTEGER LargeIntegerDivide(LARGE_INTEGER a, LARGE_INTEGER b, LARGE_INTEGER *remainder)
 {
-       LARGE_INTEGER result;
-       ULONGLONG a1,b1,q1,r1;
+    LARGE_INTEGER result;
+    ULONGLONG a1,b1,q1,r1;
 
     result.HighPart=0;
     result.LowPart=0;
     if (b.HighPart == 0 && b.LowPart == 0) { return result; }
     if (b.HighPart == 0 && b.LowPart == 1) { 
-               remainder->HighPart = 0; 
-               remainder->LowPart = 0;
-               return a; 
-       }
+       remainder->HighPart = 0; 
+       remainder->LowPart = 0;
+       return a; 
+    }
 
     a1 = a.HighPart;
     a1 <<= 32;
@@ -135,20 +135,20 @@ LARGE_INTEGER LargeIntegerDivide(LARGE_INTEGER a, LARGE_INTEGER b, LARGE_INTEGER
     b1 = b.HighPart;
     b1 <<= 32;
     b1 |= b.LowPart;
-       q1=a1/b1;
-       r1=a1-(q1*b1);
-       result.HighPart=q1 >> 32;
-       result.LowPart=q1 & 0xffffffff;
-       remainder->HighPart=r1 >> 32;
-       remainder->LowPart=r1 & 0xffffffff;
-       return result;
+    q1=a1/b1;
+    r1=a1-(q1*b1);
+    result.HighPart=(LONG)(q1 >> 32);
+    result.LowPart=(DWORD)(q1 & 0xffffffff);
+    remainder->HighPart=(LONG)(r1 >> 32);
+    remainder->LowPart=(DWORD)(r1 & 0xffffffff);
+    return result;
 }
 
 LARGE_INTEGER ConvertLongToLargeInteger(unsigned long a) 
 {
-       LARGE_INTEGER result;
-       result.HighPart=0;
-       result.LowPart=a;
-       return result;
+    LARGE_INTEGER result;
+    result.HighPart=0;
+    result.LowPart=a;
+    return result;
 }
 #endif
index f58c9d8138f013fdaa7f573b571de8b319e21931..c488b81f23e1b9a18e603e1bb9eadacfd5904c5a 100644 (file)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/preview.wmf and b/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/preview.wmf differ
index 3a62a852e7472e372db15d8b24cdce8600586290..bb42863417e188a8d1dc3009be117cf8a9681f73 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/cachmgr.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/cachmgr.gif differ
index 69a72769fbcd5d7c3956a575009c57e36c7dcc5b..14f88e669164097d633b73c052354679a1a79612 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/fserver1.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/fserver1.gif differ
index fca94049691932ed625a2b0c1c0b1fe08d7e5ddb..eac09d595bd18e859a5f6b919a08965e70e29e96 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/fserver2.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/fserver2.gif differ
index 4eb3c5f66ee3cda0b4c10f1f77f6cff02eb907ce..a33e3b68df960f98b9424d50662f16fb22354056 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/overview.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/overview.gif differ
index cd5ed94b2c216ebe797d406556b7d1c727eff5d5..87d1bd44dc4aec0f70f03c8fbb7dbce5a29b1ec8 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout1.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout1.gif differ
index 7d11189f80c13e319be3a1a63b9f27cb77cb09ef..de242870be11b31353ef0f42fb7e3c0caeaae6e2 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout2.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout2.gif differ
index 6fe7fc0ff1abceb4b1dd81f13b0abf5e928b16f2..ac570b8b09f0adc4b96e7e7c417b61b27176add5 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout3.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout3.gif differ
index 63b8830683bbfcebd8318cae467102e549b99390..2cdc34dc4a8ba4da7a3cd65b11a0000e472c68b4 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout4.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/scout4.gif differ
index 5a96359ca58e844b81c37a7c1a52428f1344475b..b8988f1cdc3406d1fda48c41d3eb2725cf7b884e 100755 (executable)
Binary files a/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/vnode.gif and b/src/WINNT/doc/install/Documentation/en_US/html/SysAdminGd/vnode.gif differ
index 6408e9d9d5ce1e2af1ffda8213be302d35b57a8f..863981997423f74323058f51474af3acfc01d2fe 100644 (file)
@@ -13,6 +13,7 @@ test tests: elogtest.exe
 $(OUT)\elogtest.exe: $(OUT)\elogtest.obj \
        $(DESTDIR)\lib\afs\afseventlog.lib $(DESTDIR)\lib\afs\afsreg.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 52e88113874f1233cab71ac4df6435cfc634020e..d0b399d64a987ee97d0523538cf0c6e29569d7b3 100644 (file)
@@ -15,18 +15,21 @@ $(OUT)\Service.obj: Service.cpp
 
 $(EXEDIR)\Service.exe: $(OUT)\Service.obj
       $(EXECONLINK) $(OUT)\Service.obj
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\Killer.obj: Killer.cpp
       $(C2OBJ) Killer.cpp
 
 $(EXEDIR)\Killer.exe: $(OUT)\Killer.obj
       $(EXECONLINK) $(OUT)\Killer.obj
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\AdminGroup.obj: AdminGroup.cpp
       $(C2OBJ) AdminGroup.cpp
 
 $(EXEDIR)\AdminGroup.exe: $(OUT)\AdminGroup.obj
       $(EXECONLINK) $(OUT)\AdminGroup.obj
+        $(_VC_MANIFEST_EMBED_EXE)
 
 prebuild:
 !IF ("$(AFSDEV_BUILDTYPE)" == "FREE")
index 55bcc617f98f71ab80797c523f2954991d9d0520..0808c025a7c4b582b3bf93a807921b86dc1c2497 100644 (file)
@@ -42,6 +42,7 @@ $(OUT)\wmi.obj: wmi.cpp
 
 $(DLLFILE): $(DLLOBJFILES)
        $(LINK) -DLL $(DLLEXPORTS) -OUT:$@ $(DLLOBJFILES) $(DLLLIBFILES)
+        $(_VC_MANIFEST_EMBED_DLL)
 
 # instloop.exe
 
@@ -53,6 +54,7 @@ $(OUT)\instloop.obj: instloop.c
 
 $(EXEFILE): $(EXEOBJFILES)
       $(LINK) /OUT:$@ $(EXEOBJFILES) $(DLLLIBFILES)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 install:  $(DLLFILE) $(EXEFILE)
 
index aa4bfbcfa2df05eeeced65d661498de2d63a6a91..1d70324530aad67c03af707876033697f02af196 100644 (file)
              <?define DebugSymHighLevel="130"?>
          <?endif?>
     <?endif?>
+
+    <!-- Build type specifications -->
+    <?ifndef env.CPU?>
+       <?error CPU is not set ?>
+    <?endif?>
+    <?if $(env.CPU) = "i386"?>
+       <?define InstallerVersion="110"?>
+       <?define Platform="Intel"?>
+       <?define Win64="no"?>
+    <?elseif $(env.CPU) = "AMD64"?>
+       <?define InstallerVersion="200"?>
+       <?define Platform="x64"?>
+       <?define Win64="yes"?>
+    <?else?>
+        <?error Unknown build type?>
+    <?endif?>
     
     <!-- Use the afsloopback.dll instead of instloop.exe -->
     <?define UseDllLoopbackInstaller?>
index 9e80bcc4c61cb71fc9082f98789aebd40274196a..e5a6b6db988c563c7a211d4109fd929632866e10 100644 (file)
@@ -31,6 +31,7 @@ $(OUT)\afscustom.obj: afscustom.cpp
 $(DLLFILE): $(OUT)\afscustom.obj
        $(LINK) -DLL $(DLLEXPORTS) \
          -OUT:$@ $** $(DLLLIBFILES)
+        $(_VC_MANIFEST_EMBED_DLL)
 
 install: $(DLLFILE)
 
index b5af2e56fe13c5dbf0405856f9ca986af0ca91bd..006a6fcd5673aba1ff8c84b6341c9bc430fd4fb7 100644 (file)
@@ -80,6 +80,7 @@
                 <ComponentRef Id="cmf_afs_shl_ext_DLL" />
                 <ComponentRef Id="cmf_afsd_service_EXE" />
                 <ComponentRef Id="cmf_afslogon_DLL" />
+                <ComponentRef Id="cmf_afscpcc_EXE" />
                 <ComponentRef Id="cmf_symlink_EXE" />
                 <ComponentRef Id="cmf_kpasswd_EXE" />
                 <ComponentRef Id="cmf_pts_EXE" />
@@ -90,7 +91,9 @@
                 <ComponentRef Id="cmf_translate_et_EXE" />
                 <ComponentRef Id="cmf_rxdebug_EXE" />
                 <ComponentRef Id="cmf_backup_EXE" />
-                <ComponentRef Id="cmf_aklog_EXE" />
+                <?if $(env.CPU) = "i386"?>
+                   <ComponentRef Id="cmf_aklog_EXE" />
+               <?endif?>
                 <ComponentRef Id="cmf_cmdebug_EXE" />
                 
                 <!-- Runtime -->
                 <ComponentRef Id="cmf_volserver_EXE" />
                 <ComponentRef Id="cmf_afskill_EXE" />
                 <ComponentRef Id="cmf_afssvrcfg_EXE" />
-                <ComponentRef Id="cmf_asetkey_EXE" />
+               <?if $(env.CPU) = "i386"?>
+                       <ComponentRef Id="cmf_asetkey_EXE" />
+               <?endif?>
                 <ComponentRef Id="cmf_bosctlsvc_EXE" />
                 <ComponentRef Id="cmf_bosserver_EXE" />
                 <ComponentRef Id="cmf_buserver_EXE" />
index 169fcf1cf692257c05fa63a5618cc68a6331b375..0bf67a4a6109f6da7c92540af18e91f673e81397 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0"?>
 <Include>
-    <Directory Id="SystemFolder" SourceName="System">
-        <Component Id="cmf_afslogon_DLL" Guid="123197FE-4F53-4035-8D51-FCFB6B50A777">
+    <Directory Id="$(var.PISystemFolder)" SourceName="System">
+        <Component Win64="$(var.Win64)" Id="cmf_afslogon_DLL" Guid="$(var.cmf_afslogon_DLL_guid)">
             <File Id="fileafslogon_DLL" Name="afslogon.dll" LongName="afslogon.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)afslogon.dll" />
-            <File Id="fileafscpcc_EXE"  Name="afscpcc.exe"  LongName="afscpcc.exe"  DiskId="1" src="$(var.ClientDir)afscpcc.exe" />
             <Registry Id="reg_afslogon01" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Action="createKeyAndRemoveKeyOnUninstall" />
             <Registry Id="reg_afslogon02" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" />
             <Registry Id="reg_afslogon03" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="Asynchronous" Type="integer" Value="0" />
             <Registry Id="reg_afslogon11" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" Name="DLLName" Type="string" Value="[#fileafslogon_DLL]" />
             <Registry Id="reg_afslogon13" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" Name="Logon" Type="string" Value="KFW_Logon_Event" />
         </Component>
+        <Component Win64="$(var.Win64)" Id="cmf_afscpcc_EXE" Guid="$(var.cmf_afscpcc_EXE_guid)">
+            <File Id="fileafscpcc_EXE"  Name="afscpcc.exe"  LongName="afscpcc.exe"  DiskId="1" src="$(var.ClientDir)afscpcc.exe" KeyPath="yes"/>
+        </Component>
     <?ifdef DebugSyms?>
-        <Component Id="cmp_ClientSystemDebug" Guid="DD34DA09-D9DA-4A5A-9521-87B7738A7D53">
+        <Component Win64="$(var.Win64)" Id="cmp_ClientSystemDebug" Guid="$(var.cmp_ClientSystemDebug_guid)">
                        <File Id="fileafslogon_PDB" Name="afslogon.pdb" LongName="afslogon.pdb" KeyPath="yes" DiskId="1" src="$(var.ClientDir)afslogon.pdb" />
                        <File Id="fileafscpcc_PDB" Name="afscpcc.pdb" LongName="afscpcc.pdb" DiskId="1" src="$(var.ClientDir)afscpcc.pdb" />
         </Component>
     <?endif?>
     </Directory>
-    <Directory Id="ProgramFilesFolder">
+    <Directory Id="$(var.PIProgramFilesFolder)">
         <Directory Id="AFSDIR" Name="OpenAFS" SourceName=".">
            <Component Id="efl_desktop_INI" Guid="0ADB427F-3648-4BE0-983B-C454AA51895C">
                <File Id="fildesktop_INI" Name="desktop.ini" KeyPath="yes" DiskId="1" src="$(var.SrcDir)WINNT\install\wix\afsdesktop.ini" Hidden="yes" System="yes" />
@@ -32,7 +34,7 @@
             <Component Id="efl_replace_afs_CMD" Guid="C9C93F3E-EEBA-4056-9669-5EF78D748D50">
                <File Id="filreplace_afs_CMD" Name="replafs.cmd" LongName="replace_afs.cmd" KeyPath="yes" DiskId="1" src="$(var.SrcDir)\WINNT\install\wix\replace_afs.cmd" />
             </Component>
-           <Component Id="efl_uninstall_EXE" Guid="8B99B979-03F4-4AB5-9CE8-1DA97DB6613A">
+           <Component Win64="$(var.Win64)" Id="efl_uninstall_EXE" Guid="$(var.efl_uninstall_EXE_guid)">
                <File Id="filuninstall_EXE" Name="uninst.exe" LongName="uninstall.exe" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\uninstall.exe">
                        <Shortcut Id="scUninstall" Directory="dirShortCut" Name="Uninst.lnk" LongName="Uninstall OpenAFS.lnk" Description="$(loc.StrUninstallDesc)" Icon="ico_OpenAFS" IconIndex="0" Show="normal" />
                 </File>
                     <Environment Id="envCommon" Name="PATH" Action="create" System="yes" Permanent="no" Part="last" Separator=";" Value="[AFSDIR]Common" />
                     <CreateFolder />
                 </Component>
-                <Component Id="cmf_afsbosadmin_DLL" Guid="B4E5799E-BC68-4C17-B924-7DA206DD88D7">
+                <Component Win64="$(var.Win64)" Id="cmf_afsbosadmin_DLL" Guid="$(var.cmf_afsbosadmin_DLL_guid)">
                     <File Id="fileafsbosadmin_DLL" Name="afsbosad.dll" LongName="afsbosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsbosadmin.dll"/>
                 </Component>
-                <Component Id="cmf_afscfgadmin_DLL" Guid="2D5E8B3A-55F2-43CC-953B-7630FF0A7326">
+                <Component Win64="$(var.Win64)" Id="cmf_afscfgadmin_DLL" Guid="$(var.cmf_afscfgadmin_DLL_guid)">
                     <File Id="fileafscfgadmin_DLL" Name="afscfgad.dll" LongName="afscfgadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afscfgadmin.dll"/>
                 </Component>
-                <Component Id="cmf_afsclientadmin_DLL" Guid="735F75B1-EBCF-4AE1-B401-D48A1DD160F2">
+                <Component Win64="$(var.Win64)" Id="cmf_afsclientadmin_DLL" Guid="$(var.cmf_afsclientadmin_DLL_guid)">
                     <File Id="fileafsclientadmin_DLL" Name="afscliad.dll" LongName="afsclientadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsclientadmin.dll"/>
                 </Component>
-                <Component Id="cmf_afskasadmin_DLL" Guid="2B4E37E4-ECEA-4435-8028-D60BAC9C647B">
+                <Component Win64="$(var.Win64)" Id="cmf_afskasadmin_DLL" Guid="$(var.cmf_afskasadmin_DLL_guid)">
                     <File Id="fileafskasadmin_DLL" Name="afskasad.dll" LongName="afskasadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afskasadmin.dll"/>
                 </Component>
-                <Component Id="cmf_afsptsadmin_DLL" Guid="CC902A5A-5CEF-47D1-B4ED-F922EB8F7FF0">
+                <Component Win64="$(var.Win64)" Id="cmf_afsptsadmin_DLL" Guid="$(var.cmf_afsptsadmin_DLL_guid)">
                     <File Id="fileafsptsadmin_DLL" Name="afsptsad.dll" LongName="afsptsadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsptsadmin.dll"/>
                 </Component>
-                <Component Id="cmf_afsvosadmin_DLL" Guid="A97E0801-06A5-465C-99E1-E5F0E07166F0">
+                <Component Win64="$(var.Win64)" Id="cmf_afsvosadmin_DLL" Guid="$(var.cmf_afsvosadmin_DLL_guid)">
                     <File Id="fileafsvosadmin_DLL" Name="afsvosad.dll" LongName="afsvosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsvosadmin.dll"/>
                 </Component>
-                <Component Id="cmf_afsadminutil_DLL" Guid="A9782D0F-768F-40F4-A600-A7240EFBEC8C">
+                <Component Win64="$(var.Win64)" Id="cmf_afsadminutil_DLL" Guid="$(var.cmf_afsadminutil_DLL_guid)">
                     <File Id="fileafsadminutil_DLL" Name="afsadmut.dll" LongName="afsadminutil.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsadminutil.dll"/>
                 </Component>
-                <Component Id="cmf_afsrpc_DLL" Guid="E75E2FC0-D011-494A-8142-670B3286C5C2">
+                <Component Win64="$(var.Win64)" Id="cmf_afsrpc_DLL" Guid="$(var.cmf_afsrpc_DLL_guid)">
                     <File Id="fileafsrpc_DLL" Name="afsrpc.dll" LongName="afsrpc.dll" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afsrpc.dll"/>
                 </Component>
-                <Component Id="cmf_afsauthent2_DLL" Guid="7B806F96-0542-4BCC-865B-E126CE3BCDA6">
+                <Component Win64="$(var.Win64)" Id="cmf_afsauthent2_DLL" Guid="$(var.cmf_afsauthent2_DLL_guid)">
                     <File Id="fileafsauthent2_DLL" Name="afsauth.dll" LongName="afsauthent.dll" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afsauthent.dll"/>
                 </Component>
-                <Component Id="cmf_afspthread_DLL" Guid="77650315-9F19-47BF-A923-54B77DA5EA5C">
+                <Component Win64="$(var.Win64)" Id="cmf_afspthread_DLL" Guid="$(var.cmf_afspthread_DLL_guid)">
                     <File Id="fileafspthread_DLL" Name="afspthrd.dll" LongName="afspthread.dll" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afspthread.dll"/>
                 </Component>
-                <Component Id="cmf_TaAfsAppLib_DLL" Guid="D6D8A744-2352-477D-9ECD-4859C475162B">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsAppLib_DLL" Guid="$(var.cmf_TaAfsAppLib_DLL_guid)">
                     <File Id="fileTaAfsAppLib_DLL" Name="TaAfsApL.dll" LongName="TaAfsAppLib.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib.dll"/>
                 </Component>
-                <Component Id="cmf_afsprocmgmt_DLL" Guid="DAAA35B5-0E95-4DEF-9E87-A99A0A24B0BE">
+                <Component Win64="$(var.Win64)" Id="cmf_afsprocmgmt_DLL" Guid="$(var.cmf_afsprocmgmt_DLL_guid)">
                     <File Id="fileafsprocmgmt_DLL" Name="afsprcmg.dll" LongName="afsprocmgmt.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsprocmgmt.dll"/>
                 </Component>
-                <Component Id="cmf_afs_config_EXE" Guid="3E73EA24-4B0D-4834-96C3-8AF38FDBCA6F">
+                <Component Win64="$(var.Win64)" Id="cmf_afs_config_EXE" Guid="$(var.cmf_afs_config_EXE_guid)">
                     <File Id="fileafs_config_EXE" Name="afs_cfg.exe" LongName="afs_config.exe" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_config.exe"/>
                 </Component>
                 
             <?ifdef DebugSyms?>
-                <Component Id="cmp_ServerCommonDebug" Guid="4132C211-5577-48DE-9C66-214EEC0E6BC4">
+                <Component Win64="$(var.Win64)" Id="cmp_ServerCommonDebug" Guid="$(var.cmp_ServerCommonDebug_guid)">
                     <File Id="fileafsbosadmin_PDB" Name="afsbosad.pdb" LongName="afsbosadmin.pdb" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsbosadmin.pdb"/>
                     <File Id="fileafscfgadmin_PDB" Name="afscfgad.pdb" LongName="afscfgadmin.pdb" DiskId="1" src="$(var.ServerDir)\afscfgadmin.pdb"/>
                     <File Id="fileafsclientadmin_PDB" Name="afscliad.pdb" LongName="afsclientadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsclientadmin.pdb"/>
                     <File Id="fileafsvosadmin_PDB" Name="afsvosad.pdb" LongName="afsvosadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsvosadmin.pdb"/>
                     <File Id="fileafsadminutil_PDB" Name="afsadmut.pdb" LongName="afsadminutil.pdb" DiskId="1" src="$(var.ServerDir)\afsadminutil.pdb"/>
                 </Component>
-                <Component Id="cmp_CommonCommonDebug" Guid="7F47902F-B92D-42A3-BDEF-AFFC79C66F0C">
+                <Component Win64="$(var.Win64)" Id="cmp_CommonCommonDebug" Guid="$(var.cmp_CommonCommonDebug_guid)">
                     <File Id="fileafsrpc_PDB" Name="afsrpc.pdb" LongName="afsrpc.pdb" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afsrpc.pdb"/>
                     <File Id="fileafsauthent_PDB" Name="afsauth.pdb" LongName="afsauthent.pdb" DiskId="1" src="$(var.LibDir)\afsauthent.pdb"/>
                     <File Id="fileafspthread_PDB" Name="afspthrd.pdb" LongName="afspthread.pdb" DiskId="1" src="$(var.LibDir)\afspthread.pdb"/>
                     <File Id="fileTaAfsAppLib_PDB" Name="TaAfsApL.pdb" LongName="TaAfsAppLib.pdb" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib.pdb"/>
                     <File Id="fileafsprocmgmt_PDB" Name="afsprcmg.pdb" LongName="afsprocmgmt.pdb" DiskId="1" src="$(var.ServerDir)\afsprocmgmt.pdb"/>
                 </Component>
-                <Component Id="cmp_ClientCommonDebug" Guid="BFA4097D-3013-46AD-86EB-2160376FB55C">
+                <Component Win64="$(var.Win64)" Id="cmp_ClientCommonDebug" Guid="$(var.cmp_ClientCommonDebug_guid)">
                     <File Id="fileafs_config_PDB" Name="afs_cfg.pdb" LongName="afs_config.pdb" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_config.pdb"/>
                 </Component>
             <?endif?>
 
                 <!-- <<LanguageSpecific:1033/en_US>> -->
             <?if $(var.Language) ="en_US"?>
-                <Component Id="cmf_afseventmsg_1033_DLL" Guid="2DBBE232-2DA5-421F-9C83-93278598634A">
+                <Component Win64="$(var.Win64)" Id="cmf_afseventmsg_1033_DLL" Guid="$(var.cmf_afseventmsg_1033_DLL_guid)">
                     <File Id="fileafseventmsg_1033_DLL" Name="afse1033.dll" LongName="afseventmsg_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afseventmsg_1033.dll"/>
                 </Component>
-                <Component Id="cmf_afsserver_1033_DLL" Guid="2EC8BA3C-0A5C-48C5-A370-36265C43A93F">
+                <Component Win64="$(var.Win64)" Id="cmf_afsserver_1033_DLL" Guid="$(var.cmf_afsserver_1033_DLL_guid)">
                     <File Id="fileafsserver_1033_DLL" Name="afss1033.dll" LongName="afsserver_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsserver_1033.dll"/>
                 </Component>
-                <Component Id="cmf_afssvrcfg_1033_DLL" Guid="70F7B4AA-E89F-4786-A3F1-27725E613F53">
+                <Component Win64="$(var.Win64)" Id="cmf_afssvrcfg_1033_DLL" Guid="$(var.cmf_afssvrcfg_1033_DLL_guid)">
                     <File Id="fileafssvrcfg_1033_DLL" Name="afsv1033.dll" LongName="afssvrcfg_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afssvrcfg_1033.dll"/>
                 </Component>
-                <Component Id="cmf_TaAfsAccountManager_1033_DLL" Guid="1BD9FA36-3DD8-4AA4-B7C0-9AC26D872068">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsAccountManager_1033_DLL" Guid="$(var.cmf_TaAfsAccountManager_1033_DLL_guid)">
                     <File Id="fileTaAfsAccountManager_1033_DLL" Name="tacm1033.dll" LongName="TaAfsAccountManager_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAccountManager_1033.dll"/>
                 </Component>
-                <Component Id="cmf_TaAfsAppLib_1033_DLL" Guid="40989EC2-EB2B-495A-BA6D-5E22AB785457">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsAppLib_1033_DLL" Guid="$(var.cmf_TaAfsAppLib_1033_DLL_guid)">
                     <File Id="fileTaAfsAppLib_1033_DLL" Name="taal1033.dll" LongName="TaAfsAppLib_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib_1033.dll"/>
                 </Component>
-                <Component Id="cmf_TaAfsServerManager_1033_DLL" Guid="54876C77-299F-496B-A5D0-F89DF8759A40">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsServerManager_1033_DLL" Guid="$(var.cmf_TaAfsServerManager_1033_DLL_guid)">
                     <File Id="fileTaAfsServerManager_1033_DLL" Name="tasm1033.dll" LongName="TaAfsServerManager_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsServerManager_1033.dll"/>
                 </Component>
-                <Component Id="cmf_afscreds_1033_DLL" Guid="76AC935C-E558-4D1C-810D-47F3A8923429">
+                <Component Win64="$(var.Win64)" Id="cmf_afscreds_1033_DLL" Guid="$(var.cmf_afscreds_1033_DLL_guid)">
                     <File Id="fileafscreds_1033_DLL" Name="acrd1033.dll" LongName="afscreds_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afscreds_1033.dll"/>
                 </Component>
-                <Component Id="cmf_afs_config_1033_DLL" Guid="6DE08ED9-2B64-4D39-A50E-62FEAC91DF88">
+                <Component Win64="$(var.Win64)" Id="cmf_afs_config_1033_DLL" Guid="$(var.cmf_afs_config_1033_DLL_guid)">
                     <File Id="fileafs_config_1033_DLL" Name="acfg1033.dll" LongName="afs_config_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_config_1033.dll"/>
                 </Component>
-                <Component Id="cmf_afs_cpa_1033_DLL" Guid="12EE2B31-4320-4A6B-90F7-7A03ECF5A0DA">
+                <Component Win64="$(var.Win64)" Id="cmf_afs_cpa_1033_DLL" Guid="$(var.cmf_afs_cpa_1033_DLL_guid)">
                     <File Id="fileafs_cpa_1033_DLL" Name="acpa1033.dll" LongName="afs_cpa_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_cpa_1033.dll"/>
                 </Component>
-                <Component Id="cmf_afs_shl_ext_1033_DLL" Guid="9FF6C6CA-C731-4319-8777-E6DBAEFC3A4B">
+                <Component Win64="$(var.Win64)" Id="cmf_afs_shl_ext_1033_DLL" Guid="$(var.cmf_afs_shl_ext_1033_DLL_guid)">
                     <File Id="fileafs_shl_ext_1033_DLL" Name="ashl1033.dll" LongName="afs_shl_ext_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_shl_ext_1033.dll"/>
                 </Component>
 
 
                 <!-- Runtime libraries -->
           <?ifndef Debug?>
+                       <!-- Note that for AFSVER_CL=1400, the runtime libraries are included via merge modules
+                            at the TARGETDIR level, since we use shared assemblies instead of private assemblies. -->
             <?if $(env.AFSVER_CL) = "1310"?>
                                <?ifdef comment?>
                                        While we would love to just use the merge modules, they are unfortunately
                     <File Id="filemfc42_DLL" Name="mfc42.dll" LongName="mfc42.dll" KeyPath="yes" DiskId="1" src="$(var.SystemDir)mfc42.dll" />
                 </Component>
                 <?ifdef DebugSyms?>
-                                       <Component Id="cmp_VC1200msvcrtPDB" Guid="A702C2AB-C99F-443A-A420-063FFD866FBC">
-                                               <File Id="filemsvcrt_PDB" Name="msvcrt.pdb" LongName="msvcrt.pdb" KeyPath="yes" DiskId="1" src="$(var.SystemDir)msvcrt.pdb" />
-                                       </Component>
-                                       <Component Id="cmp_VC1200msvcp60PDB" Guid="56CCAE2C-0CAD-43B2-A7BD-F56E9E4F74E1">
-                                               <File Id="filemsvcp60_PDB" Name="msvcp60.pdb" LongName="msvcp60.pdb" KeyPath="yes" DiskId="1" src="$(var.SystemDir)msvcp60.pdb" />
-                                       </Component>
-                                       <Component Id="cmp_VC1200mfc42PDB" Guid="0B615363-EB3C-4785-A8E6-9AB42D85293D">
-                                               <File Id="filemfc42_PDB" Name="mfc42.pdb" LongName="mfc42.pdb" KeyPath="yes" DiskId="1" src="$(var.SystemDir)mfc42.pdb" />
-                                       </Component>
+                   <Component Id="cmp_VC1200msvcrtPDB" Guid="A702C2AB-C99F-443A-A420-063FFD866FBC">
+                       <File Id="filemsvcrt_PDB" Name="msvcrt.pdb" LongName="msvcrt.pdb" KeyPath="yes" DiskId="1" src="$(var.SystemDir)msvcrt.pdb" />
+                   </Component>
+                   <Component Id="cmp_VC1200msvcp60PDB" Guid="56CCAE2C-0CAD-43B2-A7BD-F56E9E4F74E1">
+                       <File Id="filemsvcp60_PDB" Name="msvcp60.pdb" LongName="msvcp60.pdb" KeyPath="yes" DiskId="1" src="$(var.SystemDir)msvcp60.pdb" />
+                   </Component>
+                   <Component Id="cmp_VC1200mfc42PDB" Guid="0B615363-EB3C-4785-A8E6-9AB42D85293D">
+                       <File Id="filemfc42_PDB" Name="mfc42.pdb" LongName="mfc42.pdb" KeyPath="yes" DiskId="1" src="$(var.SystemDir)mfc42.pdb" />
+                   </Component>
                 <?endif?>
             <?endif?>
           <?else?> <!-- Debug -->
             </Directory> <!-- /common -->
             
             <Directory Id="dirControl_Center" Name="Contr" LongName="Control Center" SourceName="ControlC" LongSource="Control Center">
-                <Component Id="cmf_TaAfsServerManager_EXE" Guid="B890FB93-2EFD-44B6-8CB3-7A6AFABFF029">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsServerManager_EXE" Guid="$(var.cmf_TaAfsServerManager_EXE_guid)">
                     <File Id="fileTaAfsServerManager_EXE" Name="TaAfsSvM.exe" LongName="TaAfsServerManager.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsServerManager.exe">
                                                <Shortcut Id="scServerManager" Directory="dirShortCut" Name="SvrMgr.lnk" LongName="Server Manager.lnk" Description="$(loc.StrSvrMgrDesc)" Icon="ico_ServerManager" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
                     </File>
                 </Component>
-                <Component Id="cmf_TaAfsAdmSvr_EXE" Guid="99E23413-8261-4007-9DC9-B2C7453EF1EE">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsAdmSvr_EXE" Guid="$(var.cmf_TaAfsAdmSvr_EXE_guid)">
                     <File Id="fileTaAfsAdmSvr_EXE" Name="TaAfsAdS.exe" LongName="TaAfsAdmSvr.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAdmSvr.exe"/>
                 </Component>
-                <Component Id="cmf_TaAfsAccountManager_EXE" Guid="BDFA5B64-2A69-41D5-8260-3DAB3CE9A10B">
+                <Component Win64="$(var.Win64)" Id="cmf_TaAfsAccountManager_EXE" Guid="$(var.cmf_TaAfsAccountManager_EXE_guid)">
                     <File Id="fileTaAfsAccountManager_EXE" Name="TaAfsAcM.exe" LongName="TaAfsAccountManager.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAccountManager.exe">
                                                <Shortcut Id="scAcctManager" Directory="dirShortCut" Name="AcctMgr.lnk" LongName="Account Manager.lnk" Description="$(loc.StrAcctMgrDesc)" Icon="ico_AcctManager" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
                     </File>
                 </Component>
             <?ifdef DebugSyms?>
-                <Component Id="cmp_Control_CenterDebug" Guid="B14EEC50-8ADF-4FE4-B00F-431861A5620C">
+                <Component Win64="$(var.Win64)" Id="cmp_Control_CenterDebug" Guid="$(var.cmp_Control_CenterDebug_guid)">
                     <File Id="fileTaAfsServerManager_PDB" Name="TaAfsSvM.pdb" LongName="TaAfsServerManager.pdb" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsServerManager.pdb"/>
                     <File Id="fileTaAfsAdmSvr_PDB" Name="TaAfsAdS.pdb" LongName="TaAfsAdmSvr.pdb" DiskId="1" src="$(var.ServerDir)\TaAfsAdmSvr.pdb"/>
                     <File Id="fileTaAfsAccountManager_PDB" Name="TaAfsAcM.pdb" LongName="TaAfsAccountManager.pdb" DiskId="1" src="$(var.ServerDir)\TaAfsAccountManager.pdb"/>
                     <Condition>OLDCELLSERVDB &lt;&gt; ""</Condition>
                 </Component>
                 <Directory Id="dirProgram" Name="Program" src="$(var.ClientDir)">
-                    <Component Id="cmf_afsshare_EXE" Guid="E972DA35-E950-4736-AE48-E6DDCE8C97D0">
+                    <Component Win64="$(var.Win64)" Id="cmf_afsshare_EXE" Guid="$(var.cmf_afsshare_EXE_guid)">
                         <File Id="fileafsshare_EXE" Name="afsshare.exe" LongName="afsshare.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_libosi_DLL" Guid="0E10B3CC-533B-4EAC-AFC5-3D2B529385D7">
+                    <Component Win64="$(var.Win64)" Id="cmf_libosi_DLL" Guid="$(var.cmf_libosi_DLL_guid)">
                         <File Id="filelibosi_DLL" Name="libosi.dll" LongName="libosi.dll" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_libafsconf_DLL" Guid="D72DA435-878D-42BE-9383-69FB97D63624">
+                    <Component Win64="$(var.Win64)" Id="cmf_libafsconf_DLL" Guid="$(var.cmf_libafsconf_DLL_guid)">
                         <File Id="filelibafsconf_DLL" Name="libafscf.dll" LongName="libafsconf.dll" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_klog_EXE" Guid="DCE60DF8-6BB3-4090-B525-8CF8843C878B">
+                    <Component Win64="$(var.Win64)" Id="cmf_klog_EXE" Guid="$(var.cmf_klog_EXE_guid)">
                         <File Id="fileklog_EXE" Name="klog.exe" LongName="klog.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_tokens_EXE" Guid="C6F79AAF-0EF4-4751-BB56-015B7E847D71">
+                    <Component Win64="$(var.Win64)" Id="cmf_tokens_EXE" Guid="$(var.cmf_tokens_EXE_guid)">
                         <File Id="filetokens_EXE" Name="tokens.exe" LongName="tokens.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_unlog_EXE" Guid="D2C19113-8379-424D-9C90-BB4C955D8F17">
+                    <Component Win64="$(var.Win64)" Id="cmf_unlog_EXE" Guid="$(var.cmf_unlog_EXE_guid)">
                         <File Id="fileunlog_EXE" Name="unlog.exe" LongName="unlog.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_fs_EXE" Guid="D19D5998-E8E1-424B-9D0D-655840DBC571">
+                    <Component Win64="$(var.Win64)" Id="cmf_fs_EXE" Guid="$(var.cmf_fs_EXE_guid)">
                         <File Id="filefs_EXE" Name="fs.exe" LongName="fs.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_afsdacl_EXE" Guid="215DBC86-A5E8-4622-8A95-0E5830B04D0B">
+                    <Component Win64="$(var.Win64)" Id="cmf_afsdacl_EXE" Guid="$(var.cmf_afsdacl_EXE_guid)">
                         <File Id="fileafsdacl_EXE" Name="afsdacl.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_afscreds_EXE" Guid="A17567CF-866E-49AF-A717-0B4F17CA88D4">
+                    <Component Win64="$(var.Win64)" Id="cmf_afscreds_EXE" Guid="$(var.cmf_afscreds_EXE_guid)">
                         <File Id="fileafscreds_EXE" Name="afscreds.exe" LongName="afscreds.exe" KeyPath="yes" DiskId="1">
                                                        <Shortcut Id="scAfsCreds" Directory="dirShortCut" Name="Auth.lnk" LongName="Authentication.lnk" Description="$(loc.StrAfsCredsDesc)" Arguments="[CREDSAUTOINIT] [CREDSRENEWDRMAP] [CREDSIPCHDET] [CREDSQUIET] [CREDSSHOW]" Icon="ico_afscreds" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
                         </File>
                     </Component>
-                    <Component Id="cmp_credsStartup" Guid="3F40BA8D-16A2-4990-A74F-35AF3012E3F8">
+                    <Component Win64="$(var.Win64)" Id="cmp_credsStartup" Guid="$(var.cmp_credsStartup_guid)">
                                                <Shortcut Id="scAfsCredsStart" Directory="StartupFolder" Name="AFSAuth.lnk" LongName="AFS Credentials.lnk" Description="$(loc.StrAfsCredsDesc)" Arguments="[CREDSAUTOINIT] [CREDSRENEWDRMAP] [CREDSIPCHDET] [CREDSQUIET] [CREDSSHOW]" Icon="ico_afscreds" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" Target="[#fileafscreds_EXE]"/>
-                                               <Registry Root="HKLM" Key="SOFTWARE\OpenAFS\Client" Name="AutoStart" Type="integer" Value="1" Id="reg_CredsAutoStart" KeyPath="yes" />
+                                               <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Client\CurrentVersion" Name="StartupShortcutInstalled" Type="integer" Value="1" Id="reg_CredsAutoStart" KeyPath="yes" />
                     </Component>
-                    <Component Id="cmf_afs_shl_ext_DLL" Guid="E4C51111-F9ED-418D-9DE0-ED8777CED5C9">
+                    <Component Win64="$(var.Win64)" Id="cmf_afs_shl_ext_DLL" Guid="$(var.cmf_afs_shl_ext_DLL_guid)">
                         <File Id="fileafs_shl_ext_DLL" Name="afsshext.dll" LongName="afs_shl_ext.dll" KeyPath="yes" DiskId="1">
                             <Class Id="DC515C27-6CAC-11D1-BAE7-00C04FD140D2" Advertise="no" Context="InprocServer32" Description="$(loc.StrShlExtDesc)" ThreadingModel="apartment">
                                 <ProgId Id="AfsClientContextMenu.1" Description="$(loc.StrShlExtDesc)">
                             </Class>
                         </File>
                     </Component>
-                    <Component Id="cmf_afsd_service_EXE" Guid="37A90054-505D-4C57-B489-7EF4D97B86F6">
+                    <Component Win64="$(var.Win64)" Id="cmf_afsd_service_EXE" Guid="$(var.cmf_afsd_service_EXE_guid)">
                         <File Id="fileafsd_service_EXE" Name="afsd_svc.exe" LongName="afsd_service.exe" KeyPath="yes" DiskId="1" />
                         <ServiceControl Id="TransarcAFSDaemon" Name="TransarcAFSDaemon" Stop="both" Remove="both" Wait="yes" />
                         <ServiceInstall Id="svc_Client" Name="TransarcAFSDaemon" DisplayName="OpenAFS Client" Type="ownProcess" Start="auto" ErrorControl="normal" Description="Provides access to files and directories stored in AFS" Interactive="yes">
                         <Environment Id="envClient" Name="PATH" Action="create" System="yes" Permanent="no" Part="last" Separator=";" Value="[AFSDIR]Client\Program" />
                         <RemoveFile Id="removeCache" Directory="WindowsVolume" LongName="AFSCache" Name="AFSCache" On="uninstall" />
                     </Component>
-                    <Component Id="cmf_symlink_EXE" Guid="01513839-36E5-418D-8337-04B5D74337CD">
+                     <Component Win64="$(var.Win64)" Id="cmf_symlink_EXE" Guid="$(var.cmf_symlink_EXE_guid)">
                         <File Id="filesymlink_EXE" Name="symlink.exe" LongName="symlink.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                    <Component Id="cmf_kpasswd_EXE" Guid="D362743B-6BF3-49CD-8B58-8DE56BCB0143">
+                     <Component Win64="$(var.Win64)" Id="cmf_kpasswd_EXE" Guid="$(var.cmf_kpasswd_EXE_guid)">
                         <File Id="filekpasswd_EXE" Name="kpasswd.exe" LongName="kpasswd.exe" KeyPath="yes" DiskId="1" src="$(var.BinDir)kpasswd.exe" />
                     </Component>
-                    <Component Id="cmf_pts_EXE" Guid="DC65EE96-8C01-4985-B19A-87B710841CD7">
+                     <Component Win64="$(var.Win64)" Id="cmf_pts_EXE" Guid="$(var.cmf_pts_EXE_guid)">
                         <File Id="filepts_EXE" Name="pts.exe" LongName="pts.exe" KeyPath="yes" DiskId="1" src="$(var.BinDir)\pts.exe" />
                     </Component>
-                    <Component Id="cmf_bos_EXE" Guid="E3060710-F745-4958-A0C6-459B6CD0A5C3">
+                     <Component Win64="$(var.Win64)" Id="cmf_bos_EXE" Guid="$(var.cmf_bos_EXE_guid)">
                         <File Id="filebos_EXE" Name="bos.exe" LongName="bos.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\bos.exe" />
                     </Component>
-                    <Component Id="cmf_kas_EXE" Guid="59ED3FE5-B818-4CE6-A278-F9C7B97B7973">
+                     <Component Win64="$(var.Win64)" Id="cmf_kas_EXE" Guid="$(var.cmf_kas_EXE_guid)">
                         <File Id="filekas_EXE" Name="kas.exe" LongName="kas.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\kas.exe"/>
                     </Component>
-                    <Component Id="cmf_vos_EXE" Guid="854E4787-7C18-400B-9660-56F498DDC608">
+                     <Component Win64="$(var.Win64)" Id="cmf_vos_EXE" Guid="$(var.cmf_vos_EXE_guid)">
                         <File Id="filevos_EXE" Name="vos.exe" LongName="vos.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\vos.exe"/>
                     </Component>
-                    <Component Id="cmf_udebug_EXE" Guid="EDD268D3-460C-4509-8933-F62AE72DEBC5">
+                     <Component Win64="$(var.Win64)" Id="cmf_udebug_EXE" Guid="$(var.cmf_udebug_EXE_guid)">
                         <File Id="fileudebug_EXE" Name="udebug.exe" LongName="udebug.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\udebug.exe"/>
                     </Component>
-                    <Component Id="cmf_translate_et_EXE" Guid="539C313D-BD7F-4896-9AE3-E0E54C6CC1CA">
+                     <Component Win64="$(var.Win64)" Id="cmf_translate_et_EXE" Guid="$(var.cmf_translate_et_EXE_guid)">
                         <File Id="filetranslate_et_EXE" Name="translet.exe" LongName="translate_et.exe" KeyPath="yes" DiskId="1" src="$(var.BinDir)\translate_et.exe"/>
                     </Component>
-                    <Component Id="cmf_rxdebug_EXE" Guid="D9E85810-5E1D-433F-A17E-D961ABC58567">
+                     <Component Win64="$(var.Win64)" Id="cmf_rxdebug_EXE" Guid="$(var.cmf_rxdebug_EXE_guid)">
                         <File Id="filerxdebug_EXE" Name="rxdebug.exe" LongName="rxdebug.exe" KeyPath="yes" DiskId="1" src="$(var.EtcDir)\rxdebug.exe"/>
                     </Component>
-                    <Component Id="cmf_backup_EXE" Guid="A8B6C84E-115B-4317-9CAA-0797BFE50D02">
+                     <Component Win64="$(var.Win64)" Id="cmf_backup_EXE" Guid="$(var.cmf_backup_EXE_guid)">
                         <File Id="filebackup_EXE" Name="backup.exe" LongName="backup.exe" KeyPath="yes" DiskId="1" src="$(var.EtcDir)\backup.exe"/>
                     </Component>
-                    <Component Id="cmf_aklog_EXE" Guid="84FADCD9-AA0D-4D80-B374-A20A85F5957B">
-                        <File Id="fileaklog_EXE" Name="aklog.exe" LongName="aklog.exe" KeyPath="yes" DiskId="1" />
-                    </Component>
-                    <Component Id="cmf_cmdebug_EXE" Guid="CFACE5C6-A867-439F-8BEE-31C0ED399B41">
+                   <?if $(env.CPU) = "i386"?>
+                           <Component Win64="$(var.Win64)" Id="cmf_aklog_EXE" Guid="$(var.cmf_aklog_EXE_guid)">
+                               <File Id="fileaklog_EXE" Name="aklog.exe" LongName="aklog.exe" KeyPath="yes" DiskId="1" />
+                           </Component>
+                   <?endif?>
+                     <Component Win64="$(var.Win64)" Id="cmf_cmdebug_EXE" Guid="$(var.cmf_cmdebug_EXE_guid)">
                         <File Id="filecmdebug_EXE" Name="cmdebug.exe" LongName="cmdebug.exe" KeyPath="yes" DiskId="1" />
                     </Component>
-                   <Component Id="cmf_afs_cpa_CPL" Guid="C83091EC-2967-4AC6-A34D-860CD7FEDA57">
+                   <Component Win64="$(var.Win64)" Id="cmf_afs_cpa_CPL" Guid="$(var.cmf_afs_cpa_CPL_guid)">
                        <File Id="fileafs_cpa_CPL" Name="afs_cpa.cpl" LongName="afs_cpa.cpl" KeyPath="yes" DiskId="1"/>
                    <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls" Name="AFS Client CPL" Type="string" Value="[#fileafs_cpa_CPL]" Id="reg_Full_Client11" />
                    </Component>
                 <?ifdef DebugSyms?>
-                    <Component Id="cmp_ClientProgramDebug" Guid="A6A394F6-45D0-45A9-A7DD-C0997070EC14">
+                     <Component Win64="$(var.Win64)" Id="cmp_ClientProgramDebug" Guid="$(var.cmp_ClientProgramDebug_guid)">
                         <File Id="fileafsshare_PDB" Name="afsshare.pdb" LongName="afsshare.pdb" DiskId="1" />
                         <File Id="filelibosi_PDB" Name="libosi.pdb" LongName="libosi.pdb" DiskId="1" />
                         <File Id="filelibafsconf_PDB" Name="libafscf.pdb" LongName="libafsconf.pdb" DiskId="1" />
                         <File Id="filetranslate_et_PDB" Name="translet.pdb" LongName="translate_et.pdb" DiskId="1" src="$(var.BinDir)\translate_et.pdb"/>
                         <File Id="filerxdebug_PDB" Name="rxdebug.pdb" LongName="rxdebug.pdb" DiskId="1" src="$(var.EtcDir)\rxdebug.pdb"/>
                         <File Id="filebackup_PDB" Name="backup.pdb" LongName="backup.pdb" DiskId="1" src="$(var.EtcDir)\backup.pdb"/>
-                        <File Id="fileaklog_PDB" Name="aklog.pdb" LongName="aklog.pdb" DiskId="1" />
+                       <?if $(env.CPU) = "i386"?>
+                               <File Id="fileaklog_PDB" Name="aklog.pdb" LongName="aklog.pdb" DiskId="1" />
+                       <?endif?>
                         <File Id="filecmdebug_PDB" Name="cmdebug.pdb" LongName="cmdebug.pdb" DiskId="1" />
                        <File Id="fileafs_cpa_PDB" Name="afs_cpa.pdb" LongName="afs_cpa.pdb" KeyPath="yes" DiskId="1"/>
                     </Component>
                         </Directory>
                     </Directory>
                     <Directory Id="dirLib" Name="lib">
-                        <Component Id="cmp_SDK_Lib" Guid="71BC1B4E-4C4C-4FF8-8DDA-C6AB2BE22142">
+                        <Component Win64="$(var.Win64)" Id="cmp_SDK_Lib" Guid="$(var.cmp_SDK_Lib_guid)">
                             <File Id="fileafsauthent_LIB" Name="AFSAUT~1.lib" LongName="afsauthent.lib" DiskId="1" src="$(var.LibDir)afsauthent.lib" /> 
                             <File Id="fileafsdes_LIB" Name="afsdes.lib" LongName="afsdes.lib" DiskId="1" src="$(var.LibDir)afsdes.lib" /> 
                             <File Id="fileafskfw_LIB" Name="afskfw.lib" LongName="afskfw.lib" DiskId="1" src="$(var.LibDir)afskfw.lib" /> 
                             <File Id="filecm_dns_OBJ" Name="cm_dns.obj" LongName="cm_dns.obj" DiskId="1" src="$(var.LibDir)cm_dns.obj" /> 
                         </Component>
                         <Directory Id="dirLibAfs" Name="afs">
-                            <Component Id="cmp_SDK_Lib_Afs" Guid="CD671A64-D491-4363-A7AD-645482B481BE">
+                            <Component Win64="$(var.Win64)" Id="cmp_SDK_Lib_Afs" Guid="$(var.cmp_SDK_Lib_Afs_guid)">
                                 <File Id="fileafsacl_LIB" Name="afsacl.lib" LongName="afsacl.lib" DiskId="1" src="$(var.LibDir)afs\afsacl.lib" /> 
                                 <File Id="fileafsadminutil_LIB" Name="AFSADM~1.lib" LongName="afsadminutil.lib" DiskId="1" src="$(var.LibDir)afs\afsadminutil.lib" /> 
                                 <File Id="fileafsaudit_LIB" Name="afsaudit.lib" LongName="afsaudit.lib" DiskId="1" src="$(var.LibDir)afs\afsaudit.lib" /> 
                 <Directory Id="dirusr" Name="usr">
                     <Directory Id="dirafs" Name="afs">
                         <Directory Id="dirbin" Name="bin" src="$(var.ServerDir)">
-                            <Component Id="cmf_vlserver_EXE" Guid="F6A43B78-EE17-4483-AA81-4B6C6957977D">
+                             <Component Win64="$(var.Win64)" Id="cmf_vlserver_EXE" Guid="$(var.cmf_vlserver_EXE_guid)">
                                 <File Id="filevlserver_EXE" Name="vlser.exe" LongName="vlserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_volinfo_EXE" Guid="CED56F48-1049-403F-912B-3C186867B563">
+                             <Component Win64="$(var.Win64)" Id="cmf_volinfo_EXE" Guid="$(var.cmf_volinfo_EXE_guid)">
                                 <File Id="filevolinfo_EXE" Name="volin.exe" LongName="volinfo.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_volserver_EXE" Guid="36A386A0-6DA9-40A7-A12D-6A521559933D">
+                             <Component Win64="$(var.Win64)" Id="cmf_volserver_EXE" Guid="$(var.cmf_volserver_EXE_guid)">
                                 <File Id="filevolserver_EXE" Name="volse.exe" LongName="volserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_afskill_EXE" Guid="454AA25A-3C62-4AF9-AFE1-36A54A0E3F1A">
+                             <Component Win64="$(var.Win64)" Id="cmf_afskill_EXE" Guid="$(var.cmf_afskill_EXE_guid)">
                                 <File Id="fileafskill_EXE" Name="afski.exe" LongName="afskill.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_afssvrcfg_EXE" Guid="39F6AB59-FD18-4647-8B83-CDEC59E2368F">
+                             <Component Win64="$(var.Win64)" Id="cmf_afssvrcfg_EXE" Guid="$(var.cmf_afssvrcfg_EXE_guid)">
                                 <File Id="fileafssvrcfg_EXE" Name="afssv.exe" LongName="afssvrcfg.exe" KeyPath="yes" DiskId="1">
                                                                        <Shortcut Id="scSvrCfgWizard" Directory="dirShortCut" Name="SvrCfgWz.lnk" LongName="Server Configuration Wizard.lnk" Description="$(loc.StrCfgWzdDesc)" Arguments="/wizard" Icon="ico_afssvrcfg" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
                                 </File>
                             </Component>
-                            <Component Id="cmf_asetkey_EXE" Guid="9B7694A2-DCAE-4DBA-84F2-09DC796C20B2">
-                                <File Id="fileasetkey_EXE" Name="asetk.exe" LongName="asetkey.exe" KeyPath="yes" DiskId="1" />
-                            </Component>
-                            <Component Id="cmf_bosctlsvc_EXE" Guid="8F6F62A8-BB6D-46C1-BA80-4F207AA24F0D">
+                           <?if $(env.CPU) = "i386"?>
+                                    <Component Win64="$(var.Win64)" Id="cmf_asetkey_EXE" Guid="$(var.cmf_asetkey_EXE_guid)">
+                                       <File Id="fileasetkey_EXE" Name="asetk.exe" LongName="asetkey.exe" KeyPath="yes" DiskId="1" />
+                                   </Component>
+                           <?endif?>
+                             <Component Win64="$(var.Win64)" Id="cmf_bosctlsvc_EXE" Guid="$(var.cmf_bosctlsvc_EXE_guid)">
                                 <File Id="filebosctlsvc_EXE" Name="bosct.exe" LongName="bosctlsvc.exe" KeyPath="yes" DiskId="1" />
                                 <ServiceControl Id="TransarcAFSServer" Name="TransarcAFSServer" Stop="both" Remove="both" Wait="yes" />
                                 <ServiceInstall Id="svc_Server" Name="TransarcAFSServer" DisplayName="OpenAFS Server" Type="ownProcess" Start="auto" ErrorControl="normal" Description="Manages AFS server processes" Interactive="yes">
                                     -->
                                 </ServiceInstall>
                             </Component>
-                            <Component Id="cmf_bosserver_EXE" Guid="0FF7D0AB-DEA0-429E-928C-588E838E2635">
+                            <Component Win64="$(var.Win64)" Id="cmf_bosserver_EXE" Guid="$(var.cmf_bosserver_EXE_guid)">
                                 <File Id="filebosserver_EXE" Name="bosse.exe" LongName="bosserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_buserver_EXE" Guid="BF674F47-33A0-418D-B7A5-7CE778D747A5">
+                            <Component Win64="$(var.Win64)" Id="cmf_buserver_EXE" Guid="$(var.cmf_buserver_EXE_guid)">
                                 <File Id="filebuserver_EXE" Name="buser.exe" LongName="buserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_fileserver_EXE" Guid="F8EF1067-5F55-426B-9258-EBC6CDCF0DDB">
+                            <Component Win64="$(var.Win64)" Id="cmf_fileserver_EXE" Guid="$(var.cmf_fileserver_EXE_guid)">
                                 <File Id="filefileserver_EXE" Name="files.exe" LongName="fileserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_fms_EXE" Guid="250BF6D4-EAC3-4A2F-BD32-CA603CD15020">
+                            <Component Win64="$(var.Win64)" Id="cmf_fms_EXE" Guid="$(var.cmf_fms_EXE_guid)">
                                 <File Id="filefms_EXE" Name="fms.exe" LongName="fms.exe" KeyPath="yes" DiskId="1" src="$(var.EtcDir)\fms.exe"/>
                             </Component>
-                            <Component Id="cmf_butc_EXE" Guid="96DAC5A8-FD16-4FF5-8BD5-92F25880E557">
+                            <Component Win64="$(var.Win64)" Id="cmf_butc_EXE" Guid="$(var.cmf_butc_EXE_guid)">
                                 <File Id="filebutc_EXE" Name="butc.exe" LongName="butc.exe" KeyPath="yes" DiskId="1" src="$(var.EtcDir)\butc.exe"/>
                             </Component>
-                            <Component Id="cmf_kaserver_EXE" Guid="73117045-0BB8-4F57-8A75-909F35C2D723">
+                            <Component Win64="$(var.Win64)" Id="cmf_kaserver_EXE" Guid="$(var.cmf_kaserver_EXE_guid)">
                                 <File Id="filekaserver_EXE" Name="kaser.exe" LongName="kaserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_ptserver_EXE" Guid="CDBDE41D-24DF-44E5-97D2-EFA71CDBEECB">
+                            <Component Win64="$(var.Win64)" Id="cmf_ptserver_EXE" Guid="$(var.cmf_ptserver_EXE_guid)">
                                 <File Id="fileptserver_EXE" Name="ptser.exe" LongName="ptserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_salvager_EXE" Guid="E3F3ACE5-B556-4FEF-9DA2-78B194AA6639">
+                            <Component Win64="$(var.Win64)" Id="cmf_salvager_EXE" Guid="$(var.cmf_salvager_EXE_guid)">
                                 <File Id="filesalvager_EXE" Name="salva.exe" LongName="salvager.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_upclient_EXE" Guid="321BB9BF-5FF0-4363-9927-41C60BD526E9">
+                            <Component Win64="$(var.Win64)" Id="cmf_upclient_EXE" Guid="$(var.cmf_upclient_EXE_guid)">
                                 <File Id="fileupclient_EXE" Name="upcli.exe" LongName="upclient.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                            <Component Id="cmf_upserver_EXE" Guid="3CBD2EF5-43BC-4CA2-B367-87E82DED1406">
+                            <Component Win64="$(var.Win64)" Id="cmf_upserver_EXE" Guid="$(var.cmf_upserver_EXE_guid)">
                                 <File Id="fileupserver_EXE" Name="upser.exe" LongName="upserver.exe" KeyPath="yes" DiskId="1" />
                             </Component>
-                                                       <Component Id="cmf_afsserver_CPL" Guid="E270281E-9DB2-40A8-A418-55B4EC4A3FE7">
+                                                       <Component Win64="$(var.Win64)" Id="cmf_afsserver_CPL" Guid="$(var.cmf_afsserver_CPL_guid)">
                                                                <File Id="fileafsserver_CPL" Name="afsserve.cpl" LongName="afsserver.cpl" KeyPath="yes" DiskId="1"/>
                                                        <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls" Name="AFS Server CPL" Type="string" Value="[#fileafsserver_CPL]" Id="reg_Server30" />
                                                        </Component>
                             </Component>
                             
                         <?ifdef DebugSyms?>
-                            <Component Id="cmp_Server_Program_Debug" Guid="5F7BA9F7-E9BD-4AC3-9232-5EFBF6B740F8">
+                            <Component Win64="$(var.Win64)" Id="cmp_Server_Program_Debug" Guid="$(var.cmp_Server_Program_Debug_guid)">
                                 <File Id="filevlserver_PDB" Name="vlser.pdb" LongName="vlserver.pdb" DiskId="1" />
                                 <File Id="filevolinfo_PDB" Name="volin.pdb" LongName="volinfo.pdb" DiskId="1" />
                                 <File Id="filevolserver_PDB" Name="volse.pdb" LongName="volserver.pdb" DiskId="1" />
                                 <File Id="fileafskill_PDB" Name="afski.pdb" LongName="afskill.pdb" DiskId="1" />
                                 <File Id="fileafssvrcfg_PDB" Name="afssv.pdb" LongName="afssvrcfg.pdb" DiskId="1" />
-                                <File Id="fileasetkey_PDB" Name="asetk.pdb" LongName="asetkey.pdb" DiskId="1" />
+                               <?if $(env.CPU) = "i386"?>
+                                       <File Id="fileasetkey_PDB" Name="asetk.pdb" LongName="asetkey.pdb" DiskId="1" />
+                               <?endif?>
                                 <File Id="filebosctlsvc_PDB" Name="bosct.pdb" LongName="bosctlsvc.pdb" DiskId="1" />
                                 <File Id="filebosserver_PDB" Name="bosse.pdb" LongName="bosserver.pdb" DiskId="1" />
                                 <File Id="filebuserver_PDB" Name="buser.pdb" LongName="buserver.pdb" DiskId="1" />
     <Directory Id="StartupFolder" Name="." />
     <Directory Id="WindowsVolume" Name="." />
     <Directory Id="WindowsFolder" Name="." />
+
+       <!-- Shared assembly runtime for VS 2005 -->
+       <?if $(env.AFSVER_CL) = "1400"?>
+               <?ifdef env.CommonProgramFiles6432?>
+                 <?define CPF="$(env.CommonProgramFiles)"?>
+               <?else?>
+                 <?define CPF="$(env.CommonProgramFiles(x86)"?>
+               <?endif?>
+               <?if $(var.Platform) = "x64" ?>
+                       <?ifndef Debug?>
+                               <Merge Id="MSVCRT8MEM" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_CRT_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8POL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_CRT_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8MFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_MFC_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8PFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_MFC_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8MFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_MFCLOC_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8PFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_MFCLOC_x86_x64.msm"/>
+                       <?else?>
+                               <Merge Id="MSVCRT8MEM" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_DebugCRT_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8POL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_DebugCRT_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8MFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_DebugMFC_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8PFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_DebugMFC_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8MFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_MFCLOC_x86_x64.msm"/>
+                               <Merge Id="MSVCRT8PFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_MFCLOC_x86_x64.msm"/>
+                       <?endif?>
+               <?else?>
+                       <?ifndef Debug?>
+                               <Merge Id="MSVCRT8MEM" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_CRT_x86.msm"/>
+                               <Merge Id="MSVCRT8POL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_CRT_x86.msm"/>
+                               <Merge Id="MSVCRT8MFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_MFC_x86.msm"/>
+                               <Merge Id="MSVCRT8PFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_MFC_x86.msm"/>
+                               <Merge Id="MSVCRT8MFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_MFCLOC_x86.msm"/>
+                               <Merge Id="MSVCRT8PFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_MFCLOC_x86.msm"/>
+                       <?else?>
+                               <Merge Id="MSVCRT8MEM" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_DebugCRT_x86.msm"/>
+                               <Merge Id="MSVCRT8POL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_DebugCRT_x86.msm"/>
+                               <Merge Id="MSVCRT8MFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_DebugMFC_x86.msm"/>
+                               <Merge Id="MSVCRT8PFC" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_DebugMFC_x86.msm"/>
+                               <Merge Id="MSVCRT8MFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\Microsoft_VC80_MFCLOC_x86.msm"/>
+                               <Merge Id="MSVCRT8PFL" DiskId="1" Language="0" src="$(var.CPF)\Merge Modules\policy_8_0_Microsoft_VC80_MFCLOC_x86.msm"/>
+                       <?endif?>
+               <?endif?>
+       <?endif?>
 </Include>
index dab8cee81d68d4ebe57ddedda2ca24a1812b53c1..30303afd1ae5b2af2290ae09de869ebc64a50220 100644 (file)
@@ -35,6 +35,8 @@
     <String Id="StrCfgWzdDesc">Server Configuration Wizard</String>
 
     <String Id="StrLaunchCond">OpenAFS for Windows is currently only packaged for Windows 2000,XP and 2003</String>
+    <String Id="StrPlatform64">This build of OpenAFS for Windows is for 64-bit Windows versions.  Please install the 32-bit version on this operating system.</String>
+    <String Id="StrPlatformNot64">This build of OpenAFS for Windows is for 32-bit Windows versions.  Please install the 64-bit version on this operating system.</String>
     <String Id="AdminRequired">Installation of OpenAFS for Windows requires administrative privileges</String>
 
        <String Id="ErrNPIFailed">Installation of Network Provider failed.  System error [2]</String>
index 770da3a76904cf3f0c89f1d41c875c6000a16e6f..95145c2ba23594c27539f5af6e4eaf61d42ce376 100644 (file)
     <?define ProductComments="OpenAFS for Windows. Client and server components for using AFS."?>
 <?endif?>
     <?define Languages="$(var.LanguageCode)"?>
+<?if $(var.Platform) = "x64" ?>
+    <?define ProductName="OpenAFS for Windows (64-bit)"?>
+<?else?>
     <?define ProductName="OpenAFS for Windows"?>
+<?endif?>
     
     <!-- Localized packages should have different product codes -->
     <!-- Each product release should have a different product code -->
index fb01ee615adb42631e84943ffa8e03d2c925e56c..b3d687ebda97086354833a6b4a63b1cdab9cb1b4 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?>
+<?xml version="1.0" ?>
 <Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
 
     <!-- See config.wxi for the symbols that it defines/asserts -->
          Comments="$(var.PackageComments)"
          Compressed="yes"
          Description="$(var.ProductName)"
-         InstallerVersion="110"
+         InstallerVersion="$(var.InstallerVersion)"
          Keywords="Installer,OpenAFS,$(var.Manufacturer)"
          Languages="$(var.Languages)"
          Manufacturer="$(var.Manufacturer)"
-         Platforms="Intel"
+         Platforms="$(var.Platform)"
          ShortNames="no"
          SummaryCodepage="1252"
          />
          <![CDATA[VersionNT >= 500]]>
         </Condition>
         <Condition Message="$(loc.AdminRequired)">Privileged</Condition>
-        
+    <?if $(var.Platform) = "x64" ?>
+        <Condition Message="$(loc.StrPlatform64)">
+         <![CDATA[VersionNT64]]>
+        </Condition>
+    <?else?>
+        <Condition Message="$(loc.StrPlatformNot64)">
+         <![CDATA[NOT VersionNT64]]>
+        </Condition>
+    <?endif?>
         
         <!-- Global Properties -->
         <?include property.wxi?>
         
         <!-- File system and registry settings -->
         <Directory Id="TARGETDIR" Name="SourceDir">
+            <?include platform.wxi?>
             <?include registry.wxi?>
             <?include files.wxi?>
         </Directory>
diff --git a/src/WINNT/install/wix/platform.wxi b/src/WINNT/install/wix/platform.wxi
new file mode 100644 (file)
index 0000000..0d52cd3
--- /dev/null
@@ -0,0 +1,201 @@
+<?xml version="1.0"?>
+<Include>
+<!-- Platform specific GUID's and other definitions -->
+<?if $(var.Platform) = "x64" ?>
+       <?define PISystemFolder="System64Folder"?>
+       <?define PIProgramFilesFolder="ProgramFiles64Folder"?>
+       
+       <?define rcm_server_guid="2A82DD44-D2B4-4782-8EB7-2C4357C03834"?>
+       <?define rcm_cc_guid="E912420A-2135-4FFA-A751-A011532A303B"?>
+       <?define rcm_client_guid="4085D95F-F98F-4AC5-83F3-0B9DC520687A"?>
+       <?define rcm_client_cache_path_guid="E1D1D4DF-68AE-447E-9E0D-015606468C0A"?>
+       <?define rcm_client_cache_size_guid="C61AAE44-157A-4948-9664-DE699C349C01"?>
+       <?define rcm_store_ansi_guid="2C58095A-57DF-4459-9E3C-54D0956FDD57"?>
+       <?define rcm_documentation_guid="BF444FCE-90D7-4E93-AC10-26C988FD45B2"?>
+       <?define rcm_sdk_guid="324AE628-61A3-472A-9F7A-304AC6E48C14"?>
+       <?define rcm_kb301673_guid="306A2CE5-5324-4900-BBEC-94FD0F0A6A70"?>
+       <?define rcm_loopback_guid="CC241EF3-BC0C-4C31-B5DE-999E0D6280FD"?>
+
+       <?define cmf_afslogon_DLL_guid="8A8794D3-068D-40D5-BBE7-F572FA7B98F0"?>
+       <?define cmf_afscpcc_EXE_guid="892C22E6-FCF4-4001-AD4E-E4DA7B4F78C1"?>
+       <?define cmp_ClientSystemDebug_guid="852001B7-E0A7-457C-BDB9-0650D537ED96"?>
+       <?define efl_uninstall_EXE_guid="F25CB258-FA69-4764-B748-A97BD86461AF"?>
+       <?define cmf_afsbosadmin_DLL_guid="91EF031C-FFF5-4637-B66A-013673C46930"?>
+       <?define cmf_afscfgadmin_DLL_guid="B8222D9A-C2C0-4E53-95D5-6DE0429CDC0F"?>
+       <?define cmf_afsclientadmin_DLL_guid="778C00C4-A9AB-4679-AB4D-EDCB4EA7EA95"?>
+       <?define cmf_afskasadmin_DLL_guid="A6558682-E6D1-42B2-AD53-7EB57CC4E1CD"?>
+       <?define cmf_afsptsadmin_DLL_guid="F02021DD-B0B2-4EE0-890B-B0E765345101"?>
+       <?define cmf_afsvosadmin_DLL_guid="8955900E-E743-41A9-9C54-FCEB91A72ADE"?>
+       <?define cmf_afsadminutil_DLL_guid="72495728-0024-4AAC-81F6-6E826BFFED86"?>
+       <?define cmf_afsrpc_DLL_guid="AE9350B3-21AA-4204-A0A8-3D58C57EB178"?>
+       <?define cmf_afsauthent2_DLL_guid="7BD58D90-B600-44B7-BBCB-545861E878EB"?>
+       <?define cmf_afspthread_DLL_guid="8D29CD5A-DC32-4C2A-BD07-D7578FD649B4"?>
+       <?define cmf_TaAfsAppLib_DLL_guid="84C6E322-0490-4EE5-8972-553DBE905D8A"?>
+       <?define cmf_afsprocmgmt_DLL_guid="B1525D46-C2BD-4CFD-B733-DE858C31D78F"?>
+       <?define cmf_afs_config_EXE_guid="DA37BA7C-BEB1-4C3B-BCA3-806ED377F985"?>
+       <?define cmp_ServerCommonDebug_guid="038086D4-DE3F-43CD-9D72-75880FF80E98"?>
+       <?define cmp_CommonCommonDebug_guid="3C3A3415-0C86-454C-9C73-7C11E93A1E76"?>
+       <?define cmp_ClientCommonDebug_guid="2A8370D0-F2B2-45E3-99EB-39679A520F42"?>
+       <?define cmf_afseventmsg_1033_DLL_guid="1A880CB4-2A5C-4719-906D-1DD07B0106E2"?>
+       <?define cmf_afsserver_1033_DLL_guid="01E363E2-EFF7-4E1C-AAF0-AAA999DF1AAA"?>
+       <?define cmf_afssvrcfg_1033_DLL_guid="E7875BE0-F5EB-4FE1-B327-A8B36581BE6F"?>
+       <?define cmf_TaAfsAccountManager_1033_DLL_guid="3E4D5EB4-C92F-4821-880D-EEB4038F0933"?>
+       <?define cmf_TaAfsAppLib_1033_DLL_guid="AAB390CD-8961-4300-B85F-531974415B13"?>
+       <?define cmf_TaAfsServerManager_1033_DLL_guid="BA3C234D-1737-44B8-A27B-8D674643AE25"?>
+       <?define cmf_afscreds_1033_DLL_guid="FEED6F5A-E17C-4B5D-A378-50A00FC29D94"?>
+       <?define cmf_afs_config_1033_DLL_guid="D8A8C1AB-C47E-4208-B1F6-33A9526806E9"?>
+       <?define cmf_afs_cpa_1033_DLL_guid="08B5C87E-E4E0-4886-99FA-FB266BDCABF5"?>
+       <?define cmf_afs_shl_ext_1033_DLL_guid="5CA0BB73-35E2-4244-8891-DDD261244E06"?>
+       <?define cmf_TaAfsServerManager_EXE_guid="D63E9DC0-4998-444F-A6BE-0B974FA718ED"?>
+       <?define cmf_TaAfsAdmSvr_EXE_guid="6E8C0D1B-D07D-467C-9829-5C4556CB062A"?>
+       <?define cmf_TaAfsAccountManager_EXE_guid="D8C0005E-A7A9-4B50-A28E-2C1429E8B805"?>
+       <?define cmp_Control_CenterDebug_guid="C363179A-D696-47A3-BBCB-C9B86C524782"?>
+       <?define cmf_afsshare_EXE_guid="7FEB85B0-ED4F-4129-AA30-8FFF7E353296"?>
+       <?define cmf_libosi_DLL_guid="9CC44067-6181-4BC1-AA01-0846C0ABDCA8"?>
+       <?define cmf_libafsconf_DLL_guid="0DF35865-0D0F-49E8-8CFB-FC96D19AED18"?>
+       <?define cmf_klog_EXE_guid="EEC7F228-2539-4DBD-9B9D-B2ED6BD59955"?>
+       <?define cmf_tokens_EXE_guid="43F424D2-2155-4666-9326-BB2399B13060"?>
+       <?define cmf_unlog_EXE_guid="C99504D3-03A8-4ECC-95E8-B940E3A7D619"?>
+       <?define cmf_fs_EXE_guid="3E5FB477-A0C5-431B-AB0C-D8F40D27C787"?>
+       <?define cmf_afsdacl_EXE_guid="DCA65AEC-4E0C-417D-AC0D-488665AC3ED2"?>
+       <?define cmf_afscreds_EXE_guid="1E4ECD3C-1E7D-4B7B-A224-790108678654"?>
+       <?define cmp_credsStartup_guid="ADE0BD2A-423A-4299-BC63-0F884028C572"?>
+       <?define cmf_afs_shl_ext_DLL_guid="F749C3B1-6627-4E3E-99A8-4A01744DCA14"?>
+       <?define cmf_afsd_service_EXE_guid="B5F06506-3308-438A-A288-7CD80BBC6D2A"?>
+       <?define cmf_symlink_EXE_guid="DB85779D-CD1A-4579-9CF5-020CBB947412"?>
+       <?define cmf_kpasswd_EXE_guid="A355F023-9DDA-40C8-A265-74BB13761455"?>
+       <?define cmf_pts_EXE_guid="4E88A718-FB99-44B4-AB74-81A99FDA625A"?>
+       <?define cmf_bos_EXE_guid="298EF974-0F24-4D54-8C6C-D2E495F55D0F"?>
+       <?define cmf_kas_EXE_guid="C8CBC35A-5BC8-43D2-8A80-170E6324F343"?>
+       <?define cmf_vos_EXE_guid="FC0C23A9-D8A1-48DA-BA8C-4818112F228F"?>
+       <?define cmf_udebug_EXE_guid="8A37605B-7574-490C-A8B9-8D17D32974DE"?>
+       <?define cmf_translate_et_EXE_guid="8F8E868F-2BAE-4DA3-9E3F-02BC18923E61"?>
+       <?define cmf_rxdebug_EXE_guid="11CA621E-9307-4748-8F06-F00D1802E3CA"?>
+       <?define cmf_backup_EXE_guid="4F639D8F-2239-4721-B71A-EC60B6ABBC73"?>
+       <?define cmf_aklog_EXE_guid="CE4B7F72-73E2-4D28-8194-308F9C0B560A"?>
+       <?define cmf_cmdebug_EXE_guid="37C6AE92-2C02-46D8-8E52-814A34A1FE22"?>
+       <?define cmf_afs_cpa_CPL_guid="D336F113-8EF4-47F7-9546-AA605B63BA71"?>
+       <?define cmp_ClientProgramDebug_guid="FC0AD966-9323-4AAA-96D1-FFEF44460E59"?>
+       <?define cmp_SDK_Lib_guid="A7CC24B1-E6A9-4254-B468-F4C47BC9ECFC"?>
+       <?define cmp_SDK_Lib_Afs_guid="C0DA2C3B-B2B8-4AD4-9B00-42FB45C5B352"?>
+       <?define cmf_vlserver_EXE_guid="88A9024C-D5B2-4AF1-8241-E0B046E25FE3"?>
+       <?define cmf_volinfo_EXE_guid="55C8984F-D58A-44FD-9566-3C033612B2DB"?>
+       <?define cmf_volserver_EXE_guid="98049267-9D3C-4BBC-B5E5-E3A0BCE0B8AF"?>
+       <?define cmf_afskill_EXE_guid="91752843-EA46-4DF9-A02C-442A1B482916"?>
+       <?define cmf_afssvrcfg_EXE_guid="05C84A98-B9BD-4753-90E5-E1CF0476F1C5"?>
+       <?define cmf_asetkey_EXE_guid="1E709158-1696-4AFB-9DCD-9B6B5118A232"?>
+       <?define cmf_bosctlsvc_EXE_guid="5411D1AC-CC75-4A51-9B7A-44F2432E1D80"?>
+       <?define cmf_bosserver_EXE_guid="5E264AA1-67C3-4D8D-8956-358B897243F4"?>
+       <?define cmf_buserver_EXE_guid="1B08D5E3-A391-4824-919A-D1DF3B3ADD7C"?>
+       <?define cmf_fileserver_EXE_guid="22E3546C-B29B-4A70-981C-194F8EA24C19"?>
+       <?define cmf_fms_EXE_guid="79452416-3468-422B-B59F-D2342C9536C8"?>
+       <?define cmf_butc_EXE_guid="2E03B583-AAEE-4674-AA53-98D6596C6668"?>
+       <?define cmf_kaserver_EXE_guid="29D8D9DC-5C12-48E4-ACEF-797380EFE794"?>
+       <?define cmf_ptserver_EXE_guid="78199FF4-33AF-4A7E-9316-4E90522EA93F"?>
+       <?define cmf_salvager_EXE_guid="01C16D4F-ABCD-476D-B678-BCF87F1F1599"?>
+       <?define cmf_upclient_EXE_guid="DE392019-13E0-45FD-BA82-E4C0148AC654"?>
+       <?define cmf_upserver_EXE_guid="4201E9FE-56BC-4852-992A-18E5D75C3B39"?>
+       <?define cmf_afsserver_CPL_guid="7B0D1145-DB1B-47BA-A874-3AB26F86FFB6"?>
+       <?define cmp_Server_Program_Debug_guid="1EDCDA16-216B-434E-A06E-AD1A9D40F5A2"?>
+
+<?elseif $(var.Platform) = "Intel"?>
+       <?define PISystemFolder="SystemFolder"?>
+       <?define PIProgramFilesFolder="ProgramFilesFolder"?>
+       
+       <?define rcm_server_guid="D30C980B-8284-49DF-88F5-C90BBFB3E80D"?>
+       <?define rcm_cc_guid="2007844F-E101-4C99-81F5-EF9AEAD98821"?>
+       <?define rcm_client_guid="954679B0-547B-4F1E-9A3A-ABFB15B6C724"?>
+       <?define rcm_client_cache_path_guid="4080E08D-6649-4A06-B286-F5E737DF4D8A"?>
+       <?define rcm_client_cache_size_guid="F3A12290-920B-42E9-8E49-4958D7C0B6E2"?>
+       <?define rcm_store_ansi_guid="EAC84AD6-CF90-4b28-AF32-6F96DF55C3C4"?>
+       <?define rcm_documentation_guid="97493526-4A5C-4C55-A1D6-EA38841B1B85"?>
+       <?define rcm_sdk_guid="648BE65B-C152-412C-A45C-1562512B52DC"?>
+       <?define rcm_kb301673_guid="BAF01A13-445B-45BB-A832-DC2E7F98AE6A"?>
+       <?define rcm_loopback_guid="9F9BBDA3-208C-4F93-B81F-313E031B6DDA"?>
+
+       <?define cmf_afslogon_DLL_guid="3F3438F8-FEF8-49D0-87D1-8B48586D7D8C"?>
+       <?define cmf_afscpcc_EXE_guid="C3725A08-5FF7-4A11-81B5-E0AB15262832"?>
+       <?define cmp_ClientSystemDebug_guid="DD34DA09-D9DA-4A5A-9521-87B7738A7D53"?>
+       <?define efl_uninstall_EXE_guid="8B99B979-03F4-4AB5-9CE8-1DA97DB6613A"?>
+       <?define cmf_afsbosadmin_DLL_guid="B4E5799E-BC68-4C17-B924-7DA206DD88D7"?>
+       <?define cmf_afscfgadmin_DLL_guid="2D5E8B3A-55F2-43CC-953B-7630FF0A7326"?>
+       <?define cmf_afsclientadmin_DLL_guid="735F75B1-EBCF-4AE1-B401-D48A1DD160F2"?>
+       <?define cmf_afskasadmin_DLL_guid="2B4E37E4-ECEA-4435-8028-D60BAC9C647B"?>
+       <?define cmf_afsptsadmin_DLL_guid="CC902A5A-5CEF-47D1-B4ED-F922EB8F7FF0"?>
+       <?define cmf_afsvosadmin_DLL_guid="A97E0801-06A5-465C-99E1-E5F0E07166F0"?>
+       <?define cmf_afsadminutil_DLL_guid="A9782D0F-768F-40F4-A600-A7240EFBEC8C"?>
+       <?define cmf_afsrpc_DLL_guid="E75E2FC0-D011-494A-8142-670B3286C5C2"?>
+       <?define cmf_afsauthent2_DLL_guid="7B806F96-0542-4BCC-865B-E126CE3BCDA6"?>
+       <?define cmf_afspthread_DLL_guid="77650315-9F19-47BF-A923-54B77DA5EA5C"?>
+       <?define cmf_TaAfsAppLib_DLL_guid="D6D8A744-2352-477D-9ECD-4859C475162B"?>
+       <?define cmf_afsprocmgmt_DLL_guid="DAAA35B5-0E95-4DEF-9E87-A99A0A24B0BE"?>
+       <?define cmf_afs_config_EXE_guid="3E73EA24-4B0D-4834-96C3-8AF38FDBCA6F"?>
+       <?define cmp_ServerCommonDebug_guid="4132C211-5577-48DE-9C66-214EEC0E6BC4"?>
+       <?define cmp_CommonCommonDebug_guid="7F47902F-B92D-42A3-BDEF-AFFC79C66F0C"?>
+       <?define cmp_ClientCommonDebug_guid="BFA4097D-3013-46AD-86EB-2160376FB55C"?>
+       <?define cmf_afseventmsg_1033_DLL_guid="2DBBE232-2DA5-421F-9C83-93278598634A"?>
+       <?define cmf_afsserver_1033_DLL_guid="2EC8BA3C-0A5C-48C5-A370-36265C43A93F"?>
+       <?define cmf_afssvrcfg_1033_DLL_guid="70F7B4AA-E89F-4786-A3F1-27725E613F53"?>
+       <?define cmf_TaAfsAccountManager_1033_DLL_guid="1BD9FA36-3DD8-4AA4-B7C0-9AC26D872068"?>
+       <?define cmf_TaAfsAppLib_1033_DLL_guid="40989EC2-EB2B-495A-BA6D-5E22AB785457"?>
+       <?define cmf_TaAfsServerManager_1033_DLL_guid="54876C77-299F-496B-A5D0-F89DF8759A40"?>
+       <?define cmf_afscreds_1033_DLL_guid="76AC935C-E558-4D1C-810D-47F3A8923429"?>
+       <?define cmf_afs_config_1033_DLL_guid="6DE08ED9-2B64-4D39-A50E-62FEAC91DF88"?>
+       <?define cmf_afs_cpa_1033_DLL_guid="12EE2B31-4320-4A6B-90F7-7A03ECF5A0DA"?>
+       <?define cmf_afs_shl_ext_1033_DLL_guid="9FF6C6CA-C731-4319-8777-E6DBAEFC3A4B"?>
+       <?define cmf_TaAfsServerManager_EXE_guid="B890FB93-2EFD-44B6-8CB3-7A6AFABFF029"?>
+       <?define cmf_TaAfsAdmSvr_EXE_guid="99E23413-8261-4007-9DC9-B2C7453EF1EE"?>
+       <?define cmf_TaAfsAccountManager_EXE_guid="BDFA5B64-2A69-41D5-8260-3DAB3CE9A10B"?>
+       <?define cmp_Control_CenterDebug_guid="B14EEC50-8ADF-4FE4-B00F-431861A5620C"?>
+       <?define cmf_afsshare_EXE_guid="E972DA35-E950-4736-AE48-E6DDCE8C97D0"?>
+       <?define cmf_libosi_DLL_guid="0E10B3CC-533B-4EAC-AFC5-3D2B529385D7"?>
+       <?define cmf_libafsconf_DLL_guid="D72DA435-878D-42BE-9383-69FB97D63624"?>
+       <?define cmf_klog_EXE_guid="DCE60DF8-6BB3-4090-B525-8CF8843C878B"?>
+       <?define cmf_tokens_EXE_guid="C6F79AAF-0EF4-4751-BB56-015B7E847D71"?>
+       <?define cmf_unlog_EXE_guid="D2C19113-8379-424D-9C90-BB4C955D8F17"?>
+       <?define cmf_fs_EXE_guid="D19D5998-E8E1-424B-9D0D-655840DBC571"?>
+       <?define cmf_afsdacl_EXE_guid="215DBC86-A5E8-4622-8A95-0E5830B04D0B"?>
+       <?define cmf_afscreds_EXE_guid="A17567CF-866E-49AF-A717-0B4F17CA88D4"?>
+       <?define cmp_credsStartup_guid="3F40BA8D-16A2-4990-A74F-35AF3012E3F8"?>
+       <?define cmf_afs_shl_ext_DLL_guid="E4C51111-F9ED-418D-9DE0-ED8777CED5C9"?>
+       <?define cmf_afsd_service_EXE_guid="37A90054-505D-4C57-B489-7EF4D97B86F6"?>
+       <?define cmf_symlink_EXE_guid="01513839-36E5-418D-8337-04B5D74337CD"?>
+       <?define cmf_kpasswd_EXE_guid="D362743B-6BF3-49CD-8B58-8DE56BCB0143"?>
+       <?define cmf_pts_EXE_guid="DC65EE96-8C01-4985-B19A-87B710841CD7"?>
+       <?define cmf_bos_EXE_guid="E3060710-F745-4958-A0C6-459B6CD0A5C3"?>
+       <?define cmf_kas_EXE_guid="59ED3FE5-B818-4CE6-A278-F9C7B97B7973"?>
+       <?define cmf_vos_EXE_guid="854E4787-7C18-400B-9660-56F498DDC608"?>
+       <?define cmf_udebug_EXE_guid="EDD268D3-460C-4509-8933-F62AE72DEBC5"?>
+       <?define cmf_translate_et_EXE_guid="539C313D-BD7F-4896-9AE3-E0E54C6CC1CA"?>
+       <?define cmf_rxdebug_EXE_guid="D9E85810-5E1D-433F-A17E-D961ABC58567"?>
+       <?define cmf_backup_EXE_guid="A8B6C84E-115B-4317-9CAA-0797BFE50D02"?>
+       <?define cmf_aklog_EXE_guid="84FADCD9-AA0D-4D80-B374-A20A85F5957B"?>
+       <?define cmf_cmdebug_EXE_guid="CFACE5C6-A867-439F-8BEE-31C0ED399B41"?>
+       <?define cmf_afs_cpa_CPL_guid="C83091EC-2967-4AC6-A34D-860CD7FEDA57"?>
+       <?define cmp_ClientProgramDebug_guid="A6A394F6-45D0-45A9-A7DD-C0997070EC14"?>
+       <?define cmp_SDK_Lib_guid="71BC1B4E-4C4C-4FF8-8DDA-C6AB2BE22142"?>
+       <?define cmp_SDK_Lib_Afs_guid="CD671A64-D491-4363-A7AD-645482B481BE"?>
+       <?define cmf_vlserver_EXE_guid="F6A43B78-EE17-4483-AA81-4B6C6957977D"?>
+       <?define cmf_volinfo_EXE_guid="CED56F48-1049-403F-912B-3C186867B563"?>
+       <?define cmf_volserver_EXE_guid="36A386A0-6DA9-40A7-A12D-6A521559933D"?>
+       <?define cmf_afskill_EXE_guid="454AA25A-3C62-4AF9-AFE1-36A54A0E3F1A"?>
+       <?define cmf_afssvrcfg_EXE_guid="39F6AB59-FD18-4647-8B83-CDEC59E2368F"?>
+       <?define cmf_asetkey_EXE_guid="9B7694A2-DCAE-4DBA-84F2-09DC796C20B2"?>
+       <?define cmf_bosctlsvc_EXE_guid="8F6F62A8-BB6D-46C1-BA80-4F207AA24F0D"?>
+       <?define cmf_bosserver_EXE_guid="0FF7D0AB-DEA0-429E-928C-588E838E2635"?>
+       <?define cmf_buserver_EXE_guid="BF674F47-33A0-418D-B7A5-7CE778D747A5"?>
+       <?define cmf_fileserver_EXE_guid="F8EF1067-5F55-426B-9258-EBC6CDCF0DDB"?>
+       <?define cmf_fms_EXE_guid="250BF6D4-EAC3-4A2F-BD32-CA603CD15020"?>
+       <?define cmf_butc_EXE_guid="96DAC5A8-FD16-4FF5-8BD5-92F25880E557"?>
+       <?define cmf_kaserver_EXE_guid="73117045-0BB8-4F57-8A75-909F35C2D723"?>
+       <?define cmf_ptserver_EXE_guid="CDBDE41D-24DF-44E5-97D2-EFA71CDBEECB"?>
+       <?define cmf_salvager_EXE_guid="E3F3ACE5-B556-4FEF-9DA2-78B194AA6639"?>
+       <?define cmf_upclient_EXE_guid="321BB9BF-5FF0-4363-9927-41C60BD526E9"?>
+       <?define cmf_upserver_EXE_guid="3CBD2EF5-43BC-4CA2-B367-87E82DED1406"?>
+       <?define cmf_afsserver_CPL_guid="E270281E-9DB2-40A8-A418-55B4EC4A3FE7"?>
+       <?define cmp_Server_Program_Debug_guid="5F7BA9F7-E9BD-4AC3-9232-5EFBF6B740F8"?>
+
+<?else?>
+       <?error Unknown platform?>
+<?endif?>
+</Include>
index 3dfb8b0eddf5e12d3e12ab95cf3a83e52952ccea..beb75e80fdd0ab8af439b1a9cd931439217fe0bc 100644 (file)
     <Property Id="InstallMode">Typical</Property>
 
     <Property Id="AFSCCPATCH">
-      <RegistrySearch Id="rl_AFSCC_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="PatchLevel" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSCC_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="PatchLevel" Type="registry" />
     </Property>
     <Property Id="AFSCCMAJOR">
-      <RegistrySearch Id="rl_AFSCC_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="MajorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSCC_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="MajorVersion" Type="registry" />
     </Property>
     <Property Id="AFSCCMINOR">
-      <RegistrySearch Id="rl_AFSCC_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="MinorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSCC_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="MinorVersion" Type="registry" />
     </Property>
     <Property Id="AFSCCPATH">
-      <RegistrySearch Id="rl_AFSCC_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="PathName" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSCC_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Control Center\CurrentVersion" Name="PathName" Type="registry" />
     </Property>
     
     <Property Id="AFSCLIENTPATCH">
-      <RegistrySearch Id="rl_AFSClient_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="PatchLevel" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSClient_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="PatchLevel" Type="registry" />
     </Property>
     <Property Id="AFSCLIENTMAJOR">
-      <RegistrySearch Id="rl_AFSClient_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="MajorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSClient_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="MajorVersion" Type="registry" />
     </Property>
     <Property Id="AFSCLIENTMINOR">
-      <RegistrySearch Id="rl_AFSClient_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="MinorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSClient_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="MinorVersion" Type="registry" />
     </Property>
     <Property Id="AFSCLIENTPATH">
-      <RegistrySearch Id="rl_AFSClient_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="PathName" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSClient_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Client\CurrentVersion" Name="PathName" Type="registry" />
     </Property>
 
     <Property Id="AFSDOCPATCH">
-      <RegistrySearch Id="rl_AFSDoc_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="PatchLevel" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSDoc_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="PatchLevel" Type="registry" />
     </Property>
     <Property Id="AFSDOCMAJOR">
-      <RegistrySearch Id="rl_AFSDoc_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="MajorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSDoc_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="MajorVersion" Type="registry" />
     </Property>
     <Property Id="AFSDOCMINOR">
-      <RegistrySearch Id="rl_AFSDoc_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="MinorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSDoc_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="MinorVersion" Type="registry" />
     </Property>
     <Property Id="AFSDOCPATH">
-      <RegistrySearch Id="rl_AFSDoc_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="PathName" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSDoc_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Name="PathName" Type="registry" />
     </Property>
 
     <Property Id="AFSSERVERPATCH">
-      <RegistrySearch Id="rl_AFSServer_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="PatchLevel" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSServer_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="PatchLevel" Type="registry" />
     </Property>
     <Property Id="AFSSERVERMAJOR">
-      <RegistrySearch Id="rl_AFSServer_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="MajorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSServer_major" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="MajorVersion" Type="registry" />
     </Property>
     <Property Id="AFSSERVERMINOR">
-      <RegistrySearch Id="rl_AFSServer_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="MinorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSServer_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="MinorVersion" Type="registry" />
     </Property>
     <Property Id="AFSSERVERPATH">
-      <RegistrySearch Id="rl_AFSServer_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="PathName" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSServer_path" Root="HKLM" Key="Software\TransarcCorporation\AFS Server\CurrentVersion" Name="PathName" Type="registry" />
     </Property>
     
     <Property Id="AFSSDKPATCH">
-      <RegistrySearch Id="rl_AFSSDK_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="PatchLevel" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSSDK_patch" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="PatchLevel" Type="registry" />
     </Property>
     <Property Id="AFSSDKMAJOR">
-      <RegistrySearch Id="rl_AFSSDK_major" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="MajorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSSDK_major" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="MajorVersion" Type="registry" />
     </Property>
     <Property Id="AFSSDKMINOR">
-      <RegistrySearch Id="rl_AFSSDK_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="MinorVersion" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSSDK_minor" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="MinorVersion" Type="registry" />
     </Property>
     <Property Id="AFSSDKPATH">
-      <RegistrySearch Id="rl_AFSSDK_path" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="PathName" Type="registry" />
+      <RegistrySearch Win64="$(var.Win64)" Id="rl_AFSSDK_path" Root="HKLM" Key="Software\TransarcCorporation\AFS SDK\CurrentVersion" Name="PathName" Type="registry" />
     </Property>
 
        <Property Id="NSISVERSION">
-         <RegistrySearch Id="rl_NSIS_Ver" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="DisplayVersion" Type="registry" />
+         <RegistrySearch Win64="$(var.Win64)" Id="rl_NSIS_Ver" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="DisplayVersion" Type="registry" />
        </Property>
     <Property Id="NSISUNINSTALL">
-         <RegistrySearch Id="rl_NSIS_Uninst" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="UninstallString" Type="registry" />
+         <RegistrySearch Win64="$(var.Win64)" Id="rl_NSIS_Uninst" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="UninstallString" Type="registry" />
     </Property>
     
     <Property Id="ABORTREASON">$(loc.StrNsisAbortReason)</Property>
index 1fd0dbab3decd8e898b05ec5a665f94070454611..d79b680708a0ecff02af1ca52ab73887f375879a 100644 (file)
@@ -3,7 +3,7 @@
     <!--
     This file will be included as a child of the root Directory tag.
     -->
-    <Component Id="rcm_Server" Guid="D30C980B-8284-49DF-88F5-C90BBFB3E80D">
+    <Component Id="rcm_Server" Guid="$(var.rcm_server_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\AFS Service" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Server"/>
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\AFS Service" Id="reg_Server3"/>
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\AFS Service" Name="TypesSupported" Type="integer" Value="7" Id="reg_Server4" />
@@ -34,7 +34,7 @@
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\AFS Service" Name="EventMessageFile" Type="string" Value="[AFSDIR]Common\afseventmsg_$(var.LanguageCode).dll" Id="reg_Server_$(var.LanguageCode)" />
     </Component>
 
-    <Component Id="rcm_Control_Center" Guid="2007844F-E101-4C99-81F5-EF9AEAD98821">
+    <Component Id="rcm_Control_Center" Guid="$(var.rcm_cc_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center" KeyPath="yes" Id="reg_Control_Center2" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Control_Center" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center\CurrentVersion" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Control_Center3" />
@@ -60,7 +60,7 @@
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center\$(var.NumericVersion)" Name="InstallDateString" Type="string" Value="$(var.InstallTimestamp)" Id="reg_Control_Center26" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center\$(var.NumericVersion)" Name="Description" Type="string" Value="$(loc.StrAFSCCDesc)" Id="reg_Control_Center27" />
     </Component>
-    <Component Id="rcm_Client" Guid="954679B0-547B-4F1E-9A3A-ABFB15B6C724">
+    <Component Id="rcm_Client" Guid="$(var.rcm_client_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Id="reg_Client_NoUninstall2" />
         <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Action="createKey" Id="reg_Client_NoUninstall" />
         <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" Type="string" Value="$(loc.StrShlExtDesc)" Id="reg_Client_NoUninstall3" />
         <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini" Name="AFS Mappings" Type="string" Value="USR:Software\OpenAFS\Client\mappings" Id="reg_Full_Client14" />
         <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini" Name="AFS Submounts" Type="string" Value="SYS:OpenAFS\Client\Submounts" Id="reg_Full_Client15" />
     </Component>
-    <Component Id="rcm_ClientCachePath" Guid="4080E08D-6649-4A06-B286-F5E737DF4D8A" Transitive="yes">
+    <Component Id="rcm_ClientCachePath" Guid="$(var.rcm_client_cache_path_guid)" Transitive="yes" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="CachePath" Type="expandable" Value="[AFSCACHEPATH]" Id="reg_Full_Client16" KeyPath="yes" />
         <Condition>AFSCACHEPATH &lt;&gt; ""</Condition>
     </Component>
-    <Component Id="rcm_ClientCacheSize" Guid="F3A12290-920B-42E9-8E49-4958D7C0B6E2" Transitive="yes">
+    <Component Id="rcm_ClientCacheSize" Guid="$(var.rcm_client_cache_size_guid)" Transitive="yes" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="CacheSize" Type="integer" Value="[AFSCACHESIZE]" Id="reg_Full_Client17" KeyPath="yes" />
         <Condition>AFSCACHESIZE &lt;&gt; ""</Condition>
     </Component>
-    <Component Id="rcm_StoreAnsiFilenames" Guid="EAC84AD6-CF90-4b28-AF32-6F96DF55C3C4" Transitive="yes">
+    <Component Id="rcm_StoreAnsiFilenames" Guid="$(var.rcm_store_ansi_guid)" Transitive="yes" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SOFTWARE\OpenAFS\Client" Name="StoreAnsiFilenames" Type="integer" Value="[STOREANSIFILENAMES]" Id="reg_Full_Client18" KeyPath="yes" />
         <Condition>STOREANSIFILENAMES &lt;&gt; ""</Condition>
     </Component>
-    <Component Id="rcm_Documentation" Guid="97493526-4A5C-4C55-A1D6-EA38841B1B85">
+    <Component Id="rcm_Documentation" Guid="$(var.rcm_documentation_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation" KeyPath="yes" Id="reg_Docs2" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Docs" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Docs3" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation\$(var.NumericVersion)" Name="InstallDateString" Type="string" Value="$(var.InstallTimestamp)" Id="reg_Docs26" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation\$(var.NumericVersion)" Name="Description" Type="string" Value="$(loc.StrAFSDocDesc)" Id="reg_Docs27" />
     </Component>
-    <Component Id="rcm_SDK" Guid="648BE65B-C152-412C-A45C-1562512B52DC">
+    <Component Id="rcm_SDK" Guid="$(var.rcm_sdk_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK" KeyPath="yes" Id="reg_SDK2" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_SDK" />
         <Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK\CurrentVersion" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_SDK3" />
     </Component>
 
     <!-- Work around bug KB30673.  Only for Windows 2000. -->    
-    <Component Id="rcm_KB301673" Guid="BAF01A13-445B-45BB-A832-DC2E7F98AE6A">
+    <Component Id="rcm_KB301673" Guid="$(var.rcm_kb301673_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\NetBT\Parameters" Name="SmbDeviceEnabled" Type="integer" Value="0" Id="reg_KB301673" KeyPath="yes" />
     </Component>
 
             its install state is set as NULL, instead of Local or Absent.  This prevents the feature from
             being removed when the product is uninstalled. This is just a flag component to add to the
             loopback feature so that it is not empty. -->
-    <Component Id="rcm_Loopback" Guid="9F9BBDA3-208C-4F93-B81F-313E031B6DDA">
+    <Component Id="rcm_Loopback" Guid="$(var.rcm_loopback_guid)" Win64="$(var.Win64)">
         <Registry Root="HKLM" Key="SOFTWARE\OpenAFS\Client" Name="LoopbackInstalled" Type="integer" Value="1" Id="reg_Loopback1" KeyPath="yes" />
     </Component>
     
index 569d0160d1e7dc9a8014ffc9357ff4a1a5a08cda..51d8ae9110812f59b3acd946405e8bc6c0e1e3c4 100644 (file)
@@ -1,5 +1,13 @@
 ï»¿<?xml version="1.0"?> 
 <Include>
+    <?if $(env.AFSVER_CL) = "1400" ?>
+               <MergeRef Id="MSVCRT8MEM"/>
+               <MergeRef Id="MSVCRT8POL"/>
+               <MergeRef Id="MSVCRT8MFC"/>
+               <MergeRef Id="MSVCRT8PFC"/>
+               <MergeRef Id="MSVCRT8MFL"/>
+               <MergeRef Id="MSVCRT8PFL"/>
+    <?endif?>
 <?ifndef Debug?>
     <?if $(env.AFSVER_CL) = "1310" ?>
         <?ifdef comment?>
index ff266cda8b5b3cfcf5a81f833b9ad7be411de178..ebfacc0324e6f72f6960f8e4768c59cb54760ff8 100644 (file)
@@ -20,6 +20,7 @@ $(OUT)\uninstall.res: uninstall.rc AFS_component_version_number.h
 
 $(UNINSTALL): $(OBJECTS) $(OUT)\uninstall.res
   $(EXECONLINK) msi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
   $(EXEPREP)
 
 install: $(UNINSTALL)
index a2ea66027320db7c438f5c7b296e47ec165183af..ecc6197610ba32dc89a065ad694f4653eeddfc8d 100644 (file)
@@ -26,6 +26,7 @@ EXELIBS = \
 
 $(EXEFILE) : $(EXEOBJS)
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
index 9b1e2b213397ca845bbc849d8de91d8b39784ad8..576c356826ec65aa2e271af2459b5d5722e88cfc 100644 (file)
@@ -213,7 +213,7 @@ BOOL TranslateFile (LPTSTR psz)
       return FALSE;
       }
 
-   size_t cbSource;
+   DWORD cbSource;
    if ((cbSource = GetFileSize (hFile, NULL)) != 0)
       {
       LPTSTR abSource = (LPTSTR)GlobalAlloc (GMEM_FIXED, cbSource + 5);
@@ -227,7 +227,7 @@ BOOL TranslateFile (LPTSTR psz)
       else
          {
          abSource[ dwRead ] = 0;
-         size_t cbTarget = dwRead * 4;
+         DWORD cbTarget = dwRead * 4;
          LPSTR abTarget = (LPSTR)GlobalAlloc (GMEM_FIXED, cbTarget);
          memset (abTarget, 0x00, cbTarget);
 
index 11424d8a4882003f17e20091aa4509eae3d5b9ce..e3b94a6601dda1accd45e068eb85e7ff3b26eb3c 100644 (file)
@@ -29,6 +29,7 @@ PTHR_DLLOBJS = \
 
 $(PTHR_DLLFILE): $(PTHR_DLLOBJS)
        $(DLLCONLINK) /DEF:pthread.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 ############################################################################
@@ -42,6 +43,7 @@ PTHR95_DLLOBJS = \
 
 $(PTHR95_DLLFILE): $(PTHR95_DLLOBJS)
        $(DLLCONLINK) /DEF:pthread.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 $(OUT)\pthread_95.obj: pthread.c
index 8531e61e0fd9acc4934bc2667dd6a552bafee0c3..bf7fe7275a81f4f15558e47301a95836cddb39ae 100644 (file)
@@ -433,7 +433,7 @@ static size_t terminate_thread_wakeup_list_size = 0;
 
 static DWORD WINAPI terminate_thread_routine(LPVOID param) {
     thread_p cur, next;
-    size_t native_thread_count;
+    DWORD native_thread_count;
     int should_terminate;
     int terminate_thread_wakeup_list_index;
 
@@ -838,7 +838,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
 int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime) {
     int rc = 0;
     struct _timeb now, then;
-    short n_milli, t_milli;
+    afs_uint32 n_milli, t_milli;
 
     if (abstime->tv_nsec < 1000000000) {
 
@@ -873,7 +873,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const s
                 * round up the wait time here.
                 */
                rc = cond_wait_internal(cond, mutex, 
-                                ((then.time * 1000) + (t_milli)));
+                                (DWORD)((then.time * 1000) + (t_milli)));
            } else {
                rc = EINVAL;
            }
index d4926c28c49ffc66fa1600a461b790f7f2772162..849605a36da76d0063abbfef91d200d945e2fe3f 100644 (file)
@@ -13,12 +13,15 @@ test tests: ptest.exe tsd.exe native.exe
 
 $(OUT)\ptest.exe: $(OUT)\ptest.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\tsd.exe: $(OUT)\tsd.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\native.exe: $(OUT)\native.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 clean::
        $(DEL) $(DESTDIR)/lib/afspthread.lib
index d00892d4ae5852f48ecbe39279280bad34ff6216..179876591d3c7ae033eea086758cc6005073ab20 100644 (file)
@@ -90,18 +90,18 @@ typedef struct
 
 typedef struct
    {
-   LONG cAllocCpp;
-   LONG cAllocDyna;
-   LONG cAllocTotal;
-   LONG cAllocCppTared;
-   LONG cAllocDynaTared;
-   LONG cAllocTotalTared;
-   LONG cbAllocCpp;
-   LONG cbAllocDyna;
-   LONG cbAllocTotal;
-   LONG cbAllocCppTared;
-   LONG cbAllocDynaTared;
-   LONG cbAllocTotalTared;
+   size_t cAllocCpp;
+   size_t cAllocDyna;
+   size_t cAllocTotal;
+   size_t cAllocCppTared;
+   size_t cAllocDynaTared;
+   size_t cAllocTotalTared;
+   size_t cbAllocCpp;
+   size_t cbAllocDyna;
+   size_t cbAllocTotal;
+   size_t cbAllocCppTared;
+   size_t cbAllocDynaTared;
+   size_t cbAllocTotalTared;
    } STATISTICS;
 
 static struct l
@@ -248,12 +248,15 @@ typedef struct
 #define cyLABELS    15
 
 
-HWND MakeWindow (LPCTSTR pszClass, LPCTSTR pszTitle, DWORD dwStyle, RECT *prSource, HWND hParent, UINT idc, DWORD dwStyleEx = 0)
+HWND MakeWindow (LPCTSTR pszClass, LPCTSTR pszTitle, DWORD dwStyle, RECT *prSource, 
+                 HWND hParent, UINT idc, DWORD dwStyleEx = 0)
 {
    RECT rr = { 0, 0, 16, 16 };
    if (prSource)
       rr = *prSource;
-   HWND hWnd = CreateWindowEx (dwStyleEx, pszClass, pszTitle, dwStyle, rr.left, rr.top, rr.right - rr.left, rr.bottom - rr.top, hParent, (HMENU)idc, GetModuleHandle(0), 0);
+   HWND hWnd = CreateWindowEx (dwStyleEx, pszClass, pszTitle, dwStyle, 
+                               rr.left, rr.top, rr.right - rr.left, rr.bottom - rr.top, 
+                               hParent, (HMENU)UIntToPtr(idc), GetModuleHandle(0), 0);
    if (IsWindow (hWnd))
       SendMessage (hWnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), 1);
    return hWnd;
@@ -261,7 +264,8 @@ HWND MakeWindow (LPCTSTR pszClass, LPCTSTR pszTitle, DWORD dwStyle, RECT *prSour
 
 void SetWindowRect (HWND hWnd, RECT *pr)
 {
-   SetWindowPos (hWnd, 0, pr->left, pr->top, pr->right - pr->left, pr->bottom - pr->top, SWP_NOZORDER | SWP_NOACTIVATE);
+   SetWindowPos (hWnd, 0, pr->left, pr->top, pr->right - pr->left, 
+                 pr->bottom - pr->top, SWP_NOZORDER | SWP_NOACTIVATE);
 }
 
 void FormatBytes (LPTSTR pszText, double lfValue)
@@ -567,7 +571,7 @@ LPTSTR MemMgr_GetItemKey (HWND hList, int iItem)
          if (pChunk)
             {
             if (lr.iColSort == 0)
-               pszReturn = (LPTSTR)pChunk->dwTick;
+               pszReturn = (LPTSTR)UlongToPtr(pChunk->dwTick);
             else if (lr.iColSort == 4)
                pszReturn = (LPTSTR)pChunk->cbData;
             else // (lr.iColSort == 5)
@@ -674,7 +678,7 @@ void MemMgr_OnListAdd (PMEMCHUNK pCopy)
    LPTSTR pszKey = NULL;
    switch (lr.iColSort)
       {
-      case 0:  pszKey = (LPTSTR)pCopy->dwTick;  break;
+      case 0:  pszKey = (LPTSTR)UlongToPtr(pCopy->dwTick);  break;
       case 1:  pszKey = (LPTSTR)szFlags;        break;
       case 2:  pszKey = (LPTSTR)szExpr;         break;
       case 3:  pszKey = (LPTSTR)szLocation;     break;
@@ -854,10 +858,10 @@ void MemMgr_OnRefresh (void)
 {
    // Fill in the statistics at the top of the manager dialog
    //
-   SetDlgItemInt (l.hManager, IDC_VALUE_CPP_COUNT, l.Stats.cAllocCpp, TRUE);
-   SetDlgItemInt (l.hManager, IDC_VALUE_OTHER_COUNT, l.Stats.cAllocDyna, TRUE);
-   SetDlgItemInt (l.hManager, IDC_VALUE_TARED_COUNT, l.Stats.cAllocTotalTared, TRUE);
-   SetDlgItemInt (l.hManager, IDC_VALUE_TOTAL_COUNT, l.Stats.cAllocTotal, TRUE);
+   SetDlgItemInt (l.hManager, IDC_VALUE_CPP_COUNT, (INT)l.Stats.cAllocCpp, TRUE);
+   SetDlgItemInt (l.hManager, IDC_VALUE_OTHER_COUNT, (INT)l.Stats.cAllocDyna, TRUE);
+   SetDlgItemInt (l.hManager, IDC_VALUE_TARED_COUNT, (INT)l.Stats.cAllocTotalTared, TRUE);
+   SetDlgItemInt (l.hManager, IDC_VALUE_TOTAL_COUNT, (INT)l.Stats.cAllocTotal, TRUE);
 
    SetDlgItemBytes (l.hManager, IDC_VALUE_CPP_SIZE, (double)l.Stats.cbAllocCpp);
    SetDlgItemBytes (l.hManager, IDC_VALUE_OTHER_SIZE, (double)l.Stats.cbAllocDyna);
@@ -994,9 +998,9 @@ void MemMgr_OnPaint (void)
 
 void MemMgr_OnTimer (void)
 {
-   if (GetWindowLong (l.hManager, GWL_USERDATA))
+   if (GetWindowLongPtr (l.hManager, GWLP_USERDATA))
       {
-      SetWindowLong (l.hManager, GWL_USERDATA, 0);
+      SetWindowLongPtr (l.hManager, GWLP_USERDATA, 0);
       MemMgr_OnRefresh();
       }
 }
@@ -1004,7 +1008,7 @@ void MemMgr_OnTimer (void)
 
 void MemMgr_OnDelayedRefresh (void)
 {
-   SetWindowLong (l.hManager, GWL_USERDATA, 1);
+   SetWindowLongPtr (l.hManager, GWLP_USERDATA, 1);
 }
 
 
@@ -1166,7 +1170,7 @@ void MemMgr_TrackAllocation (PVOID pData, size_t cb, LPSTR pszExpr, LPSTR pszFil
             if ((pChunk = (PMEMCHUNK)l.pHeap->GetAt(iChunk)) == NULL)
                continue;
 
-            size_t iBucket = HASH(pChunk->pData,l.cBuckets);
+            size_t iBucket = HASH(PtrToUlong(pChunk->pData),l.cBuckets);
             if ((pChunk->iNext = l.aBuckets[iBucket].iFirst) != iINVALID)
                {
                PMEMCHUNK pNext;
@@ -1187,7 +1191,7 @@ void MemMgr_TrackAllocation (PVOID pData, size_t cb, LPSTR pszExpr, LPSTR pszFil
    // Prepare a MEMCHUNK entry and shove it in our array
    //
    size_t iChunk = l.cChunks;
-   size_t iBucket = HASH(pData,l.cBuckets);
+   size_t iBucket = HASH(PtrToUlong(pData),l.cBuckets);
    BOOL fLinkIn = TRUE;
 
    MEMCHUNK Chunk;
@@ -1274,7 +1278,7 @@ BOOL MemMgr_TrackDestruction (PVOID pData, LPSTR pszFile, DWORD dwLine)
       // Find the memchunk associated with this pData. That's what our
       // hash table is for.
       //
-      size_t iBucket = HASH(pData,l.cBuckets);
+      size_t iBucket = HASH(PtrToUlong(pData),l.cBuckets);
 
       PMEMCHUNK pChunk = NULL;
       for (size_t iChunk = l.aBuckets[iBucket].iFirst; iChunk != iINVALID; )
@@ -1408,7 +1412,7 @@ void MEMMGR_CALLCONV ShowMemoryManager (void)
          {
          MemMgr_RestoreSettings();
          l.hManager = MakeWindow (TEXT("Static"), cszTITLE, WS_OVERLAPPED | WS_THICKFRAME | WS_SYSMENU, &lr.rManager, 0, 0);
-         SetWindowLong (l.hManager, GWL_WNDPROC, (LONG)MemMgr_DlgProc);
+         SetWindowLongPtr (l.hManager, GWLP_WNDPROC, (LONG)PtrToUlong(MemMgr_DlgProc));
          PostMessage (l.hManager, WM_COMMAND, IDC_INITIALIZE, 0);
          ShowWindow (l.hManager, SW_SHOW);
          }
index 88f49fa0569a62556da5d2c7aa74a3ca9c4b54c7..06f8d2730bde43efd7915b8ffb4f19574cbcb395 100644 (file)
 #define MEMMGR_CALLCONV _cdecl
 #endif
 
+#ifndef EXPORTED
+#define EXPORTED __declspec(dllexport)
+#endif
+
 /*
  * MACROS _____________________________________________________________________
  *
 
 #else /* DEBUG */
 
-void MEMMGR_CALLCONV ShowMemoryManager (void);
-void MEMMGR_CALLCONV WhileMemoryManagerShowing (void);
-BOOL MEMMGR_CALLCONV IsMemoryManagerMessage (MSG *pMsg);
+EXPORTED void MEMMGR_CALLCONV ShowMemoryManager (void);
+EXPORTED void MEMMGR_CALLCONV WhileMemoryManagerShowing (void);
+EXPORTED BOOL MEMMGR_CALLCONV IsMemoryManagerMessage (MSG *pMsg);
 
 #ifndef NO_DEBUG_ALLOC
 
-PVOID MEMMGR_CALLCONV MemMgr_AllocateMemory (size_t cb, LPSTR pszExpr, LPSTR pszFile, DWORD dwLine);
-void MEMMGR_CALLCONV MemMgr_FreeMemory (PVOID pData, LPSTR pszFile, DWORD dwLine);
+EXPORTED PVOID MEMMGR_CALLCONV MemMgr_AllocateMemory (size_t cb, LPSTR pszExpr, LPSTR pszFile, DWORD dwLine);
+EXPORTED void MEMMGR_CALLCONV MemMgr_FreeMemory (PVOID pData, LPSTR pszFile, DWORD dwLine);
 
-PVOID MEMMGR_CALLCONV MemMgr_TrackNew (PVOID pData, size_t cb, LPSTR pszExpr, LPSTR pszFile, DWORD dwLine);
-void MEMMGR_CALLCONV MemMgr_TrackDelete (PVOID pData, LPSTR pszFile, DWORD dwLine);
+EXPORTED PVOID MEMMGR_CALLCONV MemMgr_TrackNew (PVOID pData, size_t cb, LPSTR pszExpr, LPSTR pszFile, DWORD dwLine);
+EXPORTED void MEMMGR_CALLCONV MemMgr_TrackDelete (PVOID pData, LPSTR pszFile, DWORD dwLine);
 
 #endif /* NO_DEBUG_ALLOC */
 
index 7bf779ad712a519fe98ad0c76b48da1d07259767..363ae2ef8d337dea0774d5d41c86fc0231a8cdd2 100644 (file)
@@ -52,13 +52,13 @@ HWND ModelessDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM
 }
 
 
-int ModalDialog (int idd, HWND hWndParent, DLGPROC lpDialogFunc)
+INT_PTR ModalDialog (int idd, HWND hWndParent, DLGPROC lpDialogFunc)
 {
    return ModalDialogParam (idd, hWndParent, lpDialogFunc, 0);
 }
 
 
-int ModalDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
+INT_PTR ModalDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
 {
    HINSTANCE hInstFound;
    LPCDLGTEMPLATE pTemplate;
@@ -78,7 +78,7 @@ int cdecl Message (UINT type, LPCTSTR title, LPCTSTR text, LPCTSTR fmt, ...)
    va_list  arg;
    // if (fmt != NULL)
       va_start (arg, fmt);
-   return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
+   return vMessage (type, PtrToLong(title), PtrToLong(text), fmt, arg);
 }
 
 
@@ -87,7 +87,7 @@ int cdecl Message (UINT type, LPCTSTR title, int text, LPCTSTR fmt, ...)
    va_list  arg;
    // if (fmt != NULL)
       va_start (arg, fmt);
-   return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
+   return vMessage (type, PtrToLong(title), (LONG)text, fmt, arg);
 }
 
 
@@ -96,7 +96,7 @@ int cdecl Message (UINT type, int title, LPCTSTR text, LPCTSTR fmt, ...)
    va_list  arg;
    // if (fmt != NULL)
       va_start (arg, fmt);
-   return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
+   return vMessage (type, (LONG)title, PtrToLong(text), fmt, arg);
 }
 
 
@@ -111,19 +111,19 @@ int cdecl Message (UINT type, int title, int text, LPCTSTR fmt, ...)
 
 int cdecl vMessage (UINT type, LPCTSTR title, LPCTSTR text, LPCTSTR fmt, va_list arg)
 {
-   return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
+   return vMessage (type, PtrToLong(title), PtrToLong(text), fmt, arg);
 }
 
 
 int cdecl vMessage (UINT type, LPCTSTR title, int text, LPCTSTR fmt, va_list arg)
 {
-   return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
+   return vMessage (type, PtrToLong(title), (LONG)text, fmt, arg);
 }
 
 
 int cdecl vMessage (UINT type, int title, LPCTSTR text, LPCTSTR fmt, va_list arg)
 {
-   return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
+   return vMessage (type, (LONG)title, PtrToLong(text), fmt, arg);
 }
 
 
index 352bdcb803903d24ecdc2cff5b787fc081cea64e..c6c2628b68494b5b8c9be17c4b97cc44d43323f5 100644 (file)
 
 #define MB_MODELESS  0x80000000L   // for Message, vMessage
 
+#ifndef EXPORTED
+#define EXPORTED __declspec(dllexport)
+#endif
+
 
 /*
  * PROTOTYPES _________________________________________________________________
  *
  */
 
-extern HWND ModelessDialog (int idd, HWND hWndParent, DLGPROC lpDialogFunc);
-extern HWND ModelessDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
+extern EXPORTED HWND ModelessDialog (int idd, HWND hWndParent, DLGPROC lpDialogFunc);
+extern EXPORTED HWND ModelessDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
 
-extern int ModalDialog (int idd, HWND hWndParent, DLGPROC lpDialogFunc);
-extern int ModalDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
+extern EXPORTED INT_PTR ModalDialog (int idd, HWND hWndParent, DLGPROC lpDialogFunc);
+extern EXPORTED INT_PTR ModalDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
 
-extern int cdecl Message (UINT mb_type, LPCTSTR pszTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
-extern int cdecl Message (UINT mb_type, LPCTSTR pszTitle, int idsTemplate, LPCTSTR pszFormat = NULL, ...);
-extern int cdecl Message (UINT mb_type, int idsTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
-extern int cdecl Message (UINT mb_type, int idsTitle, int idsTemplate, LPCTSTR pszFormat = NULL, ...);
-extern int cdecl vMessage (UINT mb_type, LPCTSTR pszTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
-extern int cdecl vMessage (UINT mb_type, LPCTSTR pszTitle, int idsTemplate, LPCTSTR pszFormat, va_list arg);
-extern int cdecl vMessage (UINT mb_type, int idsTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
-extern int cdecl vMessage (UINT mb_type, int idsTitle, int idsTemplate, LPCTSTR pszFormat, va_list arg);
+extern EXPORTED int cdecl Message (UINT mb_type, LPCTSTR pszTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED int cdecl Message (UINT mb_type, LPCTSTR pszTitle, int idsTemplate, LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED int cdecl Message (UINT mb_type, int idsTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED int cdecl Message (UINT mb_type, int idsTitle, int idsTemplate, LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED int cdecl vMessage (UINT mb_type, LPCTSTR pszTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
+extern EXPORTED int cdecl vMessage (UINT mb_type, LPCTSTR pszTitle, int idsTemplate, LPCTSTR pszFormat, va_list arg);
+extern EXPORTED int cdecl vMessage (UINT mb_type, int idsTitle, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
+extern EXPORTED int cdecl vMessage (UINT mb_type, int idsTitle, int idsTemplate, LPCTSTR pszFormat, va_list arg);
 
 #endif
 
index f1a96e5d82bfec48fba287ff3c2f5c75d64b841e..71192648267f92a280d216050d28e043c56a4df0 100644 (file)
@@ -185,7 +185,7 @@ void cdecl FormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemp
    va_list arg;
    //if (pszFormat != NULL)
       va_start (arg, pszFormat);
-   vFormatMultiString (ppszTarget, fAddHead, (LONG)pszTemplate, pszFormat, arg);
+   vFormatMultiString (ppszTarget, fAddHead, PtrToLong(pszTemplate), pszFormat, arg);
 }
 
 void cdecl FormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate, LPCTSTR pszFormat, ...)
@@ -198,7 +198,7 @@ void cdecl FormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate
 
 void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg)
 {
-   vFormatMultiString (ppszTarget, fAddHead, (LONG)pszTemplate, pszFormat, arg);
+   vFormatMultiString (ppszTarget, fAddHead, PtrToLong(pszTemplate), pszFormat, arg);
 }
 
 void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate, LPCTSTR pszFormat, va_list arg)
@@ -216,7 +216,7 @@ LPTSTR cdecl FormatString (LPCTSTR psz, LPCTSTR pszFmt, ...)
    va_list arg;
    //if (pszFmt != NULL)
       va_start (arg, pszFmt);
-   return vFormatString ((LONG)psz, pszFmt, arg);
+   return vFormatString (PtrToLong(psz), pszFmt, arg);
 }
 
 LPTSTR cdecl FormatString (int ids, LPCTSTR pszFmt, ...)
@@ -229,7 +229,7 @@ LPTSTR cdecl FormatString (int ids, LPCTSTR pszFmt, ...)
 
 LPTSTR cdecl vFormatString (LPCTSTR psz, LPCTSTR pszFmt, va_list arg)
 {
-   return vFormatString ((LONG)psz, pszFmt, arg);
+   return vFormatString (PtrToLong(psz), pszFmt, arg);
 }
 
 LPTSTR cdecl vFormatString (int ids, LPCTSTR pszFmt, va_list arg)
@@ -273,7 +273,7 @@ LPTSTR cdecl vFormatString (LONG pszSource, LPCTSTR pszFmt, va_list arg)
    LPTSTR   pszOut = NULL;
    LPTSTR   pchOut;
    LPTSTR   pszTemplate;
-   LONG     cch;
+   size_t   cch;
    int      nArgs;
    int      argno;
    TCHAR    szFmt[ cchRESOURCE ];
@@ -283,16 +283,16 @@ LPTSTR cdecl vFormatString (LONG pszSource, LPCTSTR pszFmt, va_list arg)
 
    if (HIWORD(pszSource) != 0) // It's a string
       {
-      pszTemplate = (LPTSTR)pszSource;
+      pszTemplate = (LPTSTR)LongToPtr(pszSource);
       }
    else        // It's a message
       {
-      cch = GetStringLength ((int)pszSource);
+      cch = GetStringLength((INT)pszSource);
 
       if ((pszTemplate = AllocateString (1+cch)) == NULL)
          return NULL;
 
-      GetString (pszTemplate, (int)pszSource, cch);
+      GetString (pszTemplate, (int)pszSource, (INT)cch);
       }
 
             //
@@ -336,7 +336,7 @@ LPTSTR cdecl vFormatString (LONG pszSource, LPCTSTR pszFmt, va_list arg)
 
    if (apszArgs == NULL)
       {
-      if (pszSource != (LONG)pszTemplate)
+      if (pszSource != PtrToLong(pszTemplate))
          FreeString (pszTemplate);
       return NULL;
       }
@@ -349,7 +349,7 @@ LPTSTR cdecl vFormatString (LONG pszSource, LPCTSTR pszFmt, va_list arg)
 
    for (argno = 0; pszFmt && *pszFmt; argno++)
       {
-      LONG     cchMin;
+      size_t   cchMin;
       vartype  vt;
 
       double   arg_f;
@@ -547,7 +547,7 @@ LPTSTR cdecl vFormatString (LONG pszSource, LPCTSTR pszFmt, va_list arg)
                {
                if ((arg_psz = AllocateString (cch)) == NULL)
                   goto lblDONE;
-               GetString (arg_psz, arg_ids, cch);
+               GetString (arg_psz, arg_ids, (INT)cch);
                }
 
             cch = lstrlen(arg_psz);
@@ -1423,7 +1423,7 @@ void CopyUnicodeToAnsi (LPSTR pszTargetA, LPCWSTR pszOriginalW, size_t cchMax)
 
    UINT cpTarget = CP_ACP;
    BOOL fDefault = FALSE;
-   size_t cchOut = WideCharToMultiByte (cpTarget, 0, pszOriginalW, cchSource-1, pszTargetA, cchMax * 2, TEXT(" "), &fDefault);
+   size_t cchOut = WideCharToMultiByte (cpTarget, 0, pszOriginalW, (INT)cchSource-1, pszTargetA, (INT)cchMax * 2, TEXT(" "), &fDefault);
    pszTargetA[ cchOut ] = 0;
 }
 
index f7a501584619c8a6178ed4bab3e627c041356e89..985e4755980cd2814247fccbb2ed906a39614889 100644 (file)
 
 #define cszMultiStringNULL TEXT("---")  // added instead of "" in multistrings
 
+#ifndef EXPORTED
+#define EXPORTED __declspec(dllexport)
+#endif
 
 /*
  * PROTOTYPES _________________________________________________________________
  *
  */
 
-extern void GetString (LPTSTR pszTarget, int idsSource, int cchMax = cchRESOURCE);
-extern size_t GetStringLength (int ids);
+extern EXPORTED void GetString (LPTSTR pszTarget, int idsSource, int cchMax = cchRESOURCE);
+extern EXPORTED size_t GetStringLength (int ids);
 
-extern BOOL SearchMultiString (LPCTSTR pmsz, LPCTSTR pszString, BOOL fCaseSensitive = FALSE);
+extern EXPORTED BOOL SearchMultiString (LPCTSTR pmsz, LPCTSTR pszString, BOOL fCaseSensitive = FALSE);
 
-extern LPTSTR cdecl FormatString  (LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
-extern LPTSTR cdecl FormatString  (int idsTemplate,     LPCTSTR pszFormat = NULL, ...);
-extern LPTSTR cdecl vFormatString (LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
-extern LPTSTR cdecl vFormatString (int idsTemplate,     LPCTSTR pszFormat, va_list arg);
+extern EXPORTED LPTSTR cdecl FormatString  (LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED LPTSTR cdecl FormatString  (int idsTemplate,     LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED LPTSTR cdecl vFormatString (LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
+extern EXPORTED LPTSTR cdecl vFormatString (int idsTemplate,     LPCTSTR pszFormat, va_list arg);
 
-extern void cdecl FormatMultiString  (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
-extern void cdecl FormatMultiString  (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate,     LPCTSTR pszFormat = NULL, ...);
-extern void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
-extern void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate,     LPCTSTR pszFormat, va_list arg);
+extern EXPORTED void cdecl FormatMultiString  (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemplate, LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED void cdecl FormatMultiString  (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate,     LPCTSTR pszFormat = NULL, ...);
+extern EXPORTED void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemplate, LPCTSTR pszFormat, va_list arg);
+extern EXPORTED void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate,     LPCTSTR pszFormat, va_list arg);
 
-extern void FormatBytes (LPTSTR pszTarget, LPTSTR pszFormat, double cb);
-extern void FormatDouble (LPTSTR pszTarget, LPTSTR pszFormat, double lfValue);
-extern BOOL FormatTime (LPTSTR pszTarget, LPTSTR pszFormat, SYSTEMTIME *pst, BOOL fShowDate = TRUE, BOOL fShowTime = TRUE);
-extern BOOL FormatElapsed (LPTSTR pszTarget, LPTSTR pszFormat, SYSTEMTIME *pst);
-extern BOOL FormatError (LPTSTR pszTarget, LPTSTR pszFmt, DWORD dwError);
-extern void FormatSockAddr (LPTSTR pszTarget, LPTSTR pszFmt, SOCKADDR_IN *paddr);
-extern void FormatLargeInt (LPTSTR pszTarget, LPTSTR pszFormatUser, LARGE_INTEGER *pldw);
+extern EXPORTED void FormatBytes (LPTSTR pszTarget, LPTSTR pszFormat, double cb);
+extern EXPORTED void FormatDouble (LPTSTR pszTarget, LPTSTR pszFormat, double lfValue);
+extern EXPORTED BOOL FormatTime (LPTSTR pszTarget, LPTSTR pszFormat, SYSTEMTIME *pst, BOOL fShowDate = TRUE, BOOL fShowTime = TRUE);
+extern EXPORTED BOOL FormatElapsed (LPTSTR pszTarget, LPTSTR pszFormat, SYSTEMTIME *pst);
+extern EXPORTED BOOL FormatError (LPTSTR pszTarget, LPTSTR pszFmt, DWORD dwError);
+extern EXPORTED void FormatSockAddr (LPTSTR pszTarget, LPTSTR pszFmt, SOCKADDR_IN *paddr);
+extern EXPORTED void FormatLargeInt (LPTSTR pszTarget, LPTSTR pszFormatUser, LARGE_INTEGER *pldw);
 
 typedef BOOL (CALLBACK* LPERRORPROC)(LPTSTR psz, ULONG dwErr, LANGID idLanguage);
-extern void SetErrorTranslationFunction (LPERRORPROC pfnGetErrText);
+extern EXPORTED void SetErrorTranslationFunction (LPERRORPROC pfnGetErrText);
 
-extern LPCTSTR FindExtension (LPCTSTR pszToSearch);
-extern LPCTSTR FindBaseFileName (LPCTSTR pszToSearch);
-extern void ChangeExtension (LPTSTR pszTarget, LPCTSTR pszSource, LPCTSTR pszNewExt, BOOL fForce = TRUE);
-extern void CopyBaseFileName (LPTSTR pszTarget, LPCTSTR pszSource);
+extern EXPORTED LPCTSTR FindExtension (LPCTSTR pszToSearch);
+extern EXPORTED LPCTSTR FindBaseFileName (LPCTSTR pszToSearch);
+extern EXPORTED void ChangeExtension (LPTSTR pszTarget, LPCTSTR pszSource, LPCTSTR pszNewExt, BOOL fForce = TRUE);
+extern EXPORTED void CopyBaseFileName (LPTSTR pszTarget, LPCTSTR pszSource);
 
-extern void CopyUnicodeToAnsi (LPSTR pszTargetA, LPCWSTR pszOriginalW, size_t cchMax = (size_t)1024);
-extern void CopyUnicodeToString (LPTSTR pszTarget, LPCWSTR pszOriginalW, size_t cchMax = (size_t)1024);
-extern void CopyAnsiToUnicode (LPWSTR pszTargetW, LPCSTR pszOriginalA, size_t cchMax = (size_t)1024);
-extern void CopyAnsiToString (LPTSTR pszTarget, LPCSTR pszOriginalA, size_t cchMax = (size_t)1024);
-extern void CopyStringToUnicode (LPWSTR pszTargetW, LPCTSTR pszOriginal, size_t cchMax = (size_t)1024);
-extern void CopyStringToAnsi (LPSTR pszTargetA, LPCTSTR pszOriginal, size_t cchMax = (size_t)1024);
+extern EXPORTED void CopyUnicodeToAnsi (LPSTR pszTargetA, LPCWSTR pszOriginalW, size_t cchMax = (size_t)1024);
+extern EXPORTED void CopyUnicodeToString (LPTSTR pszTarget, LPCWSTR pszOriginalW, size_t cchMax = (size_t)1024);
+extern EXPORTED void CopyAnsiToUnicode (LPWSTR pszTargetW, LPCSTR pszOriginalA, size_t cchMax = (size_t)1024);
+extern EXPORTED void CopyAnsiToString (LPTSTR pszTarget, LPCSTR pszOriginalA, size_t cchMax = (size_t)1024);
+extern EXPORTED void CopyStringToUnicode (LPWSTR pszTargetW, LPCTSTR pszOriginal, size_t cchMax = (size_t)1024);
+extern EXPORTED void CopyStringToAnsi (LPSTR pszTargetA, LPCTSTR pszOriginal, size_t cchMax = (size_t)1024);
 
 #define AllocateAnsi(_cch)     ((LPSTR)Allocate ((max((_cch),cchRESOURCE)+1) * sizeof(CHAR)))
 #define AllocateUnicode(_cch) ((LPWSTR)Allocate ((max((_cch),cchRESOURCE)+1) * sizeof(WCHAR)))
 #define AllocateString(_cch)  ((LPTSTR)Allocate ((max((_cch),cchRESOURCE)+1) * sizeof(TCHAR)))
-extern void FreeString (LPCVOID pszString, LPCVOID pszOriginalString = NULL);
+extern EXPORTED void FreeString (LPCVOID pszString, LPCVOID pszOriginalString = NULL);
 
-extern LPSTR StringToAnsi (LPCTSTR pszOriginal);
-extern LPTSTR AnsiToString (LPCSTR pszOriginalA);
-extern LPWSTR StringToUnicode (LPCTSTR pszOriginal);
-extern LPTSTR UnicodeToString (LPCWSTR pszOriginalW);
-extern LPWSTR AnsiToUnicode (LPCSTR pszOriginalA);
-extern LPSTR UnicodeToAnsi (LPCWSTR pszOriginalW);
+extern EXPORTED LPSTR StringToAnsi (LPCTSTR pszOriginal);
+extern EXPORTED LPTSTR AnsiToString (LPCSTR pszOriginalA);
+extern EXPORTED LPWSTR StringToUnicode (LPCTSTR pszOriginal);
+extern EXPORTED LPTSTR UnicodeToString (LPCWSTR pszOriginalW);
+extern EXPORTED LPWSTR AnsiToUnicode (LPCSTR pszOriginalA);
+extern EXPORTED LPSTR UnicodeToAnsi (LPCWSTR pszOriginalW);
 
-extern LPTSTR CloneAnsi (LPSTR pszOriginalA);
-extern LPTSTR CloneUnicode (LPWSTR pszOriginalW);
-extern LPTSTR CloneString (LPTSTR pszOriginal);
-extern LPTSTR CloneMultiString (LPCSTR mszOriginal);
+extern EXPORTED LPTSTR CloneAnsi (LPSTR pszOriginalA);
+extern EXPORTED LPTSTR CloneUnicode (LPWSTR pszOriginalW);
+extern EXPORTED LPTSTR CloneString (LPTSTR pszOriginal);
+extern EXPORTED LPTSTR CloneMultiString (LPCSTR mszOriginal);
 
 
 /*
@@ -95,14 +98,14 @@ extern LPTSTR CloneMultiString (LPCSTR mszOriginal);
  *
  */
 
-extern void lstrupr (LPTSTR pszToChange);
-extern LPCTSTR lstrchr (LPCTSTR pszSearch, TCHAR chToSearchFor);
-extern LPCTSTR lstrrchr (LPCTSTR pszSearch, TCHAR chToSearchFor);
-extern int lstrncmpi (LPCTSTR pszA, LPCTSTR pszB, size_t cchMax);
-extern void lstrncpy (LPTSTR pszTarget, LPCTSTR pszSource, size_t cchMax);
-extern void lstrzcpy (LPTSTR pszTarget, LPCTSTR pszSource, size_t cchMax);
+extern EXPORTED void lstrupr (LPTSTR pszToChange);
+extern EXPORTED LPCTSTR lstrchr (LPCTSTR pszSearch, TCHAR chToSearchFor);
+extern EXPORTED LPCTSTR lstrrchr (LPCTSTR pszSearch, TCHAR chToSearchFor);
+extern EXPORTED int lstrncmpi (LPCTSTR pszA, LPCTSTR pszB, size_t cchMax);
+extern EXPORTED void lstrncpy (LPTSTR pszTarget, LPCTSTR pszSource, size_t cchMax);
+extern EXPORTED void lstrzcpy (LPTSTR pszTarget, LPCTSTR pszSource, size_t cchMax);
 
-extern void lsplitpath (LPCTSTR pszSource,
+extern EXPORTED void lsplitpath (LPCTSTR pszSource,
                  LPTSTR pszDrive, LPTSTR pszPath, LPTSTR pszBase, LPTSTR pszExt);
 #endif
 
index 9dee089b67636a5da007eff711484aba4b7ffea6..a6a5bfc44fc9826a38a2535c3ee72e917916a077 100644 (file)
@@ -43,9 +43,13 @@ typedef const STRINGTEMPLATE *LPCSTRINGTEMPLATE;
 #include <WINNT/tal_dialog.h>
 #include <WINNT/tal_alloc.h>
 
+#ifndef EXPORTED
+#define EXPORTED __declspec(dllexport)
+#endif
+
 #ifndef REALLOC
 #define REALLOC(_a,_c,_r,_i) TaLocaleReallocFunction ((LPVOID*)&_a,sizeof(*_a),&_c,_r,_i)
-extern BOOL TaLocaleReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t *pcTarget, size_t cReq, size_t cInc);
+extern EXPORTED BOOL TaLocaleReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t *pcTarget, size_t cReq, size_t cInc);
 #endif
 
 
@@ -66,7 +70,7 @@ extern BOOL TaLocaleReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t
 #define MODULE_PRIORITY_LOWEST  100    // Search this module last
 #define MODULE_PRIORITY_REMOVE    0    // Never search this module again
 
-extern void TaLocale_SpecifyModule (HINSTANCE hInstance = NULL, WORD wSearchPriority = MODULE_PRIORITY_NORMAL);
+extern EXPORTED void TaLocale_SpecifyModule (HINSTANCE hInstance = NULL, WORD wSearchPriority = MODULE_PRIORITY_NORMAL);
 
 
 /*
@@ -80,9 +84,9 @@ extern void TaLocale_SpecifyModule (HINSTANCE hInstance = NULL, WORD wSearchPrio
  *
  */
 
-extern HINSTANCE TaLocale_LoadCorrespondingModule (HINSTANCE hInstance = NULL, WORD wSearchPriority = MODULE_PRIORITY_BOOSTED);
+extern EXPORTED HINSTANCE TaLocale_LoadCorrespondingModule (HINSTANCE hInstance = NULL, WORD wSearchPriority = MODULE_PRIORITY_BOOSTED);
 
-extern HINSTANCE TaLocale_LoadCorrespondingModuleByName (HINSTANCE hInstance, LPTSTR pszFilename, WORD wSearchPriority = MODULE_PRIORITY_BOOSTED);
+extern EXPORTED HINSTANCE TaLocale_LoadCorrespondingModuleByName (HINSTANCE hInstance, LPTSTR pszFilename, WORD wSearchPriority = MODULE_PRIORITY_BOOSTED);
 
 
 /*
@@ -95,7 +99,7 @@ extern HINSTANCE TaLocale_LoadCorrespondingModuleByName (HINSTANCE hInstance, LP
  *
  */
 
-extern BOOL TaLocale_EnumModule (size_t iModule, HINSTANCE *phInstance = NULL, WORD *pwSearchPriority = NULL);
+extern EXPORTED BOOL TaLocale_EnumModule (size_t iModule, HINSTANCE *phInstance = NULL, WORD *pwSearchPriority = NULL);
 
 
 /*
@@ -110,8 +114,8 @@ extern BOOL TaLocale_EnumModule (size_t iModule, HINSTANCE *phInstance = NULL, W
  *
  */
 
-extern LANGID TaLocale_GetLanguage (void);
-extern void TaLocale_SetLanguage (LANGID lang);
+extern EXPORTED LANGID TaLocale_GetLanguage (void);
+extern EXPORTED void TaLocale_SetLanguage (LANGID lang);
 
 
 /*
@@ -127,9 +131,9 @@ extern void TaLocale_SetLanguage (LANGID lang);
  *
  */
 
-extern LANGID TaLocale_GetLanguageOverride (void);
-extern void TaLocale_SetLanguageOverride (LANGID lang);
-extern void TaLocale_RemoveLanguageOverride (void);
+extern EXPORTED LANGID TaLocale_GetLanguageOverride (void);
+extern EXPORTED void TaLocale_SetLanguageOverride (LANGID lang);
+extern EXPORTED void TaLocale_RemoveLanguageOverride (void);
 
 
 /*
@@ -147,7 +151,7 @@ extern void TaLocale_RemoveLanguageOverride (void);
  *
  */
 
-extern LPCVOID TaLocale_GetResource (LPCTSTR pszType, LPCTSTR pszRes, LANGID lang = LANG_USER_DEFAULT, HINSTANCE *phInstFound = NULL);
+extern EXPORTED LPCVOID TaLocale_GetResource (LPCTSTR pszType, LPCTSTR pszRes, LANGID lang = LANG_USER_DEFAULT, HINSTANCE *phInstFound = NULL);
 
 
 /*
@@ -161,8 +165,8 @@ extern LPCVOID TaLocale_GetResource (LPCTSTR pszType, LPCTSTR pszRes, LANGID lan
  *
  */
 
-extern LPCSTRINGTEMPLATE TaLocale_GetStringResource (int ids, HINSTANCE *phInstFound = NULL);
-extern LPCDLGTEMPLATE TaLocale_GetDialogResource (int idd, HINSTANCE *phInstFound = NULL);
+extern EXPORTED LPCSTRINGTEMPLATE TaLocale_GetStringResource (int ids, HINSTANCE *phInstFound = NULL);
+extern EXPORTED LPCDLGTEMPLATE TaLocale_GetDialogResource (int idd, HINSTANCE *phInstFound = NULL);
 
 
 /*
@@ -177,10 +181,10 @@ extern LPCDLGTEMPLATE TaLocale_GetDialogResource (int idd, HINSTANCE *phInstFoun
  *
  */
 
-extern HMENU TaLocale_LoadMenu (int idm);
-extern HANDLE TaLocale_LoadImage (int idi, UINT imageType, int cx, int cy, UINT imageFlags);
-extern HICON TaLocale_LoadIcon (int idi);
-extern HACCEL TaLocale_LoadAccelerators (int ida);
+extern EXPORTED HMENU TaLocale_LoadMenu (int idm);
+extern EXPORTED HANDLE TaLocale_LoadImage (int idi, UINT imageType, int cx, int cy, UINT imageFlags);
+extern EXPORTED HICON TaLocale_LoadIcon (int idi);
+extern EXPORTED HACCEL TaLocale_LoadAccelerators (int ida);
 
 
 #endif
index 9e5145b88f9c98c180e8eb77453f19d7dd068b56..962164347eb517ca9696c6954835620ae8b23525 100644 (file)
@@ -1205,7 +1205,7 @@ DECL_PIOCTL(PSetAcl)
     AFS_STATCNT(PSetAcl);
     if (!avc)
        return EINVAL;
-    if ((acl.AFSOpaque_len = strlen(ain) + 1) > 1000)
+    if ((acl.AFSOpaque_len = strlen(ain) + 1) > 1024 /* AFSOPAQUEMAX */)
        return EINVAL;
 
     acl.AFSOpaque_val = ain;
index 0658ce94914525fc910e56cacb3c2d3a62579f31..68162ee6230ae8c349b66ae8929dd197b209afa0 100644 (file)
@@ -85,6 +85,7 @@ EXELIBS =\
 
 $(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS)
        $(EXECONLINK) dnsapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 # build copyauth
@@ -95,6 +96,7 @@ COPYAUTH_EXEOBJS =\
 
 $(COPYAUTH_EXEFILE): $(COPYAUTH_EXEOBJS) $(EXELIBS) 
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 $(INCFILES):$$(@F)
index 7dc02bf7187fc9e02430b1faac41bed13aec46e6..00cd0cb71cb7fa46680275a00ccad1a12cde2072 100644 (file)
@@ -218,7 +218,7 @@ afsconf_Check(register struct afsconf_dir *adir)
        } else {
            int len;
            strncpy(tbuffer, adir->name, sizeof(tbuffer));
-           len = strlen(tbuffer);
+           len = (int)strlen(tbuffer);
            if (tbuffer[len - 1] != '\\' && tbuffer[len - 1] != '/') {
                strncat(tbuffer, "\\", sizeof(tbuffer));
            }
@@ -266,7 +266,7 @@ afsconf_Touch(register struct afsconf_dir *adir)
                       AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
            free(p);
        } else {
-           int len = strlen(tbuffer);
+           int len = (int)strlen(tbuffer);
            if (tbuffer[len - 1] != '\\' && tbuffer[len - 1] != '/') {
                strncat(tbuffer, "\\", sizeof(tbuffer));
            }
@@ -449,7 +449,7 @@ afsconf_OpenInternal(register struct afsconf_dir *adir, char *cell,
        } else {
            int len;
            strncpy(tbuffer, adir->name, sizeof(tbuffer));
-           len = strlen(tbuffer);
+           len = (int)strlen(tbuffer);
            if (tbuffer[len - 1] != '\\' && tbuffer[len - 1] != '/') {
                strncat(tbuffer, "\\", sizeof(tbuffer));
            }
@@ -918,7 +918,7 @@ afsconf_GetCellInfo(struct afsconf_dir *adir, char *acellName, char *aservice,
     register afs_int32 i;
     int tservice;
     char *tcell;
-    size_t cnLen;
+    int cnLen;
     int ambig;
     char tbuffer[64];
 
@@ -927,7 +927,7 @@ afsconf_GetCellInfo(struct afsconf_dir *adir, char *acellName, char *aservice,
        afsconf_Check(adir);
     if (acellName) {
        tcell = acellName;
-       cnLen = strlen(tcell) + 1;
+       cnLen = (int)(strlen(tcell) + 1);
        lcstring(tcell, tcell, cnLen);
        afsconf_SawCell = 1;    /* will ignore the AFSCELL switch on future */
        /* call to afsconf_GetLocalCell: like klog  */
index 10bd995ec943e43532aaf01e31392b5ec2065184..7a2df51342f7f07e0476e594494eba9ec71d3c94 100644 (file)
@@ -271,7 +271,7 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token,
 
     /* ticket length */
     memcpy(tp, &token->ticketLen, sizeof(token->ticketLen));
-    tp += sizeof(&token->ticketLen);
+    tp += sizeof(token->ticketLen);
 
     /* ticket */
     memcpy(tp, token->ticket, token->ticketLen);
@@ -317,14 +317,14 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token,
     tp += sizeof(temp);
 
     /* cell name */
-    temp = strlen(server->cell);
+    temp = (int)strlen(server->cell);
     if (temp >= MAXKTCREALMLEN)
        return KTC_INVAL;
     strcpy(tp, server->cell);
     tp += temp + 1;
 
     /* user name */
-    temp = strlen(client->name);
+    temp = (int)strlen(client->name);
     if (temp >= MAXKTCNAMELEN)
        return KTC_INVAL;
     strcpy(tp, client->name);
@@ -336,7 +336,7 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token,
        if (client->smbname == NULL)
            temp = 0;
        else
-           temp = strlen(client->smbname);
+           temp = (int)strlen(client->smbname);
        if (temp == 0 || temp >= MAXKTCNAMELEN)
            return KTC_INVAL;
        strcpy(tp, client->smbname);
@@ -382,7 +382,7 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token,
 
     /* set up for pioctl */
     iob.in = tbuffer;
-    iob.in_size = tp - tbuffer;
+    iob.in_size = (long)(tp - tbuffer);
     iob.out = tbuffer;
     iob.out_size = sizeof(tbuffer);
 
@@ -447,7 +447,7 @@ ktc_GetToken(struct ktc_principal *server, struct ktc_token *token,
     tp += sizeof(uuid);
 
     iob.in = tbuffer;
-    iob.in_size = tp - tbuffer;
+    iob.in_size = (long)(tp - tbuffer);
     iob.out = tbuffer;
     iob.out_size = sizeof(tbuffer);
 
@@ -529,7 +529,7 @@ ktc_GetToken(struct ktc_principal *server, struct ktc_token *token,
 
     /* remember cell name and skip over it */
     cellName = cp;
-    cellNameSize = strlen(cp);
+    cellNameSize = (int)strlen(cp);
     cp += cellNameSize + 1;
 
     /* user name is here */
@@ -596,7 +596,7 @@ ktc_ListTokens(int cellNum, int *cellNumP, struct ktc_principal *server)
 
     /* do pioctl */
     iob.in = tbuffer;
-    iob.in_size = tp - tbuffer;
+    iob.in_size = (long)(tp - tbuffer);
     iob.out = tbuffer;
     iob.out_size = sizeof(tbuffer);
 
@@ -691,7 +691,7 @@ ktc_ForgetToken(struct ktc_principal *server)
 
     /* do pioctl */
     iob.in = tbuffer;
-    iob.in_size = tp - tbuffer;
+    iob.in_size = (long)(tp - tbuffer);
     iob.out = tbuffer;
     iob.out_size = sizeof(tbuffer);
 
index da9938b82b99014ceecefba42ccb32138a38770a..e01757f0df3d70b3cfd120fcedfb39a610784941 100644 (file)
@@ -24,6 +24,7 @@ CELL_EXELIBS =\
 
 $(CELL_EXEFILE): $(CELL_EXEOBJS)  $(CELL_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
@@ -40,6 +41,7 @@ KTC_EXELIBS =\
 
 $(KTC_EXEFILE): $(KTC_EXEOBJS)  $(KTC_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 test tests: $(CELL_EXEFILE) $(KTC_EXEFILE)
index 5116f32f5ffe43811bb68e51b513b67820fb7ef5..c94715805fb778802dcdf6396b0cd84b7bc4dd87 100644 (file)
@@ -124,7 +124,7 @@ afsconf_SetExtendedCellInfo(adir, apath, acellInfo, clones)
        UNLOCK_GLOBAL_MUTEX;
        return errno;
     }
-    i = strlen(acellInfo->name);
+    i = (int)strlen(acellInfo->name);
     code = write(fd, acellInfo->name, i);
     if (code != i) {
        UNLOCK_GLOBAL_MUTEX;
index d9faa3cfcf1e809c4b2aac7f5d4eaf825743dc44..22830f39b987d8983331016a72d0db2f884e061e 100644 (file)
@@ -71,6 +71,7 @@ BOSSERVER_EXELIBS =\
 
 $(BOSSERVER_EXEFILE): $(BOSSERVER_EXEOBJS) $(BOSSERVER_EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
@@ -107,6 +108,7 @@ BOS_EXELIBS =\
 
 $(RS_BOS_EXEFILE): $(BOS_EXEOBJS) $(BOS_EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 $(CL_BOS_EXEFILE): $(RS_BOS_EXEFILE)
index 51f23b7aef70e6f66d9a995e79f67a35dff38941..557c582b43de9b56705575e8d9dcd9de36a30a94 100644 (file)
@@ -27,6 +27,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 ############################################################################
index b217e86dace2d515e89f77112a0d69998c91eb67..66c97e503a6e3f1fa21a7e8c2ad615fe289451e0 100644 (file)
@@ -92,6 +92,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
index 10d69c2ef651421058475617ec055e430aa4ed7b..d772cdf4ebf0bed29b77b9d9218e7374ead19fcc 100644 (file)
@@ -82,6 +82,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS)  $(EXELIBS)
        $(EXECONLINK) dnsapi.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
index d24dd2e166b8ca51b004305baf729e08bfbe6074..f0d2ad3fae04e06bd7dce49b8eda2f330c787068 100644 (file)
@@ -55,6 +55,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 ############################################################################
@@ -78,6 +79,7 @@ clean::
 # Auxiliary build targets not built by default; e.g. test programs
 $(OUT)\butc_test.exe: $(OUT)\test.obj
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index b685ada8316d29ba0c81b6b4435ec0dd03789bbd..870c0101e9130c78037b289bb1d50dd0204399a3 100644 (file)
@@ -45,6 +45,7 @@ TESTLIBS = $(DESTDIR)\lib\afslwp.lib \
 
 $(OUT)\test_ftm.exe: $(OUT)\test_ftm.obj $(LIBFILE) $(TESTLIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 456d66b640a401fce6727f089312deca3ffd445d..a93b40a8b8236874191c531108a820a937a71d09 100644 (file)
@@ -56,8 +56,8 @@ SubString(register char *amain, register char *asub)
 {
     int mlen, slen;
     register int i, j;
-    mlen = strlen(amain);
-    slen = strlen(asub);
+    mlen = (int) strlen(amain);
+    slen = (int) strlen(asub);
     j = mlen - slen;
     if (j < 0)
        return 0;               /* not a substring */
index a54d581c541da9d5654cf2fc75254f6ae947f1d9..e79108381437b28493a0c1d12e30432851308555 100644 (file)
@@ -23,6 +23,7 @@ ITEST_EXEFILE = $(OUT)\itest.exe
 
 $(ITEST_EXEFILE): $(ITEST_EXEOBJS) 
        $(EXECONLINK) $(EXELIBS)  
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 #build ctest.exe
@@ -33,6 +34,7 @@ CTEST_EXEFILE = $(OUT)\ctest.exe
 
 $(CTEST_EXEFILE): $(CTEST_EXEOBJS) 
        $(EXECONLINK) $(EXELIBS)  
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 # build dtest.exe
@@ -43,6 +45,7 @@ DTEST_EXEFILE = $(OUT)\dtest.exe
 
 $(DTEST_EXEFILE): $(DTEST_EXEOBJS) 
        $(EXECONLINK) $(EXELIBS)  
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 all: test
index 27b65a8107c8eabee6cb0e2fe4616ac15352f0f2..e110524fbecf5d29a625d6ea44a0035e5ba3fb33 100644 (file)
@@ -60,6 +60,7 @@ COMPILE_ET_EXELIBS =\
 
 $(COMPILE_ET_EXEFILE): $(COMPILE_ET_EXEOBJS) $(COMPILE_ET_EXELIBS)  
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ####################################################################
index 2a1aa9e992470a694ad07f9b5bb9355c9c5847c5..55e7e51ae3cb2aba7a99d5c462cebe0dfeba7a9d 100644 (file)
@@ -18,6 +18,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS)  # dependents built from predefined inference rules
        $(EXECONLINK) $(EXELIBS) 
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 test1.c test1.h: test1.et 
index 9d1770162cc61ece12ea37ddc1e0bf73602d75c9..30b14b0f327cffd085dc75c31429323f30c21344 100644 (file)
@@ -1,5 +1,5 @@
-afspthread.dll                 0x61000000    0x00080000
-afsrpc.dll                     0x61080000    0x00080000
+afspthread.dll                 0x61000000    0x00040000
+afsrpc.dll                     0x61040000    0x000B0000
 afsauthent.dll                 0x61100000    0x00080000
 afspioctl.dll                  0x61200000    0x00080000
 afsprocmgmt.dll                0x61280000    0x00080000
index f90a4ba0dc261dfdac8bc13316864508c73e6b61..755250e4f93fd045319f1b01a9f51d6de4af5266 100644 (file)
@@ -492,15 +492,21 @@ INCTOOLS = \
 
 $(INCTOOLS):$(OUT)\$$(@F)
        $(COPY) $** $(DESTDIR)\bin\.
+!IF ("$(AFSVER_CL)"=="1400")
+       $(COPY) $**.manifest $(DESTDIR)\bin\.
+!ENDIF
 
 $(OUT)\mkvers.exe : $(OUT)\mkvers.obj
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\touch.exe : $(OUT)\touch.obj
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\util_cr.exe : $(OUT)\util_cr.obj
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 langsetup: $(DESTDIR)\bin\NTLang.bat
 
@@ -515,8 +521,8 @@ clean_version:
 
 clean::
        $(DEL) $(DESTDIR)\LIB\*.DLL
-       $(DEL) $(DESTDIR)\bin\mkver.exe
-       $(DEL) $(DESTDIR)\bin\touch.exe
-       $(DEL) $(OUT)\util_cr.exe
-       $(DEL) $(OUT)\mkver.exe
-       $(DEL) $(OUT)\touch.exe
+       $(DEL) $(DESTDIR)\bin\mkver.exe*
+       $(DEL) $(DESTDIR)\bin\touch.exe*
+       $(DEL) $(OUT)\util_cr.exe*
+       $(DEL) $(OUT)\mkver.exe*
+       $(DEL) $(OUT)\touch.exe*
index a0d1c61d8f63aea3132c2200871f8fd9fc95eb3e..d28d1171582b16624f7f14ef866ed7a128191094 100644 (file)
 #     AFSROOT - ROOT Directory so that $(AFSROOT)\scr is location of source
 #
 ############################################################################
-#              Optional compliation flags
-#              NO_CRTDBG - used to disable some builds for CFTDBG allocate mapping
-#      _CRTDBG_MAP_ALLOC = <utilize crt debug C runtime if define> (default is null)
-#              VADUMP - define VADUMP=1 if you are going to use the vadump utility and you are using V6.0
+# Optional compliation flags
+#     NO_CRTDBG - used to disable some builds for CFTDBG allocate mapping
+#     _CRTDBG_MAP_ALLOC = <utilize crt debug C runtime if define> (default is null)
+#     VADUMP - define VADUMP=1 if you are going to use the vadump utility and you are using V6.0
 #
 ####### Special optional defines
 
 
 #sanity checks 
 
+!IF ("$(CPU)" != "AMD64")
+!ERROR Platform SDK not configured for AMD64
+!ENDIF
+
 !IF EXISTS("TOOLS.INI")
 !MESSAGE ************CAUTION TOOLS.INI IN EFFECT**********
 !ENDIF
@@ -164,16 +168,10 @@ OUT=$(OJT)\$(RELDIR)
 # WIN32.MAK, and this nmake file, are targeted to the MSVC compiler;
 # port this nmake file if additional compiler support is required.
 
-# !IF ("$(AFSVER_CL)"=="1300")
-# afslflags = $(afslflags) /DEBUG
-# !ENDIF
-
 !IF ("$(APPVER)" == "")
-APPVER=5.0
+APPVER=5.02
 !ENDIF
 
-
-
 !INCLUDE <WIN32.MAK>
 
 # Extend and/or supplement definitions in WIN32.MAK.
@@ -212,12 +210,13 @@ afscdefs =\
        -DSTRICT \
        -D_WIN32_IE=0x0500 \
        -D_WIN32_WINNT=0x0500 \
-    -DWINVER=0x0500 \
-    -DREGISTER_POWER_NOTIFICATIONS \
-    -DAFS_AFSDB_ENV \
-    -DAFS_FREELANCE_CLIENT \
-    -DAFS_64BIT_ENV \
+       -DWINVER=0x0500 \
+       -DREGISTER_POWER_NOTIFICATIONS \
+       -DAFS_AFSDB_ENV \
+       -DAFS_FREELANCE_CLIENT \
+       -DAFS_64BIT_ENV \
        -DAFS_64BIT_CLIENT \
+       -DAFS_LARGEFILE_ENV \
         $(AFSDEV_AUXCDEFINES)
 
 # Compiler switches (except include paths and preprocessor defines)
@@ -230,15 +229,13 @@ afscdefs =\
 # /Gy   enable function-level linking
 # /GX   enable C++ exceptions (assumes extern C funcs never throw exceptions)
 # /Os   favor small (over fast) code; seems to avoid 64-bit bugs in VC compiler
-# /Wp64 64-bit porting warnings
 
 afscflags =\
         /Oy- \
        /GF \
        /Gd \
        /Gy \
-       /Os \
-        /Wp64
+       /Os
 
 !IF ("$(AFSVER_CL)"=="1400")
 afscflags = $(afscflags) /EHsc /wd4996
@@ -259,12 +256,11 @@ afscdefs = $(afscdefs) -DAFSIFS
 !ENDIF
 
 !IF ("$(AFSDEV_BUILDTYPE)" == "FREE")
-
 afscflags = $(afscflags) /Ox /Zi
 cdebug = $(cdebug:-Od=) # avoid annoying override warning (D4025)
 cvarsdll = $(cvarsdll:-MDd=-MD)
 NODEBUG=1
-
+_VC_MANIFEST_BASENAME = __OAFW
 !ELSE          # CHECKED BUILD
 cdebug = $(cdebug:-Z7=-Zi)  # avoid annoying override warning (D4025)
 
@@ -279,6 +275,18 @@ afscflags = $(afscflags) -D_DEBUG -D_CRTDBG_MAP_ALLOC
 !ENDIF
 
 !UNDEF NODEBUG
+_VC_MANIFEST_BASENAME = __OAFW.Debug
+!ENDIF
+
+!IF ("$(AFSVER_CL)"=="1400")
+_VC_MANIFEST_EMBED_EXE= \
+if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
+
+_VC_MANIFEST_EMBED_DLL= \
+if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;2
+!ELSE
+_VC_MANIFEST_EMBED_EXE=
+_VC_MANIFEST_EMBED_DLL=
 !ENDIF
 
 # Set compiler warning level
@@ -317,10 +325,6 @@ CPP2OBJ = $(C2OBJ)
 .rc{$(OUT)\}.res:
        $(RC) /fo$(OUT)\$(<B).res $<
 
-# Compile .rc (resource) files
-#.rc.res:
-#      $(RC) $*.rc
-
 .SUFFIXES: .h
 
 .h.{$(DESTDIR)\include\afs}.h:
@@ -352,9 +356,14 @@ RC = $(rc) $(rcvars) $(rcflags) $(AFSDEV_AUXRCFLAGS) /d "AFSPRODUCT_VERSION=\"$(
 
 #################### Link optional build flags set ###########
 
-afslflags =\
+afslflags = $(afslflags) \
        /FIXED:NO /VERBOSE:LIB
 
+!IF ("$(AFSVER_CL)"=="1400")
+afslflags = $(afslflags) /MANIFEST
+!ENDIF
+
+
 mfclflags = $(guilflags)
 mfclflags = $(mfclflags:/NODEFAULTLIB=)
 
@@ -413,9 +422,8 @@ DLLPREP = rebase -i $(DESTDIR)\NTDllmap.txt -q $@
 
 !ENDIF #CHECKED BUILD
 
-
 # EXE link macro for console applications
-EXECONLINK = $(link) /OUT:$@ $(ldebug) $(conlflags) $(afslflags) $(conlibsdll) Advapi32.lib user32.lib  version.lib $**
+EXECONLINK = $(link) /OUT:$@ $(ldebug) $(conlflags) $(afslflags) $(conlibsdll) Advapi32.lib user32.lib  version.lib $** 
 
 # EXE link macro for GUI applications
 EXEGUILINK = $(link) /OUT:$@ $(ldebug) $(guilflags) $(afslflags) $(guilibsdll) $**
@@ -428,11 +436,13 @@ DLLCONLINK = $(link) /OUT:$@ $(ldebug) $(dlllflags) $(afslflags) $(conlibsdll) $
 
 # DLL link macro for GUI applications
 DLLGUILINK = $(link) /OUT:$@ $(ldebug) $(dlllflags) $(afslflags) $(guilibsdll)  $**
+
 EXECONLINK = $(link) /OUT:$@ $(ldebug) $(conlflags) $(afslflags) $(conlibsdll) Advapi32.lib user32.lib version.lib $**
+
 DLLMFCLINK = $(link) /OUT:$@ $(ldebug) $(mfcdlllflags) $(afslflags) $(mfclibsdll) $**
 
 # DLL link macro for resource-only DLLs
-DLLRESLINK = $(link) /OUT:$@ $(dlllflags:-entry:_DllMainCRTStartup@12=-noentry) $(afslflags) $**
+DLLRESLINK = $(link) /OUT:$@ $(dlllflags:-entry:_DllMainCRTStartup=-noentry) $(afslflags) $**
 
 # Library archive macro
 LIBARCH = $(implib) /NOLOGO /OUT:$@ $**
@@ -442,9 +452,7 @@ NTLANG = $(DESTDIR)\bin\NTLang.bat
 
 ######### MIDL FLAGS
 
-!IFDEF OSISXP
-AFSDEV_AUXMIDLFLAGS=/Oi
-!ENDIF
+AFSDEV_AUXMIDLFLAGS=/env x64 /x64 /Oicf
 
 # Lex/Yacc macros
 LEX = flex -l
index d75fcb960d84ed72ca81446193d65e7589c45938..6a10fd3904f994c04599b3b2e2c39fc7e4f76dc3 100644 (file)
 
 #sanity checks 
 
+!IF ("$(CPU)" != "i386")
+!ERROR Platform SDK not configured for i386
+!ENDIF
+
 !IF EXISTS("TOOLS.INI")
 !MESSAGE ************CAUTION TOOLS.INI IN EFFECT**********
 !ENDIF
@@ -212,11 +216,11 @@ afscdefs =\
        -DSTRICT \
        -D_WIN32_IE=0x0500 \
        -D_WIN32_WINNT=0x0500 \
-    -DWINVER=0x0500 \
-    -DREGISTER_POWER_NOTIFICATIONS \
-    -DAFS_AFSDB_ENV \
-    -DAFS_FREELANCE_CLIENT \
-    -DAFS_64BIT_ENV \
+       -DWINVER=0x0500 \
+       -DREGISTER_POWER_NOTIFICATIONS \
+       -DAFS_AFSDB_ENV \
+       -DAFS_FREELANCE_CLIENT \
+       -DAFS_64BIT_ENV \
        -DAFS_64BIT_CLIENT \
         $(AFSDEV_AUXCDEFINES)
 
@@ -442,8 +446,9 @@ NTLANG = $(DESTDIR)\bin\NTLang.bat
 
 ######### MIDL FLAGS
 
+AFSDEV_AUXMIDLFLAGS=/env win32 /win32 /no_robust
 !IFDEF OSISXP
-AFSDEV_AUXMIDLFLAGS=/Oi
+AFSDEV_AUXMIDLFLAGS=$(AFSDEV_AUXMIDLFLAGS) /Oi
 !ENDIF
 
 # Lex/Yacc macros
index c26bd85c8fdcea3a2e38b42e6b2281f04f553e7d..1697fad26cb046dcfd9b5af49510aa84e941201d 100644 (file)
 
 #sanity checks 
 
+!IF ("$(CPU)" != "i386")
+!ERROR Platform SDK not configured for i386
+!ENDIF
+
 !IF EXISTS("TOOLS.INI")
 !MESSAGE ************CAUTION TOOLS.INI IN EFFECT**********
 !ENDIF
@@ -212,12 +216,13 @@ afscdefs =\
        -DSTRICT \
        -D_WIN32_IE=0x0500 \
        -D_WIN32_WINNT=0x0500 \
-    -DWINVER=0x0500 \
-    -DREGISTER_POWER_NOTIFICATIONS \
-    -DAFS_AFSDB_ENV \
-    -DAFS_FREELANCE_CLIENT \
-    -DAFS_64BIT_ENV \
+       -DWINVER=0x0500 \
+       -DREGISTER_POWER_NOTIFICATIONS \
+       -DAFS_AFSDB_ENV \
+       -DAFS_FREELANCE_CLIENT \
+       -DAFS_64BIT_ENV \
        -DAFS_64BIT_CLIENT \
+       -DAFS_LARGEFILE_ENV \
         $(AFSDEV_AUXCDEFINES)
 
 # Compiler switches (except include paths and preprocessor defines)
@@ -230,9 +235,11 @@ afscdefs =\
 # /Gy   enable function-level linking
 # /GX   enable C++ exceptions (assumes extern C funcs never throw exceptions)
 # /Os   favor small (over fast) code; seems to avoid 64-bit bugs in VC compiler
+# /Wp64 enable 64-bit porting warnings (conflicts with warnings as errors
+#         due to SDK mapping of Get/SetWindowLongPtr to Get/SetWindowLong
 
 afscflags =\
-    /Oy- \
+       /Oy- \
        /GF \
        /Gd \
        /Gy \
@@ -440,9 +447,7 @@ NTLANG = $(DESTDIR)\bin\NTLang.bat
 
 ######### MIDL FLAGS
 
-!IFDEF OSISXP
-AFSDEV_AUXMIDLFLAGS=/Oi
-!ENDIF
+AFSDEV_AUXMIDLFLAGS=/env win32 /win32 /no_robust /Oicf 
 
 # Lex/Yacc macros
 LEX = flex -l
index c7ed94e7a76cc41150c326a1c8dbe9e9ef1c41ea..3b7eb7684121bdc01e82450a47686a3decd2755d 100644 (file)
@@ -32,7 +32,7 @@
  * and has no typedef for ssize_t (a signed size_t).
  * So, we make our own.
  */
-typedef int ssize_t;
+typedef __int64 ssize_t;
 
 /* these macros define Unix-style functions missing in  VC++5.0/NT4.0 */
 #define MAXPATHLEN _MAX_PATH
index 3fe1087085aeeb87d1d5690d0208e478205c50d5..186df1525627514636931e096824c226c33e54a4 100644 (file)
@@ -32,7 +32,7 @@
  * and has no typedef for ssize_t (a signed size_t).
  * So, we make our own.
  */
-typedef int ssize_t;
+typedef __int64 ssize_t;
 
 /* these macros define Unix-style functions missing in  VC++5.0/NT4.0 */
 #define MAXPATHLEN _MAX_PATH
index 75955018bb43b42b7d630268e93db64fe19f4ff9..687ccb84792b0b198508c19b4bade5835b1a297d 100644 (file)
@@ -7,14 +7,19 @@
        directory or online at http://www.openafs.org/dl/license10.html
 */
 
+#include <windows.h>
 #include "io.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <process.h>
 
+#ifndef intptr_t
+#define intptr_t INT_PTR
+#endif
+
 void
-usuage()
+usage()
 {
     printf("touch filename/Wildcard \n");
     exit(1);
@@ -23,12 +28,13 @@ usuage()
 int
 main(int argc, char *argv[])
 {
-    int fh, fs;
+    int fh;
+    intptr_t fs;
     long pos;
     char buffer[1];
     struct _finddata_t finfo;
     if (argc < 2)
-       usuage();
+       usage();
     fs = _findfirst(argv[1], &finfo);
     if (fs == -1)
        return 0;
index 5e2762d9c1269aafeef5ef4163edfc8d3008bbfa..2dc0f5f564ee6c8ce13d24320e5ebcc94c04a98c 100644 (file)
 #include "malloc.h"
 #include "time.h"
 #include "stdlib.h"
-#include "windows.h"
 
 #ifndef  intptr_t
-#define intptr_t long
+#define intptr_t INT_PTR
 #endif
 
 void
-usuage()
+usage()
 {
     printf("util_cr file ;remove cr (from crlf)\n\
        OR util_cr } ProductVersion in_filename out_filename ; substitute for %%1-%%5 in file\n\
@@ -115,7 +114,7 @@ Addkey(const char *hkey, const char *subkey, const char *stag,
     if (strcmp(hkey, "HKEY_LOCAL_MACHINE") == 0)
        kHkey = HKEY_LOCAL_MACHINE;
     if (kHkey == 0)
-       usuage();
+       usage();
     result = (RegCreateKeyEx(kHkey     /*HKEY_LOCAL_MACHINE */
                             , subkey, 0, NULL, REG_OPTION_NON_VOLATILE,
                             KEY_ALL_ACCESS, NULL, &kPkey,
@@ -130,11 +129,11 @@ Addkey(const char *hkey, const char *subkey, const char *stag,
        if (*stag == '@')
            result =
                RegSetValueEx(kPkey, "", 0, REG_SZ, (CONST BYTE *) sval,
-                             strlen(sval));
+                             (DWORD)strlen(sval));
        else
            result =
                RegSetValueEx(kPkey, stag, 0, REG_SZ, (CONST BYTE *) sval,
-                             strlen(sval));
+                             (DWORD)strlen(sval));
     } else {
 
        if (*stag == '@')
@@ -162,7 +161,7 @@ Subkey(const char *hkey, const char *subkey)
     if (strcmp(hkey, "HKEY_LOCAL_MACHINE") == 0)
        kHkey = HKEY_LOCAL_MACHINE;
     if (kHkey == 0)
-       usuage();
+       usage();
     result = RegDeleteKey(kHkey, subkey);
     if (result != ERROR_SUCCESS) {
        printf("AFS Error - Could Not create a registration key\n");
@@ -319,7 +318,7 @@ isequal(char *msg1, char *msg2, char *disp)
 int
 SetSysEnv(int argc, char *argv[])
 {
-    DWORD dwResult;
+    DWORD_PTR dwResult;
     printf("assignment %s %s\n", argv[2], argv[3]);
     Addkey("HKEY_LOCAL_MACHINE",
           "System\\CurrentControlSet\\Control\\Session Manager\\Environment",
@@ -334,28 +333,27 @@ SetSysEnv(int argc, char *argv[])
 int
 main(int argc, char *argv[])
 {
-/*     typedef char * CHARP;*/
     char fname[128];
     FILE *file;
-    int l, i;
+    int i;
     char **pvar, *ch, *save;
-    long len;
+    size_t len;
     BOOL bRecurse = FALSE;
     BOOL bQuiet = FALSE;
     if (argc < 2)
-       usuage();
+       usage();
 
    /* RSM4: Add an "ECHO" that doesn't append a new line... */
    if (strcmp(argv[1], "_echo") == 0) {
       if(argc<3)
-         usuage();
+         usage();
       printf("%s",argv[2]);
       return 0;
    }
 
     if (strcmp(argv[1], "_sysvar") == 0) {
        if (argc < 4)
-           usuage();
+           usage();
        return (SetSysEnv(argc, argv));
 
     }
@@ -390,7 +388,7 @@ main(int argc, char *argv[])
        return _MSC_VER;
     }
     if (argc < 3)
-       usuage();
+       usage();
     if (strcmp(argv[1], "_isOS") == 0)
        return CheckVersion(argc, argv);
     if (strcmp(argv[1], "}") == 0) {
@@ -403,7 +401,7 @@ main(int argc, char *argv[])
        int pat, pat2;
        strcpy(v5, argv[2]);
        if (argc < 5)
-           usuage();
+           usage();
        if ((ptr = strtok(argv[2], ". \n")) == NULL)
            return 0;
        maj = atoi(ptr);
@@ -415,15 +413,15 @@ main(int argc, char *argv[])
        pat2 = -1;
        switch (strlen(ptr)) {
        case 0:
-           usuage();
+           usage();
        case 1:
            pat = atoi(ptr);
            if (isdigit(*ptr) != 0)
                break;
-           usuage();
+           usage();
        case 2:         //ONLY 1.0.44 is interpreted as 1.0.4.4 or 1.0.4a as 1.0.4.a
            if (isdigit(*ptr) == 0)
-               usuage();
+               usage();
            pat = *ptr - '0';
            ptr++;
            if (isalpha(*ptr) == 0) {
@@ -431,14 +429,14 @@ main(int argc, char *argv[])
            } else if (isalpha(*ptr) != 0) {
                pat2 = tolower(*ptr) - 'a' + 1;
            } else
-               usuage();
+               usage();
            break;
        case 3:         //1.0.401 or 1.0.40a are the same; 
            if ((isdigit(*ptr) == 0)    // first 2 must be digit
                || (isdigit(*(ptr + 1)) == 0)
                || (*(ptr + 1) != '0' && isdigit(*(ptr + 2)) == 0)      // disallow 1.0.4b0  or 1.0.41a 
                )
-               usuage();
+               usage();
            pat = *ptr - '0';
            ptr++;
            pat2 = atoi(ptr);
@@ -447,28 +445,28 @@ main(int argc, char *argv[])
                pat2 = tolower(*ptr) - 'a' + 1;
            break;
        default:
-           usuage();
+           usage();
        }
        // last can be 1-2 digits or one alpha (if pat2 hasn't been set)
        if ((ptr = strtok(NULL, ". \n")) != NULL) {
            if (pat2 >= 0)
-               usuage();
+               usage();
            switch (strlen(ptr)) {
            case 1:
                pat2 = (isdigit(*ptr)) ? atoi(ptr) : tolower(*ptr) - 'a' + 1;
                break;
            case 2:
                if (isdigit(*ptr) == 0 || isdigit(*(ptr + 1)) == 0)
-                   usuage();
+                   usage();
                pat2 = atoi(ptr);
                break;
            default:
-               usuage();
+               usage();
            }
        }
        file = fopen(argv[3], "r");
        if (file == NULL)
-           usuage();
+           usage();
        len = filelength(_fileno(file));
        save = (char *)malloc(len + 1);
        buf = save;
@@ -477,7 +475,7 @@ main(int argc, char *argv[])
        fclose(file);
        file = fopen(argv[4], "w");
        if (file == NULL)
-           usuage();
+           usage();
        sprintf(v1, "%i", maj);
        sprintf(v2, "%i", min);
        sprintf(v3, "%i", pat);
@@ -530,7 +528,7 @@ main(int argc, char *argv[])
     }
     if (strcmp(argv[1], "*") == 0) {   /* "[HKEY_CLASSES_ROOT\CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}]  @=AFS Client Shell Extension" */
        if (argc < 3)
-           usuage();
+           usage();
        for (i = 2; argc >= 3; i++) {
            char *ssub = strtok(argv[i], "[");
            BOOL option;
@@ -569,7 +567,7 @@ main(int argc, char *argv[])
        char msg[256], msgt[256];
        char *ptr;
        if (argc < 4)
-           usuage();
+           usage();
        for (i = 3; argc >= 4; i++) {
 
            char *ssect = strstr(argv[i], "[");
index 22c127923afd4c781d9eab965d8d728c2877f185..b0f93a07acbb48f884f2b5caa5cb91ad13d825c4 100644 (file)
@@ -12,6 +12,7 @@ tests: $(OUT)\dtest.exe
 
 $(OUT)\dtest.exe: $(OUT)\dtest.obj $(DESTDIR)\lib\afs\afsdir.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 8ffe8e8f69af7a1fb8af1e38258b091545b8921f..acce99f54dfd6f23c2986d160b3cf91b1b33d3b4 100644 (file)
@@ -25,6 +25,7 @@ TRANSLATE_ET_EXELIBS =\
 
 $(TRANSLATE_ET_EXEFILE): $(TRANSLATE_ET_EXEOBJS) $(TRANSLATE_ET_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
index e7e19dbffe3055f3e31121d20aa7b931aa744fdb..448971393082f20b1468e5e91fdbd3dded061300 100644 (file)
@@ -112,6 +112,7 @@ proc TellMeAboutYourself(
   OUT Capabilities *capabilities
 ) = 65538;
 
+/*
 proc GetDE(
   IN  afs_int32 index,
   OUT afs_int32 addr,
@@ -120,4 +121,5 @@ proc GetDE(
   OUT afs_int32 time,
   OUT string fileName<AFSNAMEMAX>
 ) = 65539;
+*/
 
index 8572f9aaa8b4e83e338350ec367cdd145a79d2be..945674b6defe8b3db53517a14ebd9e6478640726 100644 (file)
@@ -126,6 +126,7 @@ KASERVER_EXELIBS =\
 
 $(KASERVER): $(KASERVER_OBJS) $(AFSLIBS) $(KASERVER_EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 #build $(OUT)\kadatabase.obj
@@ -150,6 +151,7 @@ KAS_OBJS =\
        
 $(KAS): $(KAS_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ########### Misc Exes #######################################################
@@ -163,19 +165,23 @@ KPASSWD_OBJS =\
 
 $(KPASSWD_EXEFILE): $(KPASSWD_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 #kpwvalid.exe
 $(OUT)\kpwvalid.exe: $(OUT)\kpwvalid.obj $(AFSLIBS) $(KAUTH_LIBFILE)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
 
 #kdb.exe - Not implemented for NT - because dbm not available on NT
 #kdb.exe: $(OUT)\kdb.obj $(AFSLIBS) $(KAUTH_LIBFILE) 
 #      $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+#       $(_VC_MANIFEST_EMBED_EXE)
 
 #rebuild.exe 
 $(OUT)\rebuild.exe: $(OUT)\rebuild.obj $(OUT)\kautils.obj $(AFSLIBS) 
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
 
 ############################################################################
 # Definitions for generating versioninfo resources
index 0fcf79c59e38f3623563857e53943cdc9c37713c..48e6f14b8b0e4c7ba83e953d48ee380448155471 100644 (file)
@@ -353,7 +353,7 @@ kpwvalid_is(char *dir)
     struct stat statbuff;
     int len;
 
-    len = strlen(dir);
+    len = (int)strlen(dir);
     strcpy(dir + len, "/kpwvalid");
 
     if (stat(dir, &statbuff) < 0) {
index b4a9b210311c897030507928004014da23518073..81541a68928e98bf778b98c8869b1ae1281285b1 100644 (file)
@@ -24,28 +24,35 @@ EXELIBS = \
 
 $(OUT)\multiklog.exe: $(OUT)\multiklog.obj
        $(EXECONLINK) $(EXELIBS)
-
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\test_date.exe: $(OUT)\test_date.obj
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\test_badtix.exe: $(OUT)\test_badtix.obj
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\decode_ticket.exe: $(OUT)\decode_ticket.obj
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\test_interim_ktc.exe: $(OUT)\test_interim_ktc.obj
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\test_rxkad_free: test_rxkad_free.o 
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\test_getticket.exe: $(OUT)\test_getticket.obj
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\background.exe: $(OUT)\background.obj
        $(EXECONLINK) $(EXELIBS)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 
 test tests all: $(OUT)\multiklog.exe $(OUT)\test_date.exe $(OUT)\test_badtix.exe $(OUT)\decode_ticket.exe \
index 9cd71b5aef7a8d73665baa1d91c487ee3d04a6a2..bdc41cde2808615044d9ae98d926ae6cafa11554 100644 (file)
@@ -144,6 +144,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:afsadminutil.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index da8508e04422fbe708b42a3455beb85707366635..24fa6be17219507beb201aaa9682fc1eb5d9f196 100644 (file)
@@ -43,6 +43,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:bosadmin.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index 992daf2cc86147657f4c1a9826d5afbe76f65e22..3f11f0cd2c27cb3f9de52dbcc95f928257663b0f 100644 (file)
@@ -59,6 +59,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:afscfgadmin.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index 69d4d0cd0e5d3f47996fc0e0806a7cd961f6f5c0..fd0bebd802c099f0a4668ed1d140a80209f70020 100644 (file)
@@ -22,6 +22,7 @@ CFGTEST_EXELIBS =\
 
 $(OUT)\cfgtest.exe: $(OUT)\cfgtest.obj $(CFGTEST_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 1cc338216cfa1a5e5e00f42d60ac27e1b99beb69..f32f92f48f70828f4e7ddd8e87a05ed21620c39d 100644 (file)
@@ -31,6 +31,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:clientadmin.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index f32c6df1a08162d06cbbc93cd48c9f92e0c7e0da..4ee79ca56264126887367cac7e7fe27a30f4274b 100644 (file)
@@ -39,6 +39,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:kasadmin.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index a61c41f72e98272c5f04af2fbe24f94de9617e4b..d8765db4cdf94d56b597c50de3d8fa4db072368e 100644 (file)
@@ -42,6 +42,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:ptsadmin.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index 762158fa0f8436f45201cd3ccb2f2a94f76a0e8d..af61254255b858e166dde4cde8fe288b04659504 100644 (file)
@@ -35,6 +35,7 @@ AFSCP_EXEOBJS =\
 
 $(OUT)\afscp.exe: $(OUT)\afscp.obj $(AFSCP_EXEOBJS) $(AFSCP_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 32b0816c5fe17a7d5493fab2cb1f25337130c3e6..0d6ec63226abd272aa2b4ee842a5f3850376f6f3 100644 (file)
@@ -63,6 +63,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:vosadmin.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
index af1b33789e746e5faeab124ae9f23295ed1077d2..3454623e1791a19d82f9f30110d3d9d8d373e3bb 100644 (file)
@@ -145,6 +145,7 @@ DLLLIBS =\
 
 $(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS)
        $(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib secur32.lib
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 # Definitions for generating versioninfo resources
index 2d3bfa145a0fb15084de7b21c652c1d8dd6ebec1..21a05bdb6f2b4955dd330bafd2cbf7d6c7f741c3 100644 (file)
@@ -96,6 +96,7 @@ DLLLIBS =\
 
 $(LIBFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:afsrpc.def iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 # Definitions for generating versioninfo resources
index 26725a8e5ae16ea175eeac9a018ee9ca4b29ab41..fd56007b34adc5b6f89f1f9a014baf99933bab60 100644 (file)
@@ -44,6 +44,7 @@ tests: $(OUT)\rw.exe
 
 $(OUT)\rw.exe: $(OUT)\rw.obj $(LIBFILE) $(DESTDIR)\lib\afs\afsutil.lib
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 clean::
        $(DEL) $(LIBFILE)
index 04372c091dd908ed361a33e81fec17464813510d..16a89e1f593a4b518a78762fdd5fb70153215ed1 100644 (file)
@@ -129,7 +129,7 @@ struct IoRequest {
     struct TM_Elem     timeout;
 
     /* Result of select call */
-    long                       result;
+    size_t             result;
 
 #ifdef AFS_DJGPP_ENV
     NCB                  *ncbp;
@@ -228,7 +228,7 @@ fd_set *IOMGR_AllocFDSet(void)
     }
 }
 
-#define FreeRequest(x) ((x)->result = (long) iorFreeList, iorFreeList = (x))
+#define FreeRequest(x) ((x)->result = (size_t)iorFreeList, iorFreeList = (x))
 
 static struct IoRequest *NewRequest()
 {
@@ -918,7 +918,7 @@ int IOMGR_Select(fds, readfds, writefds, exceptfds, timeout)
      struct timeval *timeout;
 {
     register struct IoRequest *request;
-    int result;
+    size_t result;
 
 #ifndef AFS_NT40_ENV
     if(fds > FD_SETSIZE) {
@@ -1007,7 +1007,7 @@ again:
     result = request -> result;
 
     FreeRequest(request);
-    return (result > 1 ? 1 : result);
+    return (result > 1 ? 1 : (int)result);
 }
 \f
 int IOMGR_Cancel(PROCESS pid)
index 845d4515df832807c3f46be63abab2bb997c7d27..24a84d6f3a17960f94e2014bcc8450d839868332 100644 (file)
@@ -44,7 +44,7 @@ char lwp_debug = 0;
 #ifdef DEBUG
 #define Debug(level, msg)\
         if (lwp_debug && lwp_debug >= level) {\
-            printf("***LWP (0x%x): ", lwp_cpptr);\
+            printf("***LWP (0x%p): ", lwp_cpptr);\
             printf msg;\
             putchar('\n');\
         }
@@ -178,7 +178,7 @@ int LWP_InitializeProcessSupport(int priority, PROCESS *pid)
                "Main Process [created by LWP]");   
 
     lwp_cpptr = pcb;
-    Debug(10, ("Init: Insert 0x%x into runnable at priority %d\n", pcb, priority))
+    Debug(10, ("Init: Insert 0x%p into runnable at priority %d\n", pcb, priority))
     insert(pcb, &runnable[priority]);
 
     if ( ( value = getenv("AFS_LWP_STACK_SIZE")) == NULL )
@@ -236,10 +236,10 @@ int LWP_CreateProcess(int (*funP)(), int stacksize, int priority, void *argP,
        free((void*)pcb);
        return LWP_EINIT;
     }
-    Debug(0, ("Create: pcb=0x%x, funP=0x%x, argP=0x%x\n", pcb, funP, argP))
+    Debug(0, ("Create: pcb=0x%p, funP=0x%p, argP=0x%p\n", pcb, funP, argP))
     /* Fiber is now created, so fill in PCB */
     Initialize_PCB(pcb, priority, stacksize, funP, argP, name);
-    Debug(10, ("Create: Insert 0x%x into runnable at priority %d\n", pcb, priority))
+    Debug(10, ("Create: Insert 0x%p into runnable at priority %d\n", pcb, priority))
     insert(pcb, &runnable[priority]);
 
     LWPANCHOR.processcnt++;
@@ -284,7 +284,7 @@ int LWP_QSignal(PROCESS pid)
 {
     if (pid->status == QWAITING) {
        pid->status = READY;
-       Debug(10, ("QSignal: Insert 0x%x into runnable at priority %d\n", pid, pid->priority))
+       Debug(10, ("QSignal: Insert 0x%p into runnable at priority %d\n", pid, pid->priority))
        insert(pid, &runnable[pid->priority]);
        return LWP_SUCCESS;
     }
@@ -355,7 +355,7 @@ static int Internal_Signal(char *event)
     int rc = LWP_ENOWAIT;
     int i;
 
-    Debug(0, ("Entered Internal_Signal [event id 0x%x]", event))
+    Debug(0, ("Entered Internal_Signal [event id 0x%p]", event))
     if (!lwp_init) return LWP_EINIT;
     if (event == NULL) return LWP_EBADEVENT;
     for_all_elts(temp, blocked, {
@@ -364,7 +364,7 @@ static int Internal_Signal(char *event)
                if (temp -> eventlist[i] == event) {
                    temp -> eventlist[i] = NULL;
                    rc = LWP_SUCCESS;
-                   Debug(0, ("Signal satisfied for PCB 0x%x", temp))
+                   Debug(0, ("Signal satisfied for PCB 0x%p", temp))
                    if (--temp->waitcnt == 0) {
                        temp -> status = READY;
                        temp -> wakevent = i+1;
@@ -505,7 +505,7 @@ static VOID WINAPI Enter_LWP(PVOID fiberData)
 /* next lines are new..... */
     lwp_cpptr = pcb;
 
-    Debug(2, ("Enter_LWP: pcb=0x%x, funP=0x%x, argP=0x%x\n", pcb, pcb->funP, pcb->argP))
+    Debug(2, ("Enter_LWP: pcb=0x%p, funP=0x%p, argP=0x%p\n", pcb, pcb->funP, pcb->argP))
 
     (*pcb->funP)(pcb->argP);
 
@@ -529,10 +529,10 @@ static void Dump_One_Process(PROCESS pid)
 {
     int i;
 
-    printf("***LWP: Process Control Block at 0x%x\n", pid);
+    printf("***LWP: Process Control Block at 0x%p\n", pid);
     printf("***LWP: Name: %s\n", pid->name);
     if (pid->funP != NULL)
-       printf("***LWP: Initial entry point: 0x%x\n", pid->funP);
+       printf("***LWP: Initial entry point: 0x%p\n", pid->funP);
     switch (pid->status) {
        case READY:     printf("READY");     break;
        case WAITING:   printf("WAITING");   break;
@@ -540,7 +540,7 @@ static void Dump_One_Process(PROCESS pid)
        default:        printf("unknown");
     }
     putchar('\n');
-    printf("***LWP: Priority: %d \tInitial parameter: 0x%x\n",
+    printf("***LWP: Priority: %d \tInitial parameter: 0x%p\n",
            pid->priority, pid->argP);
     if (pid->stacksize != 0) {
        printf("***LWP:  Stacksize: %d\n", pid->stacksize);
@@ -549,7 +549,7 @@ static void Dump_One_Process(PROCESS pid)
        printf("***LWP: Number of events outstanding: %d\n", pid->waitcnt);
        printf("***LWP: Event id list:");
        for (i=0;i<pid->eventcnt;i++)
-           printf(" 0x%x", pid->eventlist[i]);
+           printf(" 0x%p", pid->eventlist[i]);
        putchar('\n');
     }
     if (pid->wakevent>0)
@@ -600,7 +600,7 @@ static void Dispatcher(void)
 
 #ifdef DEBUG
     if (LWP_TraceProcesses > 0)
-       printf("Dispatch %d [PCB at 0x%x] \"%s\"\n", ++dispatch_count,
+       printf("Dispatch %d [PCB at 0x%p] \"%s\"\n", ++dispatch_count,
               runnable[i].head, runnable[i].head->name);
 #endif
 
index 112d397e9e374f646dec12e401c89cb45d2e28aa..7ebcc36d39b6eb245b6e0efe4d77da55fe0e627a 100644 (file)
@@ -17,6 +17,7 @@ LIBS =  $(DESTDIR)\lib\afslwp.lib \
 TESTKEY = $(OUT)\testkey.exe
 $(OUT)\testkey.exe: $(OUT)\test_key.obj $(LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 
 # test targets
index a50b3326b54b54175af5263c1c155ef8a20d0c47..aa48ff9bd473ae4da21e732ab18b74acd35da43b 100644 (file)
-.TH pam_afs 5 "5 August 2002"\r
-\r
-.SH NAME\r
-pam_afs, pam_afs.so \- pluggable authentication modules for OpenAFS\r
-\r
-.SH SYNOPSIS\r
-.B pam_afs.so.1, pam_afs.krb.so.1\r
-\r
-.SH DESCRIPTION\r
-The OpenAFS pluggable authentication module provides module support\r
-for authentication, session management, and password management, which\r
-coorespond to the auth, session, and  password directives in a PAM \r
-configuration file, respectively.\r
-\r
-The\r
-.B pam_afs.krb.so\r
-module additionally keeps users' Kerberos 4 TGT available for users\r
-to use in other applications.  The \r
-.B pam_afs.so\r
-module does not do this.\r
-\r
-The\r
-.B pam_afs.krb.so\r
-module has nothing to do with Kerberos 5 authentication.  Users\r
-with a Kerberos 5 integrated AFS environment should not use\r
-either of these modules, but instead use\r
-.B pam_krb5.so\r
-directly.\r
-\r
-.SH OPTIONS\r
-The following arguments are supported.  In parenthesis next to\r
-each option are the environments in which it works.\r
-\r
-.IP "cell cell_name"\r
-(auth) Specify a \r
-.I cell_name \r
-to authenticate to other than the local cell.\r
-.IP debug\r
-(all) Provide extra debugging information to syslog.\r
-.IP dont_fork\r
-(auth) Do not use a fork() when authenticating.  Forking is a good idea,\r
-because sockets and memory used by the authentication function get\r
-cleaned up automatically.  This option should only be used if a\r
-PAM application fails when a fork() is issued.  This option cannot \r
-be used with \r
-.B use_klog.\r
-.IP ignore_root\r
-(auth, password) If user root is authenticating, simply return PAM_SUCCESS without\r
-any AFS authentication attempt.  Presumably, authentication would fall through\r
-to a secondary mechanism.\r
-.IP "ignore_uid uid"\r
-(auth) Similar to ignore_root but it allows you to specify a \r
-.I uid\r
-such that any user authenticating with uid less than or equal to\r
-.I uid\r
-will not have AFS authentication performed.\r
-.IP no_unlog\r
-(session) Does not destroy a token during logout.  This is useful if\r
-users have background jobs still running under their PAG that\r
-need access to AFS after they log out.\r
-.IP nowarn\r
-(auth, password) Prevents warning from being written to syslog.\r
-.IP refresh_token\r
-(auth) Obtains a token without first obtaining a PAG.  This is useful for\r
-screensavers to update the lifetime of a user's token.\r
-.IP remain\r
-(session) Causes AFS tokens to remain for 5 minutes after logout.\r
-.IP "remainlifetime lifetime"\r
-(session) Specify, in seconds, how long tokens should remain after\r
-logout.\r
-.IP set_token\r
-(auth) If set_token is specified, the token obtained in the authentication\r
-phase is not destroyed.  Ordinarily, tokens are obtained in the\r
-setcred() phase of authentication.  For PAM applications which do not\r
-call setcred(), the\r
-.B set_token\r
-directive should be used.\r
-.IP setenv_password_expires\r
-(auth) Sets the PASSWORD_EXPIRES environment variable to the time when your\r
-AFS token will expire.\r
-.IP try_first_pass\r
-(auth, password) This will first try a password entered to a previous module and if it\r
-fails, prompt for the user's AFS password.\r
-If\r
-.B pam_afs.so\r
-is the first module called, it will generate a failed login attempt\r
-with a NULL password for every user logging in.\r
-.IP use_first_pass\r
-(auth, password) This option is similar to\r
-.B try_first_pass\r
-except that it will not prompt for the user's AFS password if the first\r
-password fails.  If this option is specified and \r
-.B pam_afs.so\r
-is the first module listed in the PAM configuration, authentication\r
-will fail.\r
-.IP use_klog\r
-(auth) This directs\r
-.B pam_afs.so\r
-to exec klog for authentication instead of calling the authentication\r
-functions in the AFS libraries directly.\r
-\r
-.SH FILES\r
-.I /etc/pam.conf\r
-.RS\r
-This is the PAM configuration file on Solaris systems.\r
-.RE\r
-\r
-.I /etc/pam.d/*\r
-.RS\r
-These are the PAM configuration files on Linux systems.\r
-.RE\r
-\r
-.I /etc/pam.d/system-auth\r
-.RS\r
-This file controls all system authentication on many\r
-Linux distributions.\r
-.RE\r
-.SH EXAMPLE\r
-\r
-Standard \r
-.I auth\r
-settings for\r
-.I /etc/pam.d/system-auth\r
-on Linux using OpenAFS:\r
-.RS\r
-auth required /lib/security/pam_env.so\r
-.br\r
-auth sufficient /lib/security/pam_afs.so.1 \\\r
-.br\r
-     setenv_password_expires ignore_root\r
-.br\r
-auth sufficient /lib/security/pam_unix.so likeauth \\\r
-.br\r
-     nullok try_first_pass\r
-.br\r
-auth required /lib/security/pam_deny.so\r
-.RE\r
-\r
-Suggested settings for\r
-.I auth\r
-in\r
-.I /etc/pam.d/xscreensaver\r
-.RS\r
-auth sufficient /lib/security/pam_afs.so.1 \\\r
-.br\r
-     refresh_token ignore_root\r
-.br\r
-auth required /lib/security/pam_stack.so \\\r
-.br\r
-     service=system-auth\r
-.RE\r
-\r
-.SH AUTHOR\r
-Charles Clancy <tcc@xauth.net>\r
-.SH "SEE ALSO"\r
-.BR klog (1),\r
-.BR klog.krb (1),\r
-.BR pagsh (1)\r
+.TH pam_afs 5 "5 August 2002"
+
+.SH NAME
+pam_afs, pam_afs.so \- pluggable authentication modules for OpenAFS
+
+.SH SYNOPSIS
+.B pam_afs.so.1, pam_afs.krb.so.1
+
+.SH DESCRIPTION
+The OpenAFS pluggable authentication module provides module support
+for authentication, session management, and password management, which
+coorespond to the auth, session, and  password directives in a PAM 
+configuration file, respectively.
+
+The
+.B pam_afs.krb.so
+module additionally keeps users' Kerberos 4 TGT available for users
+to use in other applications.  The 
+.B pam_afs.so
+module does not do this.
+
+The
+.B pam_afs.krb.so
+module has nothing to do with Kerberos 5 authentication.  Users
+with a Kerberos 5 integrated AFS environment should not use
+either of these modules, but instead use
+.B pam_krb5.so
+directly.
+
+.SH OPTIONS
+The following arguments are supported.  In parenthesis next to
+each option are the environments in which it works.
+
+.IP "cell cell_name"
+(auth) Specify a 
+.I cell_name 
+to authenticate to other than the local cell.
+.IP debug
+(all) Provide extra debugging information to syslog.
+.IP dont_fork
+(auth) Do not use a fork() when authenticating.  Forking is a good idea,
+because sockets and memory used by the authentication function get
+cleaned up automatically.  This option should only be used if a
+PAM application fails when a fork() is issued.  This option cannot 
+be used with 
+.B use_klog.
+.IP ignore_root
+(auth, password) If user root is authenticating, simply return PAM_SUCCESS without
+any AFS authentication attempt.  Presumably, authentication would fall through
+to a secondary mechanism.
+.IP "ignore_uid uid"
+(auth) Similar to ignore_root but it allows you to specify a 
+.I uid
+such that any user authenticating with uid less than or equal to
+.I uid
+will not have AFS authentication performed.
+.IP no_unlog
+(session) Does not destroy a token during logout.  This is useful if
+users have background jobs still running under their PAG that
+need access to AFS after they log out.
+.IP nowarn
+(auth, password) Prevents warning from being written to syslog.
+.IP refresh_token
+(auth) Obtains a token without first obtaining a PAG.  This is useful for
+screensavers to update the lifetime of a user's token.
+.IP remain
+(session) Causes AFS tokens to remain for 5 minutes after logout.
+.IP "remainlifetime lifetime"
+(session) Specify, in seconds, how long tokens should remain after
+logout.
+.IP set_token
+(auth) If set_token is specified, the token obtained in the authentication
+phase is not destroyed.  Ordinarily, tokens are obtained in the
+setcred() phase of authentication.  For PAM applications which do not
+call setcred(), the
+.B set_token
+directive should be used.
+.IP setenv_password_expires
+(auth) Sets the PASSWORD_EXPIRES environment variable to the time when your
+AFS token will expire.
+.IP try_first_pass
+(auth, password) This will first try a password entered to a previous module and if it
+fails, prompt for the user's AFS password.
+If
+.B pam_afs.so
+is the first module called, it will generate a failed login attempt
+with a NULL password for every user logging in.
+.IP use_first_pass
+(auth, password) This option is similar to
+.B try_first_pass
+except that it will not prompt for the user's AFS password if the first
+password fails.  If this option is specified and 
+.B pam_afs.so
+is the first module listed in the PAM configuration, authentication
+will fail.
+.IP use_klog
+(auth) This directs
+.B pam_afs.so
+to exec klog for authentication instead of calling the authentication
+functions in the AFS libraries directly.
+
+.SH FILES
+.I /etc/pam.conf
+.RS
+This is the PAM configuration file on Solaris systems.
+.RE
+
+.I /etc/pam.d/*
+.RS
+These are the PAM configuration files on Linux systems.
+.RE
+
+.I /etc/pam.d/system-auth
+.RS
+This file controls all system authentication on many
+Linux distributions.
+.RE
+.SH EXAMPLE
+
+Standard 
+.I auth
+settings for
+.I /etc/pam.d/system-auth
+on Linux using OpenAFS:
+.RS
+auth required /lib/security/pam_env.so
+.br
+auth sufficient /lib/security/pam_afs.so.1 \\
+.br
+     setenv_password_expires ignore_root
+.br
+auth sufficient /lib/security/pam_unix.so likeauth \\
+.br
+     nullok try_first_pass
+.br
+auth required /lib/security/pam_deny.so
+.RE
+
+Suggested settings for
+.I auth
+in
+.I /etc/pam.d/xscreensaver
+.RS
+auth sufficient /lib/security/pam_afs.so.1 \\
+.br
+     refresh_token ignore_root
+.br
+auth required /lib/security/pam_stack.so \\
+.br
+     service=system-auth
+.RE
+
+.SH AUTHOR
+Charles Clancy <tcc@xauth.net>
+.SH "SEE ALSO"
+.BR klog (1),
+.BR klog.krb (1),
+.BR pagsh (1)
index ecf1a4fff2b0b7e704ae04aa649940da2497f736..6fd83673505aeb3d0237f8c75480bfb7897d7058 100644 (file)
@@ -35,6 +35,7 @@ DLLLIBS =\
 
 $(DLLFILE): $(DLLOBJS) $(DLLRES) $(DLLLIBS)
        $(DLLCONLINK) /DEF:afsprocmgmt.def
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
        $(COPY) $*.lib $(ILIBDIR)
        $(DEL) $*.lib $*.exp
@@ -54,6 +55,7 @@ KILL_EXELIBS =\
 
 $(RS_KILL_EXEFILE): $(KILL_EXEOBJS)    $(KILL_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 $(CL_KILL_EXEFILE): $(RS_KILL_EXEFILE)
index f62134ae426fab91e2e0e50050eae4e84e03c752..0f99ea97ad4405744e816071b5cf3b97daa8b2cd 100644 (file)
@@ -226,7 +226,7 @@ ProcessSignal(int signo)
 static DWORD WINAPI
 RemoteSignalThread(LPVOID param)
 {
-    int signo = (int)param;
+    int signo = (int)(intptr_t)param;
     DWORD rc = 0;
 
     if (SignalIsDefined(signo)) {
@@ -277,7 +277,7 @@ RemoteSignalListenerThread(LPVOID param)
                 */
                sigThreadHandle = CreateThread(NULL,    /* default security attr. */
                                               0,       /* default stack size */
-                                              RemoteSignalThread, (LPVOID) signo,      /* thread argument */
+                                              RemoteSignalThread, (LPVOID) (intptr_t)signo,    /* thread argument */
                                               0,       /* creation flags */
                                               &sigThreadId);   /* thread id */
 
@@ -548,7 +548,7 @@ StringArrayToString(char *strArray[])
 
     for (strCount = 0; strArray[strCount] != NULL; strCount++) {
        /* sum all string lengths */
-       byteCount += strlen(strArray[strCount]);
+       byteCount += (int)strlen(strArray[strCount]);
     }
 
     /* put all strings into buffer; guarantee buffer is at least one char */
@@ -684,7 +684,7 @@ CreateChildDataBuffer(DWORD pid,    /* child pid */
                      HANDLE * bufEventHandlep)
 {                              /* buffer read event handle */
     BOOL fsuccess = FALSE;
-    DWORD bufMemSize = dataLen + sizeof(size_t);
+    DWORD bufMemSize = dataLen + (DWORD)sizeof(size_t);
     char bufMemName[sizeof(PMGT_DATA_MEM_PREFIX) + 20];
     char bufEventName[sizeof(PMGT_DATA_EVENT_PREFIX) + 20];
 
@@ -693,7 +693,7 @@ CreateChildDataBuffer(DWORD pid,    /* child pid */
 
     /* Create and initialize named shared memory and named event */
 
-    *bufMemHandlep = CreateFileMapping((HANDLE) 0xFFFFFFFF,    /* page-file backed */
+    *bufMemHandlep = CreateFileMapping(INVALID_HANDLE_VALUE,   /* page-file backed */
                                       NULL, PAGE_READWRITE, 0, bufMemSize,
                                       bufMemName);
 
@@ -803,7 +803,7 @@ ReadChildDataBuffer(void **datap,   /* allocated data buffer */
 static DWORD WINAPI
 ChildMonitorThread(LPVOID param)
 {
-    int tidx = (int)param;
+    int tidx = (int)(intptr_t)param;
     HANDLE childProcHandle;
     BOOL fsuccess;
     DWORD rc = -1;
@@ -1033,7 +1033,7 @@ pmgt_ProcessSpawnVEB(const char *spath, char *sargv[], char *senvp[],
      */
     monitorHandle = CreateThread(NULL, /* default security attr. */
                                 0,     /* default stack size */
-                                ChildMonitorThread, (LPVOID) tidx,     /* thread argument */
+                                ChildMonitorThread, (LPVOID)(intptr_t) tidx,   /* thread argument */
                                 0,     /* creation flags */
                                 &monitorId);   /* thread id */
 
index 49e8642abb9072a0fd33ec5e9833535337f115e4..c218d82a73c0fd774d704a123ab68f89a2fefd90 100644 (file)
@@ -17,6 +17,7 @@ PMGTTEST_EXELIBS =\
 
 $(OUT)\pmgttest.exe: $(OUT)\pmgttest.obj $(PMGTTEST_EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index a5ee19262c182647e1813cdb18cd45df1ab8c736..4d87ca69336d7a78c25d460d728429f68c4b31c8 100644 (file)
@@ -75,6 +75,7 @@ PTSERVER_EXELIBS =$(PTSERVER_EXELIBS) $(DESTDIR)\lib\afs\afsprocmgmt.lib
 
 $(PTSERVER): $(PTSERVER_EXEOBJS) $(RXKADOBJS) $(PTSERVER_EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 
@@ -92,7 +93,7 @@ PTS_EXEOBJS =\
 PTCLIENT_EXEOBJS =\
        $(OUT)\ptclient.obj \
         $(OUT)\display.obj \
-       $(OUT)\pts.res
+       $(OUT)\ptclient.res
 
 PTS_EXELIBS =\
        $(DESTDIR)\lib\afsubik.lib \
@@ -112,10 +113,12 @@ PTS_EXELIBS =\
 
 $(PTS): $(PTS_EXEOBJS) $(PTS_EXELIBS) 
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 $(PTCLIENT): $(PTCLIENT_EXEOBJS) $(PTS_EXELIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 
@@ -127,6 +130,8 @@ $(OUT)\ptserver.res: AFS_component_version_number.h
 
 $(OUT)\pts.res: AFS_component_version_number.h
 
+$(OUT)\ptclient.res: AFS_component_version_number.h
+
 ############################################################################
 # rxgen on pting.xg
 
@@ -185,10 +190,10 @@ $(INCFILEDIR)\afs\prclient.h: $(INCFILEDIR)\afs\ptclient.h
 # clean up
 
 clean::
-       $(DEL) ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h
+       $(DEL) ptint.cs.c ptint.ss.c ptint.xdr.c ptint.h
        $(DEL) $(OUT)\readgroup.exe $(OUT)\readpwd.exe $(OUT)\db_verify.exe $(OUT)\testpt.exe 
        $(DEL) pterror.h pterror.c
-       $(DEL) $(PTS)
+       $(DEL) $(PTS) $(PTCLIENT)
 
 ############################################################################
 # tests?
@@ -196,15 +201,19 @@ TEST_LIBS = $(PTS_EXELIBS)
 
 $(OUT)\readgroup.exe: $(OUT)\readgroup.obj $(LIBFILE) $(TEST_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\readpwd.exe: $(OUT)\readpwd.obj $(LIBFILE) $(TEST_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\testpt.exe: $(OUT)\testpt.obj $(LIBFILE) $(TEST_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib 
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\db_verify.exe: $(OUT)\db_verify.obj $(OUT)\pterror.obj $(OUT)\display.obj $(LIBFILE) $(TEST_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 510b344ef08e593cba20e4e5f935e360b3f589c6..b67aa9fd2b2425ccac235783ecabef3afc28bac5 100644 (file)
@@ -89,6 +89,7 @@ $(OUT)\rxdebug.obj: rxdebug.c
 
 $(RXDEBUG): $(RXDOBJS) $(RXDLIBS)
        $(EXECONLINK) iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 install: $(LIBFILE) $(INCFILES) $(RXDEBUG)
index 2727fd173b120ba26c6b561b54b142c05b6be6d6..de04ecbde62668e713e0b08558f7ab55ff49c0a2 100644 (file)
@@ -331,7 +331,7 @@ rx_Finalize(void)
  *
  */
 int
-rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags)
+rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 {
     int ret;
     do {
index baefb694c7cd4552288e78aa4325d28ba2926c37..b8fdec8d1b9542403cc825b05d6bfe27d4e85d59 100644 (file)
@@ -84,6 +84,7 @@ extern afs_int32 afs_termState;
 # include <stdlib.h>
 # include <fcntl.h>
 # include <afs/afsutil.h>
+# include <WINNT\afsreg.h>
 #else
 # include <sys/socket.h>
 # include <sys/file.h>
@@ -396,6 +397,9 @@ rx_InitHost(u_int host, u_int port)
        UNLOCK_RX_INIT;
        return tmp_status;      /* Already started; return previous error code. */
     }
+#ifdef RXDEBUG
+    rxi_DebugInit();
+#endif
 #ifdef AFS_NT40_ENV
     if (afs_winsockInit() < 0)
        return -1;
@@ -1834,11 +1838,11 @@ rx_EndCall(register struct rx_call *call, afs_int32 rc)
 {
     register struct rx_connection *conn = call->conn;
     register struct rx_service *service;
-    register struct rx_packet *tp;     /* Temporary packet pointer */
-    register struct rx_packet *nxp;    /* Next packet pointer, for queue_Scan */
     afs_int32 error;
     SPLVAR;
 
+
+
     dpf(("rx_EndCall(call %x)\n", call));
 
     NETPRI;
@@ -2222,7 +2226,7 @@ rxi_Alloc(register size_t size)
 
     MUTEX_ENTER(&rx_stats_mutex);
     rxi_Alloccnt++;
-    rxi_Allocsize += size;
+    rxi_Allocsize += (afs_int32)size;
     MUTEX_EXIT(&rx_stats_mutex);
 
     p = (char *)osi_Alloc(size);
@@ -2238,7 +2242,7 @@ rxi_Free(void *addr, register size_t size)
 {
     MUTEX_ENTER(&rx_stats_mutex);
     rxi_Alloccnt--;
-    rxi_Allocsize -= size;
+    rxi_Allocsize -= (afs_int32)size;
     MUTEX_EXIT(&rx_stats_mutex);
 
     osi_Free(addr, size);
@@ -3488,7 +3492,7 @@ rxi_ReceiveAckPacket(register struct rx_call *call, struct rx_packet *np,
     rx_stats.ackPacketsRead++;
     MUTEX_EXIT(&rx_stats_mutex);
     ap = (struct rx_ackPacket *)rx_DataOf(np);
-    nbytes = rx_Contiguous(np) - ((ap->acks) - (u_char *) ap);
+    nbytes = rx_Contiguous(np) - (int)((ap->acks) - (u_char *) ap);
     if (nbytes < 0)
        return np;              /* truncated ack packet */
 
@@ -3677,12 +3681,12 @@ rxi_ReceiveAckPacket(register struct rx_call *call, struct rx_packet *np,
        /* If the ack packet has a "recommended" size that is less than 
         * what I am using now, reduce my size to match */
        rx_packetread(np, rx_AckDataSize(ap->nAcks) + sizeof(afs_int32),
-                     sizeof(afs_int32), &tSize);
+                     (int)sizeof(afs_int32), &tSize);
        tSize = (afs_uint32) ntohl(tSize);
        peer->natMTU = rxi_AdjustIfMTU(MIN(tSize, peer->ifMTU));
 
        /* Get the maximum packet size to send to this peer */
-       rx_packetread(np, rx_AckDataSize(ap->nAcks), sizeof(afs_int32),
+       rx_packetread(np, rx_AckDataSize(ap->nAcks), (int)sizeof(afs_int32),
                      &tSize);
        tSize = (afs_uint32) ntohl(tSize);
        tSize = (afs_uint32) MIN(tSize, rx_MyMaxSendSize);
@@ -3703,7 +3707,7 @@ rxi_ReceiveAckPacket(register struct rx_call *call, struct rx_packet *np,
            /* AFS 3.4a */
            rx_packetread(np,
                          rx_AckDataSize(ap->nAcks) + 2 * sizeof(afs_int32),
-                         sizeof(afs_int32), &tSize);
+                         (int)sizeof(afs_int32), &tSize);
            tSize = (afs_uint32) ntohl(tSize);  /* peer's receive window, if it's */
            if (tSize < call->twind) {  /* smaller than our send */
                call->twind = tSize;    /* window, we must send less... */
@@ -4179,9 +4183,9 @@ rxi_SetAcksInTransmitQueue(register struct rx_call *call)
 void
 rxi_ClearTransmitQueue(register struct rx_call *call, register int force)
 {
+#ifdef AFS_GLOBAL_RXLOCK_KERNEL
     register struct rx_packet *p, *tp;
 
-#ifdef AFS_GLOBAL_RXLOCK_KERNEL
     if (!force && (call->flags & RX_CALL_TQ_BUSY)) {
        int someAcked = 0;
        for (queue_Scan(&call->tq, p, tp, rx_packet)) {
@@ -6022,11 +6026,33 @@ rxi_ComputeRate(register struct rx_peer *peer, register struct rx_call *call,
 #endif /* ADAPT_WINDOW */
 
 
+#ifdef RXDEBUG
+void
+rxi_DebugInit(void)
+{
+#ifdef AFS_NT40_ENV
+#define TRACE_OPTION_DEBUGLOG 4
+    HKEY parmKey;
+    DWORD dummyLen;
+    DWORD TraceOption;
+    long code;
+
+    code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
+                         0, KEY_QUERY_VALUE, &parmKey);
+    if (code != ERROR_SUCCESS)
+       return;
 
+    dummyLen = sizeof(TraceOption);
+    code = RegQueryValueEx(parmKey, "TraceOption", NULL, NULL,
+                          (BYTE *) &TraceOption, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+       rxdebug_active = (TraceOption & TRACE_OPTION_DEBUGLOG) ? 1 : 0;
+    }
+    RegCloseKey (parmKey);
+#endif /* AFS_NT40_ENV */
+}
 
 
-
-#ifdef RXDEBUG
 /* Don't call this debugging routine directly; use dpf */
 void
 rxi_DebugPrint(char *format, int a1, int a2, int a3, int a4, int a5, int a6,
@@ -6197,7 +6223,7 @@ MakeDebugCall(osi_socket socket, afs_uint32 remoteAddr, afs_uint16 remotePort,
              void *outputData, size_t outputLength)
 {
     static afs_int32 counter = 100;
-    afs_int32 endTime;
+    time_t endTime;
     struct rx_header theader;
     char tbuffer[1500];
     register afs_int32 code;
@@ -6240,7 +6266,7 @@ MakeDebugCall(osi_socket socket, afs_uint32 remoteAddr, afs_uint16 remotePort,
        FD_SET(socket, &imask);
        tv.tv_sec = 1;
        tv.tv_usec = 0;
-       code = select(socket + 1, &imask, 0, 0, &tv);
+       code = select((int)(socket + 1), &imask, 0, 0, &tv);
        if (code == 1 && FD_ISSET(socket, &imask)) {
            /* now receive a packet */
            faddrLen = sizeof(struct sockaddr_in);
index 402c378820c113730fc03772fe8a7e3b29a274c9..d209a2d53efe6aab0710beddfb0f3fb03dd6855b 100644 (file)
@@ -202,10 +202,10 @@ _rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1,
     if (rx_Log_event) {
        struct clock now;
        clock_GetTime(&now);
-       fprintf(rx_Log_event, "%d.%d: rxevent_Post(%d.%d, %lx, %lx, %lx, %d)\n",
+       fprintf(rx_Log_event, "%d.%d: rxevent_Post(%d.%d, %lp, %lp, %lp, %d)\n",
                (int)now.sec, (int)now.usec, (int)when->sec, (int)when->usec,
-               (unsigned long)func, (unsigned long)arg,
-               (unsigned long)arg1, arg2);
+               func, arg,
+               arg1, arg2);
     }
 #endif
 
@@ -327,10 +327,10 @@ rxevent_Cancel_1(register struct rxevent *ev, register struct rx_call *call,
     if (rx_Log_event) {
        struct clock now;
        clock_GetTime(&now);
-       fprintf(rx_Log_event, "%d.%d: rxevent_Cancel_1(%d.%d, %lx, %lx)\n",
+       fprintf(rx_Log_event, "%d.%d: rxevent_Cancel_1(%d.%d, %lp, %lp)\n",
                (int)now.sec, (int)now.usec, (int)ev->eventTime.sec,
-               (int)ev->eventTime.usec, (unsigned long)ev->func,
-               (unsigned long)ev->arg);
+               (int)ev->eventTime.usec, ev->func,
+               ev->arg);
     }
 #endif
     /* Append it to the free list (rather than prepending) to keep the free
index 90fd15e7323ed956fe1c2232fb096c2f34fbbdf3..b49614275e22bde7da8ab67158314a190a17ddb2 100644 (file)
@@ -425,9 +425,9 @@ EXT u_short rx_port;
 #if !defined(KERNEL) && !defined(AFS_PTHREAD_ENV)
 /* 32-bit select Mask for rx_Listener. */
 EXT fd_set rx_selectMask;
-EXT int rx_maxSocketNumber;    /* Maximum socket number in the select mask. */
+EXT osi_socket rx_maxSocketNumber;     /* Maximum socket number in the select mask. */
 /* Minumum socket number in the select mask. */
-EXT int rx_minSocketNumber INIT(0x7fffffff);
+EXT osi_socket rx_minSocketNumber INIT(0x7fffffff);
 #endif
 
 /* This is actually the minimum number of packets that must remain free,
@@ -508,7 +508,12 @@ EXT FILE *rxevent_debugFile;       /* Set to an stdio descriptor for event logging to
 
 #define rx_Log rx_debugFile
 #ifdef AFS_NT40_ENV
-#define dpf(args) rxi_DebugPrint args; 
+EXT int rxdebug_active;
+#if !defined(_WIN64)
+#define dpf(args) if (rxdebug_active) rxi_DebugPrint args;
+#else
+#define dpf(args)
+#endif
 #else
 #define dpf(args) if (rx_debugFile) rxi_DebugPrint args; else
 #endif
index 9748b7d6e4279afdae1f66906d8815e4e89232d7..f9779fdd9b361d345c6ea18efd2836e23c3c909f 100644 (file)
@@ -166,7 +166,7 @@ rxi_ListenerProc(fd_set * rfds, int *tnop, struct rx_call **newcallp)
     afs_uint32 host;
     u_short port;
     register struct rx_packet *p = (struct rx_packet *)0;
-    int socket;
+    osi_socket socket;
     struct clock cv;
     afs_int32 nextPollTime;    /* time to next poll FD before sleeping */
     int lastPollWorked, doingPoll;     /* true iff last poll was useful */
@@ -224,10 +224,10 @@ rxi_ListenerProc(fd_set * rfds, int *tnop, struct rx_call **newcallp)
            nextPollTime = clock_Sec() + 4;     /* try again in 4 seconds no matter what */
            tv.tv_sec = tv.tv_usec = 0; /* make sure we poll */
            tvp = &tv;
-           code = select(rx_maxSocketNumber + 1, rfds, 0, 0, tvp);
+           code = select((int)(rx_maxSocketNumber + 1), rfds, 0, 0, tvp);
        } else {
            doingPoll = 0;
-           code = IOMGR_Select(rx_maxSocketNumber + 1, rfds, 0, 0, tvp);
+           code = IOMGR_Select((int)(rx_maxSocketNumber + 1), rfds, 0, 0, tvp);
        }
        lastPollWorked = 0;     /* default is that it didn't find anything */
 
@@ -324,7 +324,7 @@ static int
 rx_ListenerProc(void *dummy)
 {
     int threadID;
-    int sock;
+    osi_socket sock;
     struct rx_call *newcall;
     fd_set *rfds;
 
@@ -351,7 +351,7 @@ rx_ListenerProc(void *dummy)
 void
 rx_ServerProc(void)
 {
-    int sock;
+    osi_socket sock;
     int threadID;
     struct rx_call *newcall = NULL;
     fd_set *rfds;
@@ -424,9 +424,9 @@ rxi_Listen(osi_socket sock)
  * Recvmsg
  */
 int
-rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags)
+rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 {
-    return recvmsg((int)socket, msg_p, flags);
+    return recvmsg(socket, msg_p, flags);
 }
 
 /*
index 33eed2402fff9c3622df7f3921e3d461dd56e4d9..bb33f4eed8feb82b2dc30628befc56ddb1ca1eb9 100644 (file)
@@ -71,6 +71,7 @@ RCSID
 #include <sys/socket.h>
 #include <netinet/in.h>
 #endif /* AFS_NT40_ENV */
+#include "rx_user.h"
 #include "rx_xmit_nt.h"
 #include <stdlib.h>
 #else
@@ -1294,7 +1295,7 @@ CountFDs(register int amax)
  * the data length of the packet is stored in the packet structure.
  * The header is decoded. */
 int
-rxi_ReadPacket(int socket, register struct rx_packet *p, afs_uint32 * host,
+rxi_ReadPacket(osi_socket socket, register struct rx_packet *p, afs_uint32 * host,
               u_short * port)
 {
     struct sockaddr_in from;
index 7b377af9e8c585b531852227b141c87db158c678..6fcbcd892f863bdef0002f01d86eced90761952d 100644 (file)
@@ -238,10 +238,13 @@ extern int rx_RxStatUserOk(struct rx_call *call);
 /* old style till varargs */
 #if 0
 void
-  rxi_DebugPrint(char *format, int a1, int a2, int a3, int a4, int a5, int a6,
-                int a7, int a8, int a9, int a10, int a11, int a12, int a13,
-                int a14, int a15);
+rxi_DebugPrint(char *format, int a1, int a2, int a3, int a4, int a5, int a6,
+               int a7, int a8, int a9, int a10, int a11, int a12, int a13,
+              int a14, int a15);
+void
+rxi_DebugInit(void);
 #else
+void rxi_DebugInit();
 void rxi_DebugPrint();
 #endif
 
@@ -407,7 +410,7 @@ extern void rxi_StartServerProc(void (*proc) (void), int stacksize);
 extern void rxi_StartListener(void);
 extern void rx_ServerProc(void);
 extern int rxi_Listen(osi_socket sock);
-extern int rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags);
+extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);
 extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
 
 
@@ -462,7 +465,7 @@ extern int rxi_AllocPackets(int cla_ss, int num_pkts, struct rx_queue *q);
 extern int rxi_FreePackets(int num_pkts, struct rx_queue *q);
 extern struct rx_packet *rxi_AllocSendPacket(register struct rx_call *call,
                                             int want);
-extern int rxi_ReadPacket(int socket, register struct rx_packet *p,
+extern int rxi_ReadPacket(osi_socket socket, register struct rx_packet *p,
                          afs_uint32 * host, u_short * port);
 extern struct rx_packet *rxi_SplitJumboPacket(register struct rx_packet *p,
                                              afs_int32 host, short port,
@@ -512,7 +515,7 @@ extern void rxi_ReScheduleEvents(void);
 extern void rx_ServerProc(void);
 extern void rxi_StartListener(void);
 extern int rxi_Listen(osi_socket sock);
-extern int rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags);
+extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);
 extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
 
 
index d67a691978f9a076c5cca7149ef56f198789ede1..c663608f8cea6095d4d449d56848bb32d22d883d 100644 (file)
@@ -392,7 +392,7 @@ rxi_Listen(osi_socket sock)
  *
  */
 int
-rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags)
+rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 {
     int ret;
     ret = recvmsg(socket, msg_p, flags);
index 5e29eeb4b250435bfe2237a5ec4997431eabd96d..49319acd7bf4d1ed2a96cf9b796d73ee08987108 100644 (file)
@@ -68,14 +68,16 @@ RCSID
 #endif /* AFS_OSF_ENV */
 #else /* KERNEL */
 # include <sys/types.h>
-#ifndef AFS_NT40_ENV
+#ifdef AFS_NT40_ENV
+# include <winsock2.h>
+#else /* !AFS_NT40_ENV */
 # include <sys/socket.h>
 # include <sys/file.h>
 # include <netdb.h>
 # include <netinet/in.h>
 # include <sys/stat.h>
 # include <sys/time.h>
-#endif
+#endif /* !AFS_NT40_ENV */
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
@@ -369,14 +371,14 @@ rx_ReadProc32(struct rx_call *call, afs_int32 * value)
     if (!call->error && tcurlen > sizeof(afs_int32)
        && tnLeft > sizeof(afs_int32)) {
        tcurpos = call->curpos;
-       if (!((long)tcurpos & (sizeof(afs_int32) - 1))) {
+       if (!((size_t)tcurpos & (sizeof(afs_int32) - 1))) {
            *value = *((afs_int32 *) (tcurpos));
        } else {
            memcpy((char *)value, tcurpos, sizeof(afs_int32));
        }
        call->curpos = tcurpos + sizeof(afs_int32);
-       call->curlen = tcurlen - sizeof(afs_int32);
-       call->nLeft = tnLeft - sizeof(afs_int32);
+       call->curlen = tcurlen - (u_short)sizeof(afs_int32);
+       call->nLeft = tnLeft - (u_short)sizeof(afs_int32);
        return sizeof(afs_int32);
     }
 
@@ -876,14 +878,14 @@ rx_WriteProc32(register struct rx_call *call, register afs_int32 * value)
     if (!call->error && tcurlen >= sizeof(afs_int32)
        && tnFree >= sizeof(afs_int32)) {
        tcurpos = call->curpos;
-       if (!((long)tcurpos & (sizeof(afs_int32) - 1))) {
+       if (!((size_t)tcurpos & (sizeof(afs_int32) - 1))) {
            *((afs_int32 *) (tcurpos)) = *value;
        } else {
            memcpy(tcurpos, (char *)value, sizeof(afs_int32));
        }
        call->curpos = tcurpos + sizeof(afs_int32);
-       call->curlen = tcurlen - sizeof(afs_int32);
-       call->nFree = tnFree - sizeof(afs_int32);
+       call->curlen = tcurlen - (u_short)sizeof(afs_int32);
+       call->nFree = tnFree - (u_short)sizeof(afs_int32);
        return sizeof(afs_int32);
     }
 
index 9fc0be920ec3dac061cbfcf8fe17e9218a0f185b..7b1134b036663560417cedab45bf0a9a2a35a28a 100644 (file)
@@ -229,8 +229,8 @@ osi_Panic(char *msg, int a1, int a2, int a3)
 void
 osi_AssertFailU(const char *expr, const char *file, int line)
 {
-    osi_Panic("assertion failed: %s, file: %s, line: %d\n", (int)expr,
-             (int)file, line);
+    osi_Panic("assertion failed: %s, file: %s, line: %d\n", expr,
+             file, line);
 }
 
 #if defined(AFS_AIX32_ENV) && !defined(KERNEL)
index 35bec90c4c31c28dcc9e48491c89ffbf71777d76..1aebdf0cd140893aea0c184bdde444b025c98c44 100644 (file)
@@ -33,8 +33,13 @@ error - foo error - foo error - foo
 typedef void *osi_socket;
 #define        OSI_NULLSOCKET  ((osi_socket) 0)
 #else /* UAFS_CLIENT */
+#ifdef AFS_NT40_ENV
+typedef SOCKET osi_socket;
+#define OSI_NULLSOCKET INVALID_SOCKET
+#else /* !AFS_NT40_ENV */
 typedef afs_int32 osi_socket;
 #define        OSI_NULLSOCKET  ((osi_socket) -1)
+#endif /* !AFS_NT40_ENV */
 #endif /* UAFS_CLIENT */
 
 #define        osi_rxSleep(x)              rxi_Sleep(x)
index 4e8d7ef9a7990409b321cdbbbfbc45be077a9e7e..336ea5b5033f996968c1b72afd3702984fb6f606 100644 (file)
@@ -45,7 +45,7 @@ typedef int SOCKET;
 #include <errno.h>
 
 int
-recvmsg(int socket, struct msghdr *msgP, int flags)
+recvmsg(osi_socket socket, struct msghdr *msgP, int flags)
 {
     char rbuf[RX_MAX_PACKET_SIZE];
     int size;
@@ -93,7 +93,7 @@ recvmsg(int socket, struct msghdr *msgP, int flags)
 }
 
 int
-sendmsg(int socket, struct msghdr *msgP, int flags)
+sendmsg(osi_socket socket, struct msghdr *msgP, int flags)
 {
     char buf[RX_MAX_PACKET_SIZE];
     char *sbuf = buf;
index 35fa8e381c0e19da7106e4e7f78bce88ebd9afc6..7f6e1daa4a732d9430867da8518aa3863b1ec51f 100644 (file)
@@ -29,10 +29,8 @@ struct msghdr {
     int msg_accrightslen;
 };
 
-extern int rxi_sendmsg(int socket, struct msghdr *msgP, int flags);
+extern int rxi_sendmsg(osi_socket socket, struct msghdr *msgP, int flags);
 #define sendmsg rxi_sendmsg
-extern int rxi_recvmsg(int socket, struct msghdr *msgP, int flags);
+extern int rxi_recvmsg(osi_socket socket, struct msghdr *msgP, int flags);
 #define recvmsg rxi_recvmsg
-
-
 #endif /* _RX_XMIT_NT_H_ */
index 30dbaef1d995df3cf71d18d37dd87a6418bd0f98..b9e6e7de3bf96e26a641c49558bf5f072fe2f9a9 100644 (file)
@@ -87,7 +87,7 @@ MainCommand(as, arock)
      struct cmd_syndesc *as;
 {
     register int i;
-    int s;
+    osi_socket s;
     int j;
     struct sockaddr_in taddr;
     afs_int32 host;
@@ -579,6 +579,9 @@ main(argc, argv)
 {
     struct cmd_syndesc *ts;
 
+#ifdef RXDEBUG
+    rxi_DebugInit();
+#endif
 #ifdef AFS_NT40_ENV
     if (afs_winsockInit() < 0) {
        printf("%s: Couldn't initialize winsock. Exiting...\n", argv[0]);
index 9e255640c165163c7d028afc23958607d15c4eaf..27ea3ba443f4eeea8ec8ac65dad26d147b3e2f93 100644 (file)
@@ -24,15 +24,19 @@ tests: $(OUT)\testclient.exe $(OUT)\testserver.exe $(OUT)\tableGen.exe $(OUT)\ge
 
 $(OUT)\testclient.exe: $(OUT)\testclient.obj $(LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\testserver.exe: $(OUT)\testserver.obj $(LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\tableGen.exe: $(OUT)\tableGen.obj $(LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUT)\generator.exe: $(OUT)\generator.obj $(LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 $(RXTESTOBJS): ..\rx_clock.h ..\rx_queue.h ..\rx_event.h ..\rx.h
 
index b13983b124a8d69398f006c827a97dcb2c476f25..f9b7ac2c763cd7ba4a64dcdb37ba387136ebd6cf 100644 (file)
@@ -329,5 +329,4 @@ struct xdr_discrim {
 #define IXDR_PUT_U_SHORT(buf, v)       IXDR_PUT_INT32((buf), ((afs_int32)(v)))
 
 #include "xdr_prototypes.h"
-
 #endif /* __XDR_INCLUDE__ */
index b1d67158dc8425f08dac068436b66a4120b59c74..e43ef0c17cb6e4033b5465c85cf9e592398bdce0 100644 (file)
@@ -110,7 +110,7 @@ xdr_array(register XDR * xdrs, caddr_t * addrp, u_int * sizep, u_int maxsize,
        case XDR_DECODE:
            if (c == 0)
                return (TRUE);
-           *addrp = target = osi_alloc(nodesize);
+           *addrp = target = (caddr_t)osi_alloc(nodesize);
            if (target == NULL) {
                return (FALSE);
            }
index 0430f1dc76cc5e5879acffa7959f204904cdfbe0..14c8a631a7c1592f402da5307c1162a5cc20cbe6 100644 (file)
@@ -141,7 +141,7 @@ xdrmem_putbytes(register XDR * xdrs, caddr_t addr, register u_int len)
 static u_int
 xdrmem_getpos(register XDR * xdrs)
 {
-    return ((u_int) xdrs->x_private - (u_int) xdrs->x_base);
+    return ((u_int)(xdrs->x_private - xdrs->x_base));
 }
 
 static bool_t
@@ -150,10 +150,10 @@ xdrmem_setpos(register XDR * xdrs, u_int pos)
     register caddr_t newaddr = xdrs->x_base + pos;
     register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
 
-    if ((afs_int32) newaddr > (afs_int32) lastaddr)
+    if (newaddr > lastaddr)
        return (FALSE);
     xdrs->x_private = newaddr;
-    xdrs->x_handy = (int)lastaddr - (int)newaddr;
+    xdrs->x_handy = (int)(lastaddr - newaddr);
     return (TRUE);
 }
 
index 5c1898ee3727a0ad18fd7df2fea3b8f371130dbc..d8321006b37fc6c2354168244a95bccce48b123d 100644 (file)
@@ -95,5 +95,12 @@ extern bool_t xdr_vector(register XDR * xdrs, register char *basep,
                         register xdrproc_t xdr_elem);
 
 
+#endif
+
+#ifndef osi_alloc
+extern char *osi_alloc(afs_int32 x);
+#endif
+#ifndef osi_free
+extern int osi_free(char *x, afs_int32 size);
 #endif
 #endif /* _XDR_PROTOTYPES_H */
index 0abbec61bc3fd3c5e7ba7354d52ebbe362474272..0a84facd3221946cbef0e61763298af6d30d9ca2 100644 (file)
@@ -201,7 +201,7 @@ xdrrec_getint32(XDR * xdrs, afs_int32 * lp)
 
     /* first try the inline, fast case */
     if ((rstrm->fbtbc >= sizeof(afs_int32))
-       && (((int)rstrm->in_boundry - (int)buflp) >= sizeof(afs_int32))) {
+       && (((int)((char *)rstrm->in_boundry - (char *)buflp)) >= sizeof(afs_int32))) {
        *lp = ntohl(*buflp);
        rstrm->fbtbc -= sizeof(afs_int32);
        rstrm->in_finger += sizeof(afs_int32);
@@ -267,7 +267,7 @@ xdrrec_putbytes(XDR * xdrs, register caddr_t addr, register u_int len)
     register int current;
 
     while (len > 0) {
-       current = (u_int) rstrm->out_boundry - (u_int) rstrm->out_finger;
+       current = (u_int) (rstrm->out_boundry - rstrm->out_finger);
        current = (len < current) ? len : current;
        memcpy(rstrm->out_finger, addr, current);
        rstrm->out_finger += current;
@@ -293,11 +293,11 @@ xdrrec_getpos(register XDR * xdrs)
        switch (xdrs->x_op) {
 
        case XDR_ENCODE:
-           pos += rstrm->out_finger - rstrm->out_base;
+           pos += (u_int)(rstrm->out_finger - rstrm->out_base);
            break;
 
        case XDR_DECODE:
-           pos -= rstrm->in_boundry - rstrm->in_finger;
+           pos -= (u_int)(rstrm->in_boundry - rstrm->in_finger);
            break;
 
        default:
@@ -437,13 +437,13 @@ xdrrec_endofrecord(XDR * xdrs, bool_t sendnow)
     register afs_uint32 len;   /* fragment length */
 
     if (sendnow || rstrm->frag_sent
-       || ((afs_uint32) rstrm->out_finger + sizeof(afs_uint32) >=
+       || ((afs_uint32) (rstrm->out_finger + sizeof(afs_uint32)) >=
            (afs_uint32) rstrm->out_boundry)) {
        rstrm->frag_sent = FALSE;
        return (flush_out(rstrm, TRUE));
     }
     len =
-       (afs_uint32) (rstrm->out_finger) - (afs_uint32) (rstrm->frag_header) -
+       (afs_uint32) (rstrm->out_finger - (caddr_t)rstrm->frag_header) -
        sizeof(afs_uint32);
     *(rstrm->frag_header) = htonl(len | LAST_FRAG);
     rstrm->frag_header = (afs_uint32 *) rstrm->out_finger;
@@ -460,7 +460,7 @@ flush_out(register RECSTREAM * rstrm, bool_t eor)
 {
     register afs_uint32 eormask = (eor == TRUE) ? LAST_FRAG : 0;
     register afs_uint32 len =
-       (afs_uint32) (rstrm->out_finger) - (afs_uint32) (rstrm->frag_header) -
+       (afs_uint32) (rstrm->out_finger - (caddr_t)rstrm->frag_header) -
        sizeof(afs_uint32);
 
     *(rstrm->frag_header) = htonl(len | eormask);
@@ -478,7 +478,7 @@ fill_input_buf(register RECSTREAM * rstrm)
 {
     register caddr_t where = rstrm->in_base;
     register int len = rstrm->in_size;
-    u_int adjust = (u_int) rstrm->in_boundry % BYTES_PER_XDR_UNIT;
+    u_int adjust = (u_int) ((size_t)rstrm->in_boundry % BYTES_PER_XDR_UNIT);
 
     /* Bump the current position out to the next alignment boundary */
     where += adjust;
@@ -499,7 +499,7 @@ get_input_bytes(register RECSTREAM * rstrm, register caddr_t addr,
     register int current;
 
     while (len > 0) {
-       current = (int)rstrm->in_boundry - (int)rstrm->in_finger;
+       current = (int)(rstrm->in_boundry - rstrm->in_finger);
        if (current == 0) {
            if (!fill_input_buf(rstrm))
                return (FALSE);
@@ -535,7 +535,7 @@ skip_input_bytes(register RECSTREAM * rstrm, int cnt)
     register int current;
 
     while (cnt > 0) {
-       current = (int)rstrm->in_boundry - (int)rstrm->in_finger;
+       current = (int)(rstrm->in_boundry - rstrm->in_finger);
        if (current == 0) {
            if (!fill_input_buf(rstrm))
                return (FALSE);
index 8f0f668031193698442132c5f70442e12744c12d..363ffa4cc3f31520ac7ed231656d1750f71322e2 100644 (file)
@@ -32,6 +32,7 @@ $(EXEOBJS): $$(@B).c
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 
index 3edf9f454d8e7320f6a76ba5ecc3abb52e7f42d4..c9084971fe33618b7d7acce7b7ac6284fd7b6724 100644 (file)
@@ -192,7 +192,7 @@ define_printed(proc_list * stop, version_list * start)
        }
     }
     abort();
-    /* NOTREACHED */
+    return 0;/* NOTREACHED */
 }
 
 
index d7bbcc02fe7b0deaa54ceaa296e2f369aeb3cf30..8a2731d7c4903cf07accd8397cd316a113199a2f 100644 (file)
@@ -764,7 +764,7 @@ uppercase(char *str)
 {
     static char max_size[100];
     char *pnt;
-    int len = strlen(str);
+    int len = (int)strlen(str);
 
     for (pnt = max_size; len > 0; len--, str++) {
        *pnt++ = (islower(*str) ? toupper(*str) : *str);
index 74b81cc53eb537e4cf42ce09804b4976025123f2..043f092483e271709058dbd8c6240c87717a0806 100644 (file)
@@ -851,7 +851,7 @@ InvalidConstant(char *name)
     int slen;
 
     map = LEGALNUMS;
-    slen = strlen(name);
+    slen = (int)strlen(name);
     return (slen != strspn(name, map));
 }
 
index 1137068109526fcc187fc960f198519945e8e35d..2fd4f17d695dbd215310ba9df6518280c6085e9e 100644 (file)
@@ -359,7 +359,7 @@ findstrconst(char **str, char **val)
        error("unterminated string constant");
     }
     p++;
-    size = p - *str;
+    size = (int)(p - *str);
     *val = alloc(size + 1);
     (void)strncpy(*val, *str, size);
     (*val)[size] = 0;
@@ -383,7 +383,7 @@ findconst(char **str, char **val)
            p++;
        } while (isdigit(*p));
     }
-    size = p - *str;
+    size = (int)(p - *str);
     *val = alloc(size + 1);
     (void)strncpy(*val, *str, size);
     (*val)[size] = 0;
@@ -442,7 +442,7 @@ findkind(char **mark, token * tokp)
 
     str = *mark;
     for (s = symbols; s->kind != TOK_EOF; s++) {
-       len = strlen(s->str);
+       len = (int)strlen(s->str);
        if (strncmp(str, s->str, len) == 0) {
            if (!isalnum(str[len]) && str[len] != '_') {
                tokp->kind = s->kind;
index 20fb014390f592c9700e9971a487bbd94c0d9dde..dd571d7ac4b75dd930b5ac695842464fb6b62a13 100644 (file)
@@ -94,7 +94,7 @@ init_random_int32(void)
 
     gettimeofday(&key, NULL);
     LOCK_RM;
-    fc_keysched(&key, random_int32_schedule);
+    fc_keysched((struct ktc_encryptionKey*)&key, random_int32_schedule);
     UNLOCK_RM;
 }
 
index c5a965e22ddcb74a58e14b6452541f494e5c04af..4a94a2d533b08e9bec524417998260e7a310c437 100644 (file)
@@ -35,6 +35,7 @@ EXELIBS =\
 
 $(EXEFILE): $(EXEOBJS) 
        $(EXECONLINK) $(EXELIBS) 
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
index d224c22f1041e9a19649ddfae240e311c5dc3beb..3fae724fdc83c83331be6677bffd12f895c160bc 100644 (file)
@@ -52,7 +52,7 @@ MRXSTATS_RetrieveProcessRPCStats(struct rx_call *call,
     rc = rx_RetrieveProcessRPCStats(clientVersion, serverVersion, clock_sec,
                                    clock_usec, &allocSize, stat_count,
                                    &stats->rpcStats_val);
-    stats->rpcStats_len = allocSize / sizeof(afs_uint32);
+    stats->rpcStats_len = (u_int)(allocSize / sizeof(afs_uint32));
     return rc;
 }
 
@@ -72,7 +72,7 @@ MRXSTATS_RetrievePeerRPCStats(struct rx_call * call,
     rc = rx_RetrievePeerRPCStats(clientVersion, serverVersion, clock_sec,
                                 clock_usec, &allocSize, stat_count,
                                 &stats->rpcStats_val);
-    stats->rpcStats_len = allocSize / sizeof(afs_uint32);
+    stats->rpcStats_len = (u_int)(allocSize / sizeof(afs_uint32));
     return rc;
 }
 
index 3f916fab3663e925386f98bb80b275c9b820be5b..c4f179e06cf28b6577e6837673d8f765348402e2 100644 (file)
@@ -221,6 +221,7 @@ DLLLIBS =\
 
 $(LIBFILE): $(DLLOBJS) $(DLLLIBS)
        $(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib
+        $(_VC_MANIFEST_EMBED_DLL)
        $(DLLPREP)
 
 # Definitions for generating versioninfo resources
index c4eb7fa6d95b0d09cb99eadacbc9f83dcea36890..f379449d191d56ecb27a11b3932da8e352c4a02d 100644 (file)
@@ -309,7 +309,7 @@ GetLSAPrincipalName(char * szUser, DWORD *dwSize)
         szUser[*dwSize-1] = '\0';
         success = 1;
     }
-    *dwSize = strlen(pname);
+    *dwSize = (DWORD)strlen(pname);
 
   cleanup:
     if (pname)
@@ -637,9 +637,8 @@ Transceive(HANDLE handle, fs_ioctlRequest_t * reqp)
     long rcount;
     long ioCount;
     DWORD gle;
-       char *data;
 
-    rcount = reqp->mp - reqp->data;
+    rcount = (long)(reqp->mp - reqp->data);
     if (rcount <= 0) {
         if ( IoctlDebug() )
             fprintf(stderr, "pioctl Transceive rcount <= 0: %d\r\n",rcount);
@@ -715,7 +714,7 @@ MarshallString(fs_ioctlRequest_t * reqp, char *stringp)
     int count;
 
     if (stringp)
-       count = strlen(stringp) + 1;    /* space required including null */
+       count = (int)strlen(stringp) + 1;/* space required including null */
     else
        count = 1;
 
@@ -748,9 +747,11 @@ fs_GetFullPath(char *pathp, char *outPathp, long outSize)
     int pathHasDrive;
     int doSwitch;
     char newPath[3];
+#ifdef AFSIFS
     HANDLE rootDir;
     wchar_t *wpath;
     unsigned long length;
+#endif
     char * p;
 
 #ifdef AFSIFS
@@ -862,7 +863,7 @@ fs_GetFullPath(char *pathp, char *outPathp, long outSize)
 
     /* if there is a non-null name after the drive, append it */
     if (*firstp != 0) {
-        int len = strlen(outPathp);
+        int len = (int)strlen(outPathp);
         if (outPathp[len-1] != '\\' && outPathp[len-1] != '/') 
             strcat(outPathp, "\\");
         strcat(outPathp, firstp);
index 95555ba8bd8a33e80f52e94c7171f1d9c2285985..41c1388d08e1200db9440ca1871c2cae51eda033 100644 (file)
@@ -112,6 +112,7 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
 
 $(BUTCEXE): $(BUTCOBJS) $(BUTCLIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 .c.$(OUT)\obj:
index 6f2d1e9529ec95f3324e7e52b0719e469e1f4cfd..e9e2c270e9e438daf71ae05a7199a1860bff717c 100644 (file)
@@ -99,6 +99,7 @@ EXELIBS = \
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 install:  $(EXEFILE)
index 31590bf0f1423e3289a630a6619bb462d603d72c..14d916ac57fd8e6b8bf184aa828678377cca244c 100644 (file)
@@ -69,6 +69,7 @@ UDBG_EXELIBS =\
 
 $(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXELIBS)  
        $(EXECONLINK) iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)  
 
 $(CL_UDBG_EXEFILE): $(RS_UDBG_EXEFILE)
@@ -116,9 +117,11 @@ test tests: utst_server utst_client $(EXEFILE)
 
 utst_server: $(OUT)\utst_server.obj $(OUT)\utst_int.ss.obj $(OUT)\utst_int.xdr.obj  $(EXELIBS)
        $(EXECONLINK) 
+        $(_VC_MANIFEST_EMBED_EXE)
        
 utst_client: $(OUT)\utst_client.obj $(OUT)\utst_int.cs.obj $(OUT)\utst_int.xdr.obj $(EXELIBS)
        $(EXECONLINK) 
+        $(_VC_MANIFEST_EMBED_EXE)
        
 # rxgen on utst_int.xg
 utst_int.ss.c utst_int.cs.c utst_int.xdr.c utst_int.h: utst_int.xg
index 89b8303892176b62f896ed94b27f584d34528521..ee8a149289c85539716728eda0fcc9a17a7bb7d5 100644 (file)
@@ -134,7 +134,7 @@ udisk_LogOpcode(struct ubik_dbase *adbase, afs_int32 aopcode, int async)
     /* setup data and do write */
     aopcode = htonl(aopcode);
     code =
-       (*adbase->write) (adbase, LOGFILE, &aopcode, ustat.size,
+       (*adbase->write) (adbase, LOGFILE, (char *)&aopcode, ustat.size,
                          sizeof(afs_int32));
     if (code != sizeof(afs_int32))
        return UIOERROR;
@@ -167,7 +167,7 @@ udisk_LogEnd(struct ubik_dbase *adbase, struct ubik_version *aversion)
 
     /* do write */
     code =
-       (*adbase->write) (adbase, LOGFILE, data, ustat.size,
+       (*adbase->write) (adbase, LOGFILE, (char *)data, ustat.size,
                          3 * sizeof(afs_int32));
     if (code != 3 * sizeof(afs_int32))
        return UIOERROR;
@@ -198,7 +198,7 @@ udisk_LogTruncate(struct ubik_dbase *adbase, afs_int32 afile,
 
     /* do write */
     code =
-       (*adbase->write) (adbase, LOGFILE, data, ustat.size,
+       (*adbase->write) (adbase, LOGFILE, (char *)data, ustat.size,
                          3 * sizeof(afs_int32));
     if (code != 3 * sizeof(afs_int32))
        return UIOERROR;
@@ -229,7 +229,7 @@ udisk_LogWriteData(struct ubik_dbase *adbase, afs_int32 afile, char *abuffer,
 
     /* write header */
     code =
-       (*adbase->write) (adbase, LOGFILE, data, lpos, 4 * sizeof(afs_int32));
+       (*adbase->write) (adbase, LOGFILE, (char *)data, lpos, 4 * sizeof(afs_int32));
     if (code != 4 * sizeof(afs_int32))
        return UIOERROR;
     lpos += 4 * sizeof(afs_int32);
@@ -518,7 +518,7 @@ DRelease(char *ap, int flag)
 
     if (!ap)
        return;
-    index = (ap - (char *)BufferData) >> UBIK_LOGPAGESIZE;
+    index = (int)(ap - (char *)BufferData) >> UBIK_LOGPAGESIZE;
     bp = &(Buffers[index]);
     bp->lockers--;
     if (flag)
index 342b60da089498af3ff1eb03acc9ecd51032974d..7c86de91e45da4ab49e30ab9f4954ec3aafe3d8d 100644 (file)
@@ -210,7 +210,7 @@ ReplayLog(register struct ubik_dbase *adbase)
     /* for now, assume that all ops in log pertain to one transaction; see if there's a commit */
     while (1) {
        code =
-           (*adbase->read) (adbase, LOGFILE, &opcode, tpos,
+           (*adbase->read) (adbase, LOGFILE, (char *)&opcode, tpos,
                             sizeof(afs_int32));
        if (code != sizeof(afs_int32))
            break;
@@ -225,7 +225,7 @@ ReplayLog(register struct ubik_dbase *adbase)
        } else if (opcode == LOGTRUNCATE) {
            tpos += 4;
            code =
-               (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+               (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
                                 2 * sizeof(afs_int32));
            if (code != 2 * sizeof(afs_int32))
                break;          /* premature eof or io error */
@@ -233,7 +233,7 @@ ReplayLog(register struct ubik_dbase *adbase)
        } else if (opcode == LOGDATA) {
            tpos += 4;
            code =
-               (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+               (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
                                 3 * sizeof(afs_int32));
            if (code != 3 * sizeof(afs_int32))
                break;
@@ -253,7 +253,7 @@ ReplayLog(register struct ubik_dbase *adbase)
        syncFile = -1;
        while (1) {
            code =
-               (*adbase->read) (adbase, LOGFILE, &opcode, tpos,
+               (*adbase->read) (adbase, LOGFILE, (char *)&opcode, tpos,
                                 sizeof(afs_int32));
            if (code != sizeof(afs_int32))
                break;
@@ -265,11 +265,11 @@ ReplayLog(register struct ubik_dbase *adbase)
            else if (opcode == LOGEND) {
                tpos += 4;
                code =
-                   (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+                   (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
                                     2 * sizeof(afs_int32));
                if (code != 2 * sizeof(afs_int32))
                    return UBADLOG;
-               code = (*adbase->setlabel) (adbase, 0, buffer);
+               code = (*adbase->setlabel) (adbase, 0, (ubik_version *)buffer);
                if (code)
                    return code;
                logIsGood = 1;
@@ -277,7 +277,7 @@ ReplayLog(register struct ubik_dbase *adbase)
            } else if (opcode == LOGTRUNCATE) {
                tpos += 4;
                code =
-                   (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+                   (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
                                     2 * sizeof(afs_int32));
                if (code != 2 * sizeof(afs_int32))
                    break;      /* premature eof or io error */
@@ -290,7 +290,7 @@ ReplayLog(register struct ubik_dbase *adbase)
            } else if (opcode == LOGDATA) {
                tpos += 4;
                code =
-                   (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+                   (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
                                     3 * sizeof(afs_int32));
                if (code != 3 * sizeof(afs_int32))
                    break;
@@ -313,12 +313,12 @@ ReplayLog(register struct ubik_dbase *adbase)
                    thisSize = (len > sizeof(data) ? sizeof(data) : len);
                    /* copy sizeof(data) buffer bytes at a time */
                    code =
-                       (*adbase->read) (adbase, LOGFILE, data, tpos,
+                       (*adbase->read) (adbase, LOGFILE, (char *)data, tpos,
                                         thisSize);
                    if (code != thisSize)
                        return UBADLOG;
                    code =
-                       (*adbase->write) (adbase, tfile, data, filePos,
+                       (*adbase->write) (adbase, tfile, (char *)data, filePos,
                                          thisSize);
                    if (code != thisSize)
                        return UBADLOG;
@@ -556,7 +556,7 @@ urecovery_Interact(void)
                ubik_dprint("StartDiskGetFile failed=%d\n", code);
                goto FetchEndCall;
            }
-           nbytes = rx_Read(rxcall, &length, sizeof(afs_int32));
+           nbytes = rx_Read(rxcall, (char *)&length, sizeof(afs_int32));
            length = ntohl(length);
            if (nbytes != sizeof(afs_int32)) {
                ubik_dprint("Rx-read length error=%d\n", code = BULK_ERROR);
index 862172ca55421f3632fc2994e27df7f7cd1dd6d8..c5107fa3c285f2fce272172eb2608fbd701948d4 100644 (file)
@@ -456,7 +456,7 @@ SDISK_GetFile(rxcall, file, version)
     }
     length = ubikstat.size;
     tlen = htonl(length);
-    code = rx_Write(rxcall, &tlen, sizeof(afs_int32));
+    code = rx_Write(rxcall, (char *)&tlen, sizeof(afs_int32));
     if (code != sizeof(afs_int32)) {
        DBRELE(dbase);
        return BULK_ERROR;
index 23be20837280af6ffa115408034131174d427df2..f66c21f903320ff07f2fb1ce448681bc892c17be 100644 (file)
@@ -43,6 +43,7 @@ USVR_OBJS = \
 
 $(UPSERVER):  $(USVR_OBJS) $(LIBS)
        $(EXECONLINK) dnsapi.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
@@ -58,6 +59,7 @@ UCLNT_OBJS = \
 
 $(UPCLIENT):  $(UCLNT_OBJS)  $(LIBS)
        $(EXECONLINK) dnsapi.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
index 217a064f852b807e02e6a49df962e463f144c6b8..98f0daa29bd4a0802f7160b6f450f837262a1f6f 100644 (file)
@@ -19,6 +19,7 @@ test tests: usd_test.exe
 # make usd_test.exe
 $(OUT)\usd_test.exe: $(OUT)\usd_test.obj $(LIBFILE) $(LIBUTIL)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 1c59ef8cdac9c3614c7354a4873d0d57b3efc2c5..757d9768f73bc77a8404387c6b51a6e7015c569f 100644 (file)
@@ -32,7 +32,7 @@ RCSID
 void
 afs_NTAbort(void)
 {
-    _asm int 3h;               /* always trap. */
+    DebugBreak();
 }
 #endif
 
index db4aa01ba3cfcb6da5aa9b2c1e29e5a2b00984a5..82e89b70c8ffec3e14c9bafecc1f44c433d51872 100644 (file)
@@ -450,7 +450,7 @@ LocalizePathHead(const char **path, const char **relativeTo)
 {
     struct canonmapping *current;
     for (current = CanonicalTranslations; current->local != NULL; current++) {
-       int canonlength = strlen(current->canonical);
+       size_t canonlength = strlen(current->canonical);
        if (strncmp(*path, current->canonical, canonlength) == 0) {
            (*path) += canonlength;
            if (**path == '/')
index d719756499840d9cf001061d464fde1f9713c430..2de608098259a128ccda09018dda3a83bb18f47f 100644 (file)
@@ -330,7 +330,11 @@ gettmpdir(void)
         * the buffer pointer values but we do NOT deallocate the
         * previously installed buffer, if any, in case it is in use.
         */
-       InterlockedExchange((LPLONG) & saveTmpDir, (LONG) dirp);
+#ifdef _WIN64
+       InterlockedExchange64((LONGLONG)(INT_PTR)&saveTmpDir, (LONGLONG) dirp);
+#else
+       InterlockedExchange((LONG) & saveTmpDir, (LONG) dirp);
+#endif
 
     }
     /* if (!saveTmpDir) */
index cd2b68fe7ca1a0bd067872ff6b6ede43b683ce2a..efbd47533dbbd98a1bcdf4ada929ed07713731fa 100644 (file)
@@ -59,7 +59,7 @@ opendir(const char *path)
             */
            {
                struct stat status;
-               int len = strlen(tPath) - 1;
+               size_t len = strlen(tPath) - 1;
                tPath[len] = '\0';
                if (len >= 2 && tPath[len - 2] != ':') {
                    tPath[len - 1] = '\0';
index 2d92d6577ae4a0ce58334e6ec8b477dd9161f9b0..8d48678a2eb665e83b384b698ffdf2147b9d9a66 100644 (file)
@@ -339,7 +339,7 @@ advance(register char *lp, register char *ep)
            if (braelist[i = *ep++] == 0)
                return (-1);
            curlp = lp;
-           ct = braelist[i] - braslist[i];
+           ct = (int)(braelist[i] - braslist[i]);
            while (backref(i, lp))
                lp += ct;
            while (lp >= curlp) {
index b6b4889878be7c5cf85cb96d741cde22146c3474..15b08955f1d0b997545dca525cd0a3ea4fc0f1e7 100644 (file)
@@ -120,8 +120,8 @@ vFSLog(const char *format, va_list args)
     char *timeStamp;
     char tbuffer[1024];
     char *info;
-    int len, num;
-    char *name;
+    size_t len;
+    int num;
 
     currenttime = time(0);
     timeStamp = afs_ctime(&currenttime, tbuffer, sizeof(tbuffer));
index 603d174d6e172dbc5370dd442c2a4d8b4028ee38..8387257ca060941a220401c7490edceefefb5291 100644 (file)
@@ -43,7 +43,7 @@ mkint(char *buf, afs_uintmax_t val, int base, int uc, unsigned prec)
     int len = 0, dig, i;
 
     while (val) {
-       dig = val % base;
+       dig = (int) (val % base);
        val = (val - dig) / base;
        if (dig < 10)
            dig = dig + '0';
@@ -137,7 +137,8 @@ mkint(char *buf, afs_uintmax_t val, int base, int uc, unsigned prec)
 int
 afs_vsnprintf(char *p, size_t avail, const char *fmt, va_list ap)
 {
-    unsigned int width, precision, haveprec, len;
+    unsigned int width, precision, haveprec;
+    size_t len;
     int ljust, plsign, spsign, altform, zfill;
     int hflag, lflag, count, *countp, j;
     char *x, *y, xbuf[MAXPREC + 21], fbuf[20];
@@ -408,7 +409,7 @@ afs_vsnprintf(char *p, size_t avail, const char *fmt, va_list ap)
                                 * if spsign specified, IPaddr fields are space-filled to 3 digits
                                 */
            UVAL = va_arg(ap, unsigned long);
-           ia.s_addr = UVAL;
+           ia.s_addr = (unsigned long)UVAL;
            if (haveprec && !precision)
                he = 0;
            else
@@ -428,7 +429,7 @@ afs_vsnprintf(char *p, size_t avail, const char *fmt, va_list ap)
                            *y = toupper(*y);
                }
            } else {
-               UVAL = ntohl(UVAL);
+               UVAL = ntohl((unsigned long)UVAL);
                if (zfill) {
                    x = "%03u.%03u.%03u.%03u";
                } else if (spsign) {
@@ -520,7 +521,7 @@ vsnprintf(char *p, unsigned int avail, char *fmt, va_list ap)
 {
     int result;
     result = afs_vsnprintf(p, avail, fmt, ap);
-#ifdef AFS_AIX51_ENV
+#if defined(AFS_AIX51_ENV) || defined(AFS_NT40_ENV)
     return result;
 #endif
 }
index 1761b27207c401ba27f68b06d9704ae99b05fcdf..c5fa7263995a29d147055f721544766739a2a41c 100644 (file)
@@ -15,6 +15,7 @@ LIBS =\
 
 $(OUT)\dirpath_test.exe: $(OUT)\dirpath_test.obj $(LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 test tests: $(OUT)\dirpath_test.exe
 
index 5f95efaea8c8875a53b7683f91e6098a90115d6a..1c52330d7d637bb8f3cf9b4f34eefcf48000391f 100644 (file)
@@ -48,6 +48,7 @@ afs_winsockInit(void)
     return 0;
 }
 
+/* This function will begin to fail in the year 2038 */
 int
 afs_gettimeofday(struct timeval *tv, struct timezone *tz)
 {
index 7544343503b6fdb54d82208344bae62f3b91aecb..957ec0e3afd3eb88d8b4f25f915c7bd39615afb5 100644 (file)
@@ -627,6 +627,11 @@ Copy(file1, file2, recursive, level)
 
            if (oldAcl) {
                /* Get an old-style ACL and convert it */
+                if (verbose) {
+                    printf("  Getting old style acl\n");
+                    fflush(stdout);
+                }
+
                for (i = 1; i < strlen(file1); i++)
                    if (file1[i] == '/')
                        break;
@@ -643,6 +648,10 @@ Copy(file1, file2, recursive, level)
                if (code < 0) {
                    if (errno == EINVAL) {
                        setacl = false;
+                        if (verbose) {
+                            printf("  _VICEIOCTL(4) returns EINVAL\n");
+                            fflush(stdout);
+                        }
                    } else {
                        return 1;
                    }
@@ -655,10 +664,19 @@ Copy(file1, file2, recursive, level)
            } /*Grab and convert old-style ACL */
            else {
                /* Get a new-style ACL */
+                if (verbose) {
+                    printf("  Getting new style acl\n");
+                    fflush(stdout);
+                }
+
                code = pioctl(file1, _VICEIOCTL(2), &blob, 1);
                if (code < 0) {
                    if (errno == EINVAL) {
                        setacl = false;
+                        if (verbose) {
+                            printf("  _VICEIOCTL(2) returns EINVAL\n");
+                            fflush(stdout);
+                        }
                    } else {
                        perror("getacl ");
                        return 1;
@@ -670,6 +688,10 @@ Copy(file1, file2, recursive, level)
             * Now, set the new-style ACL.
             */
            if (setacl == true) {
+                if (verbose) {
+                    printf("  Setting new style acl\n");
+                    fflush(stdout);
+                }
                blob.out = aclspace;
                blob.in = aclspace;
                blob.out_size = 0;
@@ -678,6 +700,10 @@ Copy(file1, file2, recursive, level)
                if (code) {
                    if (errno == EINVAL) {
                        setacl = false;
+                        if (verbose) {
+                            printf("  _VICEIOCTL(1) returns EINVAL\n");
+                            fflush(stdout);
+                        }
                    } else {
                        fprintf(stderr, "Couldn't set acls for %s\n", file2);
                        return 1;
index e42ff26ce03baf0a21f3ff2ca91ac0fb1ebba241..125d1ca6aab42dd533d0010658915d231e245706 100644 (file)
@@ -59,6 +59,7 @@ EXELIBS = \
 
 $(EXEFILE): $(EXEOBJS) $(EXELIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
@@ -76,6 +77,7 @@ $(OUT)\cbd.obj: callback.c
 
 $(CBD): $(OUT)\cbd.obj 
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index 9a92d999707a1ef65b693c8d91b3ea54c9b5b4d1..fb1a9cb0814410ec0671b9ffd08b43448d2518fd 100644 (file)
@@ -90,6 +90,7 @@ VLSERVER_EXECLIBS = \
        
 $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
@@ -127,6 +128,7 @@ VLDB_CHECK_LIBS =\
 
 $(OUT)\vldb_check.exe: $(OUT)\vldb_check.obj $(VLDB_CHECK_LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 ############################################################################
 # build local vlclient
@@ -136,6 +138,7 @@ VLCLIENT_LIBS = \
 
 $(OUT)\vlclient.exe: $(OUT)\vlclient.obj  $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
 
 
 ############################################################################
index 6584e8eab22bedab13087202f5d4eff52883b075..e09db2b73405c13c0dd7e7a9648926c34c2015e1 100644 (file)
@@ -78,6 +78,7 @@ SALVAGER_EXEOBJS =\
 
 $(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 
@@ -87,6 +88,7 @@ VOLINFO = $(DESTDIR)\root.server\usr\afs\bin\volinfo.exe
 
 $(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 ############################################################################
@@ -95,6 +97,7 @@ VOLBLESS = $(DESTDIR)\root.server\usr\afs\bin\vol-bless.exe
 
 $(VOLBLESS): $(OUT)\vol-bless.obj $(OUT)\physio.obj $(OUT)\vol-bless.res $(EXEC_LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP)
 
 ############################################################################
index 8d8da685bf121e859fa8e5ea54b20318f58e2d1e..482e4b016401b110f060328ba5e78491cedb592c 100644 (file)
@@ -28,6 +28,7 @@ ILIST = $(OUT)\ilist.exe
 
 $(ILIST): $(OUT)\ilist_nt.obj $(EXEC_LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 
 ############################################################################
@@ -36,6 +37,7 @@ LTLIST = $(OUT)\ltlist.exe
 
 $(LTLIST): $(OUT)\ltlist.obj $(EXEC_LIBS)
        $(EXECONLINK)
+        $(_VC_MANIFEST_EMBED_EXE)
 
 mkdir:
        
index c70225599b68f3cd9be288cdbeff8ad4b2758a5b..5e6fa35e939ea413bbdd46ed94ebaae9f8e6da46 100644 (file)
@@ -94,6 +94,7 @@ VOLSERVER_EXELIBS = \
 
 $(VOLSERVER_EXEFILE): $(VOLSERVER_EXEOBJS) $(VOLSERVER_EXELIBS) $(EXEC_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 ############################################################################
@@ -119,6 +120,7 @@ VOS_EXELIBS = \
 
 $(RS_VOS_EXEFILE): $(VOS_EXEOBJS) $(VOS_EXELIBS) $(EXEC_LIBS)
        $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+        $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
 $(CL_VOS_EXEFILE): $(RS_VOS_EXEFILE)