$(AFSRM_EXEFILE): $(AFSRM_EXEOBJS) $(AFSRM_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
############################################################################
$(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
//
int AfsAdmSvr_Connect (
[in] STRING szClientAddress,
- [out] DWORD *pidClient,
+ [out] UINT_PTR *pidClient,
[out] ULONG *pStatus
);
// ...releases and invalidates the cookie representing the calling process.
//
int AfsAdmSvr_Disconnect (
- [in] DWORD idClient,
+ [in] UINT_PTR idClient,
[out] ULONG *pStatus
);
// 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
// ...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,
// 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
);
// 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,
// 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
);
// ...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
);
// ...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,
// ...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
// 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
// ...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,
// ...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
);
// 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,
);
int AfsAdmSvr_FindObjects (
- [in] DWORD idClient,
+ [in] UINT_PTR idClient,
[in] ASID idSearchScope,
[in] ASOBJTYPE ObjectType,
[in] AFSADMSVR_SEARCH_REFRESH SearchRefresh,
// 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
// 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
);
// ...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
// ...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,
// ...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,
// ...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,
// ...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,
// ...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,
// ...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,
// ...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,
// ...changes a group's name
//
int AfsAdmSvr_RenameGroup (
- [in] DWORD idClient,
+ [in] UINT_PTR idClient,
[in] ASID idCell,
[in] ASID idGroup,
[in] STRING szNewGroupName,
// ...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,
// ...deletes a PTS group
//
int AfsAdmSvr_DeleteGroup (
- [in] DWORD idClient,
+ [in] UINT_PTR idClient,
[in] ASID idCell,
[in] ASID idGroup,
[out] ULONG *pStatus
// 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,
// ...unlocks a user's account
//
int AfsAdmSvr_UnlockUser (
- [in] DWORD idClient,
+ [in] UINT_PTR idClient,
[in] ASID idCell,
[in] ASID idUser,
[out] ULONG *pStatus
// ...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,
// ...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,
// ...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
// ...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
// 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
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
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")
SYSTEMTIME timeLastBackup;
SYSTEMTIME timeCopyCreation;
ULONG nFiles;
- ULONG ckQuota;
- ULONG ckUsed;
+ UINT_PTR ckQuota;
+ UINT_PTR ckUsed;
FILESETTYPE FilesetType;
DWORD FilesetState;
} ASOBJPROP_VOLUME, *LPASOBJPROP_VOLUME;
STRING szName;
STRING szInstance;
STRING szPassword;
- int idUser;
+ UINT_PTR idUser;
BOOL fCreateKAS;
BOOL fCreatePTS;
} AFSADMSVR_CREATEUSER_PARAMS, *LPAFSADMSVR_CREATEUSER_PARAMS;
/app_config \
/I $(INCFILEDIR) \
/I . \
- /env win32 \
- /win32 \
/align 8 \
/pack 8 \
/W3 \
/WX \
- /no_robust \
/nologo
.SUFFIXES: .h .idl
$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
install : \
// ...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.
// 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);
// 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();
// 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();
// ...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);
// 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);
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;
}
// 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);
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;
}
// 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);
// 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);
// 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);
// 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);
// 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);
// 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);
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);
// 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);
// 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;
}
-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;
// ...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);
}
-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);
// ...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);
}
-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);
// 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);
// 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;
// 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);
*
*/
-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;
}
-BOOL ADMINAPI asc_AdminServerClose (DWORD idClient, ULONG *pStatus)
+BOOL ADMINAPI asc_AdminServerClose (UINT_PTR idClient, ULONG *pStatus)
{
BOOL rc = TRUE;
ULONG status = 0;
-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;
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);
}
-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
STRING szCell;
lstrcpy (szCell, pszCell);
- rc = (PVOID)AfsAdmSvr_GetCredentials (idClient, szCell, &status);
+ rc = AfsAdmSvr_GetCredentials (idClient, szCell, &status);
}
}
RpcExcept(1)
}
-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
// 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)
{
}
-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)
{
}
-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;
}
-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;
}
-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;
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))
{
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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)
{
}
-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)
{
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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))
{
}
-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))
{
*
*/
-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);
*
*/
-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);
/*
*
*/
-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);
/*
*
*/
-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
*
*/
-BOOL ValidateBinding (RPC_NS_HANDLE hBind, DWORD *pidClient, ULONG *pStatus);
+BOOL ValidateBinding (RPC_NS_HANDLE hBind, UINT_PTR *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;
}
-BOOL ADMINAPI UnbindFromAdminServer (DWORD idClient, ULONG *pStatus)
+BOOL ADMINAPI UnbindFromAdminServer (UINT_PTR idClient, ULONG *pStatus)
{
BOOL rc = TRUE;
ULONG status = 0;
}
-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;
*
*/
-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);
}
-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;
}
-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;
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
*
*/
-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;
}
-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;
*
*/
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-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;
}
-void TestForNotifications (DWORD idClient, ASID idCell, ASID idObject)
+void TestForNotifications (UINT_PTR idClient, ASID idCell, ASID idObject)
{
if (l.pListeners)
{
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);
static struct
{
HANDLE hPingThread;
- DWORD *adwClients;
+ UINT_PTR *adwClients;
size_t cdwClients;
HANDLE hCallbackThread;
*
*/
-void StartPingThread (DWORD idClient)
+void StartPingThread (UINT_PTR idClient)
{
asc_Enter();
}
-void StopPingThread (DWORD idClient)
+void StopPingThread (UINT_PTR idClient)
{
asc_Enter();
for (size_t ii = 0; ii < l.cdwClients; ++ii)
{
- DWORD idClient;
+ UINT_PTR idClient;
if ((idClient = l.adwClients[ ii ]) == 0)
continue;
*
*/
-void StartPingThread (DWORD idClient);
-void StopPingThread (DWORD idClient);
+void StartPingThread (UINT_PTR idClient);
+void StopPingThread (UINT_PTR idClient);
void StartCallbackThread (void);
void StopCallbackThread (void);
*
*/
-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;
}
-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;
}
-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;
}
-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;
}
-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;
typedef struct
{
BOOL fInUse;
- DWORD idClient;
+ UINT_PTR idClient;
LPASACTION pAction;
DWORD dwTickStart;
} OPERATION, *LPOPERATION;
*
*/
-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;
}
-BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, DWORD *pidClient, ULONG *pStatus)
+BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, PVOID *pidClient, ULONG *pStatus)
{
AfsAdmSvr_Enter();
size_t iClient;
}
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));
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)
}
-LPCTSTR AfsAdmSvr_GetClientName (DWORD idClient)
+LPCTSTR AfsAdmSvr_GetClientName (UINT_PTR idClient)
{
static TCHAR szName[ cchSTRING ];
LPCTSTR pszName = NULL;
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;
}
-LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (DWORD idClient)
+LPSOCKADDR_IN AfsAdmSvr_GetClientAddress (UINT_PTR idClient)
{
static SOCKADDR_IN ipAddress;
LPSOCKADDR_IN pAddress = NULL;
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;
}
-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();
}
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)
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 ]);
}
}
}
-size_t AfsAdmSvr_BeginOperation (DWORD idClient, LPASACTION pAction)
+size_t AfsAdmSvr_BeginOperation (UINT_PTR idClient, LPASACTION pAction)
{
AfsAdmSvr_Enter();
}
-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;
DWORD WINAPI AfsAdmSvr_AutoOpen_ThreadProc (PVOID lp)
{
- DWORD dwScope = (DWORD)lp;
+ DWORD dwScope = PtrToUlong(lp);
ULONG status;
if (!l.fOperational)
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);
// 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;
// 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);
// 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);
// 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);
// 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;
// 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;
// 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;
// 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;
// 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;
// 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)
{
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;
}
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;
// 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;
// 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;
// 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;
// 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;
// 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;
DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib.dll
-!IF ("$(AFSVER_CL)"<"1400")
+!IF ($(AFSVER_CL) < 1400)
DEFFILE = TaAfsAppLib.def
!ELSE
DEFFILE = TaAfsAppLib2005.def
# 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
$(DLLFILE) : $(DLLOBJS) $(DLLLIBS)
$(DLLGUILINK) $(LOCALLINKFLAGS) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
}
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);
}
// 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);
/*
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);
// ...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
// 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
// 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,
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);
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);
//
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;
// 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);
/*
static struct
{
BOOL fUseAdminServer;
- DWORD idAdminServerClient;
+ UINT_PTR idAdminServerClient;
} l = {0, 0};
}
-DWORD AfsAppLib_GetAdminServerClientID (void)
+UINT_PTR AfsAppLib_GetAdminServerClientID (void)
{
return (l.fUseAdminServer) ? l.idAdminServerClient : 0;
}
}
-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);
}
}
-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);
}
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
int idsNone;
LPCELLLIST lpcl;
- PVOID hCreds;
+ UINT_PTR hCreds;
} BROWSEDIALOGPARAMS, *LPBROWSEDIALOGPARAMS;
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);
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)
{
PostMessage (pbdp->hDlg, WM_THREADSTART, 0, 0);
- DWORD idClient;
+ UINT_PTR idClient;
if ((idClient = AfsAppLib_GetAdminServerClientID()) != 0)
{
EnumeratePrincipalsRemotely (pbdp, idClient);
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.
//
}
-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.
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)
{
*
*/
-#define dwCOVER_SIGNATURE 0xC0E0C0E0 // SetWindowLong(hDlgCover,DWL_USER,#)
+#define dwCOVER_SIGNATURE 0xC0E0C0E0 // SetWindowLongPtr(hDlgCover,DWLP_USER,#)
typedef struct // COVERPARAMS
{
{
if (!lstrcmp (szClassName, TEXT("#32770"))) // WC_DIALOG
{
- if (GetWindowLong (hChild, DWL_USER) == dwCOVER_SIGNATURE)
+ if (GetWindowLongPtr (hChild, DWLP_USER) == dwCOVER_SIGNATURE)
{
DestroyWindow (hChild);
break;
(LPARAM)lp);
ShowWindow (hCover, TRUE);
- SetWindowLong (hCover, DWL_USER, dwCOVER_SIGNATURE);
+ SetWindowLongPtr (hCover, DWLP_USER, dwCOVER_SIGNATURE);
FreeString (lpcp->pszDesc);
FreeString (lpcp->pszButton);
*
*/
-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())
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);
}
-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);
{
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();
}
-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);
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();
}
{
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)
{
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))
{
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)
{
*
*/
+
+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;
{
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)
{
void AfsAppLib_CheckForExpiredCredentials (LPCREDENTIALSDLG_PARAMS lpp)
{
- static PVOID hCredsPrevious = NULL;
+ static UINT_PTR hCredsPrevious = 0;
static BOOL fHadGoodCredentials;
TCHAR szCell[ cchNAME ];
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))
{
}
-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 */
-}
-
}
-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)
{
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);
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;
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;
}
static struct
{
HWND hWnd;
- DWORD *adwData;
+ UINT_PTR *adwData;
size_t cdwData;
} *aWindows = NULL;
static size_t cWindows = 0;
}
-DWORD GetWindowData (HWND hWnd, LPTSTR pszField)
+UINT_PTR GetWindowData (HWND hWnd, LPTSTR pszField)
{
- DWORD rc = 0;
+ UINT_PTR rc = 0;
if (pcsData == NULL)
{
}
-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)
{
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;
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)
{
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)
{
{
WNDCLASS wc;
GetClassInfo (THIS_HINST, TEXT("LISTBOX"), &wc);
- procListbox = (LONG)wc.lpfnWndProc;
+ procListbox = PtrToLong(wc.lpfnWndProc);
wc.style = CS_GLOBALCLASS;
wc.lpfnWndProc = (WNDPROC)CheckListProc;
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);
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;
}
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);
}
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;
}
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)
{
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;
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);
$(DLLFILE) : $(DLLOBJS)
$(DLLRESLINK)
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
install : $(DLLFILE)
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;
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;
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 ]));
}
}
$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
$(EXEGUILINK) comctl32.lib shell32.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
test : $(EXEFILE)
;
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;
}
-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;
WORKERPACKET wp;
wp.wpPtsUserCreate.hCell = hCell;
wp.wpPtsUserCreate.pszUser = szUserName;
- wp.wpPtsUserCreate.idUser = idUser;
+ wp.wpPtsUserCreate.idUser = (int) idUser;
AfsClass_Leave();
#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);
}
-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())
{
typedef struct
{
ULONG dwID;
- ULONG ckStorageTotal;
- ULONG ckStorageFree;
- ULONG ckStorageAllocated;
+ size_t ckStorageTotal;
+ size_t ckStorageFree;
+ size_t ckStorageAllocated;
} AGGREGATESTATUS, *LPAGGREGATESTATUS;
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);
}
}
- size_t nServersToRefresh = 0;
+ ULONG nServersToRefresh = 0;
HENUM hEnum;
for (LPSERVER lpServer = ServerFindFirst (&hEnum); lpServer; lpServer = ServerFindNext (&hEnum))
{
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);
}
Debugstr & Debugstr::operator<< (size_t l)
{
char szTemp[40];
- _ltoa (l, szTemp, 10);
+ _ltoa ((LONG)l, szTemp, 10);
return (*this << szTemp);
}
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;
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;
{
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);
}
*
*/
-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;
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);
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
//
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;
//
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))
{
{
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);
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;
}
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;
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 {
$(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
/Zp4 \
/cpp_cmd $(cc) \
/cpp_opt "-E" \
- /no_robust \
/nologo
.SUFFIXES: .h .idl
$(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
$(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
# 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)
$(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,
$(DESTDIR)\bin\kpasswd.exe: $(KPASSWD_OBJS) $(KPASSWD_LIBS)
$(DEL) $(DESTDIR)\bin\kpasswd.exe
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
void afs_exit();
+extern void afsi_log(char *pattern, ...);
+
/* globals from the base afsd */
extern int cm_logChunkSize;
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;
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);
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);
}
}
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 */
}
if ( !bNameFound ) {
- int size = strlen(cm_NetbiosName) + 2;
+ size_t size = strlen(cm_NetbiosName) + 2;
if ( !pHostNames ) {
pHostNames = malloc(size);
dwSize = 1;
*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,
int afsd_InitCM(char **reasonP)
{
osi_uid_t debugID;
- DWORD cacheBlocks;
+ afs_uint64 cacheBlocks;
DWORD cacheSize;
long logChunkSize;
DWORD stats;
/* 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
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;
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;
*/
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;
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;
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;
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";
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];
#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;
SymCleanup(hProcess);
GlobalFree(pSym);
+#endif /* _X86_ */
}
#ifdef _DEBUG
_CrtSetBreakAlloc(*afsd_crtDbgBreakCurrent);
}
#endif
-
+#if defined(_X86)
ep->ContextRecord->Eip++;
+#endif
return EXCEPTION_CONTINUE_EXECUTION;
}
else
char tbuffer[512];
char *ptbuf[1];
HANDLE h;
- int i;
if (filep)
sprintf(tbuffer, "Error at file %s, line %d: %s",
#endif /* JUMP */
HMODULE hHookDll;
HMODULE hAdvApi32;
- int cnt;
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_ALWAYS_DF*/ |
{
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;
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);
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)
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)
/* 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));
}
/* 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;
/* 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);
{
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)
{
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);
}
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;
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))
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;
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];
uc_close(ULONG fid)
{
- ULONG code;
cm_scache_t *scp;
cm_req_t req;
scp_status_t *prev, *curr;
{
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);
}
-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));
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;
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)
HANDLE pipe;
DWORD written;
unsigned char *bufIn, *bufOut;
- DWORD lenIn, lenOut, status;
- DWORD err;
+ DWORD lenIn;
rpc_t rpc;
BOOL st;
/* ...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;
}
static LPWORD
lpwAlign( LPWORD lpIn )
{
- ULONG ul;
+ ULONG_PTR ul;
- ul = (ULONG) lpIn;
+ ul = (ULONG_PTR) lpIn;
ul += 3;
ul >>=2;
ul <<=2;
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
}
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++) {
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;
*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
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 ) {
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;
}
/* First try service/cell@REALM */
if (code = pkrb5_build_principal(ctx, &increds.server,
- strlen(RealmName),
+ (int)strlen(RealmName),
RealmName,
ServiceName,
CellName,
pkrb5_free_principal(ctx,increds.server);
increds.server = 0;
code = pkrb5_build_principal(ctx, &increds.server,
- strlen(RealmName),
+ (int)strlen(RealmName),
RealmName,
ServiceName,
0);
pkrb5_free_principal(ctx,increds.server);
increds.server = 0;
code = pkrb5_build_principal(ctx, &increds.server,
- strlen(RealmName),
+ (int)strlen(RealmName),
RealmName,
ServiceName,
CellName,
pkrb5_free_principal(ctx,increds.server);
increds.server = 0;
code = pkrb5_build_principal(ctx, &increds.server,
- strlen(RealmName),
+ (int)strlen(RealmName),
RealmName,
ServiceName,
0);
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';
}
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';
}
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;
szUser[*dwSize-1] = '\0';
success = 1;
}
- *dwSize = strlen(pname);
+ *dwSize = (DWORD)strlen(pname);
cleanup:
if (pname)
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;
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);
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 {
GetSecurityLogonSessionData(HANDLE hToken, PSECURITY_LOGON_SESSION_DATA * ppSessionData)
{
NTSTATUS Status = 0;
- HANDLE TokenHandle;
TOKEN_STATISTICS Stats;
DWORD ReqLen;
BOOL Success;
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;
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;
int
main(int argc, char **argv) {
- BOOL res;
HKEY hkSubmounts;
HKEY hkParameters;
char mountRoot[64]="/afs";
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);
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;
}
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,
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,
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);
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);
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) {
/* 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;
/* 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
/* 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;
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;
}
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);
}
* 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 */
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)
*/
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);
}
}
* 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);
*/
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;
}
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);
}
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_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 */
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;
/* 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 {
lock_ReleaseWrite(&buf_globalLock);
}
-int buf_TryReserveBuffers(long nbuffers)
+int buf_TryReserveBuffers(afs_uint64 nbuffers)
{
int code;
/* 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);
}
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++)
{
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);
/* 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);
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);
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);
{
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);
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);
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;
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;
(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);
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
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;
}
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)
&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) {
/* 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;
{
int i;
cm_scache_t *scp;
- unsigned long now;
+ time_t now;
osi_Log0(afsd_logp, "CheckCBExpiration");
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);
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;
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
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 */
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
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
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"
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 */
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;
#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 */
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;
}
cm_bkgListEndp = rp;
lock_ReleaseWrite(&cm_daemonLock);
- osi_Wakeup((long) &cm_bkgListp);
+ osi_Wakeup((LONG_PTR) &cm_bkgListp);
}
static int
/* 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;
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);
/* 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);
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);
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);
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);
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);
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,
/* 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);
}
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);
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;
* 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) {
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);
/* 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);
+}
} 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__ */
#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[];
/* 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
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;
}
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;
}
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. */
}
/* # 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. */
{
long temp;
- temp = strlen(ioctlp->inDatap) + 1;
+ temp = (long) strlen(ioctlp->inDatap) + 1;
ioctlp->inDatap += temp;
}
}
/* # of bytes of path */
- code = strlen(ioctlp->inDatap) + 1;
+ code = (long)strlen(ioctlp->inDatap) + 1;
ioctlp->inDatap += code;
/* and return success */
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 */
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;
long cm_IoctlSetCacheSize(struct smb_ioctl *ioctlp, struct cm_user *userp)
{
- long temp;
+ afs_uint64 temp;
long code;
cm_SkipIoctlPath(ioctlp);
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 */
/* 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;
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;
}
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__);
(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);
(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);
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)
hMemoryMappedFile = NULL;
afsi_log("Memory Mapped File has been closed");
+ return 0;
}
int
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;
hm = CreateFileMapping( hf,
NULL,
PAGE_READWRITE,
- 0, mappingSize,
+ (DWORD)(mappingSize >> 32),
+ (DWORD)(mappingSize & 0xFFFFFFFF),
NULL);
if (hm == NULL) {
if (GetLastError() == ERROR_DISK_FULL) {
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)
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);
}
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;
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,
fileInfo.nFileSizeHigh,
fileInfo.nFileSizeLow);
}
-
}
hm = CreateFileMapping( hf,
hm = CreateFileMapping( hf,
NULL,
PAGE_READWRITE,
- 0,
- mappingSize,
+ (DWORD)(mappingSize >> 32),
+ (DWORD)(mappingSize & 0xFFFFFFFF),
NULL);
if (hm == NULL) {
if (GetLastError() == ERROR_DISK_FULL) {
hm = CreateFileMapping( hf,
NULL,
PAGE_READWRITE,
- 0, mappingSize,
+ (DWORD)(mappingSize >> 32),
+ (DWORD)(mappingSize & 0xFFFFFFFF),
NULL);
if (hm == NULL) {
if (GetLastError() == ERROR_DISK_FULL) {
}
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);
#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;
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;
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;
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;
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
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);
*/
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;
}
}
*/
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;
}
}
*/
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;
}
}
/* 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;
}
}
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;
}
}
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;
}
}
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;
}
}
* 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;
}
}
* 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;
}
}
* 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;
}
}
*/
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;
}
}
#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) {
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;
}
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);
}
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);
}
/* 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);
}
}
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))
{
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++)
{
{
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);
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
* ::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 */
long usecs;
int doPing;
int serverType;
- unsigned long now;
int wasDown;
cm_conn_t *connp;
struct rx_connection * callp;
/* 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;
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;
first = 0;
else
sum <<= 1;
- sum ^= (long) tsrp->server;
+ sum ^= (LONG_PTR) tsrp->server;
}
lock_ReleaseWrite(&cm_serverLock);
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 *);
* 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;
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 */
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;
/* 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);
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." */
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)
*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)
*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;
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)
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);
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)
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)
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)
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;
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)
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)
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)
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);
#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);
/* 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);
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);
}
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);
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);
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);
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);
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));
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);
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);
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);
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);
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);
{
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;
*rtypep = destroy; /* Remove entire entry */
return 0;
}
- len = strlen(arights);
+ len = (int)strlen(arights);
mode = 0;
for(i=0;i<len;i++) {
tc = *arights++;
}
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) {
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) {
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) {
continue;
}
strcpy(input,offmsg);
- blob.in_size += strlen(offmsg);
+ blob.in_size += (long)strlen(offmsg);
input += strlen(offmsg) + 1;
} else
*(input++) = '\0';
return code;
}
strcpy(input,motd);
- blob.in_size += strlen(motd);
+ blob.in_size += (long)strlen(motd);
input += strlen(motd) + 1;
} else
*(input++) = '\0';
#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] == '\\' &&
}
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);
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] == '\\' &&
* 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);
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] == '\\' &&
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);
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);
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;
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" : "");
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) {
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;
}
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;
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;
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");
afs_int32 code;
afs_int32 flags = 0;
struct ViceIoctl blob;
- struct cmd_item *ti;
if (as->parms[0].items) { /* -enable */
flags |= AFSCALL_RXSTATS_ENABLE;
afs_int32 code;
afs_int32 flags = 0;
struct ViceIoctl blob;
- struct cmd_item *ti;
if (as->parms[0].items) { /* -enable */
flags |= AFSCALL_RXSTATS_ENABLE;
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)
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;
}
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;
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;
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;
}
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 */
}
/* 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 */
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
*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,
*/
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);
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 )
/* 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 */
*/
void smb_Server(VOID *parmp)
{
- int myIdx = (int) parmp;
+ INT_PTR myIdx = (INT_PTR) parmp;
NCB *ncbp;
NCB *outncbp;
smb_packet_t *bufp;
dos_ptr dos_ncb;
time_t now;
#endif /* DJGPP */
- int lana = (int) parmp;
+ INT_PTR lana = (INT_PTR) parmp;
ncbp = GetNCB();
#ifdef DJGPP
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);
{
thread_t phandle;
int lpid;
- int i;
+ INT_PTR i;
int len;
struct tm myTime;
#ifdef DJGPP
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);
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;
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);
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) {
/* 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
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
/*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
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);
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
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);
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,
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);
}
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;
}
cm_ReleaseUser(userp);
- nShares = rootShares.cShare + nRegShares + allSubmount;
+ nShares = (USHORT)(rootShares.cShare + nRegShares + allSubmount);
#define REMARK_LEN 1
outParmsTotal = 8; /* 4 dwords */
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;
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;
}
}
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;
}
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);
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;
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;
/* 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;
}
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);
strcpy(op + 70, shortName);
if (smb_StoreAnsiFilenames)
CharToOem(op + 70, op + 70);
- *(op + 68) = shortNameEnd - shortName;
+ *(op + 68) = (char)(shortNameEnd - shortName);
}
}
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;
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 */
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++;
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 */
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 */
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,
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));
#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] == '\\' &&
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);
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] == '\\' &&
* 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);
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] == '\\' &&
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);
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);
$(EXEFILE) : $(EXEOBJS)
$(EXEGUILINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
/* 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();
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);
}
#include "syscfg.h"
static int IsLoopback(char * guid);
+int syscfg_GetIFInfo_2000(int *count, int *addrs, int *masks, int *mtus, int *flags);
/* syscfg_GetIFInfo
*
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;
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;
dwSize = sizeof(DWORD);
status = RegQueryValueEx(key, "EnableDHCP", NULL,
- &valType, &dwDHCP, &dwSize);
+ &valType, (LPBYTE) &dwDHCP, &dwSize);
if (status || (valType != REG_DWORD))
dwDHCP = 0;
/* 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;
$(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 \
$(OUT)\regman.exe: $(OUT)\regman.obj $(REGMAN_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
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);
}
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(DLLFILE): $(DLLOBJS)
$(DLLGUILINK) $(DLLLIBS) /DEF:$(DEFFILE)
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
lang ::
{
// 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);
}
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);
static int iFrameLast = 0;
if (msg == WM_INITDIALOG)
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
switch (msg)
{
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)
{
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 ];
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);
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)
{
{
if (!ptp->rc)
{
- LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+ LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
TCHAR szSvrName[ cchNAME ];
TCHAR szAggName[ cchNAME ];
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);
}
}
-static LONG procAggregatesList = 0;
+static UINT_PTR procAggregatesList = 0;
LRESULT CALLBACK Aggregates_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
{
case WM_DESTROY:
if (procAggregatesList != 0)
- SetWindowLong (hList, GWL_WNDPROC, procAggregatesList);
+ SetWindowLongPtr (hList, GWLP_WNDPROC, procAggregatesList);
break;
case WM_COMMAND:
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);
}
} aiBADCREDS;
struct {
- ULONG ckAllocated;
- ULONG ckCapacity;
+ size_t ckAllocated;
+ size_t ckCapacity;
} aiOVERALLOC;
struct {
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)
{
}
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);
{
HWND hCombo = GetDlgItem (hDlg, IDC_MON_SUBSET);
CB_StartChange (hCombo, TRUE);
- int iSel = 0;
+ size_t iSel = 0;
BOOL fAddedAny = FALSE;
TCHAR szCell[ cchNAME ];
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:
{
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;
{
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;
*
*/
-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);
{
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)
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
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);
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)
{
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);
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
}
}
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)
{
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;
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;
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
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)
{
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)
{
// 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)
{
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;
}
-static LONG procFilesetsCreateList = 0;
+static LONG_PTR procFilesetsCreateList = 0;
LRESULT CALLBACK Filesets_Create_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
{
case WM_DESTROY:
if (procFilesetsCreateList != 0)
- SetWindowLong (hList, GWL_WNDPROC, procFilesetsCreateList);
+ SetWindowLongPtr (hList, GWLP_WNDPROC, procFilesetsCreateList);
break;
case WM_COMMAND:
{
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?
{
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;
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
{
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);
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;
}
-static LONG procFilesetsCreateReplicaList = 0;
+static LONG_PTR procFilesetsCreateReplicaList = 0;
LRESULT CALLBACK Filesets_CreateReplica_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
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:
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?
{
{
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;
{
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;
case WM_DESTROY:
PropCache_Delete (hDlg);
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
psdp = NULL;
break;
}
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)
{
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);
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;
}
-static LONG procFilesetsMoveToList = 0;
+static LONG_PTR procFilesetsMoveToList = 0;
LRESULT CALLBACK Filesets_MoveTo_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
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:
{
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?
{
{
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;
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)
{
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
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);
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)
{
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);
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)
{
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;
}
-static LONG procRepSitesList = 0;
+static LONG_PTR procRepSitesList = 0;
LRESULT CALLBACK Filesets_RepSites_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
{
case WM_DESTROY:
if (procRepSitesList != 0)
- SetWindowLong (hList, GWL_WNDPROC, procRepSitesList);
+ SetWindowLongPtr (hList, GWLP_WNDPROC, procRepSitesList);
break;
case WM_COMMAND:
{
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 ];
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);
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;
}
-static LONG procFilesetsRestoreList = 0;
+static LONG_PTR procFilesetsRestoreList = 0;
LRESULT CALLBACK Filesets_Restore_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
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:
{
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?
{
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;
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);
}
-static LONG procFilesetsList = 0;
+static LONG_PTR procFilesetsList = 0;
LRESULT CALLBACK Filesets_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
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:
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);
}
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;
{
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);
}
{
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;
}
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)
{
{
if (sub)
Subsets_FreeSubset (sub);
- SetWindowLong (hDlg, DWL_USER, (LONG)subNew);
+ SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)subNew);
}
break;
{
if (sub)
Subsets_FreeSubset (sub);
- SetWindowLong (hDlg, DWL_USER, (LONG)subNew);
+ SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)subNew);
}
}
break;
{
if (sub)
Subsets_FreeSubset (sub);
- SetWindowLong (hDlg, DWL_USER, (LONG)subNew);
+ SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)subNew);
}
break;
}
// 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;
}
}
- int iiMax = SendMessage (hList, LB_GETCOUNT, 0, 0);
+ int iiMax = (int) SendMessage (hList, LB_GETCOUNT, 0, 0);
for (int ii = 0; ii < iiMax; ++ii)
{
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);
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))
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);
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);
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)
{
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);
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)
{
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);
{
if (!ptp->rc)
{
- LPIDENT lpi = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+ LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
TCHAR szSvrName[ cchNAME ];
TCHAR szSvcName[ cchNAME ];
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)
{
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);
}
-static LONG procServicesList = 0;
+static LONG_PTR procServicesList = 0;
LRESULT CALLBACK Services_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
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:
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);
}
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)
{
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;
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;
}
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)
{
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)
{
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)
{
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)
{
case WM_DESTROY:
Delete (lpp);
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
PropCache_Delete (pcSVR_EXECUTE, NULL);
break;
}
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)
{
case WM_DESTROY:
Delete (lpp);
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
PropCache_Delete (pcSVR_GETDATES, NULL);
break;
}
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);
}
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)
{
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)
{
break;
case WM_DESTROY:
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
PropCache_Delete (pcSVR_INSTALL, NULL);
Delete (lpp);
break;
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)
{
break;
case WM_DESTROY:
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
break;
case WM_ENDTASK:
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;
}
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)
{
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)
{
{
if (!ptp->rc)
{
- LPIDENT lpiServer = (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+ LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
TCHAR szText[ cchNAME ];
lpiServer->GetServerName (szText);
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)
{
break;
case WM_DESTROY:
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
PropCache_Delete (pcSVR_PRUNE, NULL);
Delete (lpp);
break;
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)
{
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))
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)
{
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;
}
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);
}
return FALSE;
}
- lpp->keyVersion = SP_GetPos (GetDlgItem (hDlg, IDC_KEY_VERSION));
+ lpp->keyVersion = (int) SP_GetPos (GetDlgItem (hDlg, IDC_KEY_VERSION));
return TRUE;
}
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)
{
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);
}
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)
{
break;
case WM_DESTROY:
- SetWindowLong (hDlg, DWL_USER, 0);
+ SetWindowLongPtr (hDlg, DWLP_USER, 0);
PropCache_Delete (pcSVR_UNINSTALL, NULL);
Delete (lpp);
break;
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)
{
LPIDENT Server_GetServer (HWND hDlg)
{
- return (LPIDENT)GetWindowLong (hDlg, DWL_USER);
+ return (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);
}
LPIDENT Server_GetServerForChild (HWND hChild)
}
-static LONG procTabControl = 0;
+static LONG_PTR procTabControl = 0;
LRESULT CALLBACK Server_SubclassTabControlProc (HWND hTab, UINT msg, WPARAM wp, LPARAM lp)
{
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)
{
case WM_DESTROY:
if (procTabControl != 0)
- SetWindowLong (hTab, GWL_WNDPROC, procTabControl);
+ SetWindowLongPtr (hTab, GWLP_WNDPROC, procTabControl);
break;
}
// 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
LPIDENT lpiCell;
LPSUBSET sub;
- PVOID hCreds;
+ UINT_PTR hCreds;
} GLOBALS;
typedef struct
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);
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;
else
{
if (fNewCreds)
- lpCell->SetCurrentCredentials (g.hCreds);
+ lpCell->SetCurrentCredentials ((PVOID)g.hCreds);
lpCell->Invalidate();
if ((ptp->rc = lpCell->RefreshAll (&ptp->status)) != TRUE)
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))
{
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)
TCHAR szCell[ cchNAME ];
LPSUBSET sub;
BOOL fCloseAppOnFail;
- PVOID hCreds;
+ UINT_PTR hCreds;
} OPENCELL_PACKET, *LPOPENCELL_PACKET;
typedef struct
// 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?
break;
case WM_REFRESHED_CREDENTIALS:
- g.hCreds = (PVOID)lp;
+ g.hCreds = (UINT_PTR)lp;
UpdateDisplay_Cell(FALSE);
StartTask (taskREFRESH_CREDS, NULL, g.lpiCell);
break;
DWORD WINAPI Main_Redraw_ThreadProc (PVOID lp)
{
- BOOL fInvalidate = (BOOL)lp;
+ BOOL fInvalidate = (BOOL)(UINT_PTR)lp;
AfsClass_Enter();
if (g.lpiCell == NULL)
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);
}
// 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))
-static LONG procServers = 0;
+static LONG_PTR procServers = 0;
LRESULT CALLBACK Main_SubclassServersProc (HWND hServers, UINT msg, WPARAM wp, LPARAM lp)
{
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:
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);
}
$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
lang ::
HACCEL hAccel;
int rc;
- DWORD idClient;
+ UINT_PTR idClient;
ASID idCell;
- PVOID hCreds;
+ UINT_PTR hCreds;
TCHAR szPatternUsers[ cchNAME ];
TCHAR szPatternGroups[ cchNAME ];
BOOL fWarnBadCreds;
BOOL fShowActions;
BOOL fWindowsRegexp;
- LONG cminRefreshRate;
+ DWORD cminRefreshRate;
- int iTabLast;
+ size_t iTabLast;
// What user preferences have been chosen?
//
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;
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Browse_OnInitDialog (hDlg);
l.dwTickLastType = 0;
break;
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.
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)
{
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));
{
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);
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)
{
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 ++;
}
LPBROWSE_PARAMS lpp;
- if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
+ if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)
{
return lpp->TypeToShow;
}
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)
{
}
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);
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;
{
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)
}
-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);
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);
// 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;
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;
}
{
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;
}
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Group_Create_OnInitDialog (hDlg);
break;
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
//
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;
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.
//
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Group_Delete_OnInitDialog (hDlg);
break;
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
//
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.
//
// 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)
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Group_Rename_OnInitDialog (hDlg);
break;
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
//
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));
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));
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
//
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();
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 ];
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)
{
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);
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Machine_Create_OnInitDialog (hDlg);
break;
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
//
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;
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.
//
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);
}
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Machine_Delete_OnInitDialog (hDlg);
break;
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
//
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.
//
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();
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));
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))
{
// 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)
{
// 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);
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])
{
TCHAR szCell[ cchNAME ];
BOOL fCloseAppOnFail;
- PVOID hCreds;
+ UINT_PTR hCreds;
} OPENCELL_PARAMS, *LPOPENCELL_PARAMS;
typedef struct
{
LPTSTR mszNames;
TCHAR szPassword[ cchRESOURCE ];
- int idUser;
+ UINT_PTR idUser;
AFSADMSVR_CHANGEUSER_PARAMS Properties;
LPASIDLIST pGroupsMember;
LPASIDLIST pGroupsOwner;
{
LPTSTR mszNames;
TCHAR szOwner[ cchNAME ];
- int idGroup;
+ UINT_PTR idGroup;
AFSADMSVR_CHANGEGROUP_PARAMS Properties;
LPASIDLIST pMembers;
LPASIDLIST pGroupsOwner;
typedef struct
{
ASID idCell;
- int idUserMax;
- int idGroupMax;
+ UINT_PTR idUserMax;
+ UINT_PTR idGroupMax;
} CELL_CHANGE_PARAMS, *LPCELL_CHANGE_PARAMS;
typedef enum
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
User_Password_OnInitDialog (hDlg);
break;
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
//
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;
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
User_Create_OnInitDialog (hDlg);
break;
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
//
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;
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
//
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);
}
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
User_Delete_OnInitDialog (hDlg);
break;
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
//
void User_Delete_OnDestroy (HWND hDlg)
{
- LPASIDLIST pUserList = (LPASIDLIST)GetWindowLong (hDlg, DWL_USER);
+ LPASIDLIST pUserList = (LPASIDLIST)GetWindowLongPtr (hDlg, DWLP_USER);
asc_AsidListFree (&pUserList);
}
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.
//
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))
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);
}
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();
case WM_EXPIRED_CREDENTIALS:
case WM_REFRESHED_CREDENTIALS:
- g.hCreds = (PVOID)lp;
+ g.hCreds = (UINT_PTR)lp;
StartTask (taskUPD_CREDS);
break;
}
-void Main_PrepareTabChild (int iTabNew)
+void Main_PrepareTabChild (size_t iTabNew)
{
HWND hTab = GetDlgItem (g.hMain, IDC_TAB);
int iTabOld = TabCtrl_GetCurSel (hTab);
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);
$(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)
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) $(EXESDKLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(EXEFILE) : $(EXEOBJS) $(EXEOBJSc) $(EXERES) $(AFSAPPLIBOBJS) $(AFSDOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
install : $(COPYHEADERS) $(EXEFILE) lang
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
AutoMapEdit_OnInitDialog (hDlg);
break;
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
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);
Free (pszString);
}
+#if 0
static int lstrncmpi (LPCTSTR pszA, LPCTSTR pszB, size_t cch)
{
if (!pszA || !pszB)
return 0; // no differences before told to stop comparing, so A==B
}
-
+#endif
/*
* REALLOC ____________________________________________________________________
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;
{
case IDAPPLY:
if (!AdvancedTab_OnApply (hDlg))
- SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+ SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
break;
case IDC_REFRESH:
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;
}
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))
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
DriveEdit_OnInitDialog (hDlg);
break;
void DriveEdit_OnInitDialog (HWND hDlg)
{
- PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+ PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
// Fill in the combo box
//
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);
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
SubEdit_OnInitDialog (hDlg);
SubEdit_Enable (hDlg);
break;
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);
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);
{
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:
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;
}
{
case IDAPPLY:
if (!HostsTab_OnApply (hDlg))
- SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+ SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
break;
case IDC_ADD:
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;
}
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))
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
ServerEdit_OnInitDialog (hDlg);
break;
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))
void ServerEdit_OnInitDialog (HWND hDlg)
{
- PCELLDBLINE pLine = (PCELLDBLINE)GetWindowLong (hDlg, DWL_USER);
+ PCELLDBLINE pLine = (PCELLDBLINE)GetWindowLongPtr (hDlg, DWLP_USER);
TCHAR szTitle[ cchRESOURCE ];
CELLDBLINEINFO Info;
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);
{
case IDAPPLY:
if (!PrefsTab_OnApply (hDlg))
- SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+ SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
break;
case IDC_REFRESH:
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;
}
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)
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
PrefsEdit_OnInitDialog (hDlg);
PrefsEdit_Enable (hDlg);
break;
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);
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)))
$(DLLFILE): $(DLLOBJS)
$(DLLGUILINK) $(DLLLIBS) /DEF:$(DEFFILE)
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(EXEFILE) : $(EXEOBJS) $(EXECOBJS) $(EXERES) $(AFSAPPLIBOBJS) $(AFSDOBJS) $(CLIENTOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
install : $(COPYHEADERS) $(EXEFILE) lang
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);
}
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
} 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]);
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;
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)
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();
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);
void Creds_OnClickDestroy (HWND hDlg)
{
- LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+ LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
if (pszCell && *pszCell)
{
DestroyCurrentCredentials (pszCell);
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
NewCreds_OnInitDialog (hDlg);
break;
void NewCreds_OnInitDialog (HWND hDlg)
{
- LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+ LPTSTR pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
if (!pszCell)
pszCell = TEXT("");
}
if ( !pszCell )
- pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
+ pszCell = (LPTSTR)GetWindowLongPtr (hDlg, DWLP_USER);
if (pszCell)
{
HWND hTab = GetDlgItem (g.hMain, IDC_TABS);
switch (msg)
{
case WM_INITDIALOG:
- SetWindowLong (hDlg, DWL_USER, lp);
+ SetWindowLongPtr (hDlg, DWLP_USER, lp);
Mapping_OnInitDialog (hDlg);
break;
void Mapping_OnInitDialog (HWND hDlg)
{
- PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLong (hDlg, DWL_USER);
+ PDRIVEMAP pMap = (PDRIVEMAP)GetWindowLongPtr (hDlg, DWLP_USER);
// Fill in the combo box
//
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);
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:afs_shl_ext.def $(DLLSDKLIBS)
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
############################################################################
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)
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)
$(DLLFILE): $(DLLOBJS)
$(DLLGUILINK) $(DLLLIBS) -def:libosi.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(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
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;
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;
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;
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;
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 {
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 *);
long type;
/* the addr */
- long lockAddr;
+ LONG_PTR lockAddr;
/* raw state */
long readers;
/* 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 */
/* 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;
/* 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);
}
/* 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;
#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 */
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 */
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 *);
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);
/* 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];\
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 *);
*/
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 */
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);
* 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;
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? */
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 */
}
/* 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 */
#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 */
/* 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
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 *);
#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 */
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);
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;
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;
}
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;
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;
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
$(OUT)\elogtest.exe: $(OUT)\elogtest.obj \
$(DESTDIR)\lib\afs\afseventlog.lib $(DESTDIR)\lib\afs\afsreg.lib
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(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")
$(DLLFILE): $(DLLOBJFILES)
$(LINK) -DLL $(DLLEXPORTS) -OUT:$@ $(DLLOBJFILES) $(DLLLIBFILES)
+ $(_VC_MANIFEST_EMBED_DLL)
# instloop.exe
$(EXEFILE): $(EXEOBJFILES)
$(LINK) /OUT:$@ $(EXEOBJFILES) $(DLLLIBFILES)
+ $(_VC_MANIFEST_EMBED_EXE)
install: $(DLLFILE) $(EXEFILE)
<?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?>
$(DLLFILE): $(OUT)\afscustom.obj
$(LINK) -DLL $(DLLEXPORTS) \
-OUT:$@ $** $(DLLLIBFILES)
+ $(_VC_MANIFEST_EMBED_DLL)
install: $(DLLFILE)
<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" />
<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" />
<?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" />
<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 <> ""</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>
<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>
<?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 -->
-<?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>
--- /dev/null
+<?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>
<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>
<!--
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" />
<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" />
<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 <> ""</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 <> ""</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 <> ""</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>
<?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?>
$(UNINSTALL): $(OBJECTS) $(OUT)\uninstall.res
$(EXECONLINK) msi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
install: $(UNINSTALL)
$(EXEFILE) : $(EXEOBJS)
$(EXECONLINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
return FALSE;
}
- size_t cbSource;
+ DWORD cbSource;
if ((cbSource = GetFileSize (hFile, NULL)) != 0)
{
LPTSTR abSource = (LPTSTR)GlobalAlloc (GMEM_FIXED, cbSource + 5);
else
{
abSource[ dwRead ] = 0;
- size_t cbTarget = dwRead * 4;
+ DWORD cbTarget = dwRead * 4;
LPSTR abTarget = (LPSTR)GlobalAlloc (GMEM_FIXED, cbTarget);
memset (abTarget, 0x00, cbTarget);
$(PTHR_DLLFILE): $(PTHR_DLLOBJS)
$(DLLCONLINK) /DEF:pthread.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
############################################################################
$(PTHR95_DLLFILE): $(PTHR95_DLLOBJS)
$(DLLCONLINK) /DEF:pthread.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(OUT)\pthread_95.obj: pthread.c
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;
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) {
* 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;
}
$(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
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
#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;
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)
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)
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;
{
// 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);
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();
}
}
void MemMgr_OnDelayedRefresh (void)
{
- SetWindowLong (l.hManager, GWL_USERDATA, 1);
+ SetWindowLongPtr (l.hManager, GWLP_USERDATA, 1);
}
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;
// 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;
// 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; )
{
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);
}
#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 */
}
-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;
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);
}
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);
}
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);
}
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);
}
#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
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, ...)
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)
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, ...)
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)
LPTSTR pszOut = NULL;
LPTSTR pchOut;
LPTSTR pszTemplate;
- LONG cch;
+ size_t cch;
int nArgs;
int argno;
TCHAR szFmt[ cchRESOURCE ];
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);
}
//
if (apszArgs == NULL)
{
- if (pszSource != (LONG)pszTemplate)
+ if (pszSource != PtrToLong(pszTemplate))
FreeString (pszTemplate);
return NULL;
}
for (argno = 0; pszFmt && *pszFmt; argno++)
{
- LONG cchMin;
+ size_t cchMin;
vartype vt;
double arg_f;
{
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);
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;
}
#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);
/*
*
*/
-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
#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
#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);
/*
*
*/
-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);
/*
*
*/
-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);
/*
*
*/
-extern LANGID TaLocale_GetLanguage (void);
-extern void TaLocale_SetLanguage (LANGID lang);
+extern EXPORTED LANGID TaLocale_GetLanguage (void);
+extern EXPORTED 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);
/*
*
*/
-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);
/*
*
*/
-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);
/*
*
*/
-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
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;
$(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS)
$(EXECONLINK) dnsapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
# build copyauth
$(COPYAUTH_EXEFILE): $(COPYAUTH_EXEOBJS) $(EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(INCFILES):$$(@F)
} 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));
}
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));
}
} 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));
}
register afs_int32 i;
int tservice;
char *tcell;
- size_t cnLen;
+ int cnLen;
int ambig;
char tbuffer[64];
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 */
/* ticket length */
memcpy(tp, &token->ticketLen, sizeof(token->ticketLen));
- tp += sizeof(&token->ticketLen);
+ tp += sizeof(token->ticketLen);
/* ticket */
memcpy(tp, token->ticket, token->ticketLen);
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);
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);
/* 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);
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);
/* remember cell name and skip over it */
cellName = cp;
- cellNameSize = strlen(cp);
+ cellNameSize = (int)strlen(cp);
cp += cellNameSize + 1;
/* user name is here */
/* do pioctl */
iob.in = tbuffer;
- iob.in_size = tp - tbuffer;
+ iob.in_size = (long)(tp - tbuffer);
iob.out = tbuffer;
iob.out_size = sizeof(tbuffer);
/* do pioctl */
iob.in = tbuffer;
- iob.in_size = tp - tbuffer;
+ iob.in_size = (long)(tp - tbuffer);
iob.out = tbuffer;
iob.out_size = sizeof(tbuffer);
$(CELL_EXEFILE): $(CELL_EXEOBJS) $(CELL_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(KTC_EXEFILE): $(KTC_EXEOBJS) $(KTC_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
test tests: $(CELL_EXEFILE) $(KTC_EXEFILE)
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;
$(BOSSERVER_EXEFILE): $(BOSSERVER_EXEOBJS) $(BOSSERVER_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(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)
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) dnsapi.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
# Auxiliary build targets not built by default; e.g. test programs
$(OUT)\butc_test.exe: $(OUT)\test.obj
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(OUT)\test_ftm.exe: $(OUT)\test_ftm.obj $(LIBFILE) $(TESTLIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
{
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 */
$(ITEST_EXEFILE): $(ITEST_EXEOBJS)
$(EXECONLINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
#build ctest.exe
$(CTEST_EXEFILE): $(CTEST_EXEOBJS)
$(EXECONLINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
# build dtest.exe
$(DTEST_EXEFILE): $(DTEST_EXEOBJS)
$(EXECONLINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
all: test
$(COMPILE_ET_EXEFILE): $(COMPILE_ET_EXEOBJS) $(COMPILE_ET_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
####################################################################
$(EXEFILE): $(EXEOBJS) # dependents built from predefined inference rules
$(EXECONLINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
test1.c test1.h: test1.et
-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
$(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
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*
# 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
# 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.
-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)
# /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
!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)
!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
.rc{$(OUT)\}.res:
$(RC) /fo$(OUT)\$(<B).res $<
-# Compile .rc (resource) files
-#.rc.res:
-# $(RC) $*.rc
-
.SUFFIXES: .h
.h.{$(DESTDIR)\include\afs}.h:
#################### 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=)
!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) $**
# 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:$@ $**
######### MIDL FLAGS
-!IFDEF OSISXP
-AFSDEV_AUXMIDLFLAGS=/Oi
-!ENDIF
+AFSDEV_AUXMIDLFLAGS=/env x64 /x64 /Oicf
# Lex/Yacc macros
LEX = flex -l
#sanity checks
+!IF ("$(CPU)" != "i386")
+!ERROR Platform SDK not configured for i386
+!ENDIF
+
!IF EXISTS("TOOLS.INI")
!MESSAGE ************CAUTION TOOLS.INI IN EFFECT**********
!ENDIF
-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)
######### MIDL FLAGS
+AFSDEV_AUXMIDLFLAGS=/env win32 /win32 /no_robust
!IFDEF OSISXP
-AFSDEV_AUXMIDLFLAGS=/Oi
+AFSDEV_AUXMIDLFLAGS=$(AFSDEV_AUXMIDLFLAGS) /Oi
!ENDIF
# Lex/Yacc macros
#sanity checks
+!IF ("$(CPU)" != "i386")
+!ERROR Platform SDK not configured for i386
+!ENDIF
+
!IF EXISTS("TOOLS.INI")
!MESSAGE ************CAUTION TOOLS.INI IN EFFECT**********
!ENDIF
-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)
# /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 \
######### MIDL FLAGS
-!IFDEF OSISXP
-AFSDEV_AUXMIDLFLAGS=/Oi
-!ENDIF
+AFSDEV_AUXMIDLFLAGS=/env win32 /win32 /no_robust /Oicf
# Lex/Yacc macros
LEX = flex -l
* 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
* 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
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);
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;
#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\
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,
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 == '@')
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");
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",
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));
}
return _MSC_VER;
}
if (argc < 3)
- usuage();
+ usage();
if (strcmp(argv[1], "_isOS") == 0)
return CheckVersion(argc, argv);
if (strcmp(argv[1], "}") == 0) {
int pat, pat2;
strcpy(v5, argv[2]);
if (argc < 5)
- usuage();
+ usage();
if ((ptr = strtok(argv[2], ". \n")) == NULL)
return 0;
maj = atoi(ptr);
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) {
} 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);
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;
fclose(file);
file = fopen(argv[4], "w");
if (file == NULL)
- usuage();
+ usage();
sprintf(v1, "%i", maj);
sprintf(v2, "%i", min);
sprintf(v3, "%i", pat);
}
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;
char msg[256], msgt[256];
char *ptr;
if (argc < 4)
- usuage();
+ usage();
for (i = 3; argc >= 4; i++) {
char *ssect = strstr(argv[i], "[");
$(OUT)\dtest.exe: $(OUT)\dtest.obj $(DESTDIR)\lib\afs\afsdir.lib
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(TRANSLATE_ET_EXEFILE): $(TRANSLATE_ET_EXEOBJS) $(TRANSLATE_ET_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
OUT Capabilities *capabilities
) = 65538;
+/*
proc GetDE(
IN afs_int32 index,
OUT afs_int32 addr,
OUT afs_int32 time,
OUT string fileName<AFSNAMEMAX>
) = 65539;
+*/
$(KASERVER): $(KASERVER_OBJS) $(AFSLIBS) $(KASERVER_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
#build $(OUT)\kadatabase.obj
$(KAS): $(KAS_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
########### Misc Exes #######################################################
$(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
struct stat statbuff;
int len;
- len = strlen(dir);
+ len = (int)strlen(dir);
strcpy(dir + len, "/kpwvalid");
if (stat(dir, &statbuff) < 0) {
$(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 \
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:afsadminutil.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:bosadmin.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:afscfgadmin.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(OUT)\cfgtest.exe: $(OUT)\cfgtest.obj $(CFGTEST_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:clientadmin.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:kasadmin.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:ptsadmin.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(OUT)\afscp.exe: $(OUT)\afscp.obj $(AFSCP_EXEOBJS) $(AFSCP_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:vosadmin.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(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
$(LIBFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:afsrpc.def iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
# Definitions for generating versioninfo resources
$(OUT)\rw.exe: $(OUT)\rw.obj $(LIBFILE) $(DESTDIR)\lib\afs\afsutil.lib
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
clean::
$(DEL) $(LIBFILE)
struct TM_Elem timeout;
/* Result of select call */
- long result;
+ size_t result;
#ifdef AFS_DJGPP_ENV
NCB *ncbp;
}
}
-#define FreeRequest(x) ((x)->result = (long) iorFreeList, iorFreeList = (x))
+#define FreeRequest(x) ((x)->result = (size_t)iorFreeList, iorFreeList = (x))
static struct IoRequest *NewRequest()
{
struct timeval *timeout;
{
register struct IoRequest *request;
- int result;
+ size_t result;
#ifndef AFS_NT40_ENV
if(fds > FD_SETSIZE) {
result = request -> result;
FreeRequest(request);
- return (result > 1 ? 1 : result);
+ return (result > 1 ? 1 : (int)result);
}
\f
int IOMGR_Cancel(PROCESS pid)
#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');\
}
"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 )
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++;
{
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;
}
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, {
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;
/* 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);
{
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;
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);
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)
#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
TESTKEY = $(OUT)\testkey.exe
$(OUT)\testkey.exe: $(OUT)\test_key.obj $(LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
# test targets
-.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)
$(DLLFILE): $(DLLOBJS) $(DLLRES) $(DLLLIBS)
$(DLLCONLINK) /DEF:afsprocmgmt.def
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(RS_KILL_EXEFILE): $(KILL_EXEOBJS) $(KILL_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(CL_KILL_EXEFILE): $(RS_KILL_EXEFILE)
static DWORD WINAPI
RemoteSignalThread(LPVOID param)
{
- int signo = (int)param;
+ int signo = (int)(intptr_t)param;
DWORD rc = 0;
if (SignalIsDefined(signo)) {
*/
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 */
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 */
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];
/* 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);
static DWORD WINAPI
ChildMonitorThread(LPVOID param)
{
- int tidx = (int)param;
+ int tidx = (int)(intptr_t)param;
HANDLE childProcHandle;
BOOL fsuccess;
DWORD rc = -1;
*/
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 */
$(OUT)\pmgttest.exe: $(OUT)\pmgttest.obj $(PMGTTEST_EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(PTSERVER): $(PTSERVER_EXEOBJS) $(RXKADOBJS) $(PTSERVER_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
PTCLIENT_EXEOBJS =\
$(OUT)\ptclient.obj \
$(OUT)\display.obj \
- $(OUT)\pts.res
+ $(OUT)\ptclient.res
PTS_EXELIBS =\
$(DESTDIR)\lib\afsubik.lib \
$(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)
$(OUT)\pts.res: AFS_component_version_number.h
+$(OUT)\ptclient.res: AFS_component_version_number.h
+
############################################################################
# rxgen on pting.xg
# 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?
$(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:
$(RXDEBUG): $(RXDOBJS) $(RXDLIBS)
$(EXECONLINK) iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
install: $(LIBFILE) $(INCFILES) $(RXDEBUG)
*
*/
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 {
# include <stdlib.h>
# include <fcntl.h>
# include <afs/afsutil.h>
+# include <WINNT\afsreg.h>
#else
# include <sys/socket.h>
# include <sys/file.h>
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;
{
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;
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);
{
MUTEX_ENTER(&rx_stats_mutex);
rxi_Alloccnt--;
- rxi_Allocsize -= size;
+ rxi_Allocsize -= (afs_int32)size;
MUTEX_EXIT(&rx_stats_mutex);
osi_Free(addr, size);
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 */
/* 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);
/* 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... */
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)) {
#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,
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;
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);
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
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
#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,
#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
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 */
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 */
rx_ListenerProc(void *dummy)
{
int threadID;
- int sock;
+ osi_socket sock;
struct rx_call *newcall;
fd_set *rfds;
void
rx_ServerProc(void)
{
- int sock;
+ osi_socket sock;
int threadID;
struct rx_call *newcall = NULL;
fd_set *rfds;
* 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);
}
/*
#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
* 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;
/* 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
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);
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,
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);
*
*/
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);
#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
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);
}
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);
}
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)
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)
#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;
}
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;
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_ */
struct cmd_syndesc *as;
{
register int i;
- int s;
+ osi_socket s;
int j;
struct sockaddr_in taddr;
afs_int32 host;
{
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]);
$(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
#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_INT32((buf), ((afs_int32)(v)))
#include "xdr_prototypes.h"
-
#endif /* __XDR_INCLUDE__ */
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);
}
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
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);
}
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 */
/* 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);
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;
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:
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;
{
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);
{
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;
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);
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);
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
}
}
abort();
- /* NOTREACHED */
+ return 0;/* NOTREACHED */
}
{
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);
int slen;
map = LEGALNUMS;
- slen = strlen(name);
+ slen = (int)strlen(name);
return (slen != strspn(name, map));
}
error("unterminated string constant");
}
p++;
- size = p - *str;
+ size = (int)(p - *str);
*val = alloc(size + 1);
(void)strncpy(*val, *str, size);
(*val)[size] = 0;
p++;
} while (isdigit(*p));
}
- size = p - *str;
+ size = (int)(p - *str);
*val = alloc(size + 1);
(void)strncpy(*val, *str, size);
(*val)[size] = 0;
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;
gettimeofday(&key, NULL);
LOCK_RM;
- fc_keysched(&key, random_int32_schedule);
+ fc_keysched((struct ktc_encryptionKey*)&key, random_int32_schedule);
UNLOCK_RM;
}
$(EXEFILE): $(EXEOBJS)
$(EXECONLINK) $(EXELIBS)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
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;
}
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;
}
$(LIBFILE): $(DLLOBJS) $(DLLLIBS)
$(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib
+ $(_VC_MANIFEST_EMBED_DLL)
$(DLLPREP)
# Definitions for generating versioninfo resources
szUser[*dwSize-1] = '\0';
success = 1;
}
- *dwSize = strlen(pname);
+ *dwSize = (DWORD)strlen(pname);
cleanup:
if (pname)
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);
int count;
if (stringp)
- count = strlen(stringp) + 1; /* space required including null */
+ count = (int)strlen(stringp) + 1;/* space required including null */
else
count = 1;
int pathHasDrive;
int doSwitch;
char newPath[3];
+#ifdef AFSIFS
HANDLE rootDir;
wchar_t *wpath;
unsigned long length;
+#endif
char * p;
#ifdef AFSIFS
/* 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);
$(BUTCEXE): $(BUTCOBJS) $(BUTCLIBS)
$(EXECONLINK) dnsapi.lib mpr.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
.c.$(OUT)\obj:
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
install: $(EXEFILE)
$(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXELIBS)
$(EXECONLINK) iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(CL_UDBG_EXEFILE): $(RS_UDBG_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
/* 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;
/* 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;
/* 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;
/* 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);
if (!ap)
return;
- index = (ap - (char *)BufferData) >> UBIK_LOGPAGESIZE;
+ index = (int)(ap - (char *)BufferData) >> UBIK_LOGPAGESIZE;
bp = &(Buffers[index]);
bp->lockers--;
if (flag)
/* 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;
} 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 */
} 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;
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;
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;
} 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 */
} 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;
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;
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);
}
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;
$(UPSERVER): $(USVR_OBJS) $(LIBS)
$(EXECONLINK) dnsapi.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(UPCLIENT): $(UCLNT_OBJS) $(LIBS)
$(EXECONLINK) dnsapi.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
# make usd_test.exe
$(OUT)\usd_test.exe: $(OUT)\usd_test.obj $(LIBFILE) $(LIBUTIL)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
void
afs_NTAbort(void)
{
- _asm int 3h; /* always trap. */
+ DebugBreak();
}
#endif
{
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 == '/')
* 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) */
*/
{
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';
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) {
char *timeStamp;
char tbuffer[1024];
char *info;
- int len, num;
- char *name;
+ size_t len;
+ int num;
currenttime = time(0);
timeStamp = afs_ctime(¤ttime, tbuffer, sizeof(tbuffer));
int len = 0, dig, i;
while (val) {
- dig = val % base;
+ dig = (int) (val % base);
val = (val - dig) / base;
if (dig < 10)
dig = dig + '0';
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];
* 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
*y = toupper(*y);
}
} else {
- UVAL = ntohl(UVAL);
+ UVAL = ntohl((unsigned long)UVAL);
if (zfill) {
x = "%03u.%03u.%03u.%03u";
} else if (spsign) {
{
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
}
$(OUT)\dirpath_test.exe: $(OUT)\dirpath_test.obj $(LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
test tests: $(OUT)\dirpath_test.exe
return 0;
}
+/* This function will begin to fail in the year 2038 */
int
afs_gettimeofday(struct timeval *tv, struct timezone *tz)
{
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;
if (code < 0) {
if (errno == EINVAL) {
setacl = false;
+ if (verbose) {
+ printf(" _VICEIOCTL(4) returns EINVAL\n");
+ fflush(stdout);
+ }
} else {
return 1;
}
} /*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;
* 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;
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;
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(CBD): $(OUT)\cbd.obj
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(OUT)\vldb_check.exe: $(OUT)\vldb_check.obj $(VLDB_CHECK_LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
############################################################################
# build local vlclient
$(OUT)\vlclient.exe: $(OUT)\vlclient.obj $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
############################################################################
$(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(VOLBLESS): $(OUT)\vol-bless.obj $(OUT)\physio.obj $(OUT)\vol-bless.res $(EXEC_LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(ILIST): $(OUT)\ilist_nt.obj $(EXEC_LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
############################################################################
$(LTLIST): $(OUT)\ltlist.obj $(EXEC_LIBS)
$(EXECONLINK)
+ $(_VC_MANIFEST_EMBED_EXE)
mkdir:
$(VOLSERVER_EXEFILE): $(VOLSERVER_EXEOBJS) $(VOLSERVER_EXELIBS) $(EXEC_LIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
+ $(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
############################################################################
$(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)