Introduction of CodeFx

advertisement
MICROSOFT
All-In-One Code
Framework
CodeFx
MSDN Forum Support Team
3/1/2009
"All-In-One Code Framework" code-name "CodeFx" delineates the framework and skeleton of
most Microsoft development techniques using typical examples in different programming
languages.
TABLE OF CONTENTS
Introduction ....................................................................................... 4
Current Stage ..................................................................................... 5
Examples for COM ......................................................................................... 5
Examples for Windows 7................................................................................ 6
Examples for App Compat .............................................................................. 8
Examples for ASP.NET .................................................................................... 8
Examples for Silverlight ................................................................................. 9
Examples for Data Access ............................................................................. 11
Examples for Office ...................................................................................... 13
Examples for Language ................................................................................. 14
Examples for Library ..................................................................................... 15
Examples for IPC and RPC ............................................................................. 16
Examples for Windows ................................................................................. 18
Examples for WinForm ................................................................................. 18
Examples for WPF ......................................................................................... 19
Examples for XML ......................................................................................... 20
Examples for File System .............................................................................. 20
Examples for Security ................................................................................... 21
Examples for Visual Studio ........................................................................... 22
Examples for Windows Shell ......................................................................... 23
Examples for Hook........................................................................................ 24
Examples for Console ................................................................................... 24
Examples for Network .................................................................................. 24
Examples for Diagnostics .............................................................................. 24
Features ............................................................................................ 26
All-In-One ..................................................................................................... 26
Skeleton ....................................................................................................... 26
Microsoft APGC CSS - Mainland China
16th Floor, Metro Tower, No.30 Tian Yao Qiao Road Shanghai, 200030, P.R.C
Customer Service 800-820-3800 (Local calls) 021-810-7722 (Cell phone)
Source of Examples ...................................................................................... 26
Uniform ........................................................................................................ 26
Mutually Dependent ..................................................................................... 27
Feedback ........................................................................................... 28
Microsoft APGC CSS - Mainland China
16th Floor, Metro Tower, No.30 Tian Yao Qiao Road Shanghai, 200030, P.R.C
Customer Service 800-820-3800 (Local calls) 021-810-7722 (Cell phone)
Introduction
Dear Friends. Have you ever needed a quick understanding of a
technique, e.g. ActiveX or VSX, but been daunted by the few or too many
samples and documents that are available on the Internet? Have you
ever downloaded or created a good sample, e.g. a named pipe sample for
IPC, but forgotten where the sample was placed after a few days? Have
you ever wanted a simple test environment, e.g. a COM object or a DLL,
but become tired of frequently creating such projects and naming them
as "ClassLibrary1", "ClassLibrary2", "ClassLibraryABC"?
If your answer is YES to any one of these questions, this All-In-One Code
Framework will be of assistance to you.
All-In-One Code Framework code-name CodeFx delineates the framework and
skeleton of most Microsoft development techniques (e.g. COM, Data Access, IPC)
using typical sample codes in different programming languages (e.g. Visual C#,
VB.NET, Visual C++). For instance, the code example ATLActiveXDll shows the
skeleton of an ATL ActiveX DLL as its name implies. Each example is elaborately
selected, composed, and documented to demonstrate one frequently-asked,
tested or used scenario based on our experience as support engineers. If you
are a software developer, you can fill the skeleton with blood, muscle and soul.
If you are a software tester or a support engineer like us, you may extend the
sample codes a little to fit your specific test scenario or refer your customer to
this project if the customer's question coincides with what we collected.
Project Scope
The target of the project is to sketch the skeleton of most Microsoft
development techniques using typical sample codes that are frequently-asked,
tested or used. You can imagine each technique as a building. The foundation of
the building (the basics of the technique) and the facilities inside the building
(the details of the technique) are not in the scope. Instead, you fill find the
structure of the building (the framework and skeleton of the technique) in the
scope.
All-In-One Code Framework
- MSDN Forum Support Team -
-4-
Current Stage
In the pilot phase of the project, we focus on five techniques: COM, Library, IPC,
Office and Data Access. Today is June 15, 2009. There have been 140 code
examples in the project. The collection currently grows at a rate of seven
examples per week.
Examples for COM
ATLCOMClient
Use COM servers in an ATL
application
CSDllCOMServer
MFCActiveX
An in-process COM Server in C#
CppCOMClient
CSExeCOMServer
ATLDllCOMServer
An out-of-process COM Server in C#
Use COM servers in a C++
application
A MFC ActiveX Control
MFCSafeActiveX
An in-process ATL COM Server
CSCOMClient
CSCOMService
Host ActiveX controls and use COM
servers in a C# application
A MFC ActiveX Control Safe for
Scripting and Initialization
An out-of-process COM Service in C#
ATLExeCOMServer
ATLActiveX
VBCOMClient
CSServicedComponent
An out-of-process ATL COM Server
Host ActiveX controls and use COM
servers in a VB.NET application
An ATL ActiveX Control
A serviced component written in C#
CSActiveX
MFCCOMClient
VBDllCOMServer
ATLCOMService
Host ActiveX controls and use COM
servers in a MFC application
A C# ActiveX Control
An in-process COM Server in VB
VBActiveX
An out-of-process ATL COM Service
HTMLEmbedActiveX
VBServicedComponent
Host ActiveX controls in HTML
A VB.NET ActiveX Control
A serviced component written in VB.NET
Name
Description
Owner
CSDllCOMServer
An in-process COM Server in C#
Jialiang
VBDllCOMServer
An in-process COM Server in VB.NET
Jialiang
ATLDllCOMServer
An in-process ATL COM Server
Jialiang
CSExeCOMServer
An out-of-process COM Server in C#
Jialiang
ATLExeCOMServer
An out-of-process ATL COM Server
Jialiang
CSCOMService
An out-of-process COM Service in C#
Jialiang
ATLCOMService
An out-of-process ATL COM Service
Jialiang
CSServicedComponent A serviced component written in C#
Jialiang
VBServicedComponent A serviced component written in VB.NET
Jialiang
All-In-One Code Framework
- MSDN Forum Support Team -
-5-
MFCActiveX
A MFC ActiveX Control
Jialiang
MFCSafeActiveX
A MFC ActiveX Control Safe for Scripting and Initialization Jialiang
ATLActiveX
An ATL ActiveX Control
Jialiang
CSActiveX
A C# ActiveX Control
Jialiang
VBActiveX
A VB.NET ActiveX Control
Jialiang
ATLCOMClient
Use COM servers in an ATL application
Jialiang
CppCOMClient
Use COM servers in a C++ application
Jialiang
CSCOMClient
Host ActiveX controls use COM servers in C#
Jialiang
VBCOMClient
Host ActiveX controls and use COM servers in VB.NET
Jialiang
MFCCOMClient
Host ActiveX controls and use COM servers in MFC
Jialiang
HTMLEmbedActiveX
Host ActiveX controls in HTML
Jialiang
Examples for Windows 7
All-In-One Code Framework
- MSDN Forum Support Team -
-6-
CSWin7TriggerStartService
Win7 Trigger Start Service (C#)
CSWin7ShellLibrary
Operate on Win7 Shell Library (C#)
CSWin7TaskbarAppID
Win7 Application ID in taskbar (C#)
CSWin7TaskbarOverlayIcons
Win7 Overlay Icons in taskbar (C#)
CSWin7TaskbarProgressbar
Win7 Progressbar in taskbar (C#)
CSWin7TaskbarThumbnail
Win7 Thumbnail in taskbar (C#)
CSWin7TaskbarJumpList
Win7 JumpList in taskbar (C#)
Name
VBWin7TriggerStartService
CppWin7TriggerStartService
Win7 Trigger Start Service (VB.NET)
VBWin7ShellLibrary
Win7 Trigger Start Service (C++)
CppWin7ShellLibrary
Operate on Win7 Shell Library (VB.NET)
VBWin7TaskbarAppID
Operate on Win7 Shell Library (C++)
CppWin7TaskbarAppID
Win7 Application ID in taskbar (VB.NET)
Win7 Application ID in taskbar (C++)
VBWin7TaskbarOverlayIcons
Win7 Overlay Icons in taskbar (VB.NET)
VBWin7TaskbarProgressbar
Win7 Progressbar in taskbar (VB.NET)
VBWin7TaskbarThumbnail
Win7 Thumbnail in taskbar (VB.NET)
VBWin7TaskbarJumpList
Win7 JumpList in taskbar (VB.NET)
Description
Owner
CSWin7TriggerStartService
Win7 Trigger Start Service (C#)
Jialiang
VBWin7TriggerStartService
Win7 Trigger Start Service (VB.NET)
Jialiang
CppWin7TriggerStartService Win7 Trigger Start Service (C++)
Jialiang
CSWin7ShellLibrary
Operate on Win7 Shell Library (C#)
Jialiang
VBWin7ShellLibrary
Operate on Win7 Shell Library (VB.NET) Jialiang
CppWin7ShellLibrary
Operate on Win7 Shell Library (C++)
Jialiang
CSWin7TaskbarAppID
Win7 Application ID in taskbar (C#)
LingzhiSun
VBWin7TaskbarAppID
Win7 Application ID in taskbar (VB.NET) LingzhiSun
CppWin7TaskbarAppID
Win7 Application ID in taskbar (C ++)
LingzhiSun
CSWin7TaskbarOverlayIcons Win7 Overlay Icons in taskbar (C#)
LingzhiSun
VBWin7TaskbarOverlayIcons Win7 Overlay Icons in taskbar (VB.NET)
LingzhiSun
All-In-One Code Framework
- MSDN Forum Support Team -
-7-
CSWin7TaskbarProgressbar
Win7 Progressbar in taskbar (C#)
LingzhiSun
VBWin7TaskbarProgressbar
Win7 Progressbar in taskbar (VB.NET)
LingzhiSun
CSWin7TaskbarThumbnail
Win7 Thumbnail in taskbar (C#)
LingzhiSun
VBWin7TaskbarThumbnail
Win7 Thumbnail in taskbar (VB.NET)
LingzhiSun
CSWin7TaskbarJumpList
Win7 Jumplist in taskbar (C#)
LingzhiSun
VBWin7TaskbarJumpList
Win7 Jumplist in taskbar (VB.NET)
LingzhiSun
Examples for App Compat
CppCheckOSVersion
CSCheckOSVersion
Check OS Version in C++
Check OS Version in C#
Name
Description
Owner
CppCheckOSVersion Check OS Version in C++ Jialiang
CSCheckOSVersion
Check OS Version in C#
Jialiang
Examples for ASP.NET
All-In-One Code Framework
- MSDN Forum Support Team -
-8-
VBASPBNETFileUpload
File upload in ASP.NET (VB.NET)
VBASPNETLocalization
Globalization and Localization in ASP.NET
CSASPNETCascadingDropDownList
Cascading Drop Down List in ASP.NET
CSASPNETPageValidation
ASP.NET Validator Controls
CSASPNETMVCFileDownload
ASP.NET MVC File Download sample
CSASPNETOutputCache
Output cache in ASP.NET (C#)
CSASPNETGridView
ASP.NET GridView control (C#)
CSASPNETDataPager
ASP.NET DataPager control (C#)
VBASPNETMasterPage
ASP.NET Master Page (VB.NET)
CSASPNETMenu
Menu in ASP.NET (C#)
CSASPNETAjaxExtender
ASP.NET AJAX Extender
Name
Description
Owner
VBASPNETFileUpload
File upload in ASP.NET (VB.NET)
BravoYang
VBASPNETLocalization
Globalization and localization in ASP.NET
BravoYang
(VB.NET)
CSASPNETCascadingDropDownList Cascading Drop Down List in ASP.NET
ThomasSun
CSASPNETPageValidation
ASP.NET Validator Controls (C#)
LiZongQing
CSASPNETAjaxExtender
ASP.NET AJAX Extender (C#)
VinceXu
CSASPNETMVCFileDownload
ASP.NET MVC File Download sample
stcheng
CSASPNETOutputCache
Output cache in ASP.NET (C#)
ThomasSun
CSASPNETMenu
Menu in ASP.NET (C#)
LiZongQing
VBASPNETMasterPage
ASP.NET Master Page (VB.NET)
BravoYang
CSASPNETDataPager
ASP.NET DataPager control (C#)
Kjian
CSASPNETGridView
ASP.NET GridView control (C#)
Kjian
Examples for Silverlight
All-In-One Code Framework
- MSDN Forum Support Team -
-9-
CSSL3PlaneProjection
Plan projection in SL3 (C#)
CSSL3FullScreen
Full screen in SL3 (C#)
CSSL3Input
VBSL3PlaneProjection
Plane projection in SL3 (VB.NET)
VBSL3FullScreen
Full screen in SL3 (VB.NET)
VBSL3Input
Mouse and keyboard inputs of SL3
CSSL3PixelShader
Pixel shader in SL3 (C#)
CSSL3Text
Mouse and keyboard inputs of SL3
VBSL3PixelShader
Pixel shader in SL3 (VB.NET)
VBSL3Text
Work with text in SL3 (C#)
XamlSL3Text
Work with text in SL3 (VB.NET)
XAMLSL3SplashScreen
Work with text in SL3 (Xaml)
XamlSL3StyleControlTemplate
Splash Screen in SL3 (XAML)
CSSL3DeepZoom
Deep Zoom in SL3 (C#)
CSSL3CustomControl
Custom Control in SL3 (C#)
CSSL3Animation
Animation in SL3 (C#)
Style and control template in SL3
VBSL3DeepZoom
Deep Zoom in SL3 (VB.NET)
VBSL3CustomControl
Custom Control in SL3 (VB.NET)
VBSL3Animation
Animation in SL3 (VB.NET)
CSSL3WriteableBitmap
Writeable Bitmap in SL3 (C#)
Name
Description
Owner
CSSL3PlaneProjection
Plane projection in SL3 (C#)
allenc
VBSL3PlaneProjection
Plane projection in SL3 (VB.NET)
allenc
CSSL3FullScreen
Full screen in SL3 (C#)
allenc
All-In-One Code Framework
- MSDN Forum Support Team -
- 10 -
VBSL3FullScreen
Full screen in SL3 (VB.NET)
allenc
CSSL3Input
Mouse and keyboard inputs in SL3 Moggle
VBSL3Input
Mouse and keyboard inputs in SL3 Moggle
CSSL3PixelShader
Pixel shader in SL3 (C#)
allenc
VBSL3PixelShader
Pixel shader in SL3 (VB.NET)
allenc
CSSL3Text
Work with text in SL3 (C#)
shanaolanxing
VBSL3Text
Work with text in SL3 (VB.NET)
shanaolanxing
XAMLSL3Text
Work with text in SL3 (XAML)
shanaolanxing
XAMLSL3StyleControlTemplate Style and control template in SL3
shanaolanxing
XAMLSL3SplashScreen
Splash screen in SL3 (XAML)
allenc
CSSL3DeepZoom
Deep zoom in SL3 (C#)
shanaolanxing
VBSL3DeepZoom
Deep zoom in SL3 (VB.NET)
shanaolanxing
CSSL3CustomControl
Custom control in SL3 (C#)
Moggle
VBSL3CustomControl
Custom control in SL3 (VB.NET)
Moggle
CSSL3Animation
Animation in SL3 (C#)
allenc
VBSL3Animation
Animation in SL3 (VB.NET)
allenc
CSSL3WriteableBitmap
Writeable bitmap in SL3 (C#)
shanaolanxing
Examples for Data Access
All-In-One Code Framework
- MSDN Forum Support Team -
- 11 -
VBLinqToSQL
CSUseADO
Use LINQ to SQL in VB.NET
CppUseADO
Use ADO in a C# application
VBLinqToEntities
CSLinqToSQL
Use ADO in a C++ application
Use Linq To SQL in C#
SQLServer2005DB
Use LINQ to Entities in VB.NET
VBLinqToDataSets
Use LINQ to DataSets in VB.NET
CSLinqToEntities
A SQL Server 2005 Database project
CSUseADONET
Use ADO.NET in a C# application
VBLinqToObject
Use LINQ to Entities in C#
CppUseADONET
CSLinqToDataSets
Use ADO.NET in a C++ application
Use LINQ to DataSets in C#
CSLinqToObject
CSLinqExtension
Use Linq To Object in VB.NET
Use Linq To Object in C#
Linq Extension in C#
VBADONETDataServiceClient
Use ADO.NET Data Service in VB.NET
VBADONETDataService
ADO.NET Data Service in VB.NET
CSADONETDataService
CSADONETDataServiceClient
ADO.NET Data Service in C#
VBADONETDataServiceSL3Client
Use ADO.NET Data Service in C#
CSADONETDataServiceSL3Client
Use ADO.NET Data Service in Silverlight (VB.NET)
Name
Use ADO.NET Data Service in Silverlight (C#)
Description
Owner
CSUseADO
Use ADO in a C# application
RongchunZhang
CppUseADO
Use ADO in a C++ application
Jialiang
CSUseADONET
Use ADO.NET in a C# application
LingzhiSun
CppUseADONET
Use ADO.NET in a C++ application
LingzhiSun
CSADONETDataService
ADO.NET Data Service in C#
LingzhiSun
VBADONETDataService
ADO.NET Data Service in VB.NET
LingzhiSun
CSADONETDataServiceClient
Use ADO.NET Data Service in C#
LingzhiSun
VBADONETDataServiceClient
Use ADO.NET Data Service in VB.NET
LingzhiSun
CSADONETDataServiceSL3Client Use ADO.NET Data Service in Silverlight allenc
VBADONETDataServiceSL3Client Use ADO.NET Data Service in Silverlight allenc
CSLinqToObject
Use LINQ to Objects in C#
Colbert
VBLinqToObject
Use LINQ to Objects in VB.NET
LingzhiSun
CSLinqToSQL
Use LINQ to SQL in C#
RongchunZhang
VBLinqToSQL
Use LINQ to SQL in VB.NET
LingzhiSun
CSLinqToEntities
Use LINQ to Entities in C#
LingzhiSun
VBLinqToEntities
Use LINQ to Entities in VB.NET
LingzhiSun
All-In-One Code Framework
- MSDN Forum Support Team -
- 12 -
CSLinqToDataSets
Use LINQ to DataSets in C#
LingzhiSun
VBLinqToDataSets
Use LINQ to DataSets in VB.NET
LingzhiSun
CSLinqExtension
Extend LINQ in C#
LingzhiSun
SQLServer2005DB
A SQL Server 2005 Database project
Colbert
Examples for Office
CSAutomateWord
CSVstoServerDocument
Automate Word in a C# application
Use VSTO ServerDocument class
Microsoft Word
Microsoft Word 2007
CppAutomateWord
Automate Word in a VC++ app
VBAutomateWord
CSVstoExcelWorkbook
Automate Word in a VB.NET app
Customize Excel workbook using VSTO
CSAutomateExcel
CSVstoVBAInterop
Automate Excel in a C# application
VSTO Interop with Excel VBA macros
CSExcelAutomationAddIn
Microsoft Excel
Excel Automation Add-in in C#
Microsoft Excel 2007
CppAutomateExcel
Automate Excel in a VC++ application
CSVstoGetWrapperObject
VBExcelAutomationAddIn
Get VSTO Wrapper Objectt
VBAutomateExcel
Excel Automation Add-in in VB.NET
Automate Excel in a VB.NET app
CSAutomateOutlook
Automate Outlook in a C# application
CSOfficeSharedAddIn
Microsoft Outlook
CppAutomateOutlook
Office Shared AddIn in C#
Microsoft Outlook 2007
Automate Outlook in a VC++ app
CSOutlookUIDesigner
VSTO Designers customize Outlook
VBAutomateOutlook
Automate Outlook in a VB.NET app
CppOfficeManagedCOMAddInShim
Managed COM AddIn Shim
CSOutookRibbonXml
Ribbon XML customize Outlook UI
CSAutomatePowerPoint
Automate PowerPoint in a C# app
Microsoft PowerPoint
Microsoft PowerPoint 2007
CppAutomatePowerPoint
Automate PowerPoint in a VC++ app
VBAutomatePowerPoint
Automate PowerPoint in a VB.NET app
Name
CSOutlookUIDesigner
All-In-One Code Framework
Description
Customize Outlook UI using VSTO Designers
- MSDN Forum Support Team -
Owner
midnightfrank
- 13 -
CSOutlookRibbonXml
Customize Outlook UI using Ribbon XML
midnightfrank
CSVstoExcelWorkbook
Customize Excel workbook using VSTO
midnightfrank
CSVstoVBAInterop
VSTO Interop with Excel VBA macros
midnightfrank
CSVstoGetWrapperObject
Get VSTO Wrapper Object
midnightfrank
CSExcelAutomationAddIn
Excel Automation Add-in in C#
Colbert
VBExcelAutomationAddIn
Excel Automation Add-in in VB.NET
Colbert
CSVstoServerDocument
Use VSTO ServerDocument class
midnightfrank
CSOfficeSharedAddIn
Office Shared AddIn in C#
Colbert
CppOfficeManagedCOMAd
Shim of Office Managed COM AddIn
dInShim
Colbert
CSAutomateWord
Automate Word in a C# application
Jialiang
VBAutomateWord
Automate Word in a VB.NET application
Jialiang
CppAutomateWord
Automate Word in a VC++ application
Jialiang
CSAutomateExcel
Automate Excel in a C# application
Colbert
VBAutomateExcel
Automate Excel in a VB.NET application
Jialiang
CppAutomateExcel
Automate Excel in a VC++ application
Jialiang
CSAutomateOutlook
Automate Outlook in a C# application
Jialiang
VBAutomateOutlook
Automate Outlook in a VB.NET application
Jialiang
CppAutomateOutlook
Automate Outlook in a VC++ application
Jialiang
CSAutomatePowerPoint
Automate PowerPoint in a C# application
Jialiang
VBAutomatePowerPoint
Automate PowerPoint in a VB.NET application
Jialiang
CppAutomatePowerPoint
Automate PowerPoint in a VC++ application
Jialiang
Examples for Language
All-In-One Code Framework
- MSDN Forum Support Team -
- 14 -
CSBasics
CSCodeDOM
Basics of C#
CodeDOM in C#
VBBasics
Basics of VB.NET
CppBasics
CppCLIBasics
Basics of VC++
Name
CSBasics
Basics of VC++/CLI
Description
Owner
Basics of C#
CSCodeDOM CodeDOM in C#
VBBasics
Basics of VB.NET
CppBasics
Basics of VC++
midnightfrank
CppCLIBasics Basics of VC++/CLI
Examples for Library
CSEmitAssembly
VBReflection
C# emits an assembly with types in
runtime
CppCLIWrapLib
VB.NET dynamically loads and uses
the types of a .NET assembly
VBClassLibrary
CSReflection
C# dynamically loads and uses the
types of a .NET assembly
CppStaticallyLinkLib
C++/CLI wrapper of native C++ lib
A VB.NET Class Library
C++ statically links a static library
CSClassLibrary
CppStaticLibrary
CppImplicitlyLinkDll
CppHostCLR
C++ hosts CLR and loads a .NET
assembly
A C# Class Library
A C++ Static Library
C++ implicitly links a DLL
CppDllExport
CSPInvokeDll
C# P/Invoke a native DLL
A C++ Dynamic Library exporting Symbols
CppDelayloadDll
C++ delay-loads a DLL
(/DELAYLOAD)
CppLoadLibrary
C++ dynamically loads a DLL
All-In-One Code Framework
CSLoadLibrary
C# dynamically loads a native DLL
- MSDN Forum Support Team -
- 15 -
Name
CppDllExport
Description
A C++ dynamic library export symbols
Owner
Jialiang
CppImplicitlyLinkDll C++ implicitly links a DLL
Jialiang
CppDelayloadDll
C++ delay-loads a DLL
Jialiang
CppLoadLibrary
C++ dynamically loads a DLL
Jialiang
CSLoadLibrary
C# dynamically loads a native DLL
Jialiang
CSPInvokeDll
C# P/Invokes a native DLL
Jialiang
CSClassLibrary
A C# Class Library
Jialiang
CppHostCLR
C++ hosts CLR and loads a .NET assembly
Jialiang
CSReflection
C# dynamically loads and uses the types of an assembly
Jialiang
CSEmitAssembly
C# emits an assembly with types in runtime
Jialiang
VBClassLibrary
A VB.NET Class Library
Jialiang
VBReflection
VB.NET dynamically loads and uses the types of an assembly Jialiang
CppStaticLibrary
A C++ Static Library
Jialiang
CppStaticallyLinkLib C++ statically links a static library
Jialiang
CppCLIWrapLib
Jialiang
C++/CLI wrapper of native C++ lib
Examples for IPC and RPC
All-In-One Code Framework
- MSDN Forum Support Team -
- 16 -
CppNamedPipeServer
A named-pipe server written in C++
CSNamedPipeServer
A named-pipe server written in C#
CppMailslotServer
A mailslot server written in C++
CSMailslotServer
A mailslot server written in C#
CppNamePipeClient
CSRemotingServer
A named-pipe client written in C++
CSNamedPipeClient
CppMailslotClient
A .NET Remoting client written in VB
CppFileMappingClient
Create shared memory in C++
CSMailslotClient
Access shared memory in C++
CSFileMappingServer
A mailslot client written in C#
CSFileMappingClient
Create shared memory in C#
CppSendWM_COPYDATA
Send WM_COPYDATA in C++
Name
VBRemotingClient
A .NET Remoting server written in VB
CppFileMappingServer
A mailslot client written in C++
Receive WM_COPYDATA in C++
Receive WM_COPYDATA in C#
A .NET Remoting client written in C#
VBRemotingServer
A named-pipe client written in C#
CppReceiveWM_COPYDATA
CSReceiveWM_COPYDATA
CSRemotingClient
A .NET Remoting server written in C#
Access shared memory in C#
CSSocketServer
CSSocketClient
A socket server written in C#
CSSendWM_COPYDATA
A socket client written in C#
MFCClipboard
Send WM_COPYDATA in C#
Use clipboard in MFC
Description
Owner
CppNamedPipeServer
A named-pipe server written in C++
Jialiang
CppNamedPipeClient
A named-pipe client written in C++
Jialiang
CSNamedPipeServer
A named-pipe server written in C#
Jialiang, Riquel
CSNamedPipeClient
A named-pipe client written in C#
Jialiang, Riquel
CppMailslotServer
A mailslot server written in C++
Jialiang
CppMailslotClient
A mailslot client written in C++
Jialiang
CSMailslotServer
A mailslot server written in C#
Riquel
CSMailslotClient
A mailslot client written in C#
Riquel
CppFileMappingServer
Create shared memory in C++
hongyes
CppFileMappingClient
Access shared memory in C++
hongyes
CSFileMappingServer
Create shared memory in C#
hongyes
CSFileMappingClient
Access shared memory in C#
hongyes
CSRemotingServer
A .NET Remoting server written in C# Jialiang
CSRemotingClient
A .NET Remoting client written in C#
VBRemotingServer
A .NET Remoting server written in VB Jialiang
VBRemotingClient
A .NET Remoting client written in VB
Jialiang
CSReceiveWM_COPYDATA
Receive WM_COPYDATA in C#
Riquel
All-In-One Code Framework
- MSDN Forum Support Team -
Jialiang
- 17 -
CSSendWM_COPYDATA
Send WM_COPYDATA in C#
Riquel
CppReceiveWM_COPYDATA Receive WM_COPYDATA in C++
Jialiang
CppSendWM_COPYDATA
Send WM_COPYDATA in C++
Jialiang
CSSocketServer
A socket server written in C#
Riquel
CSSocketClient
A socket client written in C#
Riquel
MFCClipboard
Use clipboard in MFC
hongyes
Examples for Windows
CppWindowsDialog
Windows Dialog Box in C++
CppWindowsUserControls
Use user-controls in C++ Windows app
CppWindowsCommonControls
Use common-controls in C++ Windows app
CppWindowsSubclassing
Subclass Windows in C++
Name
Description
Owner
CppWindowsDialog
Windows Dialog Box in C++
Jialiang
CppWindowsUserControls
Use user-controls in C++ Windows application
Jialiang
CppWindowsCommonControls Use common-controls in C++ Windows application Jialiang
CppWindowsSubclassing
Subclass Windows in C++
Jialiang
Examples for WinForm
All-In-One Code Framework
- MSDN Forum Support Team -
- 18 -
CSWinFormDataBinding
CSWimFormControls
WinForm Data Binding in C#
CSWinFormObjPersistence
WinForm Control Customization in C#
CSWinFormDragAndDrop
Drag & Drop operations in WinForm
CSWinFormGraphics
CSWinFormTimeConsumingOpr
Use GDI+ to do Graphics in WinForm
CSWinFormPrinting
CSWinFormLocalization
Printing in WinForm
Localize WinForms application
CSWinFormDesigner
Object Persistence in WinForm
Time-consuming Operations in WinForm
CSWinFormPassValueBetweenForms
Pass Value between WinForms
CSWinFormDataGridView
WinForm Designers in C#
CSWinFormSplashScreen
DataGridView in WinForm
Name
WinForm Splash Screen
Description
Owner
CSWinFormDataBinding
WinForm Data-binding in C#
ZhiXin
CSWinFormControls
WinForm Control Customization in C#
ZhiXin
CSWinFormObjPersistence
Object Persistence in WinForm
ZhiXin
CSWinFormDragAndDrop
Drag and Drop operations in WinForm
ZhiXin
CSWinFormGraphics
Use GDI+ to do Graphics in WinForm
ZhiXin
CSWinFormTimeConsumingOpr
Time-consuming Operations in WinForm ZhiXin
CSWinFormPrinting
Printing in WinForm
ZhiXin
CSWinFormPassValueBetweenForms Pass Value between WinForms
ZhiXin
CSWinFormLocalization
Localize WinForm application
ZhiXin
CSWinFormDataGridView
DataGridView in WinForm
ZhiXin
CSWinFormDesigner
WinForm Designers in C#
ZhiXin
CSWinFormSplashScreen
WinForm Splash Screen
Bruce
Examples for WPF
CSWPFThreading
Threading in WPF
Name
Description
All-In-One Code Framework
Owner
- MSDN Forum Support Team -
- 19 -
CSWPFThreading Threading in WPF Colbert
Examples for XML
VBLinqToXml
CSLinqToXml
Use LINQ to XML in VB.NET
VBXmlSerialization
Use LINQ to XML in C#
CSXmlSerialization
XML Serialization (VB.NET)
Name
XML Serialization (C#)
Description
Owner
CSLinqToXml
Use LINQ to XML in C#
LingzhiSun
VBLinqToXml
Use LINQ to XML in VB.NET LingzhiSun
CSXmlSerialization XML Serialization (C#)
Colbert
VBXmlSerialization XML Serialization (VB.NET)
Colbert
Examples for File System
All-In-One Code Framework
- MSDN Forum Support Team -
- 20 -
CppListFilesInDirectory
CSListFilesInDirectory
List files in directory using C++
List files in directory using C#
CppFileSystemWatcher
CSFileSystemWatcher
Monitor directory change in C++
Monitor directory change in C#
CppSynchronousIO
VBListFilesInDirectory
List files in directory using VB.NET
VBFileSystemWatcher
Monitor directory change in VB.NET
CSSynchronousIO
Synchronous I/O in C++
Synchronous I/O in C#
CRTFileIO
File I/O using CRT APIs
CppAsynchronousIO
CSAsynchronousIO
Asynchronous I/O in C++
Asynchronous I/O in C#
CppSparseFile
CSSparseFile
Sparse file operations in C++
Sparse file operations in C#
VBSparseFile
Sparse file operations in VB.NET
CppFileHandle
Operations about file handle
Name
Description
Owner
CppSynchronousIO
Synchronous I/O in C++
Jialiang
CppAsynchronousIO
Asynchronous I/O in C++
Jialiang
CppSparseFile
Sparse file operations in C++
Jialiang
CSSparseFile
Sparse file operations in C#
Jialiang
VBSparseFile
Sparse file operations in VB.NET
Jialiang
CppFileHandle
Operations about file handle
Jialiang
CSListFilesInDirectory List files in directory using C#
midnightfrank
VBListFilesInDirectory List files in directory using VB.NET midnightfrank
Examples for Security
All-In-One Code Framework
- MSDN Forum Support Team -
- 21 -
CSEncryption
Use encryption in C#
CSUac
CSDigitalSignature
Use digital signature in C#
VBUac
UAC Elevation in C#
CSCustomAuthorization
Implement custom authorization in C#
CSImpersonateUser
Impersonation in C#
CppUac
UAC Elevation in VB.NET
UAC Elevation in C++
CSControlFirewall
Control Windows Firewall in C#
VBImpersonateUser
Impersonation in VB.NET
Name
Description
Owner
CSEncryption
Use encryption in C#
Riquel
CSDigitalSignature
Use digital signature in C#
Riquel
CSUac
UAC Elevation in C#
Fisnik
VBUac
UAC Elevation in VB.NET
Fisnik
CppUac
UAC Elevation in VC++
RongchunZhang
CSCustomAuthorization Implement custom authorization in C# Riquel
CSControlFirewall
Control Windows Firewall in C#
Fisnik
CSImpersonateUser
Impersonation in C#
Riquel
VBImpersonateUser
Impersonation in VB.NET
Riquel
Examples for Visual Studio
CSTFSWorkItemObjectModel
Use TFS WorkItem Object Model in C#
CSVSPackage
VS Package in C#
CSVSPackageState
VS Package: State Persisting
All-In-One Code Framework
- MSDN Forum Support Team -
- 22 -
Name
Description
Owner
CSTFSWorkItemObjectModel Use TFS WorkItem Object Model in C# billwg
CSVSPackage
VS Package in C#
RongchunZhang
CSVSPackageState
VS Package: State Persisting
hongyes
Examples for Windows Shell
ATLShellExtDragAndDropHandler
Shell Drag and Drop Extension Handler
ATLShellExtInfotipHandler
Shell Infotip Extension Handler
ATLShellExtPropSheetHandler
Shell Property Sheet Extension Handler
ATLShellExtContextMenuHandler
Shell Context Menu Extension Handler
ATLShellExtIconHandler
Shell Icon Extension Handler
ATLShellExtIconOverlayHandler
Shell Icon Overlay Extension Handler
Name
Description
Owner
ATLShellExtDragAndDropHandler Shell Drag and Drop Extension Handler Jialiang
ATLShellExtInfotipHandler
Shell Infotip Extension Handler
Jialiang
ATLShellExtPropSheetHandler
Shell Property Sheet Extension Handler Jialiang
ATLShellExtContextMenuHandler Shell Context Menu Extension Handler
Jialiang
ATLShellExtIconHandler
Shell Icon Extension Handler
Jialiang
ATLShellExtIconOverlayHandler
Shell Icon Overlay Extension Handler
Jialiang
All-In-One Code Framework
- MSDN Forum Support Team -
- 23 -
Examples for Hook
CSWindowsHook
Windows Hook in a C# application
CppWindowsHook
CppHookDll
Windows Hook in a C++ application
Hook Dll injected into other processes
Name
CSWindowsHook
Description
Owner
Windows Hook in a C# application
RongchunZhang
CppWindowsHook Windows Hook in a C++ application
CppHookDll
RongchunZhang
Hook Dll injected into other processes RongchunZhang
Examples for Console
CppRedirectConsole
C++ app redirects console IO
Name
Description
Owner
CppRedirectConsole C++ app redirects console IO hongyes
Examples for Network
CSSMTPSendEmail
Send email using SMTP in C#
Name
VBSMTPSendEmail
Send email using SMTP in VB.NET
Description
CSSMTPSendEmail Send email using SMTP in C#
Owner
Jialiang
VBSMTPSendEmail Send email using SMTP in VB.NET Jialiang
Examples for Diagnostics
All-In-One Code Framework
- MSDN Forum Support Team -
- 24 -
CppStackOverflow
CppStackCorruption
Stack overflow in a Win32 application
Stack corruption in a Win32 application
CppHeapCorruption
Heap corruption in a Win32 application
CppResourceLeaks
Resource leaks in a Win32 application
Name
CppStackOverflow
Description
Stack overflow in a Win32 application
Owner
Jialiang
CppStackCorruption Stack corruption in a Win32 application Jialiang
CppHeapCorruption Heap corruption in a Win32 application Jialiang
CppResourceLeaks
Resource leaks in a Win32 application
All-In-One Code Framework
- MSDN Forum Support Team -
Jialiang
- 25 -
Features
All-In-One
All examples for all Microsoft development techniques are in one Visual Studio
solution. All source codes, documents, and reference materials can be viewed or
tested in one instance of Visual Studio.
Skeleton
The project delineates the skeleton of the technologies. Its samples do not
demonstrate any specific businesses such as the design of a traffic game in
Silverlight or fireworks in ATL, as they may distract your attention from the core
of the technologies. You can easily extend the skeleton to meet your own
requirements.
Source of Examples
The examples are refined out of our supports for developers in the newsgroups
and the forums. You can think of the project as a collection of most frequently
requested test scenarios in contrast with FAQs.
Uniform



All examples follow a uniform naming convention. The convention applies
to the name of the projects, variables, methods, types, etc.
All examples have a uniform style of coding, commenting and
documentation. For instance, each code example has a ReadMe.txt file
that documents the example. The content of ReadMe.txt follows this
structure: Use (the purpose of the example), Project Relation (the
relation between the current example and the rest), Build (how to build
the example), Creation (the detailed steps to create such an example)
and References (the reference materials).
All examples of the same technique manage to provide a uniform output
or export. For instance, ATLDllCOMServer, ATLExeCOMServer,
ATLCOMService, CSDllCOMServer, CSCOMService, VBDllCOMServer,
MFCActiveX, MFCSafeActiveX, ATLActiveX, CSActiveX, VBActiveX are COM
components in different forms. However, they export a uniform set of
methods, properties and events.
All-In-One Code Framework
- MSDN Forum Support Team -
- 26 -
Mutually Dependent
The code examples are mutually dependent or related, and many are efficiently
reused by other examples to demonstrate the techniques. For instance,
CppDllExport is a sample C++ DLL that exports the symbols of data, functions
and classes. CppImplicitlyLinkDll depends on CppDllExport to demonstrate the
implicit link of a DLL; CppDelayloadDll delay-loads the DLL; CppLoadLibrary
dynamically loads the DLL; CSPInvokeDll uses CppDllExport to show the use
of .NET Platform Invocation Service.
The above five features are highlighted because most sample code sites like
www.codeproject.com and MSDN lack them. Besides, the code examples in AllIn-One Code Framework are typical, extensible, structured, complete, welldocumented and easy to understand.
All-In-One Code Framework
- MSDN Forum Support Team -
- 27 -
Feedback
We look forward to hearing your feedback. Please post your suggestions and
ideas in Discussions or contact us directly. Your comments on this project are
appreciated.
Thank you!
All-In-One Code Framework
- MSDN Forum Support Team -
- 28 -
Download