110,915
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Text;
using System.Runtime.InteropServices;
namespace ConsoleApplication33
{
class Program
{
[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool InternetGetCookie(
string url, string name, StringBuilder data, ref int dataSize);
static void Main(string[] args)
{
StringBuilder cookieHeader = new StringBuilder(new string(' ',4096));
int datasize = cookieHeader.Length;
bool b= InternetGetCookie("http://community.csdn.net/", null, cookieHeader, ref datasize);
Console.WriteLine(cookieHeader.ToString());
Console.Read();
}
}
}