This is the second in a series of posts that describe new and updated samples in the Windows 7 SDK.   The following table lists samples that pertain to networking and related services, and are new to Windows 7 or updated to support Windows 7, including the  Active Directory Service Interfaces (ADSI), Dynamic Host Configuration Protocol (DHCP), EAP, HTTP, IPHelp, Mobile Broadband, Network Access Protection (NAP), Distributed Routing, Quality of Service (QOS), Remote Access Server (RAS), Remote Procedure Call (RPC), Universal Plug and Play (UPNP), Windows File Protection (WFP), Winsock, and Wireless LAN (WLAN).

See also:

New Win32 Samples in Windows SDK for Windows 7: Networking and Related Services

New Win32 Samples in Windows SDK for Windows 7: Multimedia

New Win32 Samples in Windows SDK for Windows 7: Security

New Win32 Samples in Windows SDK for Windows 7: Systems Management

New Win32 Samples in Windows SDK for Windows 7: Open Packaging Conventions (OPC)

New Win32 Samples in Windows SDK for Windows 7: Tablet PC and MultiTouch

New Win32 Samples in Windows SDK for Windows 7: Web

New Win32 Samples in Windows SDK for Windows 7: Windows Base

New Win32 Samples in Windows SDK for Windows 7: Windows User Interface

New Win32 Samples in Windows SDK for Windows 7: Windows XML Paper Specification (XPS)

New Win32 Samples in Windows SDK for Windows 7: Communication

 

Over 1,200 samples were changed since the release of the Windows SDK for Windows 7 RC release. Many “new to Win 7” samples were added, simplified, or extended, and many older samples were updated to support Windows 7 as well as older operating systems.

For build instructions and additional information about the samples, see the Readme.txt files and other documents in the SDK sample folders. For general sample building instructions, refer to the Samples Reference page that installs with the Windows SDK, and the SDK Release Notes (under the Start menu, in All Programs > Microsoft Windows SDK v7.0). By default, Win32 samples are installed under the following path: C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples.

Send your thoughts to the Windows SDK Feedback alias.  Tell us how you use the SDK and what we can do to improve your development experience.  The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.

New/updated Networking and related services samples in the Windows SDK for Windows 7

Sample

Description

Location (under Samples)

AddGroup

The AddGroup sample adds a group object to a specified container in Active Directory.

NetDs\ADSI\ActiveDir\AddGroup\vc

ActiveDir ADEvent

Demonstrates an Active Directory administrative notification handler.

netds\ADSI\ActiveDir\ADEvent

ActiveDir Attributes

Uses ADSI to bind to the Active Directory schema container and enumerate some types of its attributes.

netds\adsi\activedir\attributes\vc

BindToParent Sample

The BindtoParent sample uses ADSI to bind to the local domain partition in Active Directory. It then searches for a specified user object. When it finds the object, the sample binds to the parent of that object, which is the container of the user object in the Active Directory hierarchy.

netds\ADSI\activedir\bindtoparent\VC

ActiveDir CreateUser

The CreateUser sample uses ADSI with the LDAP provider to create a domain account for a user.

netds\ADSI\activedir\createuser\VC

Active Dir Credentials

The Credentials sample uses ADSI and the LDAP provider to bind to Active Directory using specified credentials rather than using the default credentials of the logged-on user.

NetDs\ADSI\ActiveDir\Credentials\VC

ActiveDIR GCAllUsers

The GCallUsers sample searches the global catalog to enumerate users in an Active Directory forest.

netds\ADSI\activedir\gcallusers\VC

ActiveDir GetDomainMode

The GetDomainmode sample binds to an Active Directory domain partition and reads the ntMixedDomain property to determine the operation mode of the domain.

netds\ADSI\activedir\getdomainmode\VC

ActiveDir GetSchemaInfo

The GetSchemaInfo sample uses ADSI to bind to the Active Directory schema container and search for classSchema and/or attributeSchema objects that match a specified query.

NetDs\ADSI\ActiveDir\GetSchemaInfo\vc

ActiveDir PropertyList

The PropertyList sample uses ADSI to bind to Active Directory and enumerate its attributes. The sample Demonstrates use of the IADs, IADsPropertyList, IADsPropertyEntry, and IADsPropertyValue interfaces.

