如何检查子字符串包含在VC ++中的WCHAR strname []中? [英] How to check substring is contained in WCHAR strname [ ] in VC++ ?

查看:116
本文介绍了如何检查子字符串包含在VC ++中的WCHAR strname []中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我有WCHAR szProcessName [],它存储Windows中所有正在运行的进程的完整路径(例如C:\ WINDOWS \ system32 \ cmd.exe).现在,我要运行jfw.exe的完整路径.如果它正在运行,那么我要检查jfw.exe是WCHAR szProcessName []的任何元素的子字符串.


谢谢
-sumit vadaviya.

Hi Everyone.

I have WCHAR szProcessName[] which stores full path(e.g C:\WINDOWS\system32\cmd.exe) of all the running processes in windows. Now I want full path of jfw.exe if it is running. If it is running then I want to check that jfw.exe is a substring of any element of WCHAR szProcessName[].


Thanks
-sumit vadaviya.

推荐答案

您可以使用
最好的问候
Espen Harlinn
You could use the wcsstr[^] function, or just check if the string ends with "\jfw.exe"

Best regards
Espen Harlinn


这篇关于如何检查子字符串包含在VC ++中的WCHAR strname []中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