==========================================================
CodeGuru
Newsletter
June 8, 2004
http://www.CodeGuru.com
This
newsletter is part of the Developer.com, EarthWeb, and internet.com
networks.
Jupitermedia Corporation
___________________________ Sponsors
________________________________
Search Engine Strategies Summer
2004
_____________________________________________________________________
==========================================================
All
newsletters are sent from the domain “internet.com.”
If configuring e-mail
or Spam filter rules, please use this
domain name (not the entire “from”
address, which varies).
==========================================================
TOPICS:
–> Editorial –
… Getting Ready for SP2
… May Book Winners
–> New Articles
on CodeGuru:
==> C#
– Two Quick Ways to Perform ASP.NET Authentication
– Inter-Process
Communication in .NET Using Named Pipes, Part 2
– Monitoring Clipboard
Activity in C#
– [Updated] MSIL Tutorial
==> C++
– Serial Communications with ActiveX
– Simple Shell Extension to
Manupulate File Summary Information
– [Updated] ImageTextButton
– Keeping
Your PocketPC Application’s Communications Working
==> VB
– VB .NET Versioning
– It Is a Matter of State
– Visual Studio.NET
Style Tear Off Panes – Part II
–> Discussion Groups
–> Highlighted new articles on Developer.com
1. Using SQL Server 2000 Extended
Properties
2. Opinion Piece: The Outsourcing
Question
3. Q&A with Thomas Schaeck, Architect of IBM
WebSphere Portal
4. Creating Interactive GUIs with Swing’s
MVC Architecture Part 2: Dynamic View for a Static Model
/——————————————————————-
Search
Engine Strategies Conference & Expo 2004, the premier event
for search
engine marketing & optimization, comes to San Jose
August 2-5, 2004. Be
part of this exclusive gathering of search
professionals that features
world-renowned search engine
expert Danny Sullivan. Learn the basics &
practical knowledge of
search engine marketing and fully understand how
search engines
interact with your Web site & ways to improve your
listings. Register
early & save!
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,fn3a,7fgr,jorm,i5r0
————————————————————–adv.-/
==========================================================
Comments
from the
Editor
==========================================================
Welcome to another installment of the CodeGuru Update. Over the last couple
of weeks I have mentioned a few things that have been announced from Microsoft.
This week I’m going to mentioning a little more on the Windows XP Service Pack
2.
There is a chance that SP2 could impact your applications in a number of
ways. This service pack brings changes to the internals of Windows XP that will
cause changes. First, there will be increased network protection. This
includes the use of a Windows firewall, reduced privileges for RPC
services, and DCOM access control restrictions.
There will also be better email security including attachment controls.
Web browsing will also be made more secure by including a pop-up manager and by
locking the local machine zone down. Yet another area of change is in the area
of new memory protection. SP2 will also include Hardware enforced data exception
prevention (DEP).
This all adds up to changes in networking, email/IM, Web access, and hardware
usage. These changes to the underlying Windows code will thus result in changes
to the way things work for many applications.
One of the things that Microsoft has done in this service pack is to
recompile the core components of Windows. They used some of the optimization
features that are available in Visual C++. For example, they used the /GS switch
when compiling. You should use similar switches when compiling your own
programs.
The /GS switch should be used when compiling. This will help to provide
better security. This was introduced in VC++ 7.0 to do a buffer security check.
By using this switch, you can detect potential buffer overruns which could be
exploited. Safer exception handling, the avoidance of vulnerable pointer
parameters in functions, and other potential liabilities in security can be
caught using this switch.
In addition to the /GS switch, you should also consider WPO and PGO.
WPO is Whole Program Optimization. This has been available since VC++ 2002.
If you use WPO, then your entire program will be evaluated at one time in
order to look for optimizations. This enables better inlining of code, stack
alignment, and better custom calling conventions. You implement WPO by including
the /GL switch when you compile and the /LTCG switch when linking. In Visual
Studio 2005, even more improvements have been made in WPO.
PGO (also called POGO) is Profile Generated Optimization. The addition of PGO
in Visual Studio adds a number of optimizations including:
— Switch expansion
— Better inlining decisions
— function/basic
block layout
— cold code separation
— virtual call speculation
—
partial inlining
Taking the time to optimize is generally low on a programmers “to-do” list.
If your application is large, chances are you will gain performance and other
benefits by using PGO. Someone made the comment that if you save a user 10
seconds and you have a million users, then you just saved over 115 days worth of
time.
Optimizing and using the buffer security check switch are just two ways to
begin making your applications cleaner and more secure. Additionally, by using
these switches, you are decreasing the chances that your application will have
problems running on Windows XP SP2.
One final note on SP2: You may want to check out a recent article posted by
InternetNews: XP SP2: Do’s & Don’ts For Web Sites
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,7jnw,mbsh,jorm,i5r0
… May Book Winners …
As has been the case for several months now, I’ve chosen two people from
those that submitted articles in the past month. They each get their choice of
either the CodeGuru Visual C++ Goodies book or Kick Start Visual C++ .NET by
Kate Gregory. The lucky people for May are:
– Sonu Kapoor
– Eric Shan
They each have 60 days to get me their mailing address and choice of book!
Congratulations to both of them as well as the past winners.
Until next week!
Brad!
—————————
Brad Jones
www.CodeGuru.com
—————————
… Recently Published Books
For those of you keeping up by reading books. The following are just a
few of the new books that have been recently released. If you’ve read any of
these, feel free to write a review to be posted on CodeGuru. See the submission
guidelines at:
https://www.codeguru.com/review-guidelines.php
–> Service-Oriented Architecture
By Thomas Erl for
Prentice Hall/PTR
550 pages for $39.99
http://books.internet.com/books/0131428985
“A Field Guide to Integrating XML and Web Services”
–> Covert Java
By Alex Kalinovsky for Sams Publishing
280 pages for $29.99
http://books.internet.com/books/0596007574
“Techniques for Decompiling, Patching, and Reverse Engineering”
=========================================================
New
& Updated Articles on
CodeGuru
==========================================================
Following are short descriptions of new articles on CodeGuru. If you are
interested in submitting your own article for inclusion on the site, then you
will find guidelines located at http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,fka1,909i,jorm,i5r0
This week’s posted CodeGuru articles:
==> C#
– Two Quick Ways to Perform ASP.NET Authentication
By Anand
Narayanaswamy
By applying ASP.NET programming logic, you can store user data
in either XML files or a Web configuration file and then validate users using
those files. Learn how to apply both of these simple methods of
authentication.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,akx7,gzs7,jorm,i5r0
– Inter-Process Communication in .NET Using Named Pipes, Part 2
By Ivan
L
Describes how to build a .NET Named Pipes multithreaded server and a client
communicating with it.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,iuyq,4njj,jorm,i5r0
– Monitoring Clipboard Activity in C#
By Tom Archer –
Learn to control
your Clipboard contents.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,9pui,80ag,jorm,i5r0
– [Updated] MSIL Tutorial
By Alex F
Managed C++, C#, VB .NET, and other
.NET programming languages are compiled to IL code (or MSIL). Learning MSIL
gives you the chance to understand some things that are generally hidden. While
you never need to write programs in MSIL directly, in some difficult cases it is
very useful to open the MSIL code and see how things are done.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,f9rd,ltw2,jorm,i5r0
==> C++
– Serial Communications with ActiveX
By Mongi MAHMOUDI
Discover how to
make serial communication (RS232) with MSComm.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,6yj7,818w,jorm,i5r0
– Simple Shell Extension to Manupulate File Summary Information
By Ejaz
Anwer
A very basic shell extention to add and reterive the comments of the
files.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,6z1y,be8j,jorm,i5r0
– [Updated] ImageTextButton
By Anurag Velekkattu
Learn about a Owner
Draw button that loads a bitmap and embeds text on it.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,8fnq,vcu,jorm,i5r0
– Keeping Your PocketPC Application’s Communications Working
By Alex
Gusev
If you wrote PocketPC applications that used RAS on a version of Pocket
PC before 2002, then you may find that they don’t work with Pocket PC 2002 or
later. Learn how to give new life to these RAS applications.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,5v3d,fbbw,jorm,i5r0
==> VB
– VB .NET Versioning
By Josip Medved
Use VB6 AutoIncrement
versioning in .NET projects.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,l1vq,iwws,jorm,i5r0
– It Is a Matter of State
By Paul Kimmel
Learn about the State pattern,
which permits an object to change its behavior dynamically by changing its
internal state, creating the illusion that the object has changed.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,1vaf,6jb3,jorm,i5r0
– Visual Studio.NET Style Tear Off Panes – Part II
By kirants
Framework
to build and use Visual Studio .NET-style Tear Off Panes
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,izar,166z,jorm,i5r0
==========================================================
Discussion
Groups
==========================================================
Check out the CodeGuru discussion forums at:
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,bcr8,cx5j,jorm,i5r0
Forums include Visual C++, General C++, Visual Basic, Java, General
Technology, C#, ASP.NET, XML, Help Wanted, and much, much, more!
==========================================================
New
Articles on
Developer.com
==========================================================
Below are some of the new articles that have been posted to Developer.com
(http://www.developer.com).
1. Using SQL Server 2000 Extended
Properties
By Mike Gunderloy –
Have you
ever thought of customizing the metadata associated with your data? You
can do just that with SQL Server data by using extended properties.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,le8w,1o2b,jorm,i5r0
2. Opinion Piece: The Outsourcing
Question
By Paul Kimmel –
Paul Kimmel
offers some straightforward discussion and insights on this current trend,
including some historical perspective, where we are now, possible outcomes, ways
to protect yourself, and how international outsourcing might unfold.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,jm35,bftj,jorm,i5r0
3. Q&A with Thomas Schaeck, Architect of IBM WebSphere Portal
By Developer.com
Developer.com gets
with IBM’s Thomas Schaeck to discuss Portal Development.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,xnt,cc0w,jorm,i5r0
4. Creating Interactive GUIs with Swing’s MVC Architecture Part 2:
Dynamic View for a Static Model
By
Vlad Kofman –
Create a dynamically adjustable presentation of a
corresponding model for a Swing Table UI component.
http://nl.internet.com/ct.html?rtr=on&s=1,y03,1,i972,hmw9,jorm,i5r0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Advertising: If you are interested in advertising in our newsletters, call
Claudia at
1-203-662-2863
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For
information about advertising opportunities, visit our media kit
http://www.internet.com/mediakit/salescontacts.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For details on becoming a Commerce Partner, contact David Arganbright
on
1-203-662-2858
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To learn about other free newsletters offered by internet.com or
to
change your subscription visit http://e-newsletters.internet.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internet.com’s network of more than 160 Web sites is organized into 16
channels:
Developer http://www.internet.com/sections/webdev.html
DevX http://www.internet.com/sections/devx.html
Downloads
http://www.internet.com/sections/downloads.html
EarthWeb
http://www.internet.com/sections/earthweb.html
Graphics
http://www.internet.com/sections/graphics.html
Interactive
Marketing http://www.internet.com/sections/marketing.html
International
http://www.internet.com/sections/international.html
Internet
Lists http://www.internet.com/sections/lists.html
Internet
News http://www.internet.com/sections/news.html
Internet
Resources http://www.internet.com/sections/resources.html
IT
http://www.internet.com/sections/it.html
Linux/Open
Source http://www.internet.com/sections/linux.html
Small
Business http://www.internet.com/sections/sb.html
Windows
Technology http://www.internet.com/sections/win.html
Wireless
Internet http://www.internet.com/sections/wireless.html
xSP
Resources http://www.internet.com/sections/xsp.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looking for a job? Filling an opening? – http://jobs.internet.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This
newsletter is published by Jupitermedia Corporation
http://internet.com – The Internet & IT
Network
Copyright (c) 2004 Jupitermedia Corporation. All rights
reserved.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For
information on reprinting or linking to internet.com content:
http://internet.com/corporate/permissions.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~