请教一下
ES_SetOutputFile(m_hEncoder,pansichar('E:\test.wmv');可以正常运行。
但
str:='E:\test.wmv';
ES_SetOutputFile(m_hEncoder,pansichar(str);
就不对了呢。
ES_SetOutputFile(m_hEncoder,pansichar('E:\test.wmv');可以正常运行。
但
str:='E:\test.wmv';
ES_SetOutputFile(m_hEncoder,pansichar(str);
就不对了呢。
function ES_SetOutputFile(hEncoder:THandle;szFileName:Pchar):integer;
function ES_SetOutputFile(hEncoder:THandle;szFileName:Pansichar):integer
另外,具体出错提示是什么啊?
ES_SetOutputFile(m_hEncoder,pchar(str));
ES_SetOutputFile(m_hEncoder,pchar(str));
function ES_SetOutputFile(hEncoder:THandle;szFileName:Pchar):integer;stdcall;
例子:
procedure SampleProcedure;
var
AStr: string;
begin
SetLength(AStr, 100);
CallAPI(XX, PChar(AStr), Length(AStr));
AStr := PChar(AStr);
....
end;
这个在Macro的pascal精要中强调过的。
ES_SetOutputFile(m_hEncoder,pchar(str));
感觉这个是对的