S
satanmonkey
Unregistered / Unconfirmed
GUEST, unregistred user!
代码大致如下
var
tmpMimeType,tmpURLwidechar;
MHTBody:TStringlist;
currURL,URL,title,filename,content,MimeType:string;
BodyIndex,ThreadIDWORD;
i:integer;
haveIndex:boolean
...
getmem(tmpMimeType,sizeof(widechar)*256);
getmem(tmpURL,sizeof(widechar)*1024);
if GetCatheStringFromUrl(URL,content)=S_OK then
begin
//确定mime类型
StringToWideChar(url,tmpURL,sizeof(widechar)*256);
FindMimeFromData(nil,tmpURL,pwidechar(content),length(content),nil,0,tmpMimeType,0);
Mimetype:=widechartostring(tmpMimeType);
//添加
...
...
end;
freemem(tmpMimeType,sizeof(widechar)*256)
//该句出错
freemem(tmpURL,sizeof(widechar)*1024);
var
tmpMimeType,tmpURLwidechar;
MHTBody:TStringlist;
currURL,URL,title,filename,content,MimeType:string;
BodyIndex,ThreadIDWORD;
i:integer;
haveIndex:boolean
...
getmem(tmpMimeType,sizeof(widechar)*256);
getmem(tmpURL,sizeof(widechar)*1024);
if GetCatheStringFromUrl(URL,content)=S_OK then
begin
//确定mime类型
StringToWideChar(url,tmpURL,sizeof(widechar)*256);
FindMimeFromData(nil,tmpURL,pwidechar(content),length(content),nil,0,tmpMimeType,0);
Mimetype:=widechartostring(tmpMimeType);
//添加
...
...
end;
freemem(tmpMimeType,sizeof(widechar)*256)
//该句出错
freemem(tmpURL,sizeof(widechar)*1024);