Sams .NET Stuff : All my .NET stuff
Updated: 8/5/2002; 11:08:07 PM.

 

Categories:
Personal Friends:

Subscribe to "Sams .NET Stuff" in Radio UserLand.

Click to see the XML version of this web page.

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

 
 

Tuesday, April 30, 2002

Mike Deem: We released Beta 1 of the Microsoft SOAP Toolkit version 3.0 today.


11:36:41 PM    

In his post, Charles says

This C++ program compiled with /clr sums up what I don't like about Managed C++. It runs without complaint even though the buffer overrun is corrupting both allocated memory and unallocated memory, deallocated memory is accessed (admittedly the latter problem is trapped in the debug build but problems often occur only when running in released code), and an unitialized variable is used. A couple of people I've discussed this with are surprised that IL can access unmanaged types so I've included the output from ILDASM below.

void main(void)
{
  char* buff1 = new char[16];
  char* buff2 = new char[16];
  for (int i = 0; i < 33; i++)
    buff1[i] = i;
  delete buff1;
  int x;
  *buff1 = x;
}

Umm, there is nothing managed about this "Managed C++" program and thus you will not get any of the CLR benefits. I think you may be confused about Managed C++ and this is common. As I say in my book, in Chapter 7, compiling with /clr will not make *any* of your data managed. It just changes compilation to emit IL in an assembly. All of the data is *still unmanaged* and coming from the unmanaged heap. That's why you have the problems above. Only the types you specifically mark with __gc or __value will become managed and the problems will go away.

Do this and it won't run:

#include "stdafx.h"

#using <mscorlib.dll>

#include <tchar.h>

using namespace System;

 

// This is the entry point for this application

int _tmain(void)

{

// TODO: Please replace the sample code below with your own.

// char* buff1 = new __gc char[16];

char *buff1 = __gc new char[16];

char *buff2 = __gc new char[16];

for (int i = 0; i < 33; i++)

buff1[i] = i;

delete buff1;

int x;

*buff1 = x;

return 0;

}

 




11:12:15 PM    

Maintaining header files is often tedious and provides ample opportunity for mistakes. Thankfully, .NET assembly libraries erase the reliance on these files. This how-to article contrasts the new .NET assembly libraries with the older header files.
Article. Apr 29, 2002.


10:17:32 PM    

Third party vendors are already supporting .NET in a big way. This article takes a look at several components from leading .NET vendors.
Review. Apr 29, 2002.


10:16:40 PM    

Learn how to create your own file extensions and secure Web applications using HTTP Handlers and HTTP Modules.
Article. Apr 29, 2002.


10:15:47 PM    

Chris Sells announced:

Don Box's keynote at the Web Services DevCon: The Role of Virtualization in Web Services

Virtualization is a fundamental mechanism for raising the level of abstraction in software systems. All modern operating systems virtualize physical memory and interrupts through the use of a virtual memory manager and thread scheduler. Moreover, the industry at large has been moving towards more advanced execution engines such as the Common Language Runtime that virtualize memory and code into objects and types. Don Box examines role that virtualization plays in the world of XML Web Services.

Available for viewing now at http://www.technetcast.com/events/wsdc2002/

Chris & Tim

http://www.sellsbrothers.com/conference/




8:51:05 PM    

Peter reported on two things of interest to me.

  • Thomas Restrepo posted a two-part series on his experiences building a formatter for .NET remoting, as part of this effort.
  • Chris Sells posted audio and video for the WSDevCon talks. Since it's a commercial venture for him, I guess it's understandable that he's charging for access. The Don Box keynote (The Role of Virtualization in Web Services) is free, though - worth checking out.  This was an inspiring keynote and well worth checking out.
[Peter Drayton's Radio Weblog]


8:37:37 PM    


© 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