<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I am currently digging into using the DCE/RPC parts of JCIFS. Unfortunately I am running into problems.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Iused midlc (Version 0.6.1) To generate a JCIFS compatible stub for the svcctl Service and am now trying to call it. Unfortunately I am getting “jcifs.dcerpc.DcerpcException: DCERPC_FAULT_PROTO_ERROR”<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Here comes my code:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>            rpc.policy_handle scHandle = new rpc.policy_handle();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            SvcCtl.OpenSCManager openSCManagerRpc = new SvcCtl.OpenSCManager(host, null, 0x0001 | 0x0002, scHandle);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>            // Connection-oriented DCE/RPC over SMB named pipes.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + host + "[\\PIPE\\svcctl]",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    ConcurrentNtlmAuthenticator.getInstance().getNtlmPasswordAuthentication());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            try {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                handle.sendrecv(openSCManagerRpc);           </span><span lang=EN-US style='font-family:Wingdings'>ß</span><span lang=EN-US>The Exception is thrown when executing this line.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                if (openSCManagerRpc.retval != 0) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    throw new SmbException(openSCManagerRpc.retval, true);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            } catch(Exception e) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                e.printStackTrace();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            } finally {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                try {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    handle.close();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                } catch(IOException ioe) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    ioe.printStackTrace();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So what am I doing wrong? I would be really glad if you could help me get started, as Googling doesn’t seem to get me very far (There seems to be almost no information on this available)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Chris<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D;mso-fareast-language:DE'>[ C h r i s t o f e r  D u t z ]<br> <br>C-Ware IT-Service<br>Inhaber<br>Dipl. Inf. Christofer Dutz<br>Karlstraße. 104, 64285 Darmstadt<br> <br>fon:  0 61 51 / 27315 - 61<br>fax:  0 61 51 / 27315 - 64<br>mobil:  0171 / 7 444 2 33<br>email:  <a href="christofer.dutz@c-ware.de"><span style='color:blue'>christofer.dutz@c-ware.de</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D;mso-fareast-language:DE'><a href="http://www.c-ware.de"><span style='color:blue'>http://www.c-ware.de</span></a><br> <br>FA Darmstadt: 07 813 60581<br><br></span><span style='mso-fareast-language:DE'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>