summaryrefslogtreecommitdiff
path: root/source4/torture/dcom
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-12 00:48:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:44 -0500
commit79c5d73a71c35f5b16232072a7b52033cb9364cb (patch)
tree62aec59516dd088a0b71b4f86119497b621acb16 /source4/torture/dcom
parentc8b894b670a2e854c5a6af598ab1f02b142b3406 (diff)
downloadsamba-79c5d73a71c35f5b16232072a7b52033cb9364cb.tar.gz
samba-79c5d73a71c35f5b16232072a7b52033cb9364cb.tar.bz2
samba-79c5d73a71c35f5b16232072a7b52033cb9364cb.zip
r3689: Large number of COM updates:
- Work on server side and local COM support (should work, just no example classes yet) - Use vtables so that local and remote calls can be used transparently - Generate 'proxies and stubs' rather then heavily modified code in client.pm and server.pm. proxies (client side code) are generated in proxy.pm, stubs (server side dispatchers) are generated in stubs.pm - Support registering classes and interfaces - DCOM interfaces no longer have to be in the same IDL file as their base interface, which will allow us to split up dcom.idl (This used to be commit 7466947a23985f9bb15209b67880f7b94dc515c8)
Diffstat (limited to 'source4/torture/dcom')
-rw-r--r--source4/torture/dcom/simple.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source4/torture/dcom/simple.c b/source4/torture/dcom/simple.c
index 287e35142e..85bf194091 100644
--- a/source4/torture/dcom/simple.c
+++ b/source4/torture/dcom/simple.c
@@ -35,16 +35,21 @@ BOOL torture_dcom_simple(void)
struct GUID IID[2];
struct GUID clsid;
WERROR error;
- struct dcom_interface *interfaces;
- struct IStream_Read r_read;
- struct IStream_Write r_write;
+ struct dcom_interface_p **interfaces;
+ struct Read r_read;
+ struct Write r_write;
WERROR results[2];
struct dcom_context *ctx;
char test_data[5];
int i;
+ extern NTSTATUS dcom_IUnknown_init(void);
+ extern NTSTATUS dcom_IStream_init(void);
mem_ctx = talloc_init("torture_dcom_simple");
+ dcom_IUnknown_init();
+ dcom_IStream_init();
+
dcom_init(&ctx, lp_parm_string(-1, "torture", "userdomain"),
lp_parm_string(-1, "torture", "username"),
lp_parm_string(-1, "torture", "password"));
@@ -62,10 +67,15 @@ BOOL torture_dcom_simple(void)
printf("dcom_create_object failed - %s\n", win_errstr(error));
return False;
}
+
+ if (!W_ERROR_IS_OK(results[0])) {
+ printf("dcom_create_object didn't return IStream interface - %s\n", win_errstr(results[0]));
+ return False;
+ }
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);
+ status = dcom_IStream_Read(interfaces[0], mem_ctx, &r_read);
if (NT_STATUS_IS_ERR(status)) {
printf("IStream::Read() failed - %s\n", nt_errstr(status));
ret = False;
@@ -79,7 +89,7 @@ BOOL torture_dcom_simple(void)
}
r_write.in.num_requested = 5;
r_write.in.data = (uint8_t *)&test_data;
- status = dcerpc_IStream_Write(&interfaces[0], mem_ctx, &r_write);
+ status = dcom_IStream_Write(interfaces[0], mem_ctx, &r_write);
if (NT_STATUS_IS_ERR(status)) {
printf("IStream::Write() failed - %s\n", nt_errstr(status));
ret = False;
@@ -88,7 +98,7 @@ BOOL torture_dcom_simple(void)
ret = False;
}
- status = dcerpc_IUnknown_Release(&interfaces[1], mem_ctx, NULL);
+ status = dcom_IUnknown_Release(interfaces[1], mem_ctx, NULL);
if (NT_STATUS_IS_ERR(status)) {
printf("IUnknown::Release() failed - %s\n", nt_errstr(status));
return False;