Windows NT Systems Programming

[ Home | Syllabus |Course Notes]


RPC Postscript


Running Second Version (Revised)

(code is here)

Server Program

Client Program


ccrpc2.idl

 

[
  uuid (87654329-4321-1234-4321-987654321CBA),
  version(1.0),
  endpoint ("ncacn_np:[\\pipe\\ccrpc2]")
]
interface calcline
{
  typedef struct
  {
    double real;
    double imag;
  } complex;

  void CalcLine([in] double left, 
	[in] double right,
	[in] double y, [in] long width,
	[out, size_is(width)] short line[]);
}

Memory Allocation (MEMSTUB)

 

void __RPC_FAR * __RPC_API
	midl_user_allocate(size_t len)
{
	return(new(unsigned char [len]));
}

void __RPC_API midl_user_free(void __RPC_FAR * ptr)
{
	delete(ptr);
}

RPCs and Objects: Towards a distributed object model


Copyright chris wild 1997.
For problems or questions regarding this web contact [Dr. Wild].
Last updated: November 03, 1997.