如何将文件拖放到 .MAPIMail 上

2024-04-03

给定一些文件(或 shell 文件对象),我如何调用.MAPIMail向他们注册 shell 扩展处理程序?


问题

我的计算机上有一些文件:

  • C:\Users\ian\AppData\Local\Temp\Contoso_Invoice_141174.pdf
  • C:\Users\ian\AppData\Local\Temp\Contoso_Invoice_141173.pdf
  • C:\Users\ian\AppData\Local\Temp\Contoso_Invoice_141171.pdf

我想做的程序化的相当于将它们放在.MAPIMail注册处理程序:

The Sent to文件夹的邮件收件人选项实际上是一个特殊的注册.MAPIMail扩大:

这是在系统上注册的文件类型:

HKEY_CLASSES_ROOT\.mapimail

我如何调用一个临时的drop.mapimail file?

你就不能直接看一下注册表吗?

现在,我可能是一个糟糕的开发人员,并且拼写了注册表,.mapimail条目的默认值:

CLSID\{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}

提取 clsid{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE},并确认该类已注册:

HKEY_CLASSES_ROOT\CLSID\{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}
    (default) = Desktop Shortcut
    \InProcServer32
        (default) = %SystemRoot%\System32\sendmail.dll

And use CoCreateInstance创建该 COM 对象:

IUnknown unk = CreateComObject("{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}");

然后我就进入了一个无证、不受支持的世界,我不知道我必须使用什么界面QueryInterfacefor,以及以什么顺序调用什么方法。

所以我们只剩下 shell 编程了

我想要的是可能涉及外壳的东西(伪代码):

IShellFolder desktop;
OleCheck(SHGetDesktopFolder(out desktop));

List<pidl> pidls = new List<pidl>();

ULONG chEaten = 0;
ULONG dwAttributes = 0;
PIDL pidl;

foreach (String filename in Files) do
{
    OleCheck(desktop.ParseDisplayName(0, nil, filename, out chEaten, out pidl, ref dwAttributes));

    pidls.Add(pidl);
}

//Get the shell folder of the temp folder
IShellFolder tempShellFolder;
desktop.ParseDisplayName(0, nil, GetTemporaryPath, out chEaten, out pidl, ref dwAttributes));
desktop.BindToObject(pidl, nil, IShellFolder, tempShellFolder);

//i have no idea what i've been doing; just throwing reasonable looking code together
//nobody will actually ever read this

IDontCare context;

tempShellFolder.GetUIObjectOf(0, pidls.Count, pidls, IDontCareAnymore, nil, ref context); 

除了所有代码都依赖于 a 的存在上下文菜单,我没有。没有人这么说.MAPIMail必须在任何上下文中Send to menu.

我问如何将文件拖放到.mapimail file.

还有我的上帝。

为什么不直接使用 MAPI?

因为当您是在安装了 Office 64 位的 Windows 64 位上运行的 32 位应用程序时,不会安装 MAPI 客户端。所以我需要能够完成用户已经可以完成的事情。


虽然它没有回答我的问题,但雷蒙德指出这是一个愚蠢的问题。任何心智正常的人都不应该尝试向收件人发送邮件。但我很绝望!

事实证明我并没有完全陷入困境。虽然有一个bitness当从 32 位应用程序处理 64 位 Outlook(MAPI 提供程序)(反之亦然)时,这是一场噩梦,有一个出局了。

如果我使用just MapiSendMail, and no otherMAPI函数,可以安全地跨越32位/64位障碍。从在 32 位和 64 位平台上构建 MAPI 应用程序 http://msdn.microsoft.com/en-us/library/office/dd941355.aspx:

32 位 MAPI 应用程序和 64 位 Outlook

不支持在安装有 64 位 Outlook 和 64 位 Windows 的计算机上运行 32 位 MAPI 应用程序。应用程序开发人员必须将应用程序更新并重建为适用于 64 位平台的 64 位应用程序。这是因为 32 位应用程序无法加载 64 位 Msmapi32.dll 文件。应用程序开发人员必须进行少量 API 更改才能成功地为 64 位环境构建代码。 MAPI 头文件已通过这些更改进行更新,以支持 64 位平台。您可以在以下位置下载这些头文件Outlook 2010:MAPI 头文件 http://www.microsoft.com/downloads/details.aspx?FamilyID=f8d01fc8-f7b5-4228-baa3-817488a66db1。开发人员可以使用同一组 MAPI 头文件来构建 32 位和 64 位 MAPI 应用程序