netds\ADSI\ActiveDir\PropertyList\vc

PropSheetHost_s

The PropSheetHost Demonstrates how to host the Active Directory Users and Computers MMC snap-in property sheet for an Active Directory object.

netds\adsi\activedir\PropSheetHost

ActiveDir QueryUsers Sample

The QueryUsers sample queries an Active Directory domain partition for user objects that match a specified filter.

NetDs\ADSI\ActiveDir\QueryUsers\vc

ActiveDir RootDSE

The RootDSE sample binds to rootDSE of an Active Directory server using the IADs interface and retrieves the defaultNamingContext property, which contains the distinguished name of the domain partition, as well as other naming contexts for the domain.

netds\ADSI\ActiveDir\RootDSE\VC

ActiveDir SID

The SID sample uses ADSI to bind to the local domain partition in Active Directory. It then searches for a specified user object. When it finds the object, the sample retrieves the user's SID and converts the binary SID to a SID string format.

netds\ADSI\activedir\sid\VC

ADSI ActiveDir User

The User sample binds to a user object in Active Directory and uses the IADsUser interface to retrieve information about the user.

NetDs\ADSI\ActiveDir\User\vc

ActiveDir WkGuid Sample

The WkGuid sample uses the well-known GUID of the Users container to bind to the Users container in the default naming context.

NetDs\ADSI\ActiveDir\WKGUID\vc

ADSI General ADQI

Lists all supported ADSI interfaces for a given ADsPath. For selected supported interfaces, the sample allows you to run some of the object methods.

netds\ADSI\General\ADQI

ADSI General ADsCmd

Demonstrates dumping all properties from an ADSI object.

netds\ADSI\General\ADsCmd

ADSI General ADSIDump

Traverses the Active Directory tree and dumps a listing of all objects and their attributes for the specified ADsPath to a file.

netds\ADSI\General\ADSIDump

ADSI General DsSrch

Demonstrates searching using IID_IDirectorySearch and ADSI.

netds\ADSI\General\DsSrch

ADSI Start Binding

Demonstrates how to bind to a domain using the credentials of the currently logged-on user and with credentials of a specified user.

netds\ADSI\Start\Binding\vc

ADSI Start Child

Demonstrates binding to a child object from a container

netds\ADSI\Start\Child\vc

ADSI Start Create

The Create sample creates a new local user account. It includes a function that uses the IADsContainer interface with the WinNT provider to create a local user account. It also has an optional function that uses the IDirectoryObject interface with the LDAP provider to create a domain user account in Active Directory.

netds\ADSI\Start\Create\vc

ADSI Start Delete

Uses the WinNT: provider and the IADsContainer interface to delete a local user object. It also uses the LDAP provider and the IDirectoryObject interface to delete a user account from Active Directory.

netds\ADSI\Start\Delete\vc

ADSI Start Enum

Enumerates the objects in a container, printing the name and class of every object in a specified WinNT domain.

netds\ADSI\Start\Enum\vc

ADSI Start Filter

Enumerates selected objects in a container, printing the name and class of the filtered objects in a specified WinNT domain.

netds\ADSI\Start\Filter\vc

ADSI Start Move

Moves an object from one container to another by moving a user from one organizational unit to another.

netds\ADSI\Start\Move\vc

ADSI Start Parent

Binds to an object and then uses the IADs interface to retrieve a binding string for the object's parent.

netds\ADSI\Start\Parent\vc

ADSI Start Read

Reads various single-valued and multi-valued properties of an Active Directory object.

netds\ADSI\Start\Read\vc

ADSI Start Rename

Renames an Active Directory Object.

netds\ADSI\Start\Rename\vc

ADSI Start Schema

Enumerates the objects in the schema using the WinNT provider.

netds\ADSI\Start\Schema\vc

ADSI Start Search

Uses the IDirectorySearch interface to search Active Directory for objects that match a specified filter.

netds\ADSI\Start\Search\vc

ADSI Start Write

How to set single-valued and multi-valued attributes of an Active Directory object.

netds\ADSI\Start\Write\vc

DHCP Notify

