Re: WindowsProcessMBS CreateProcessWithLogonW
Marnaud <[email protected]> Fri, 21 Dec 2018 14:23:08 +0100
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_205AEF0D-E772-440D-BE5C-43CD2ED0AFA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 19 d=C3=A9c. 2018 =C3=A0 16:58 du soir, Scott Carpenter = <[email protected]> a =C3=A9crit: >=20 > I am trying to launch an application from within a Xojo app using = WindowsProcessMBS (code below). It is important that I use this function = as it calls the Windows CreateProcessWithLogonW and I need to = authenticate as this is being developed as a Windows service. > In testing with a console app all works well if I don=E2=80=99t try to = authenticate, but when I include credentials, the LastErrorMessage = returns "The parameter is incorrect". > I have reviewed the Microsoft documentation for = CreateProcessWithLogonW: > =20 > = https://docs.microsoft.com/de-de/windows/desktop/api/winbase/nf-winbase-cr= eateprocesswithlogonw = <https://docs.microsoft.com/de-de/windows/desktop/api/winbase/nf-winbase-c= reateprocesswithlogonw> Sorry you don't get much answers. Have you perhaps tried in a = non-console application, just for testing? I'm seeing =E2=80=9Cdesktop = apps only=E2=80=9D in the requirements field; not sure if this excludes = console apps.= --Apple-Mail=_205AEF0D-E772-440D-BE5C-43CD2ED0AFA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 19 d=C3=A9c. 2018 =C3=A0 16:58 du soir, Scott Carpenter = <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> a =C3=A9crit:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div = class=3D"WordSection1" style=3D"page: WordSection1; font-family: = Helvetica; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: normal; letter-spacing: normal; orphans: auto; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: = 0px;"><div style=3D"margin: 0in 0in 0.0001pt; font-size: 11pt; = font-family: Calibri, sans-serif;" class=3D"">I am trying to launch an = application from within a Xojo app using WindowsProcessMBS (code below). = It is important that I use this function as it calls the Windows = CreateProcessWithLogonW and I need to authenticate as this is being = developed as a Windows service.<o:p class=3D""></o:p></div><div = style=3D"margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: = Calibri, sans-serif;" class=3D"">In testing with a console app all works = well if I don=E2=80=99t try to authenticate, but when I include = credentials, the LastErrorMessage returns "The parameter is = incorrect".<o:p class=3D""></o:p></div><div style=3D"margin: 0in 0in = 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"">I= have reviewed the Microsoft documentation for = CreateProcessWithLogonW:<o:p class=3D""></o:p></div><div style=3D"margin: = 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" = class=3D""><o:p class=3D""> </o:p></div><div style=3D"margin: 0in = 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" = class=3D""><a = href=3D"https://docs.microsoft.com/de-de/windows/desktop/api/winbase/nf-wi= nbase-createprocesswithlogonw" style=3D"color: purple; text-decoration: = underline;" = class=3D"">https://docs.microsoft.com/de-de/windows/desktop/api/winbase/nf= -winbase-createprocesswithlogonw</a></div></div></div></blockquote><br = class=3D""></div><div>Sorry you don't get much answers. Have you perhaps = tried in a non-console application, just for testing? I'm seeing = =E2=80=9Cdesktop apps only=E2=80=9D in the requirements field; not sure = if this excludes console apps.</div></body></html>= --Apple-Mail=_205AEF0D-E772-440D-BE5C-43CD2ED0AFA0--