这听起来像是所有希望都破灭了。但是,在 Windows 7 上:

例外:MAPISendMail

然而,所有 Simple MAPI 和 MAPI 元素中的一个函数调用,MAP发送邮件,将在 Windows-32 位 on-Windows-64-bit (WOW64) 或 Windows-64-bit-on-Windows-32-bit (WOW32) 方案中成功,并且不会导致上述警报。此 WOW64 方案仅适用于 Windows 7。图 2 显示了一个 WOW64 方案,其中 32 位 MAPI 应用程序调用MAP发送邮件在安装了 64 位 Windows 7 的计算机上。在这种情况下,MAPI 库进行 COM 调用来启动 64 位 Fixmapi 应用程序。 Fixmapi 应用程序隐式链接到 MAPI 库,该库将函数调用路由到 Windows MAPI 存根,Windows MAPI 存根又将调用转发到 Outlook MAPI 存根,从而使 MAPISendMail 函数调用能够成功。

因此,作为 Delphi Jedi 用户,他们的简单发送电子邮件函数将会失败(因为它们使用too muchMAPI)。所以我必须创建自己的:

procedure MapiSimpleSendMail(slFiles: TStrings; ToEmailAddress: string=''; ToName: string='');
var
    mapiMessage: TMapiMessage;
    flags: LongWord;
//  senderName: AnsiString;
//  senderEmailAddress: AnsiString;
    emailSubject: AnsiString;
    emailBody: AnsiString;
//  sender: TMapiRecipDesc;
    recipients: packed array of TMapiRecipDesc;
    attachments: packed array of TMapiFileDesc;
    i: Integer;
    hr: Cardinal;
    es: string;
const
    MAPI_E_UNICODE_NOT_SUPPORTED = 27; //Windows 8. The MAPI_FORCE_UNICODE flag is specified and Unicode is not supported.
begin
    ZeroMemory(@mapiMessage, SizeOf(mapiMessage));

