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函数都可以实现这些功能 ...
随机推荐
- 解决gvim中php函数提示php_funclist.dict无法生效的问题
在Windows中, 当打开php文件时, 提示 dicvim(setlocal) unknown option: Files\Vim\vimfiles\dict\php_funclist.dict ...
- FJUT 奇怪的数列(线性选择算法)题解
题意:找出无需数列中位数(偶数为两个中位数平均数向下取整) 思路:用nth_element(a + first,a + k,a+ end + 1)找出中位数,复杂度一般为O(n).这个STL能将 [ ...
- rg.apache.ibatis.binding.BindingException: Mapper method 'com.dao.Cameao.getOnlineDayRation attempted to return null from a method with a primitive return type (float)
本文为博主原创,未经允许不得转载: 异常展示如下: org.apache.ibatis.binding.BindingException: Mapper method 'com.dao.Cameao. ...
- NOI 8467 鸣人的影分身
http://noi.openjudge.cn/ch0206/8467/ 描述 在火影忍者的世界里,令敌人捉摸不透是非常关键的.我们的主角漩涡鸣人所拥有的一个招数——多重影分身之术——就是一个很好的例 ...
- Jenkins+Ant/maven+Svn实现自动化部署,编译,运行,测试结果自动邮件通知
Jenkins+Ant+Svn实现自动化部署,编译,运行,测试结果自动邮件通知
- hdu 3579 Hello Kiki 不互质的中国剩余定理
Hello Kiki Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Probl ...
- Cocos2d-x学习笔记(十)CC_CALLBACK回调函数相关宏
这里加入一个插曲,是关于Cocos2d-x回调函数的.首先,让我们Cocos支持的回调函数宏有哪些,以及其原型: // new callbacks based on C++11 #define CC_ ...
- 使用canvas画三角形
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- JVM内存管理的机制
Eclipse崩溃,错误提示:MyEclipse has detected that less than 5% of the 64MB of Perm Gen (Non-heap memory) sp ...
- MongoDB(课时6 关系查询)
支持关系查询操作:大于($gt),小于($lt),大于等于($gte),小于等于($lte),不等于($ne ),等于(key:value 或 $eq).想让这些操作正常使用,需要准备一个数据集合. ...