BUG: 16-bit RPC Samples Print Meaningless Error CodesID: Q139717
|
Some of the 16-bit RPC samples print meaningless error codes. For example:
Runtime reported exception 378535963
The 16-bit applications method for generating exceptions are different from
those used by 32-bit applications. This is encapsulated to ease
programming. Please look in the header file Rpcx86.h.
RpcExceptionCode is defined as _exception_code. However, _excpetion_code is
a 16-bit integer, so when this is printed as an unsigned long integer, the
result is not meaningful.
Any of the following methods should result in meaningful error codes:
printf("Runtime reported exception %ld\n", (unsigned long)
RpcExceptionCode());
-or-
unsigned long ulCode;
ulCode = RpcExceptionCode();
printf("Runtime reported exception %ld\n", ulCode );
Note that this method is used by the samples that do not exhibit the
problem.Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are reasearching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
This bug is exhibited by the following samples:
callback\callc.c
data\dunion\dunionc.c
data\inout\inoutc.c
data\repas\repasc.c
data\xmit\xmitc.c
doctor\doctorc.c
rpcssm\rpcssmc.c
The SDK header file Rpcerr.h that installs with the 16-bit runtimes for RPC.
Keywords : kbnetwork kbAPI kbNTOS350bug kbNTOS351bug kbRPC kbSDKPlatform kbWinOS310bug kbWinOS95bug kbGrpNet
Version :
Platform :
Issue type : kbbug
Last Reviewed: March 5, 1999