{   senderName := '';
    senderEmailAddress := '';

    ZeroMemory(@sender, sizeof(sender));
    sender.ulRecipClass := MAPI_ORIG; //MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG
    sender.lpszName := PAnsiChar(senderName);
    sender.lpszAddress := PAnsiChar(senderEmailAddress);}
    mapiMessage.lpOriginator := nil; //PMapiRecipDesc; { Originator descriptor                  }

    if ToEmailAddress <> '' then
    begin
        SetLength(recipients, 1);
        recipients[0].ulRecipClass := MAPI_TO;
        recipients[0].lpszName := LPSTR(ToName);
        recipients[0].lpszAddress := LPSTR(ToEmailAddress);

        mapiMessage.lpRecips := @recipients[0]; //A value of NULL means that there are no recipients. Additionally, when this member is NULL, the nRecipCount member must be zero.
        mapiMessage.nRecipCount := 1;
    end
    else
    begin
        mapiMessage.lpRecips := nil; //A value of NULL means that there are no recipients. Additionally, when this member is NULL, the nRecipCount member must be zero.
        mapiMessage.nRecipCount := 0;
    end;

    mapiMessage.lpszMessageType := nil;

    if slFiles.Count > 0 then
    begin
        emailSubject := 'Emailing: ';
        emailBody :=
                '          '+#13#10+ //Yes, the shell really does create a blank mail with a leading line of ten spaces
                'Your message is ready to be sent with the following file or link attachments:'+#13#10;


    SetLength(attachments, slFiles.Count);
        for i := 0 to slFiles.Count-1 do
        begin
            attachments[i].ulReserved := 0; // Cardinal;        { Reserved for future use (must be 0)     }
            attachments[i].flFlags := 0; // Cardinal;           { Flags                                   }
            attachments[i].nPosition := $FFFFFFFF; //Cardinal;         { character in text to be replaced by attachment }
            attachments[i].lpszPathName := PAnsiChar(slFiles[i]);    { Full path name of attachment file       }
            attachments[i].lpszFileName := nil; // LPSTR;         { Original file name (optional)           }
            attachments[i].lpFileType := nil; // Pointer;         { Attachment file type (can be lpMapiFileTagExt) }

            if i > 0 then
                emailSubject := emailSubject+', ';
            emailSubject := emailSubject+ExtractFileName(slFiles[i]);
            emailBody := emailBody+#13#10+
                    ExtractFileName(slFiles[i]);
        end;

        emailBody := emailBody+#13#10+
                #13#10+
                #13#10+
                'Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments.  Check your e-mail security settings to determine how attachments are handled.';


        mapiMessage.lpFiles := @attachments[0];
        mapiMessage.nFileCount := slFiles.Count;
    end
    else
    begin
        emailSubject := '';
        emailBody := '';

        mapiMessage.lpFiles := nil;
        mapiMessage.nFileCount := 0;
    end;

    {
        Subject
        Emailing: 4388_888871544_MVM_10.tmp, amt3.log, swtag.log, wct845C.tmp, ~vs1830.sql

        Body
                  <-- ten spaces
        Your message is ready to be sent with the following file or link attachments:

        4388_888871544_MVM_10.tmp
        amt3.log
        swtag.log
        wct845C.tmp
        ~vs1830.sql


        Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments.  Check your e-mail security settings to determine how attachments are handled.
    }
    mapiMessage.lpszSubject := PAnsiChar(emailSubject);
    mapiMessage.lpszNoteText := PAnsiChar(emailBody);


    flags := MAPI_DIALOG;

    hr := Mapi.MapiSendMail(0, 0, mapiMessage, flags, 0);
    case hr of
    SUCCESS_SUCCESS: {nop}; //The call succeeded and the message was sent.
    MAPI_E_AMBIGUOUS_RECIPIENT:
        begin
            //es := 'A recipient matched more than one of the recipient descriptor structures and MAPI_DIALOG was not set. No message was sent.';
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_AMBIGUOUS_RECIPIENT', SysErrorMessage(hr)]);
        end;
    MAPI_E_ATTACHMENT_NOT_FOUND:
        begin
            //The specified attachment was not found. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_ATTACHMENT_NOT_FOUND', SysErrorMessage(hr)]);
        end;
    MAPI_E_ATTACHMENT_OPEN_FAILURE:
        begin
            //The specified attachment could not be opened. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_ATTACHMENT_OPEN_FAILURE', SysErrorMessage(hr)]);
        end;
    MAPI_E_BAD_RECIPTYPE:
        begin
            //The type of a recipient was not MAPI_TO, MAPI_CC, or MAPI_BCC. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_BAD_RECIPTYPE', SysErrorMessage(hr)]);
        end;
    MAPI_E_FAILURE:
        begin
            //One or more unspecified errors occurred. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_FAILURE', SysErrorMessage(hr)]);
        end;
    MAPI_E_INSUFFICIENT_MEMORY:
        begin
            //There was insufficient memory to proceed. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_INSUFFICIENT_MEMORY', SysErrorMessage(hr)]);
        end;
    MAPI_E_INVALID_RECIPS:
        begin
            //One or more recipients were invalid or did not resolve to any address.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_INVALID_RECIPS', SysErrorMessage(hr)]);
        end;
    MAPI_E_LOGIN_FAILURE:
        begin
            //There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_LOGIN_FAILURE', SysErrorMessage(hr)]);
        end;
    MAPI_E_TEXT_TOO_LARGE:
        begin
            //The text in the message was too large. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_TEXT_TOO_LARGE', SysErrorMessage(hr)]);
        end;
    MAPI_E_TOO_MANY_FILES:
        begin
            //There were too many file attachments. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_TOO_MANY_FILES', SysErrorMessage(hr)]);
        end;
    MAPI_E_TOO_MANY_RECIPIENTS:
        begin
            //There were too many recipients. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_TOO_MANY_RECIPIENTS', SysErrorMessage(hr)]);
        end;
    MAPI_E_UNICODE_NOT_SUPPORTED:
        begin
            //The MAPI_FORCE_UNICODE flag is specified and Unicode is not supported.
            //Note  This value can be returned by MAPISendMailW only.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_UNICODE_NOT_SUPPORTED', SysErrorMessage(hr)]);
        end;
    MAPI_E_UNKNOWN_RECIPIENT:
        begin
            //A recipient did not appear in the address list. No message was sent.
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_UNKNOWN_RECIPIENT', SysErrorMessage(hr)]);
        end;
    MAPI_E_USER_ABORT:
        begin
            es := 'The user canceled one of the dialog boxes. No message was sent.';
            raise Exception.CreateFmt('Error %s sending e-mail message: %s', ['MAPI_E_USER_ABORT', es]);
        end;
    else
        raise Exception.CreateFmt('Error %d sending e-mail message: %s', [hr, SysErrorMessage(hr)]);
    end;
