OE PowerTool 4.5.5
Twój adres IP to: 18.97.14.91
Przeglądarka: CCBot/2.0 (https://commoncrawl.org/faq/)
#include <windows.h>
#include <iostream>
#include <shlobj.h>
using namespace std;
int main(int argc, char ** argv) {
if (argc!=2) {
cerr << "wrong number of parameters!" << endl;
return 1;
}
char file[MAX_PATH];
GetFullPathName(argv[1], MAX_PATH, file, NULL);
cout << file << endl;
DROPFILES s;
s.pFiles = sizeof(s);
s.pt.x = 1;
s.pt.y = 1;
s.fNC = false;
s.fWide = false;
HGLOBAL hDrop;
BYTE * p;
hDrop = GlobalAlloc(GHND, sizeof(s) + strlen(file) + 2);
p = (BYTE*)GlobalLock(hDrop);
CopyMemory(p, &s, sizeof(s));
CopyMemory(p + sizeof(s), argv[1], strlen(file)+1);
GlobalUnlock(p);
PostMessage(FindWindow("Notepad", NULL), WM_DROPFILES, (WPARAM)hDrop, NULL);
return 0;
}