BOOLEAN
CdIsNameInExpression(
  IN  PIRP_CONTEXT IrpContext,
  IN  PCD_NAME CurrentName,
  IN  PCD_NAME SearchExpression,
  IN  ULONG  WildcardFlags,
  IN  BOOLEAN CheckVersion
  );

Routine Description:

    This routine will compare two CdName strings.  We assume that if this
    is to be a case-insensitive search then they are already upcased.

    We compare the filename portions of the name and if they match we
    compare the version strings if requested.

Arguments:

    CurrentName - Filename from the disk.

    SearchExpression - Filename expression to use for match.

    WildcardFlags - Flags field which indicates which parts of the
        search expression might have wildcards.  These flags are the
        same as in the Ccb flags field.

    CheckVersion - Indicates whether we should check both the name and the
        version strings or just the name.

Return Value:

    BOOLEAN - TRUE if the expressions match, FALSE otherwise.