end;

Note:任何代码都会发布到公共领域。无需归属。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何将文件拖放到 .MAPIMail 上 的相关文章

  • 如何使用本机 C++ 检查进程是否在 Windows 7 中具有提升的权限?

    如何检查进程在 Windows 7 中是否具有提升的权限 使用本机 C 而不是 C C net 我有时一直在寻找答案 但我只能找到使用 NET 框架的答案 最简单的方法是调用 IsUserAnAdmin 函数 如果您需要更高的精度 您也可以
  • C++:获取注册表值仅给出第一个字符[重复]

    这个问题在这里已经有答案了 我试图从注册表中获取字符串值 但我只得到第一个字母 HKEY hKey char gamePath MAX PATH if RegOpenKeyEx HKEY CURRENT USER L Software Bl
  • 如何使用 Visual C++ 在 win32 API 中创建圆形/圆形按钮

    我有一个 Visual C 中的 Window Win32 API 应用程序 我没有使用MFC 我必须创建一个带有位图图像的圆形 圆形按钮 我的应用程序有一个皮肤视图 任何人都可以帮助我完成这项任务吗 按钮是窗口 您可以使用 CreateW
  • GetDeviceCaps获取的物理屏幕尺寸不是我屏幕的实际物理尺寸

    在 Windows 7 下 我使用以下代码来获取屏幕的物理宽度 以毫米为单位 hSize 为 482 比实际尺寸约 310 用尺子测量 大得多 这是为什么 HDC screen GetDC NULL int hSize GetDeviceC
  • 在 C++ 应用程序中显示/隐藏桌面图标

    右键单击桌面 取消选中 视图 gt 显示桌面图标 桌面上的所有图标都会消失 是否可以从 C 应用程序显示 隐藏桌面图标 你有c 代码的例子吗 预先非常感谢您的任何建议 SHGetSet设置 http msdn microsoft com e
  • 将第二个显示器显示设置更改为复制

    我正在尝试以编程方式使第二个监视器具有重复的显示 我的下面的功能应该将第二个显示器的显示更改为 重复显示 即使第二个显示器显示第一个 主显示器上的所有内容 我的问题 当我运行我的函数时 它成功找到第二个监视器 并通过更改 DEVMODE d
  • 如何从具有管理员权限的应用程序接收键盘输入到非管理员应用程序?

    我编写了一个应用程序 该应用程序具有覆盖类型的窗口 可以通过热键显示和隐藏该窗口 而另一个应用程序具有焦点 所述另一个应用程序是一个以管理员权限运行的 DirectX 游戏 我已经尝试了 3 种可能的解决方案 以便在其他应用程序中按下我的热
  • 使用createremotethread注入dll

    createremotethread如何在进程内执行dll 它使用的参数之一是 loadlibraryA 所以我得到了它在进程中执行 loadlibrary 函数的部分 然后它应该将上下文切换到内核模式 dll 是否由具有 loadlibr
  • 将 CreateThread 与 lambda 结合使用

    只是试验 但我想知道是否可以使该代码工作 如编译 void main int number 5 DWORD dontThreadOnMe PVOID PVOID data int value int data cout lt lt valu
  • 如何获取重定向路径的实际路径?

    在 64 位上运行的 32 位进程会得到广义的由于文件重定向 指向重定向路径的路径 致电GetCurrentDirectory 例如 如果进程正在运行 Windows SysWOW64会得到结果 Windows System32 不过 很有
  • 在 C# 中查看非托管 dll 上的导出表

    我目前正在尝试创建一个 C 应用程序 该应用程序将允许我查看非托管 DLL 中的导出表 我的问题是 一旦我获得了所需的所有指针 我不知道如何循环访问 API 为我提供的信息 这是我现在所拥有的 using System using Syst
  • WIN32,C++:是否可以在不隐藏窗口的情况下对窗口进行动画处理?

    我有一个编辑控件 一个文本字段 我想要为其设置动画 我想要的动画是它滑出 为该文本字段创建一条额外的线 我可以为我的文本字段设置动画并使其变大 但是要显示滑动动画 我首先必须隐藏它 这意味着整个文本字段会滑出 就像第一次从无到有一样 而不是
  • HBRUSH 转 RGB 值

    你能得到RGB值吗HBRUSH或者从刷子ID 例如 我正在寻找GRAY BRUSH以 RGB 值表示 您想使用获取对象 http msdn microsoft com en us library windows desktop dd1449
  • 32 位 OpenFileDialog --> 64 位 System32?

    在 32 位程序中 如何让打开 保存文件对话框显示 64 位系统的 System32 文件夹中的文件 Wow64DisableWow64FsRedirection不起作用 因为由于某种原因它不适用于对话框 我猜是因为它位于不同的线程上 当然
  • 如何从任何进程关闭 Windows 上的套接字(ipv4 和 ipv6)连接?

    如何在 Windows 上关闭 tcp v4 和 tcp v6 连接 我不想终止具有开放连接的整个进程 因为这显然会将其他人踢出该进程 我需要从一个单独的进程执行此操作 因此无法访问套接字句柄等 我正在使用 Windows API 来获取
  • 以编程方式最小化/恢复窗口,跳过动画效果

    我需要对窗口列表执行多项操作 最小化其中一些 恢复其他 以便立即在两组或多组窗口之间切换 这样做的问题是最小化和恢复窗口时可以看到的动画 整个过程看起来很糟糕 所有这些动画都进进出出 上下移动 但是 我无法禁用这些动画 因为这是针对其他计算
  • 修改代码以从 Windows 中的 PE 可执行文件检索双重签名信息?

    我已经挣扎了一段时间想要修改这段代码示例 https support microsoft com en us help 323809 how to get information from authenticode signed execu
  • SetCurrentDirectoryW 中的错误 206

    在我之后之前不清楚的问题 https stackoverflow com questions 44389617 long path name in setcurrentdirectoryw 我以某种方式能够创建一个具有长路径名的目录 但是
  • 从 .NET 设置系统时区

    有没有人有一些代码可以从 NET 获取 TimeZoneInfo 字段并执行互操作代码以通过 SetTimeZoneInformation 设置系统时区 我意识到它基本上是将 TimeZoneInfo 成员映射到结构成员 但对我来说 这些字
  • 在没有主窗口的 MFC 应用程序中创建多个对话框,它们成为彼此的子级

    标题已更新 继从this https stackoverflow com questions 2729371 creating multiple mfc dialogs through com strange behaviour问题 现在我

