Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I can call an application named "PinPoint.Plate" with Visual Basic, Python and Mathematica version 8 but not with version 9. I can still call Excel though. How can I fix this? This is what I did:

Needs["NETLink`"]
InstallNET[];
NETLink[];
p = CreateCOMObject["PinPoint.Plate"]

gives the error:

 (* CreateCOMObject::netexcptn: A .NET exception occurred: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {9B7024E3-BD35-11D2-8EE4-0080C70A9C3D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at Wolfram.NETLink.Internal.CallPacketHandler.createCOM(KernelLinkImpl ml). >> *)
share|improve this question
1  
for starters, put a semi between the Needs and the InstallNET. –  Andreas Lauschke Mar 29 '13 at 20:40
    
I guess it could have to do with the .NET version that is used. Version 9 uses .NET 4.0 while Version 8 seems to use 2.x according to ShowNETConsole. I guess that somehow you need to ensure that PinPoint.Plate is registered in such a way that the .NET version used by mathematica sees it. I'm no .NET expert and don't know PinPoint.Plate, so I don't have an idea how to achieve that... –  Albert Retey Mar 30 '13 at 10:33

1 Answer 1

This is apparently a 32-bit COM object, so you need to force .NET/Link to run in 32-bit mode:

Needs["NETLink`"];
ReinstallNET["Force32Bit" -> True];
p = CreateCOMObject["PinPoint.Plate"]

Generally, the only time you need to worry about bit-ness issues is when you are calling non-.NET code, such as a 32-bit DLL via DefineDLLFunction or, as here, a 32-bit COM object.

share|improve this answer
    
WOW That was great it now works. THANKS!!! But it still doesnt call the methods quite right. I explore it a bit more –  PaulB Apr 16 '13 at 20:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.