.NET
  Home arrow .NET arrow Page 3 - Introduction to RPC on Windows, Part II
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Introduction to RPC on Windows, Part II
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2005-01-17

    Table of Contents:
  • Introduction to RPC on Windows, Part II
  • Types of Handles
  • Types of Binding Handles
  • Implicit binding handles
  • Explicit binding handles

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introduction to RPC on Windows, Part II - Types of Binding Handles


    (Page 3 of 5 )

    Before we use any binding handles let’s take a look at their various types and when to use each one. Binding handles are of three types:

    • Automatic 
    • Implicit
    • Explicit

    You must decide which one of these to use based on the amount of control you need to have over the binding process or the process of creating a logical connection.

    Automatic binding handles

    Automatic binding handles really automate the binding process and you don’t have any control over this process whatsoever. The good news is that the client and server applications do not need to publish any code to handle the binding process. One may use these handles when the application does not require a specific server and when it does not need to maintain any state information between the client and server. To use Automatic binding in your applications you need to specify that you will use automatic binding handles in the application Configuration File (ACF). The code for the generated stub by the MIDL Compiler then contains the code for managing automatic binding. A typical ACF file for automatic handles looks like the one below:

    /* ACF file */
    [
      auto_handle
    ]
    interface MyInterface
    {
     // Any Methods
    }

    So what happens when the ACF does not include any other handle attribute, and when the remote procedures do not use explicit handles; how would binding would occur? It’s simple -- the MIDL compiler uses automatic handles by default. The same things happen when the ACF file is not present. One more thing to be aware of is that you must not provide an auto handle as an argument to any of the remote procedures declared in your interface. A Sample IDL would look like the one below:

    /* IDL file */
    [
      uuid (6B29FC33-CA47-1067-B31D-00DD010662DA),
      version(1.0),
      pointer_default(unique)
    ]

    interface IFoo
    {
      void GetRange([out] long * min);
      void Shutdown([in] long * nAfterStep);
    }

    More .NET Articles
    More By Digvijay Chauhan


       · Hi I'm Digvijay ....... the author of this article.Please feel free to ask any...
       · I do like your explaination on the topic of RPC. I try to used them to solve...
       · Thank you for your article. I am having a problem where the sever denies access to...
       · Hi,I didn't get what you're trying to solve. Could you please give me the...
       · What is the exact error do you get?Would you like me to take a look at the...
     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT