Skip to main content
ATL Server Library Reference 

Call this method to get the value of a server variable from the HTTP request.

BOOL GetServerVariable(
   LPCSTR szVariable,
   CStringA& str 
) const throw( );



The name of the server variable.


A reference to a CString that will receive the string on successful return of this method.

Returns TRUE on success, FALSE on failure. Call GetLastError to get extended error information.

This method is equivalent to calling IHttpServerContext::GetServerVariable on the server context associated with this request.