-
-
未解决
[悬赏]Delphi hook GetUserNameEx
20.00雪花
-
发表于:
2017-6-3 07:34
2851
-
未解决 [悬赏]Delphi hook GetUserNameEx
20.00雪花
function NewGetUserNameEx(NameFormat: DWORD; lpNameBuffer: lptstr; var nSize: DWORD): Boolean; stdcall;
type
TNewGetUserNameEx=function (NameFormat: DWORD; lpNameBuffer: lptstr; var nSize: DWORD): Boolean; stdcall;
begin
Result:=TNewGetUserNameEx(Hook32[47].BaseAddr32)(NameFormat,lpNameBuffer, nSize);
// StrPCopy(lpNameBuffer,'111111'); //这样目标文件GetUserNameEx结果是乱码
// CopyMemory(lpNameBuffer, @Buffer, 4);//这样目标文件GetUserNameEx结果还是原来的值
end;
因为最后返回值在lpNameBuffer里,搞了半天不知道怎么hook这种。用StrPCopy,CopyMemory都不行,要么乱码要么改变不了。求指点
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!