Monday, August 24, 2009

Farewell, D430... It's Been Real

Well, in spite of all the headaches and issues I went through with my old D430, it's been sad to see it go... Today, I imaged it for a co-worker and put WinXP back on it. I felt bad. It's kind of like reclaiming land, building some futuristic development on it, and then clearing it again to turn it into a waste dump. The machine was INSTANTLY 30% slower and I'm sure it will just go downhill from here. Bummer.

Farewell D430. I wish I could say you were going to a better place...

Saturday, August 22, 2009

D630 System Up and Running on 9.04

Gotta love Ubuntu. Just one day later and I'm fully up and running. Bluetooth is working great (send-recieve from phone, check. bluetooth audio for headset, check.), nvidia graphics working great (after installing proprietary driver version 180), wireless working great (Broadcom B43 Wireless proprietary driver and updated OS). Yep, everything working great! I've updated my Bluetooth Headset post to include more accurate information on how I got it working this time around. Just do a search or click here.

Friday, August 21, 2009

"New" Test Subject

I won't go into how (sad story), but I was just given a Latitude D630 to possibly switch out my D430. I've been VERY happy running Ubuntu 8.10 on my D430 but am now interested to see how 9.04 works on the D630. With the NVidia card, faster CPU, and other goodies, it ought to be a slightly better, albeit heavier, experience.

I'll post some of my findings here in the next few days.

Thursday, August 6, 2009

Exposing .NET as COM (Windows)

Below didn't work for me, so I'm trying these links instead:

Sorry, real world problem here - need to write it down:

(Ripped shamelessly from Experts-Exchange )

Ok, to make a VB Component COM callable, follow the instructions below:

1) Open up the Visual Studio .NET command prompt, and change to your project directory (where your .sln file is located). Whenever I refer to the command prompt, I mean the VS.NET command prompt. To open it, go to Start->Program Files->Microsoft Visual Studio .NET->Visual Studio .NET Tools->Visual Studio .NET Command Prompt. You may want to put a link to it on your quickbar.

In the command prompt, while in your project directory, type:

sn -k key.snk

This will create a strong name RSA key file with a public and private key. There are security implications if you create any components that are distributed outside your company, which we should discuss if you have this situation.

2) In your assembly's AssemblyInfo.vb file, create two attributes, which you can put right at the end of your file:

<Assembly: AssemblyDelaySign(False)>
<Assembly: AssemblyKeyFile("..\..\key.snk")>

Because the strong name signing of your assembly will occur on the Debug or Release assembly, you need to provide a relative path to your .snk file.

3) In your assembly project properties, go to Configuration Properties -> Build -> Register for COM Interop. Compile your assembly. This will create a .tlb file in the build directory that you can add into any VB or other COM clients for testing. This will also register the .NET assembly for testing on a development machine without having to use the following steps.

** If you are testing on your own machine, with the ASP in a local IIS server, you can stop now, and use the component using CreateObject("MyAssembly.Myclass"). ***

For server deployment, continue below:

4) Copy your Release assembly to whereever you would like on your server machine.

5) Make sure you have the .NET runtime installed on the server. I prefer not to install the entire SDK, but just the 20Mb redistributable.

6) Open a command prompt (regular, since only the SDK creates the special .NET one). Change the directory to:

C:\Windows\Microsoft .NET\Framework\v1.0.3705 (or whatever version of the Framework you are running)

7) Run "gacutil -i c:\where ever you put it\myassembly.dll" to install your component into the Global Assembly Cache. This is the simplest approach and does not require any special handling of your component.

If you have to uninstall from the GAC, just run "gacutil -u myassembly", without a path.

8) Run "regasm c:\where ever you put it\myassembly.dll" to have your component registered as COM callable in the registry.

If you have to uninstall from the registry, run "regasm c:\where ever you put it\myassembly.dll /unregister".

Now you should be able to call your DLL from COM.