0

MBN IMbnSms インターフェイスと 2G/3G/4G モデムを介して SMS メッセージを送受信するプログラムがあります。私たちのコードは Windows 7 と Windows 8.x では動作しますが、Windows 10 では失敗します。IMbnSms.GetSmsStatus() は、モデムがネットワーク上で 10 分間待機していた場合でも、常に 0x8000000A (E_PENDING) エラーを返します。IMbnSms.SmsSendPdu()は、OnSmsSendComplete イベントで E_MBN_FAILURE を取得します。

この問題を再現する GetSmsStatus() の簡単なテスト コードを次に示します。

    using MbnApi;
    using System;

    namespace GetSmsStatusTest
    {
        class Program
        {
            static void Main(string[] args)
            {
                GetSmsStatus(args[0]);
            }

            static void GetSmsStatus(string interfaceID)
            {
                try
                {
                    MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager();
                    IMbnInterfaceManager infManager = (IMbnInterfaceManager)mbnInfMgr;

                    //obtain the IMbnInterface passing interfaceID
                    IMbnInterface mbnInterface = infManager.GetInterface(interfaceID);
                    IMbnSms mbnSms = mbnInterface as IMbnSms;
                    if (mbnSms == null)
                    {
                        Console.WriteLine("Got no IMbnSms");
                        return;
                    }
                    MBN_SMS_STATUS_INFO mbnSmsStatusInfo;
                    mbnSms.GetSmsStatus(out mbnSmsStatusInfo);
                    Console.WriteLine("flag={0}, index={1}", mbnSmsStatusInfo.flag, mbnSmsStatusInfo.messageIndex);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }   
            }
    }

「netsh mbn sho int」で取得できるネットワーク インターフェイス GUID で呼び出します。

4

1 に答える 1

2

Microsoft は、7 日に入手した Windows 10 更新パッケージでこの問題を解決しました。いくつかのデータ カードで再テストしたところ、現在は機能しています。

于 2015-08-10T05:47:59.477 に答える