随机推荐

  • 具有扩展方法的 Kotlin 数据绑定

    我正在尝试在 Android 的数据绑定中使用 Kotlin 扩展方法 例如 调用 onclick 处理程序 所以我编写了这段代码 posttest list item xml
  • 输入文件大小和内容在 macOS 上不会更新

    我编写了一个基于网络的小型工具 它使用文件输入来读取不断变化的文件 用户手动选择它 一次 JavaScript 会跟踪它的更改时间 上次文件修改时间和文件大小 如果已更改 则会再次读取文件内容 这在 Windows 上的所有浏览器中都可以正
  • PHP AWS SDK 3错误:AWS HTTP错误:cURL错误6:无法解析主机:s3.oregon.amazonaws.com

    我正在尝试连接到 AWS 版本 3 SDK 存储桶 但是 我收到以下错误 PHP 致命错误 未捕获异常 Aws S3 Exception S3Exception 并显示消息 在 上执行 PutObject 时出错 https s3 oreg
  • 我如何在 codeigniter 中创建一个虚荣网址

    我如何在 codeigniter 中创建一个虚荣网址 我在框架中执行此操作确实遇到困难 而且似乎没有任何好的答案 有可能 我正在我的一个项目中使用它 这是 CodeIgniter 论坛上的一个帖子 展示了如何做到这一点 http codei
  • 您遇到过的最好的源代码注释是什么? [关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • 使用 .NET Core 时是否需要 AssemblyInfo?

    之前 AssemblyInfo cs文件是由 Visual Studio 自动创建的 用于包含程序集范围的属性 如 AssemblyVersion AssemblyName 等 在 NET Core 和 ASP NET Core 中 pro
  • T-SQL - 按周进行透视

    我目前正在尝试创建一个 T SQL 它运行表中的交货列表 并按客户和仓库对它们进行分组 因此每一行都将是 客户 仓库 总价值 称为费率的列的总和 然而 客户希望将 总价值 分为过去 9 周 因此 我们将拥有如下列 而不是总价值 22 01
  • 为什么我的 rustup rust-toolchain 文件没有覆盖默认值?

    我想使用 Rust 每晚 构建来与 Arrow 和 Datafusion 配合使用 根据这个帖子 https stackoverflow com questions 58226545 how to switch between rust t
  • ESP8266 I2C从机不确认数据

    我有一个 TM4C123 处理器作为 I2C 主处理器 一个 ESP8266 作为从处理器 对于 ESP 我使用的是 Arduino IDE 并在 2 5 2 版安装了 ESP8266 支持 它应该支持 I2C 从模式 但是 我无法让它工作
  • NsdManager.DiscoveryListener.onServiceFound 的 NsdServiceInfo 中 Host 为 null

    我试图将 NsdServiceInfo 的 mHost 作为参数传递给 NsdManager DiscoveryListener onServiceFound 但它为空 我有两个 Android 设备 其中设备 1 是服务器 设备 2 是客
  • 如何添加到表过滤器以允许多个复选框选择以及从下拉列表中进行过滤?

    我有一个可以通过多个复选框以及 选择 下拉列表进行过滤的表格 本质上 我想要做的是单击多个复选框 以便找到包含该类 例如类 1 和 3 的每一行 然后按位置对其进行过滤 此时我已经非常接近了 我可以从复选框中选择位置 这也是一个类 两个字母
  • 基于正则表达式以闪亮方式突出显示 DT 中的单词

    使用闪亮的 DT 我希望能够突出显示所选单词 环境searchHighlight TRUE接近我想要的 但这也会突出显示包含搜索的单词 例如 如果我搜索 on 它也会匹配 stone 突出显示中间的 on 示例图片 我可以优化搜索选项reg
  • 在单遍中执行多次还原

    在流的单次传递中执行多次归约的习惯用法是什么 是否只是拥有一个大的减速器类 即使这违反了 SRP 如果需要不止一种类型的减速计算 大概您希望避免进行多次传递 因为管道阶段可能很昂贵 或者您希望避免收集中间值以便通过多个收集器运行它们 因为存
  • 如何对迭代器进行排序而不将其全部放入向量中?

    我正在构建一个类似于生成器的通用接口 它将数据从一个流传输到另一个流 最终执行以下操作 file gt toCsv gt filter gt sort gt filter 我知道如何对向量 切片进行排序 但是如何从传入流 迭代器中进行排序而
  • 文件系统观察器内部缓冲区溢出

    当我尝试监视网络路径上的文件夹 DFS 分布式文件系统 时 出现 System IO Internal BufferOverflowException 异常 同时进行许多更改 当 FileSystemWatcher 监视不使用此文件系统的本
  • Google G Suite SAML SSO 域登录页面

    我正在使用 Google G Suite 并创建了一个使用 G Suite SAML 管理用户登录的应用程序 看 一切都很顺利 但是当用户没有登录我们的 G Suite 帐户并且也登录了他们自己的 Google 帐户时 我遇到了问题 在这种
  • 在弹性中映射 geo_point 字段数组

    我想将一些 JSON 持久保存到 elastic search 中 看起来有点像这样 name value points lat 0 0 lon 0 0 lat 1 0 lon 1 0 点是弹性中 geo point 类型的列表 因为它们是
  • 按对角线旋转数据框

    给定一个数据框 col1 col2 col3 0 1 4 7 1 2 5 8 2 3 6 9 如何得到这样的东西 0 1 2 0 1 0 2 0 3 0 1 5 0 4 0 7 0 2 9 0 6 0 NaN 3 NaN 8 0 NaN 如
  • 我如何跟踪退回的电子邮件?

    我想跟踪从我的服务器发送的退回电子邮件 我看了一些资料 发现退回的邮件都存储在邮箱中 直接读取邮箱文件就可以检测到 使用 php 检查退回邮件 https stackoverflow com questions 4243100 check
  • 如何将文件拖放到 .MAPIMail 上

    给定一些文件 或 shell 文件对象 我如何调用 MAPIMail向他们注册 shell 扩展处理程序 问题 我的计算机上有一些文件 C Users ian AppData Local Temp Contoso Invoice 14117