您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ strrchrW函数代码示例

51自学网 2021-06-03 08:31:56
  C++
这篇教程C++ strrchrW函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中strrchrW函数的典型用法代码示例。如果您正苦于以下问题:C++ strrchrW函数的具体用法?C++ strrchrW怎么用?C++ strrchrW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了strrchrW函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1:

/*************************************************************************** *	get_basename * * Return the base name of a file name (i.e. remove the path components). */static const WCHAR *get_basename( const WCHAR *name ){    const WCHAR *ptr;    if (name[0] && name[1] == ':') name += 2;  /* strip drive specification */    if ((ptr = strrchrW( name, '//' ))) name = ptr + 1;    if ((ptr = strrchrW( name, '/' ))) name = ptr + 1;    return name;}
开发者ID:AlexSteel,项目名称:wine,代码行数:14,


示例2: SchRpcRegisterTask

HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD flags, const WCHAR *sddl,                                   DWORD task_logon_type, DWORD n_creds, const TASK_USER_CRED *creds,                                   WCHAR **actual_path, TASK_XML_ERROR_INFO **xml_error_info){    WCHAR *full_name, *relative_path;    DWORD disposition;    HRESULT hr;    WINE_TRACE("%s,%s,%#x,%s,%u,%u,%p,%p,%p/n", wine_dbgstr_w(path), wine_dbgstr_w(xml), flags,            wine_dbgstr_w(sddl), task_logon_type, n_creds, creds, actual_path, xml_error_info);    *actual_path = NULL;    *xml_error_info = NULL;    /* FIXME: assume that validation is performed on the client side */    if (flags & TASK_VALIDATE_ONLY) return S_OK;    full_name = get_full_name(path, &relative_path);    if (!full_name) return E_OUTOFMEMORY;    if (strchrW(path, '//') || strchrW(path, '/'))    {        WCHAR *p = strrchrW(full_name, '/');        if (!p) p = strrchrW(full_name, '//');        *p = 0;        hr = create_directory(full_name);        *p = '//';    }    switch (flags & (TASK_CREATE | TASK_UPDATE))    {    default:    case TASK_CREATE:        disposition = CREATE_NEW;        break;    case TASK_UPDATE:        disposition = OPEN_EXISTING;        break;    case (TASK_CREATE | TASK_UPDATE):        disposition = OPEN_ALWAYS;        break;    }    hr = write_xml_utf8(full_name, disposition, xml);    if (hr == S_OK)    {        *actual_path = heap_strdupW(relative_path);        schedsvc_auto_start();    }    heap_free(full_name);    return hr;}
开发者ID:UIKit0,项目名称:wine-1,代码行数:55,


示例3: FD31_StripEditControl

/*********************************************************************** *                              FD31_StripEditControl        [internal] * Strip pathnames off the contents of the edit control. */static void FD31_StripEditControl(HWND hwnd){    WCHAR temp[BUFFILE], *cp;    GetDlgItemTextW( hwnd, edt1, temp, sizeof(temp)/sizeof(WCHAR));    cp = strrchrW(temp, '//');    if (cp != NULL) {	strcpyW(temp, cp+1);    }    cp = strrchrW(temp, ':');    if (cp != NULL) {	strcpyW(temp, cp+1);    }    /* FIXME: shouldn't we do something with the result here? ;-) */}
开发者ID:howard5888,项目名称:wineT,代码行数:19,


示例4: sizeof

