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#