Guest
2007-10-24T17:25:28Z
I'm kinda new to c# dotnet and think my problem is to do with using a com object through it.

I wondered if someone could post some sample code on using the client sms dll in c#?

I registered the dll using the "Add Reference" in the ide and then I've tried


      ACTIVESMSCLIENTLib.ActiveSMS s = new ACTIVESMSCLIENTLib.ActiveSMS();
      s.SendMessage(m.PhoneNumber, m.Message, 15000);

But I get an error:

Retrieving the COM class factory for component with CLSID {E2F98610-ED09-4987-9664-87E16414BF0A} failed due to the following error: 80040154.

Can anyone point out the error of my ways?
Guest
2007-10-24T17:34:43Z
Duh!

Please ignore me. Turns out it was simpler than I thought. I spent ages on this only to learn that developing it on Vista x64 and having the component registered in the registry as an x86 object is the issue!

Once I change VS to compile for x86 rather than the default "Any CPU" off she goes and it runs just fine.

Thanks anyway.