Demonstrates obtaining notification of parameters when they change. This example monitors the change of the Gateway address (OPTION_ROUTER_ADDRESS = 3) in a DHCP Client. The DHCP Client Options API will signal an application via an Event handle whenever this value changes. This change can occur during the renew or release state of a DHCP Client.

netds\DHCP\DHCPNotify

DHCP Persist

Demonstrates how to request an option to be made persistent; i.e. the option is retrieved during every DHCP Client boot.

netds\DHCP\DHCPPersist

DHCP Request

Demonstrates requesting parameters from the DHCP Client. The parameters requested will either come from the DHCP Client cache or the DHCP Client will request them from the DHCP Server via a DHCP_INFORM packet. Please note that not all DHCP Servers support the DHCP_INFORM packet so if no data is received either the server does not support it or the client timed out waiting for a response.

netds\DHCP\DHCPRequest

DHCPv4 Compare Scopes

Compares scope-level options for V4 scopes with the same scope address on 2 DHCP servers (e.g. when configured in an 80:20 configuration) and highlights the differences.

netds\dhcp\DHCPServerCompareScopesV4

DHCPv4 Server Scope Stats

Dump statistics across all the V4 scopes on a DHCP server.

netds\dhcp\DHCPServerScopeStatsV4

DHCPv4 Server Show Leases

Dump IPv4 leases across all the scopes configured on a DHCP server

netds\dhcp\DHCPServerShowLeasesV4

DHCPv6 Server Show Leases

Dump IPv6 leases across all the scopes configured on a DHCP server.

netds\dhcp\DHCPServerShowLeasesV6

EAPHost Method Sample

Demonstrates a working EAPHost EAP method - both peer and authenticator implementation. Also demonstrates how one would author an EAPHost supplicant.

NetDS\EAP\EAPHost

Asynchronous HTTP server sample

Demonstrates how to create a simple HTTP server using the HTTP API, v2. It does this using the system thread pool.

NetDs\HTTP\AsyncServer

Http.sys Server

Demonstrates a simple server app that receives a request and sends back a response. Demonstrates the use of V2 http.sys Api's for writing a server application. This program creates a server seesion, Url group and request Queue and starts a listener on the URL specified by the user. The listener receives a request and sends the response.

NetDs\Http\HttpV2Server

IPHelp EnableRouter

Demonstrates how to use IPHLPAPI EnableRouter

netds\IPHelp\EnableRouter

IPHelp IPArp

Demonstrates the use of IP Helper APIs to manipulate ARP cache.

netds\IPHelp\IPArp

IPHelp IPChange

Demonstrates how to programmatically change an IP address for a specific network adapter on your machine. This program also demonstrates how to retrieve existing network adapter IP configuration information.

netds\IPHelp\IPChange

IPHelp IPRenew

Demonstrates how to programmatically release and renew IPv4 addresses obtained through DHCP. Also demonstrates how to retrieve existing network adapter configuration information.

netds\IPHelp\IPRenew

IPHelp IPRoute

Demonstrates how to manipulate network routing tables.

netds\IPHelp\IPRoute

IPHelp IPStat

Demonstrates the use of IP Helper APIs to get IP statistics.

netds\IPHelp\IPStat

Mobile Broadband APIs sample

Demonstrates how to use Mobile Broadband APIs such as how to enumerate mobile broadband interfaces or how to get radio state of specific interface

NetDs\MB\mbapi\

Network Access Protection Sample

Demonstrates NAP System Health Agent, NAP System Health Validator, NAP SHV Configuration UI, and a NAP Enforcement Client.

Netds\NAP

Distributed Routing Table (DRT)

The DRT Sample Demonstrates the use of a subset of the Peer to Peer APIs centered on the Distributed Routing Table (DRT) protocol.

NetDs\PeerToPeer\DRT

QOS2 sample

Demonstrates the use of the QOS2 API. This program implements a simple traffic generator which uses the QOS2 API to not overload the network path between the source and its destination.

netds\Qos\Qos2

Traffic Control API sample

Demonstrates how to use the Traffic Control API.

NetDs\QoS\TC\

RRAS Agile VPN

