How to Implement RPC in windows XP
-
Good point - I forgot that one. So long since I used VC6....since I moved to VS2003, I've always used a Visual Studio newer than my standard target (Windows 2000 - we've not managed to make the giant leap to XP or Vista at the company I work for).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Hi, I compiled the idl file and it creates server and client (ie client_c.c and server_s.c) stub files.Client stub file is working properly in application.But In server stub file Interface definition is not implemented(generated code).(I created idl file project type is ATL COM AppWizard and server type as Service). Regrads, Suthakar
-
Hi, I compiled the idl file and it creates server and client (ie client_c.c and server_s.c) stub files.Client stub file is working properly in application.But In server stub file Interface definition is not implemented(generated code).(I created idl file project type is ATL COM AppWizard and server type as Service). Regrads, Suthakar
suthakar56 wrote:
But In server stub file Interface definition is not implemented
What do you mean by 'not implemented'? I just tried a quick sample of IDL, which I processed with
midl /server stub /client stub a.idl
- seemed to have the correct server marshalling code.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
suthakar56 wrote:
But In server stub file Interface definition is not implemented
What do you mean by 'not implemented'? I just tried a quick sample of IDL, which I processed with
midl /server stub /client stub a.idl
- seemed to have the correct server marshalling code.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
I just compiled .idl by vc++ editer itself.It creates the client and server stub files.I want to know that whether i should compile .idl file using midl compiler only or the the first is enough. Not implemented -->The function(idl) definition is implemented in server stub file (in my sample code).But original code it was not there.
-
I just compiled .idl by vc++ editer itself.It creates the client and server stub files.I want to know that whether i should compile .idl file using midl compiler only or the the first is enough. Not implemented -->The function(idl) definition is implemented in server stub file (in my sample code).But original code it was not there.
suthakar56 wrote:
I just compiled .idl by vc++ editer itself.It creates the client and server stub files.I want to know that whether i should compile .idl file using midl compiler only or the the first is enough.
VC++ uses MIDL. That's fine.
suthakar56 wrote:
Not implemented -->The function(idl) definition is implemented in server stub file (in my sample code).But original code it was not there.
Can you explain what you mean by 'But original code it was not there'
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
suthakar56 wrote:
I just compiled .idl by vc++ editer itself.It creates the client and server stub files.I want to know that whether i should compile .idl file using midl compiler only or the the first is enough.
VC++ uses MIDL. That's fine.
suthakar56 wrote:
Not implemented -->The function(idl) definition is implemented in server stub file (in my sample code).But original code it was not there.
Can you explain what you mean by 'But original code it was not there'
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
I am already having some sample code for RPC which executes perfectly.But my RPC server stub code, implementation of idl function definition (ie auto generated) was not there.
-
I am already having some sample code for RPC which executes perfectly.But my RPC server stub code, implementation of idl function definition (ie auto generated) was not there.
So - do you mean there was no whatever_s.c file? Or that it was empty? Try posting your IDL, and look in your VC++ project settings for that file to see what the command line to compile the IDL is and post that.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
So - do you mean there was no whatever_s.c file? Or that it was empty? Try posting your IDL, and look in your VC++ project settings for that file to see what the command line to compile the IDL is and post that.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Hi, now server is working fine but in client side it through an exception while running with breakpoints in client stub file.The idl file is as follows
[ uuid (id),
version(1.0),
pointer_default(unique)
]
interface myidl
{
typedef struct
{
int data;
}DATA_ST;void function([out] [in] DATA_ST *,DATA_ST);
}NdrNsGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, myidl__MIDL_AutoBindHandle ); while running this above function it through the exception " Runtime reported exception 0x6e2 = 1762.I want to know how the synchronization is maintained between client and server.
-
Hi, now server is working fine but in client side it through an exception while running with breakpoints in client stub file.The idl file is as follows
[ uuid (id),
version(1.0),
pointer_default(unique)
]
interface myidl
{
typedef struct
{
int data;
}DATA_ST;void function([out] [in] DATA_ST *,DATA_ST);
}NdrNsGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, myidl__MIDL_AutoBindHandle ); while running this above function it through the exception " Runtime reported exception 0x6e2 = 1762.I want to know how the synchronization is maintained between client and server.
suthakar56 wrote:
I want to know how the synchronization is maintained between client and server.
By maintaining a single thread of control between client and server - the calling thread on the client side waits while an RPC call is made.
suthakar56 wrote:
void function([out] [in] DATA_ST *,DATA_ST);
Should that be
void function([out] DATA_ST *,[in] DATA_ST);
?
suthakar56 wrote:
Runtime reported exception 0x6e2 = 1762
Error 1762 ==
RPC_S_NAME_SERVICE_UNAVAILABLE
. Means it can't find the server, I think.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
suthakar56 wrote:
I want to know how the synchronization is maintained between client and server.
By maintaining a single thread of control between client and server - the calling thread on the client side waits while an RPC call is made.
suthakar56 wrote:
void function([out] [in] DATA_ST *,DATA_ST);
Should that be
void function([out] DATA_ST *,[in] DATA_ST);
?
suthakar56 wrote:
Runtime reported exception 0x6e2 = 1762
Error 1762 ==
RPC_S_NAME_SERVICE_UNAVAILABLE
. Means it can't find the server, I think.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Good! Well done for sorting it out!
suthakar56 wrote:
As a beginner,I missed the .acf file
I've never used an acf file when I've used MS-RPC - I guess the situations where I've used RPC have been simple enough for me to get away without one.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p