|
|
|
|
Purpose |
This function submits a service request to an Aspen Server. | ||
|
|
| ||
|
Syntax |
#include <aspen.h> ... int AspenRequest( int session, int service, void *input, void *output ); | ||
|
|
| ||
|
Parameters |
session session identifies a session with the Server that should receive this request.
service service contains the enumerated value that corresponds to a service request. See, Services.
*input *input is a void pointer that points to a service request input structure. See, Services.
*output *output is a void pointer that points to a service request output structure. See, Services. | ||
|
|
| ||
|
Remarks |
All service requests are submitted using this function. The currently available services are:
The input and output parameters for this function vary depending upon the service request being made. | ||
|
|
| ||
|
Return Value |
| ||
|
|
| ||
|
See Also |
|||
|
|
| ||
|
Example |
int CAspenRequestDlg::DoASPEN_GetServerInfo() { ASPEN_GETSERVERINFO_OUTPUT serverInfo; server_list *slp = list; unsigned long dayOfCentury; struct tm localTime; char timeStr[80]; int retval; int serverTimeZone; CString strText; retval = AspenRequest(slp->server_session, ASPEN_GetServerInfo, NULL, &serverInfo); if (!retval) { serverTimeZone = serverInfo.time_zone; AspenTimeToANSITime(serverInfo.time, serverInfo.seconds, serverTimeZone, (struct tm *)(&localTime), &dayOfCentury); strcpy(timeStr, asctime(&localTime)); strText.Format("Name : %s", serverInfo.server_name); m_HistoryEdit.AppendString(strText); strText.Format("DataFeed : %d", serverInfo.data_feed); m_HistoryEdit.AppendString(strText); strText.Format("IntradayBarWidth : %d", serverInfo.intraday_bar_width); m_HistoryEdit.AppendString(strText); strText.Format("TimeZone : %d", serverInfo.time_zone); m_HistoryEdit.AppendString(strText); strText.Format("Time : %s", timeStr); m_HistoryEdit.AppendString(strText); strText.Format("Seconds : %d", serverInfo.seconds); m_HistoryEdit.AppendString(strText); strText.Format("Security Mode : %d", serverInfo.security_mode); m_HistoryEdit.AppendString(strText); strText.Format("Max Watchlist Size : %d", serverInfo.max_watchlist_size); m_HistoryEdit.AppendString(strText); strText.Format("System ID number : %ld", serverInfo.system_ID); m_HistoryEdit.AppendString(strText); strText.Format("Server Number : %d", serverInfo.server_number); m_HistoryEdit.AppendString(strText); strText.Format("Authorized User Limit : %d", serverInfo.authorized_user_limit); m_HistoryEdit.AppendString(strText); strText.Format("Max User Profiles : %d", serverInfo.max_user_profiles); m_HistoryEdit.AppendString(strText); } return retval; } |
©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.