.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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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

    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek