interactive services namedpipes working directpry
Posted: Tue Jun 18, 2019 12:15 pm
Hi,
my OS is windows 7 X64 and i try to open a openvpn process via named Pipes in vb.Net
the code opens the NamedPipe without problems.
Then i send the start request
But the only Response I get is
It doesn't matter, if i send the folder of openvpn.exe or any other Folder i have access to .
When i send C:\Pedro\ the service Responds with
but that didn't help at all, because i clearly send something, so len should not be 0
I hope somebody can give me a hint, what open expects from me.
thx
my OS is windows 7 X64 and i try to open a openvpn process via named Pipes in vb.Net
Code: Select all
Dim pipeClient As New NamedPipeClientStream( _
".", "openvpn\service", _
PipeDirection.InOut, PipeOptions.Asynchronous)
pipeClient.Connect(100000)
the code opens the NamedPipe without problems.
Then i send the start request
Code: Select all
Dim Nullbyte As Byte = &H0
Dim getbytes_xpb As Byte() = System.Text.Encoding.ASCII.GetBytes(workingdir_xps & Chr(Nullbyte) & vpnoptioons_xps & Chr(Nullbyte) & Chr(Nullbyte))
pipeClient.Write(getbytes_xpb, 0, getbytes_xpb.Length)
I changed the Variable workingdir_xps to something like C:\Pedro but nothing works so far.Startup data ends at working directory
It doesn't matter, if i send the folder of openvpn.exe or any other Folder i have access to .
When i send C:\Pedro\ the service Responds with
I looked at the source codeStartup data is not NULL terminated
Code: Select all
sud->directory = data;
len = wcslen(sud->directory) + 1;
size -= len;
if (size <= 0)
{
MsgToEventLog(M_ERR, TEXT("Startup data ends at working directory"));
ReturnError(pipe, ERROR_STARTUP_DATA, L"GetStartupData", 1, &exit_event);
goto err;
}
I hope somebody can give me a hint, what open expects from me.
thx