还是shellexecute啊,这个函数支持NT的
ShellExecute( HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
ShellExecute( HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
解决方案 »
- 达人请进!D5编译错误提示的问题!!!在线等~~
- 怎样在listView中增加ListBox等控件
- delphi 6里面的 DBGrid 控件是否支持这样的功能:在DBGrid控件中显示数据后,当鼠标放在某一条数据上的时候,能够浮现出该条数据的详细信息
- 在线等待!!ado中怎样使用IP代替数据库名?高分!!
- 怎样改变报表打印出来的内容(文字、数字、条形码等)颜色(黑色)深浅?[
- @@@@诚招Delphi开发人员及数据库开发人员,要求重庆地区人员或愿意到重庆工作的人员,具有工作及要求见内容
- adoquery<>query ???
- 各位大侠请问Jeffrey Richter的windows核心程序设计是不是就是andvanced windows程序设计的第四版
- 关于ttreeview的几个问题!(连接数据库方面)
- 控件焦点问题!
- 如何用sql 語句將某個字段值設為null
- 请教:为什么专家分会少掉?
我是用的ISAPI写的Web Server Application
但是我在WIN98 PWS上就可以!
我肯定我是给了执行的权限的!
因为别的显示都出来了!单独这一条没有执行!
我是用的ISAPI写的Web Server Application
但是我在WIN98 PWS上就可以!
我肯定我是给了执行的权限的!
因为别的显示都出来了!单独这一条没有执行!
[Now Supported on Windows NT]The ShellExecuteEx function performs an action on a file. The file can be an executable file or a document.WINSHELLAPI BOOL WINAPI ShellExecuteEx( LPSHELLEXECUTEINFO lpExecInfo // pointer to SHELLEXECUTEINFO structure
);
ParameterslpExecInfoPointer to a SHELLEXECUTEINFO structure that contains and receives information about the application to start. Return ValuesIf the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError. ResIf the function succeeds, it sets the hInstApp member of the SHELLEXECUTEINFO structure to the instance handle of the application that the function started. If the function fails, hInstApp is one of the SE_ERR_ error values indicating the cause of the failure. (An instance handle will always be greater than 32, and an error value less than 32.) Note that the SE_ERR_ error values are for compatibility with the ShellExecute function; use the GetLastError function to retrieve error information. Last error values returned by GetLastError correspond to the SE_ERR_ values and may be one of the following:Value Meaning
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
ERROR_DDE_FAIL The DDE transaction failed.
ERROR_NO_ASSOCIATION There is no application associated with the given filename extension.
ERROR_ACCESS_DENIED
ERROR_DLL_NOT_FOUND
ERROR_CANCELLED The function prompted the user for the location of the application, but the user cancelled the request.
ERROR_NOT_ENOUGH_MEMORY
ERROR_SHARING_VIOLATION A sharing violation occurred.
shellexecuteEx('c:\...\xxx.exe') ???我的DELPHI里面怎么没有这条帮助?
不可能将运行的程序显示在用户界面上的。所以,在Service中只能运行
console程序,不能有用户进行操作的。在9X下只有一个桌面,所以可以显示执行的程序。