Click here to Skip to main content
15,881,740 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

can any one tell me how i can return value or result from server back to client by using rpc.

thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 19-Oct-11 2:13am    
Nothing is tagged: platform, language, other relevant detail. How can you hope for useful answer?
--SA

sorry my mistake

i am using windows XP professional with visual studio 2010 professional
i am using vc++ for developing application.

this is IDL file i use

C#
// File Example1.idl
[
   // A unique identifier that distinguishes this interface from other interfaces.
   uuid(00000001-EAF3-4A7A-A0F2-BCE4C30DA77E),

   // This is version 1.0 of this interface.
   version(1.0)
]
interface Example1 // The interface is named Example1
{
   // A function that takes a zero-terminated string.
   void Output(
      [in, string] const char* szOutput);

   void Output2([out,retval] char *ptrx);

}



i can not obtain return value in ptrx , any suggestion ?
 
Share this answer
 
problem solved

here is new IDL with changes

C#
void Output(
      [in, string] unsigned char* szOutput,[out,retval,size_is(100)] unsigned char *ptrx);

   void get_file(
        [in,out] long *total , [in,out] long *pack , [out,retval,size_is(5000)] unsigned char* data );
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900