/*********************************************************************** *           get_default_desktop * * Get the name of the desktop to use for this app if not specified explicitly. */static const WCHAR *get_default_desktop(void){    static const WCHAR defaultW[] = {'D','e','f','a','u','l','t',0};    static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0};    static const WCHAR explorerW[] = {'//','E','x','p','l','o','r','e','r',0};    static const WCHAR app_defaultsW[] = {'S','o','f','t','w','a','r','e','//',                                          'W','i','n','e','//',                                          'A','p','p','D','e','f','a','u','l','t','s',0};    static WCHAR buffer[MAX_PATH + sizeof(explorerW)/sizeof(WCHAR)];    WCHAR *p, *appname = buffer;    const WCHAR *ret = defaultW;    DWORD len;    HKEY tmpkey, appkey;    len = (GetModuleFileNameW( 0, buffer, MAX_PATH ));    if (!len || len >= MAX_PATH) return ret;    if ((p = strrchrW( appname, '/' ))) appname = p + 1;    if ((p = strrchrW( appname, '//' ))) appname = p + 1;    p = appname + strlenW(appname);    strcpyW( p, explorerW );    /* @@ Wine registry key: HKCU/Software/Wine/AppDefaults/app.exe/Explorer */    if (!RegOpenKeyW( HKEY_CURRENT_USER, app_defaultsW, &tmpkey ))    {        if (RegOpenKeyW( tmpkey, appname, &appkey )) appkey = 0;        RegCloseKey( tmpkey );        if (appkey)        {            len = sizeof(buffer);            if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret = buffer;            RegCloseKey( appkey );            if (ret && strcmpiW( ret, defaultW )) return ret;            ret = defaultW;        }    }    memcpy( buffer, app_defaultsW, 13 * sizeof(WCHAR) );  /* copy only software//wine */    strcpyW( buffer + 13, explorerW );    /* @@ Wine registry key: HKCU/Software/Wine/Explorer */    if (!RegOpenKeyW( HKEY_CURRENT_USER, buffer, &appkey ))    {        len = sizeof(buffer);        if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret = buffer;        RegCloseKey( appkey );    }    return ret;}
开发者ID:thomcom,项目名称:wine,代码行数:53,


示例5: msi_media_get_disk_info

static UINT msi_media_get_disk_info( MSIPACKAGE *package, struct media_info *mi ){    MSIRECORD *row;    LPWSTR ptr;    static const WCHAR query[] =        {'S','E','L','E','C','T',' ','*',' ', 'F','R','O','M',' ',         '`','M','e','d','i','a','`',' ','W','H','E','R','E',' ',         '`','D','i','s','k','I','d','`',' ','=',' ','%','i',0};    row = MSI_QueryGetRecord(package->db, query, mi->disk_id);    if (!row)    {        TRACE("Unable to query row/n");        return ERROR_FUNCTION_FAILED;    }    mi->disk_prompt = strdupW(MSI_RecordGetString(row, 3));    mi->cabinet = strdupW(MSI_RecordGetString(row, 4));    mi->volume_label = strdupW(MSI_RecordGetString(row, 5));    if (!mi->first_volume)        mi->first_volume = strdupW(mi->volume_label);    ptr = strrchrW(mi->source, '//') + 1;    lstrcpyW(ptr, mi->cabinet);    msiobj_release(&row->hdr);    return ERROR_SUCCESS;}
开发者ID:NVIDIA,项目名称:winex_lgpl,代码行数:30,


示例6: WshShortcut_put_IconLocation

static HRESULT WINAPI WshShortcut_put_IconLocation(IWshShortcut *iface, BSTR IconPath){    WshShortcut *This = impl_from_IWshShortcut(iface);    HRESULT hr;    WCHAR *ptr;    BSTR path;    INT icon;    TRACE("(%p)->(%s)/n", This, debugstr_w(IconPath));    /* scan for icon id */    ptr = strrchrW(IconPath, ',');    if (!ptr)    {        WARN("icon index not found/n");        return E_FAIL;    }    path = SysAllocStringLen(IconPath, ptr-IconPath);    /* skip spaces if any */    while (isspaceW(*++ptr))        ;    icon = atoiW(ptr);    hr = IShellLinkW_SetIconLocation(This->link, path, icon);    SysFreeString(path);    return hr;}
开发者ID:UIKit0,项目名称:wine-1,代码行数:31,


示例7: AddERExcludedApplicationW

/************************************************************************* * AddERExcludedApplicationW  [[email
C++ strrchr_m函数代码示例
C++ strrchr函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。