I think I may have asked a similar question in the past, but I am still stuck...
As part of an automated process, I must \"import\" a specific subset of media files into
Mouse move/click is probably the best solution in this case. Here is something you can try. Assuming you are using windows since you put c# in the title
OR
If you are an expert of Windows you can try to do some inter process communication to send the drag and drop event to the program.
1) Inject into target process
2) Get IDropTarget of target window
function GetDropTargetFromWnd(AWnd: HWND): IDropTarget;
var Unknow: IUnknown;
begin
Unknow := IUnknown(GetProp(AWnd, PChar(GlobalFindAtom('OleDropTargetInterface'))));
if Assigned(Unknow) then
Unknow.QueryInterface(IDropTarget, Result)
end;
3) Create IDataObject with your files
4) Call IDropTarget.DragEnter
5) Call IDropTarget.Drop
Updated algorithm:
1) Register your unique message with RegisterWindowMessage
2) Install global hook with SetWindowsHookEx with WH_CALLWNDPROC type (additional dll is required)
3) Create fixed file with 13 names
4) Send unique message registered in steip 1 to target window
5) You hook will be loaded into target process
6) Inside hook procedure check message
7) If message is your unique message
7.1) Get IDropTarget of target window
7.2) Load names from fixed file
7.3) Create IDataObject with your files
7.4) Call IDropTarget.DragEnter
7.5) Call IDropTarget.Drop
8) If all files don’t processed yet then go to 3
9) Uninstall global hook
Update 2
Also you can try send WM_DROPFILES message to target window from you hook dll.