--- mstools/samples/rpc/handles/cxhndl/cxhndlc.c 2018/08/09 18:20:56 1.1 +++ mstools/samples/rpc/handles/cxhndl/cxhndlc.c 2018/08/09 18:22:02 1.1.1.2 @@ -8,7 +8,6 @@ -p protocol_sequence -e endpoint -o options - -u uuid -f filename PURPOSE: Client side of RPC distributed application @@ -39,23 +38,22 @@ void Usage(char * pszProgramName) fprintf(stderr, " -n network_address\n"); fprintf(stderr, " -e endpoint\n"); fprintf(stderr, " -o options\n"); - fprintf(stderr, " -u uuid\n"); fprintf(stderr, " -f filename\n"); exit(1); } -void main(int argc, char **argv) +void _CRTAPI1 main(int argc, char **argv) { RPC_STATUS status; // returned by RPC API function PCONTEXT_HANDLE_TYPE phContext = NULL; - char * pbBuf = NULL; + unsigned char * pbBuf = NULL; short cbRead; /* count of bytes read */ - unsigned char * pszUuid = "12345678-1234-1234-1234-123456789ABC"; + unsigned char * pszUuid = NULL; unsigned char * pszProtocolSequence = "ncacn_np"; unsigned char * pszNetworkAddress = NULL; - unsigned char * pszEndpoint = "\\pipe\\context"; + unsigned char * pszEndpoint = "\\pipe\\cxhndl"; unsigned char * pszOptions = NULL; unsigned char * pszStringBinding = NULL; unsigned char * pszFileName = "readme.cxh"; @@ -77,9 +75,6 @@ void main(int argc, char **argv) case 'o': pszOptions = argv[++i]; break; - case 'u': - pszUuid = argv[++i]; - break; case 'f': pszFileName = argv[++i]; break; @@ -93,7 +88,7 @@ void main(int argc, char **argv) Usage(argv[0]); } - pbBuf = (char *) malloc(BUFSIZE * sizeof(char)); + pbBuf = (unsigned char *) malloc(BUFSIZE * sizeof(unsigned char)); /* Use a convenience function to concatenate the elements of */ /* the string binding into the proper sequence. */