I want to call SHFileOperation
using code injection. My code works fine while calling simple
functions like MessageBox
from user32.dll
, but won t while calling ShFileOperation
from shell32.dll
.
我要说一下我认为存在问题的那部分法典。 我知道这个问题正在分阶段实施。
这里是遥感信息价值的形象:
http://www.freeimagehosting.net/uploads/219d79fc30.jpg
//Structure type LPSHFILEOPSTRUCT = ^SHFILEOPSTRUCT; SHFILEOPSTRUCT = packed record Wnd: HWND; wFunc: UINT; pFrom: PAnsiChar; pTo: PAnsiChar; fFlags: FILEOP_FLAGS; fAnyOperationsAborted: BOOL; hNameMappings: Pointer; lpszProgressTitle: PAnsiChar; end; //Remote Info type TRemoteInfo = record LoadLibrary: function(lpLibFileName: PChar): HMODULE; stdcall; GetProcAddress: function(hModule: HMODULE; lpProcName: LPCSTR): FARPROC; stdcall; shf: SHFILEOPSTRUCT; ; Kernel32: array[0..20] of Char; shell32: array[0..20] of Char; SHFileOperationA: array[0..20] of Char; Fromlpbuff: array[0..20] of char; //Source path Tolpbuff: array[0..20] of Char; //Des Path end; //Initialize .... ZeroMemory(@RemoteInfo, SizeOf(RemoteInfo)); RemoteInfo.shf.Wnd := 0; RemoteInfo.shf.wFunc := FO_COPY; RemoteInfo.shf.pFrom := @remoteInfo.Fromlpbuff; RemoteInfo.shf.pto := @remoteInfo.tolpbuff; lstrcpy(RemoteInfo.shf.pFrom, e:1.jpg + #0#0); lstrcpy(RemoteInfo.shf.pto, f:1.jpg + #0#0); RemoteInfo.shf.fFlags := FOF_ALLOWUNDO; RemoteInfo.shf.fAnyOperationsAborted := false; ....