-
把快捷方式的文件的路径,使用IShellLink。
怎样获取快捷方式所指向的目标文件名? HRESULT hres IShellLink* psl HRESULT hres IShellLink* psl char szGotPath[MAX_PATH] char szDescription[MAX_PATH] WIN32_FIND_DATA wfd OleInitialize(0) hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl) if (SUCCEEDED(hres)) { IPersistFile* ppf hres = psl->QueryInterface(IID_IPersistFile, (void**)&ppf) if (SUCCEEDED(hres)) { WCHAR wsz[MAX_PATH] char lpszLinkFile[MAX_PATH] //这里存放的是快捷方式的路径 if(MultiByteToWideChar(CP_ACP, 0, lpszLinkFile, -1, wsz, MAX_PATH)==0) return hres = ppf->Load(wsz, STGM_READ) if (SUCCEEDED(hres)) { hres = psl->Resolve(m_hWnd, 0) if (SUCCEEDED(hres)) { hres = psl->GetPath(szGotPath, MAX_PATH, (WIN32_FIND_DATA*)&wfd, SLGP_SHORTPATH)-Get the path file of the Shortcut, using IShellLink.
- 2023-07-15 01:10:03下载
- 积分:1
-
用信号量实现读者和写者的程序
读者-写者问题的读写操作限制(包括读者优先和写者优先):
写-写互斥,即不能有两个写者同时进行写操作。
读-写互斥,即不能同时有一个线程在读,而另一个线程在写。
读-读允许,即可以有一个或多个读者在读。
读者优先的附加限制:如果一个读者申请进行读操作时已有另一个读者正在进行读操作,则该读者可直接开始读操作。
写者优先的附加限制:如果一个读者申请进行读操作时已有另一写者在等待访问共享资源,则该读者必须等到没有写者处于等待状态才能开始读操作。
- 2022-04-22 12:41:24下载
- 积分:1
-
C# 打印Datagridview 中数据
C# 打印Datagridview 中数据
public GridPrinter(DataGridView objDataGridView, PrintDocument objPrintDocument, bool bCenterOnPage, bool bHasTitle, string sTitle, Font objTitleFont, Color objTitleColor, bool bPaging)
{
dataGridView = objDataGridView;
printDocument = objPrintDocument;
centerOnPage = bCenterOnPage;
hasTitle = bHasTitle;
title = sTitle;
tit
- 2022-12-23 01:35:04下载
- 积分:1
-
C#编程发送邮件
C#编程发送邮件-C# programming mail
- 2022-07-07 09:33:55下载
- 积分:1
-
带图标的菜单 Visual basic开发的很简单的小程序,功能很单一,适合初学者使用...
带图标的菜单 Visual basic开发的很简单的小程序,功能很单一,适合初学者使用-icon menu with Visual basic development of the small simple procedures, functions very single, for beginners
- 2022-02-28 11:56:28下载
- 积分:1
-
directshow采集摄像头
使用directshow采集摄像头,实时观看,并且可以抓取视频保存
- 2023-04-13 04:50:04下载
- 积分:1
-
CPictureEx类(GIF (including animated GIF87a and GIF89a), JPEG, BMP, WMF, ICO, CUR)
GIF (including animated GIF87a and GIF89a), JPEG, BMP, WMF, ICO, CUR
- 2023-05-05 21:10:03下载
- 积分:1
-
没什么好说的,一般4X4大小键盘输入程序。
没什么好说的,一般4X4大小键盘输入程序。-To say nothing of, 4X4 size keyboard input procedures.
- 2022-02-02 16:14:08下载
- 积分:1
-
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
stepest 后裔
- 2022-08-22 02:06:40下载
- 积分:1
-
列举系统中运行的所有进程,自编
列举系统中运行的所有进程,自编-cited operating system in all processes, self
- 2022-03-22 13:50:53下载
- 积分:1