导航:  Windows Procedures >

AfxPathCommonPrefix

上一页返回章节概述下一页

描述

 

比较两个路径以确定它们是否共用一个前缀.前缀是这些类型之一:"C:\", ".", "..", "..\".

 

FreeBASIC 语法

 

FUNCTION AfxPathCommonPrefix ( _

  BYREF wszFile1 AS CONST WSTRING, _

  BYREF wszFile2 AS CONST WSTRING _

) AS CWSTR

 

参数

 

wszFile1

 

包含第一个路径名的字符串.

 

wszFile2

 

包含第二个路径名的字符串.

 

返回值

 

共同前缀.

 

引用文件

 

AfxPath.inc

 

Sample Code

 

DIM cws AS CWSTR = AfxPathCommonPrefix("C:\win\desktop\temp.txt", "c:\win\tray\sample.txt")