/* Copyright 1998 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * * Transact.h -- SMB Transact and Transact2 related support routines * * 08-12-98 sbrodie Original * */ #define SEARCH_ST_SIZE 21 typedef struct ActiveShare *hSHARE; union Transact_SearchContext { struct Transact1_SearchContext { bool NextSearchOK; BYTE SearchState[SEARCH_ST_SIZE]; hSHARE SearchDrive; } t1; struct Transact2_SearchContext { struct Transact1_SearchContext t1; struct TransactParms tp; DWORD resume_key; WORD dir_handle; char last_filename[DOS_NAME_LEN]; } t2; }; extern void Transact_addword(struct TransactParms *TP, int value); extern void Transact_addlong(struct TransactParms *TP, long value); extern void Transact_addstring(struct TransactParms *TP, const char *str); extern WORD Transact_getword(BYTE *p); extern DWORD Transact_getlong(BYTE *p); extern BYTE *Transact_getpointer(struct TransactParms *TP, BYTE *p); extern void Transact_addsetupword(struct TransactParms *TP, int value); /* The following function is used only by TRANSACT2_FSCTL - beware of * the length limit on path - see define for MAX_SETUPWORDS in SMB.h */ extern void Transact_addroutepath(struct TransactParms *TP, const char *path); extern void Transact_init(struct TransactParms *TP, int ret_param_len);