不用ASP对象

解决方案 »

  1.   

    GetCookie( LPCSTR pstrUrl, LPCTSTR pstrCookieName, LPTSTR pstrCookieData, DWORD dwBufLen )
      

  2.   

    to upstairs,
    CInternetSession::GetCookie
      static BOOL GetCookie( LPCSTR pstrUrl, LPCTSTR pstrCookieName, LPTSTR pstrCookieData, DWORD dwBufLen );
      static BOOL GetCookie( LPCSTR pstrUrl, LPCTSTR pstrCookieName, CString& strCookieData );
     吗?不行吧!
    也许应该是:
    InternetGetCookie
    BOOL InternetGetCookie(
        IN  LPCSTR lpszUrlName,
        IN  LPCSTR lpszCookieName,
        OUT LPSTR lpszCookieData,
        IN OUT LPDWORD  lpdwSize
    );Returns the cookie for the specified URL. Returns TRUE if successful, or FALSE otherwise. To get the specific error value, callGetLastError. The following error values apply to InternetGetCookie: ERROR_NO_MORE_ITEMS  There is no cookie for the specified URL and all its parents. 
    ERROR_INSUFFICIENT_BUFFER  The value passed in lpdwSize is insufficient to copy all the cookie data. The value returned in lpdwSize is the size of the buffer necessary to get all the data. 
      

  3.   

    InternetGetCookie可以得到属性名称和对应的值。不过domain name, expires date, url path, cookie name得不到。