level 5
指狗为鸡
楼主
最近在学用DELPHI7编写activexDLL
有段代码我在其他地方用一点问题没有。写成ACTIVEX DLL不管是VB还是DELPHI调用都直接崩溃。代码如下。
function ReadMemory64(Pid: Integer; Base: Int64; bit: Integer): Int64;
var
hprocess:cardinal;
dwret:uint64;
begin
dwret := 0;
//NtReadVirtualMemory64 := getprocaddress(getmodulehandle('ntdll.dll'),'NtWow64ReadVirtualMemory64');
hprocess := openprocess(PROCESS_ALL_ACCESS,false,pid);
if hprocess = 0 then begin
showmessage('无法打开进程');
exit;
end;
if NtWow64ReadVirtualMemory64(hprocess,base,@dwret,bit,0) = 0 then result := dwret;
end;
就是到的时候 NtWow64ReadVirtualMemory64(hprocess,base,@dwret,bit,0) 的时候出问题,不管是动态还是静态。难道ACTIVEX里不能加载NTDLL?
2015年10月14日 14点10分
1
有段代码我在其他地方用一点问题没有。写成ACTIVEX DLL不管是VB还是DELPHI调用都直接崩溃。代码如下。
function ReadMemory64(Pid: Integer; Base: Int64; bit: Integer): Int64;
var
hprocess:cardinal;
dwret:uint64;
begin
dwret := 0;
//NtReadVirtualMemory64 := getprocaddress(getmodulehandle('ntdll.dll'),'NtWow64ReadVirtualMemory64');
hprocess := openprocess(PROCESS_ALL_ACCESS,false,pid);
if hprocess = 0 then begin
showmessage('无法打开进程');
exit;
end;
if NtWow64ReadVirtualMemory64(hprocess,base,@dwret,bit,0) = 0 then result := dwret;
end;
就是到的时候 NtWow64ReadVirtualMemory64(hprocess,base,@dwret,bit,0) 的时候出问题,不管是动态还是静态。难道ACTIVEX里不能加载NTDLL?