diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-11-08 02:12:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:39 -0500 |
commit | 8c2e179d477c99ab9c52e6b9af19a86d553d10b5 (patch) | |
tree | 386d8be6564c95686da8bf3eafb16de211dd28bc /source4/torture/dcom | |
parent | 009892846fb25e6698c8e38c46cae3512abb7ec6 (diff) | |
download | samba-8c2e179d477c99ab9c52e6b9af19a86d553d10b5.tar.gz samba-8c2e179d477c99ab9c52e6b9af19a86d553d10b5.tar.bz2 samba-8c2e179d477c99ab9c52e6b9af19a86d553d10b5.zip |
r3611: DCOM client support works!!
The torture test DCOM-SIMPLE now successfully does an
IStream_Read and a IStream_Write call.
This test can now be run successfully against the "Simple DCOM" Visual
Studio example.
(You have to quote out line 337 in pidl. pidl complains if the variable
that contains the array size follows the array. I still need to fix this
properly)
Next goals:
- Clean up code
- Server side support
- Support custom marshalling
- Support DCOM interfaces in files other then dcom.idl
(This used to be commit 8693344772a9b700533179f4bacfe27ec27dfcfe)
Diffstat (limited to 'source4/torture/dcom')
-rw-r--r-- | source4/torture/dcom/simple.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source4/torture/dcom/simple.c b/source4/torture/dcom/simple.c index d057bf9627..287e35142e 100644 --- a/source4/torture/dcom/simple.c +++ b/source4/torture/dcom/simple.c @@ -40,6 +40,8 @@ BOOL torture_dcom_simple(void) struct IStream_Write r_write; WERROR results[2]; struct dcom_context *ctx; + char test_data[5]; + int i; mem_ctx = talloc_init("torture_dcom_simple"); @@ -62,16 +64,28 @@ BOOL torture_dcom_simple(void) } ZERO_STRUCT(r_read); + r_read.in.num_requested = 20; /* Give me 20 0xFF bytes... */ status = dcerpc_IStream_Read(&interfaces[0], mem_ctx, &r_read); if (NT_STATUS_IS_ERR(status)) { printf("IStream::Read() failed - %s\n", nt_errstr(status)); - return False; + ret = False; + } else if (!W_ERROR_IS_OK(r_read.out.result)) { + printf("IStream::Read() failed - %s\n", win_errstr(r_read.out.result)); + ret = False; } + for (i = 0; i < 5; i++) { + test_data[i] = i+1; + } + r_write.in.num_requested = 5; + r_write.in.data = (uint8_t *)&test_data; status = dcerpc_IStream_Write(&interfaces[0], mem_ctx, &r_write); if (NT_STATUS_IS_ERR(status)) { printf("IStream::Write() failed - %s\n", nt_errstr(status)); - return False; + ret = False; + } else if (!W_ERROR_IS_OK(r_write.out.result)) { + printf("IStream::Write() failed - %s\n", win_errstr(r_write.out.result)); + ret = False; } status = dcerpc_IUnknown_Release(&interfaces[1], mem_ctx, NULL); |