.NET : .NET News
Updated: 7/1/2002; 9:29:31 PM.

 

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Friday, April 12, 2002

Another day with VS.NET, .NET and VSIP


I think I have something real cool now and something to soon write an article about (I am doing one for Wrox right now on Web Forms and Managed C++). I have been doing a lot of work on an advanced development environment that will become a part of VS.NET (not an add-in). As I talked about much earlier, there is VSIP and the Automation model. VSIP is a real complicated beast. I can't talk much about it because of the agreements other than to see its big and complex. Productivity in creating things with it has been low. So I decided to use the Automation model in VS.NET to do stuff that I could do. I originally was doing things in the automation model with VB.NET, port to C# and then port back to ATL/C++ COM because VSIP is all COM based still. That's the weird thing about VSIP. There is this wonderful. modern XML-everything, whizzy environment for users to develop managed (and unmanaged C++) code in but the guts of VS.NET are still years of accumulated COM and old code!

.NET (which I have been working in for 2 years) has made me forget just how hard and tedious all this COM stuff is. When I ported, the one line of C# that went through 4 objects down in the automation model become a couple dozen lines of ATL COM (yes thats with Smart pointers too). Unfornately, VSIP is not managed code in any way and you can't even create an RCW for the Interfaces either! So, I ended up leaving the VSIP code in the COM component that implements IDTWizard and it launches the C# or VB.NET wizard that creates a User Control project. Now I needed to add default implementations of methods for the thing I was creating and a custom toolbar and tools. Time for automation.

I ended up coding a VB.NET component that manipulates the VS.NET DTE model to find the right place in the UserControl1.cs file and stick in the code on the fly. Why VB.NET? Because, believe or not, the Automation model in VS.NET has problems too! The NewLine() method for instance works in VB.NET but "is not implemented for V1 in C#!" Then I wrote a C# component to grab the VS.NET Toolbox, add a custom tab and some tools. Now to call it from ATL/C++ COM unmanaged code. Here are the steps:

  1. Create a C# or VB.NET class
  2. Generate a key for it - sn -k keyfile.snk

  3. Put an assembly directive at top of file

    [(Assembly: AssemblyKeyFile("keyfile.snk")]

  4. Compile

  5. regasm file.dll /tlb to generate the COM Type Library

  6. gacutil -i file.dll to place file in GAC

  7. Copy the generated typelibraries into the directory of your C++ project

  8. #import file.tlb no_namespaces named_guids and one other I can't remember

  9. Compile C++ code and you will have access to the CCW through the types in the imported tlb

Whew! After that, I now have a COM/ATL/C++ native component making calls to two different managed components in two different languages each handling the parts they are good in. Pretty cool?

 



10:57:20 PM    


Tablets and Smart Phones. TechED report #2: My favorite "cool new thing" here at TechED? Microsoft's Tablet computer and Smart Phone. I got a chance to sit down with the Tablet team here and get my hands on a prototype Acer device. Wow, is the ink good. This device will change how we all think of computers. No longer do computers need to be stuck with a keyboard. [Robert Scoble: Scobleizer Weblog]

Ahh...yah. We have a couple of prototype tablets in our group with some NDA stuff on them. They rock!



9:12:07 PM    


Web Services Security. This is huge. [Bryce's Radio Experiments]



9:09:53 PM    


Google created a new API. Now what? There in fact were two major announcements yesterday that will have a large impact on those interested in the commercial possibilities of turning Web Spiders into Web Services. The first was clearly Google API. No question this increases awareness. But the comparitively quieter announcement made yesterday will in all likelihood have at least a long lasting impact on making all this real [Sam Ruby]

That is indeed my point too. WS_SECURITY will have a much longer lasting impact on making all of this real, not displaying a thousand Radio pages with a Google search on he person's name



9:07:50 PM    

Fawcette releases yet another .NET Magazine


Lets hope they don't morph this one into another VB magazine. I so miss Visual C++ Developer which they "assimilated" into Visual Studio Magazine promising a blend with their VB magazine. The C++ articles got less and less to none. The C# articles got less and less. The table of contents looks promising. Lets see.

9:21:14 AM    


They finally put Don Box's webcast online:

http://www.microsoft.com/usa/webcasts/ondemand/871.asp

[Matt Griffith's Radio Weblog]

Someone told me it was quite entertaining too. Some classic Box stuff about VB programmers being the Eloi (sp?) and C++ programmers being the Morlocks -)



9:04:37 AM    


© Copyright 2002 Sam Gentile.



Click here to visit the Radio UserLand website.

 


April 2002
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
Mar   May

Click on the coffee mug to add Sam Gentile's Instant Outline to your Radio UserLand buddy list.