ShellExecute函数的问题
情境:自己写了一个loading画面,定时器到时间后调用shellexecute函数调用真正的程序。
问题:调用时出错,说找不到dll资源,但是用鼠标双击确可以打开。
经过分析之后,应该是路径的问题,主程序启动时要加载一些dll,还有读一些ini文件,这些都用到了
GetCurrentDir函数,应该是shellexecute之后主程序得到的当前路径不正确,导致无法读取资源。
修改:将GutCurrentDir换成
ExtractFilePath(application.ExeName);
这样就完全可以了。
ShellExecute函数的问题的更多相关文章
- ShellExecute函数简单说明
平时在delphi写代码的过程中总是能遇到ShellExecute函数,于是索性将它的使用方法整理一下,由于我在微软的站点上也没能查到个详解(当然我查的中文版,俺菜嘛) ShellExecute函数原 ...
- 转:ShellExecute函数与ShellExecuteEx函数
ShellExecute函数 ShellExecute函数原型及參数含义例如以下: function ShellExecute(hWnd: HWND; Operation, FileName, Par ...
- Delphi Win API 函数 [ ShellAPI ] ShellExecute 函数
引用单元:uses ShellAPI; 函数原型:function ShellExecute(hWnd: HWND; Operation, FileName, Parameters,Directory ...
- 阻塞调用ShellExecute函数
SHELLEXECUTEINFO si;ZeroMemory(&si, sizeof(si));si.cbSize = sizeof(si);si.fMask = SEE_MASK_NOCLO ...
- Delphi调用外部程序函数:WinExec() 和ShellExecute详解
1,WinExec(): WinExec主要运行EXE文件,不能运行其他类型的文件.不用引用特别单元. 原型:UINT WinExec(exePath,ShowCmd) 示例,我想要用记事 ...
- 在Delphi中使用ShellExecute(handle, 'open', PChar(fname),nil, nil, SW_HIDE)函数应注意的问题
在Delphi中使用ShellExecute(handle, 'open', PChar(fname),nil, nil, SW_HIDE)函数应注意的问题: 一.对一般vcl程序及isapi dll ...
- API函数ShellExecute与ShellExecuteEx用法
ShellExecute: 1.函数功能:你可以给它任何文件的名字,它都能识别出来并打开它.2.函数原型: HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpO ...
- ShellExecute —— 运行一个外部程序
原型参数 注意事项:使用该函数时,需添加该头文件:[1] #include <shellapi.h> ShellExecute函数原型及参数含义如下: ShellExecute( hWn ...
- 【转】【C++】ShellExecute, WinExec, CreateProcess 三者的区别
ShellExecute ShellExecute的功能是运行一个外部程序(或者是打开一个已注册的文件.打开一个目录.打印一个文件等等),并对外部程序有一定的控制. 有几个API函数都可以实现这些功能 ...
随机推荐
- Python3基础 file with 配合文件操作
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- shell编程学习笔记之特殊变量($0、$1、$2、 $?、 $# 、$@、 $*)
特殊变量($0.$1.$2. $?. $# .$@. $*) shell编程中有一些特殊的变量可以使用.这些变量在脚本中可以作为全局变量来使用. 名称 说明 $0 脚本名称 $1-9 脚本执行时的参数 ...
- 如何在windows中部署Gitblit
1.安装Java环境 2.下载Gitblit压缩包 http://gitblit.com/ 3.解压后进行配置 编辑gitblit-1.8.0\data\gitblit.properties文件 gi ...
- Unity3D学习笔记(十九):UGUI、Image、Text、Button
UGUI:Unity官方最新,与NGUI同源 UI:User Interface(用户的操作界面),图片+文字 UGUI的组件: 1.创建UGUI组件时,会默认创建Canvas(画布)和EventSy ...
- Network Simulator for P4(NSP4) src内容介绍
Structure What's NSP4? src source code introduction What's NSP4? NSP4是一个用于P4的网络仿真工具,旨在简化P4的环境部署和运行,将 ...
- Ubuntu 14.04 执行指定用户的命令
#!/bin/bashsudo -u username /home/sco/start_server.sh 或者 #!/bin/bashsu - username -c /etc/init.d/xxx ...
- ubuntu16.04, git 的配置
1.下载git:sudo apt-get install git 2.生成公钥:ssh-keygen -t rsa -C '你的邮箱' ,不停回车即可 3. mkdir test cd te ...
- 使用canvas画三角形
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- django关系类型字段
一.多对一(ForeignKey) 多对一的关系,通常被称为外键.外键字段类的定义如下: class ForeignKey(to, on_delete, **options)[source] 外键需要 ...
- 动态规划-Largest Sum of Averages
2018-07-12 23:21:53 问题描述: 问题求解: dp[i][j] : 以ai结尾的分j个部分得到的最大值 dp[i][j] = max{dp[k][j - 1] + (ak+1 + . ...