拖动文件到窗口 - SendDropFiles
函数简介
拖动文件到指定窗口。
接口名称
SendDropFiles
DLL调用
int SendDropFiles(long instance, long hwnd, string file_path);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄 |
| file_path | 字符串 | 文件路径 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 将文件拖动到指定窗口
long hwnd = 0x000A0B2C; // 目标窗口句柄
int ret = SendDropFiles(instance, hwnd, "C:\\test\\hello.txt");
Python
# 待补充
返回值
整数型:1 成功,0 失败。
