| |
| INT WINAPI GopherStoreItem(
|
| |
HCLIENT hClient, |
|
| |
UINT nItemType |
|
| |
LPCTSTR lpszSelector, |
|
| |
LPCTSTR lpszFileName, |
|
| |
DWORD dwOptions |
|
| );
|
The GopherStoreItem function stores the specified item on
the server in a file on the local system.
Parameters
- hClient
- Handle to the client session.
- nItemType
- An integer value which specifies the selector item type. Refer
to the GopherSelectItem function for a list of valid item
types. The item type may not specify a directory or index,
otherwise an error will be returned.
- lpszSelector
- A pointer to the null-terminated selector string which
identifies the resource to be returned by the server. The selector
may be the name of a file on the server, or it may be an unique
sequence of characters which is used to access the item.
- lpszFileName
- A pointer to a null-terminated string that specifies the file
that the item data will be stored in on the local system. If the
file does not exist, it will be created. If the file does exist, it
will be overwritten.
- dwOptions
- An unsigned integer that specifies one or more options. This
parameter is constructed by using a bitwise operator with any of
the following values:
| Constant |
Description |
| GOPHER_TRANSFER_DEFAULT |
The default transfer mode. The item data is copied to the local
system exactly as it is stored on the server. |
| GOPHER_TRANSFER_CONVERT |
If the item being retrieved from the server is textual, the
data is automatically converted so that the end of line character
sequence is compatible with the Windows platform. Individual
carriage return or linefeed characters are converted to carriage
return/linefeed character sequences. |
Return Value
If the function succeeds, the return value is the server result
code. If the function fails, the return value is GOPHER_ERROR. To
get extended error information, call GopherGetLastError.
Remarks
This function will cause the current thread to block until the
transfer completes, a timeout occurs or the transfer is canceled.
During the transfer, the GOPHER_EVENT_PROGRESS event will be
periodically fired, enabling the application to update any user
interface controls. Event notification must be enabled, either by
calling GopherEnableEvents, or by registering a callback
function using the GopherRegisterEvent function.
To determine the current status of a transfer while it is in
progress, use the GopherGetTransferStatus function.
Requirements
Client: Requires Windows 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cstools7.h.
Library: Use csgprav7.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
GopherEnableEvents,
GopherGetItem, GopherGetTransferStatus,
GopherRegisterEvent
|
|