summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm7
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm13
2 files changed, 13 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
index f8ba4fc18a..bc592e7f80 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
@@ -78,6 +78,9 @@ sub ParseInterface($)
my $if = shift;
my $res;
+ $res .= "\n#ifndef _$if->{NAME}_\n";
+ $res .= "#define _$if->{NAME}_\n";
+
$res .="\n\n/* $if->{NAME} */\n";
$res .="#define COM_" . uc($if->{NAME}) . "_UUID $if->{PROPERTIES}->{uuid}\n\n";
@@ -102,12 +105,14 @@ sub ParseInterface($)
$res .="\n";
}
+ $res .= "#endif\n";
+
return $res;
}
sub ParseCoClass($)
{
- my $c = shift;
+ my ($c) = @_;
my $res = "";
$res .= "#define CLSID_" . uc($c->{NAME}) . " $c->{PROPERTIES}->{uuid}\n";
if (has_property($c, "progid")) {
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm
index e6366f0f3d..f3525260a5 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm
@@ -54,7 +54,7 @@ sub ParseRegFunc($)
$res.= "
const void *base_vtable;
- base_iid = dcerpc_table_$interface->{BASE}.uuid;
+ base_iid = ndr_table_$interface->{BASE}.syntax_id.uuid;
base_vtable = dcom_proxy_vtable_by_iid(&base_iid);
if (base_vtable == NULL) {
@@ -69,13 +69,13 @@ sub ParseRegFunc($)
foreach my $x (@{$interface->{DATA}}) {
next unless ($x->{TYPE} eq "FUNCTION");
- $res .= "\tproxy_vtable.$x->{NAME} = dcom_proxy_$interface->{NAME}_$x->{NAME};\n";
+ $res .= "\tproxy_vtable->$x->{NAME} = dcom_proxy_$interface->{NAME}_$x->{NAME};\n";
}
$res.= "
- proxy_vtable.iid = dcerpc_table_$interface->{NAME}.uuid;
+ proxy_vtable->iid = ndr_table_$interface->{NAME}.syntax_id.uuid;
- return dcom_register_proxy(&proxy_vtable);
+ return dcom_register_proxy((struct IUnknown_vtable *)proxy_vtable);
}\n\n";
}
@@ -120,7 +120,7 @@ static $fn->{RETURN_TYPE} dcom_proxy_$interface->{NAME}_$name(struct $interface-
NDR_PRINT_IN_DEBUG($name, &r);
}
- status = dcerpc_ndr_request(p, &d->ipid, &dcerpc_table_$interface->{NAME}, DCERPC_$uname, mem_ctx, &r);
+ status = dcerpc_ndr_request(p, &d->ipid, &ndr_table_$interface->{NAME}, DCERPC_$uname, mem_ctx, &r);
if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
NDR_PRINT_OUT_DEBUG($name, r);
@@ -203,7 +203,8 @@ sub Parse($$)
$res .= "#include \"includes.h\"\n" .
"#include \"lib/com/dcom/dcom.h\"\n" .
- "#include \"$comh_filename\"\n";
+ "#include \"$comh_filename\"\n" .
+ "#include \"librpc/rpc/dcerpc.h\"\n";
foreach (@{$pidl}) {
next if ($_->{TYPE} ne "INTERFACE");