.NET
  Home arrow .NET arrow 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


    (Page 1 of 5 )

    In this second article about using RPC on the Windows platform, we'll cover RPC handles, which should be handled with care. Keep reading to find out why, and how to use them.

    In the previous article in this series we learned about the basics of using RPC on the Windows platform for developing Client/Server applications. It gave you a fair understanding of writing and integrating the MIDL generated code into your own applications, apart from the basics of using the MIDL compiler and the IDL language itself.

    When we have the PRC mechanism to keep track of all the network communication for us we can devote more time to the business logic of the application being developed. But in order to design better solutions one needs to be aware of the issues that are encountered while we use RPC as the communication channel.

    RPC handles are something that should be used with care because they determine how the communication will be established. In this article we are going to discuss just that. To understand the issues better, we’ll write code to observe the differences in the RPC context handle types.

    So let’s get started now!

    What are these RPC Handles?

    When we program for Windows using plain old C, we see a lot of handles scattered all over the program, such as HMODULE, HWND or SCARDHANDLE. Moreover they all have different names in different places, to make them relevant to the code we write. So what’s different with these RPC handles?

    Well, you may assume an RPC handle to be the equivalent of the "this" pointer that we see in the C++ language or the HANDLE returned from CreateWindowEx, or any other handle in Windows for that matter. They are basically different handles that behave somewhat differently based on the context, but they do accomplish the same thing: they all connect to an object, or rather encapsulate an object. Most of the context handles that you see while programming Windows are more or less opaque, but in the RPC world the context handles are 100 percent opaque, since they are defined to be pointers of type void*. Now let’s learn more about the different types of these RPC handles and more importantly the need for them.

    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





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