I am trying to send an SMS using the Windows 7 API. I have the latest Win7 SDK (v7.1) and .Net 4 installed.
I found this paper from Microsoft to implement it using managed code. I mean it looks straight forward. Please see the link.
However, before I even get up to that point, when I attempt to get the necessary interfaces I get this exception.
MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager();
IMbnInterfaceManager iMbnInterfaceManager = (IMbnInterfaceManager)mbnInfMgr;
Array interfaces = iMbnInterfaceManager.GetInterfaces(); // Error line.
COMException was unhandled
Element not found. (Exception from HRESULT: 0x80070490).
I don’t understand the error code. I have also searched the internet for similar problems and code samples to no avail.
As a note I also tried the sample C++ project from Microsoft 7 SDK and get the same error when the code tries to get the interfaces on line 240 in mbapi.cpp.
hr = g_InterfaceMgr->GetInterfaces(&psa); // Element not found (error code 0x80070490)
C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\netds\MB\mbapi
Oh I also tried it on another Windows 7 machine to no avail.
Any assistance would be very much appreciated! I will also try and expand on anything I have covered if it will help come to a solution!
Here is a tester project that throws the error in C#
I'm guessing you already noticed this, but on the page you link to, it says "This white paper provides guidelines and key steps for software developers on how to call the Windows mobile broadband API" so I'm guessing the interfaces/API only exist in the mobile OS .NET.
It depends on how you place the braces :)
(Windows Mobile) broadband API or Windows (Mobile Broadband) API
In this case the 2nd reading is correct and it does apply to the "big" Win7. The OP did not mention wherher he has some MB device on the machine. Maybe the interface provider won't work until some MB driver is installed.