Demonstrates how to use the RasUpdateConnection and RasGetProjectionInfoEx APIs to get the IKEv2 projection information and to perform a MOBIKE switch. First it makes a VPN connection using RasDial on the interface specified by argument “interface_index”. Once the connection is setup it tries to perform a MOBIKE switch to the “new_interface_index” and if the switch is successful the local tunnel end point will be changed as seen on the console in program output.

netds\ras\RASAgileVPN

RPC AsyncRPC

Demonstrates Asynchronous RPC functionalities

netds\rpc\AsyncRPC

RPC ClUuid

Demonstrates how to supply multiple implementations of the remote procedure specified in the interface.

netds\rpc\ClUuid

RPC Data DUnion

Demonstrates discriminated unions

netds\rpc\Data\DUnion

RPC Data InOut

Demonstrates the use of [in,out] parameters

netds\rpc\Data\InOut

RPC User Marshal

Demonstrates the use of User Marshal attributes and functionalities instead of the obsolete Represent_As functionality in the original sample.

netds\rpc\Data\UserMarshal

RPC Data Xmit

Demonstrates the type-conversion attribute transmit_as. Older sample was rewritten to use Wire Marshal instead of less-efficient transmit as.

netds\rpc\Data\WireMarshal

RPC Dynept

Demonstrates a client application managing its connection to the server through dynamic endpoints.

netds\rpc\Dynept

RPC Handles cxhndl

Demonstrates the use of the context_handle attribute.

netds\rpc\Handles\cxhndl

RPC Handles usrdef

Demonstrates the use of user-defined handles

netds\rpc\Handles\usrdef

RPC Hello

Demonstrates a client/server implementation of the classic "Hello world" program.

netds\rpc\Hello

RPC RPCsvc

Demonstrates how to implement an NT system service that uses RPC.

netds\rpc\RPCsvc

RPC StrOut

Demonstrates how to allocate memory at a server for a two-dimensional object (an array of pointers) and pass it back to the client as an [out]-only parameter.

netds\rpc\StrOut

upnp DCO_DimmerService

Implements the dimmer device and dimmer service functionality of the RegDevice sample. This is implemented as COM server object.

netds\upnp\DCO_DimmerService

UPNP GenericUCP

GenericUCP is a C++ sample UPnP application that discovers and controls UPnP devices found on the network. This sample was developed using Visual C++. The sample application uses the UPnP Control Point API provided by upnp.dll. More description about the application can be found in the documentation. The application first starts by discovering devices on the network through one of the three types of searches available, FindByType, FindByUDN and AsyncFind. The devices found are instantiated in the device list. One of the devices can be selected and the service objects for the selected device are listed in the service list. One of the services can be selected and controlled by invoking actions against it. The events relevant to the service are displayed in the events field.

netds\upnp\GenericUCP

upnp RegisterDevice

Implements dimmer device functionality as a COM server object and demonstrates how to register/unregister this device with the Microsoft UPnP framework's Device Host. The device specific functionality is implemented in the ..\DCO_DimmerService directory.

netds\upnp\RegisterDevice

MsnFilter_s bulk submission.

Sample program that uses WFP API's to block all incoming traffic except traffic destined to windows live messenger.

NetDS\WFP\MsnFilter

Windows Connect Now sample

Demonstrates the basic usage of the WCNAPI’s to configure a WCN enabled device. This includes devices such as a wireless router or printer. Also, this demonstrates getting a wireless profile from a configured WCN enabled router via the devices' push button.

NetDs\WindowsConnectNow

Bluetooth Connection Sample

Demonstrates how to establish a connection using Bluetooth

NetDS\Winsock\Bluetooth

Winsock Ideal Send Backlog sample

Demonstrates simple implementation of ideal send backlog feature of winsock.

netds\winsock\isb

Wireless Autconfig API Sample

Demonstrates the use of APIs provided by the Wireless Autoconfig Service. Profile Management and Connection Control is shown.

netds\wlan\AutoConfig

Wireless Hosted Network Sample

Demonstrates how to use the wireless Hostednetwork feature available on Windows 7. The operating system installs a virtual device if a Hosted Network capable wireless adapter is present on the machine. This virtual device is used exclusively for performing software access point (SoftAP) connections.

 

Karin Meier-Magruder
Program Manager for Samples
Windows SDK Team