Issue installing

Nov 17, 2010 at 9:00 AM

ok I will just get to the point.

Computer A

Downloaded and installed using the reg file. Referenced the dll in my app, tried opening the serial port and I recieved an exception error. After alot of messing around trying to get it to work I downloaded the source and compiled as you said. Now everything works fine :-)

Computer B

I took my App that I made on Computer A and installed on Computer B. When I run the app I get the same problem with the exception error. I have tried the reg file, I tried the dll's I downloaded from here, I tried the new dll's that I compiled and still the same problem.

Any ideas?

Coordinator
Nov 17, 2010 at 11:20 AM

Hi Gaz_83.

Thanks for trying this out and getting back at me with your issue. The reg file registers the server component of COM interop on the computer. Please provide me with more information on that specific exception, you received.

When you compile the whole stuff, VS takes care of the registration part, so you do not need the reg file.

Thus it is not too surprising that it did not work on Computer B (considering you were not succussful trying the reg file method on Computer A). As stated above I would love to get some more information on the Exception you were confronted with.

Did you try to install the reg file with admin-rights? You need to. The app you compiled on Computer A should work on any computer you were successful installing the COM interop server part. So the fastest way to success would be to compile the SLN on Computer B - your app should work after that step.

 

Regards,

Paul

Nov 17, 2010 at 11:28 AM

Hi Paul,

Thanks for getting back to me so quickly.

I will change my code to try and give me more detail on the error.

I cannot complie on computer 2 as i can not install any development software on it.

Is there away of removing what vs has done? Quote (When you compile the whole stuff, VS takes care of the registration part, so you do not need the reg file.) because if I can do that then I should get the error message back on Computer 1 and be in a better position to provide more info.

Cheers

Gaz

Coordinator
Nov 17, 2010 at 11:34 AM

Hi Gaz,

unchecking "Register for COM interop" on the Build pane of the Project's Properties page should do the job. Then rebuild the solution (with administrative privileges, of course).

Hope that helps for now. I'm really interested in the information you collect, because I did not have that issue.

Regards,

Paul

Nov 17, 2010 at 11:43 AM

Ok the error has been thrown up in VS and this is what I got

 {System.IO.Ports.InteropException: Exception of type 'System.IO.Ports.InteropException' was thrown.
   at System.IO.Ports.SerialPort.RegisterCom()
   at System.IO.Ports.SerialPort..ctor()
   at TRV.MainPage..ctor()
   at TRV.App.Application_Startup(Object sender, StartupEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)}

InnerException = null

Message = Exception of type 'System.IO.Ports.InteropException' was thrown.

StackTrace =    at System.IO.Ports.SerialPort.RegisterCom()
   at System.IO.Ports.SerialPort..ctor()
   at TRV.MainPage..ctor()
   at TRV.App.Application_Startup(Object sender, StartupEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

Hope that helps

Coordinator
Nov 17, 2010 at 3:49 PM

Alright. I found that the reg file does not work for me anymore either. So the way to do it, is via compilation.

 

You can try adding this value to the reg file:

"CodeBase"="file:///C:/<PathToSerialPortDLLFile>"

in the [HKEY_CLASSES_ROOT\CLSID\{30E24601-6E65-4FAF-9999-2B135F0B512F}\InprocServer32] section and

in the [HKEY_CLASSES_ROOT\CLSID\{30E24601-6E65-4FAF-9999-2B135F0B512F}\InprocServer32\1.0.0.0] section.

On my system the path has to be

HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{30E24601-6E65-4FAF-9999-2B135F0B512F} instead of

HKEY_CLASSES_ROOT\CLSID\{30E24601-6E65-4FAF-9999-2B135F0B512F} because of me having a 64Bit system running.

This would affect the last five sections of the file. Maybe you try this, too.


Nov 17, 2010 at 5:03 PM

That modification to the reg file seems to have solved the problem on Computer A.

Will try computer B tomorrow

Coordinator
Nov 18, 2010 at 1:35 PM

Hi Gaz,

I put a new release with modified README and reg files online, because I guess that the problem is solved. If you still have issues (maybe with the new release), just tell me and I will look into it.

Regards,

Paul