I read in other forum that the problem is about 64bits version.
https://mqldiscussions.com/t/mql5-asynchronous-named-pipes/888
I am using windows10 64bit
So back to MT4 again...
MQL5 Asynchronous named pipes?
- 2019.11.11
- mrakey (Mirelle Rake)
- mqldiscussions.com
I´m trying to integrate MT5 with an external Named Pipe Server application written in C# through named pipes. The problem is the app requires a Asyncronous named pipe, and I can´t find a way to connect to it...
Using this codes
long ReadFile(long fileHandle,uchar &buffer[],long bytes,long &numOfBytes,long overlapped);
and
uchar inBuffer[255]={0}; long number_of_bytes_to_read=255; long number_of_bytes_read=0; Print("00"); int succes = ReadFile( hPipe, inBuffer,number_of_bytes_to_read,number_of_bytes_read,NULL);
It dont generate the error Access Violation but I never receive any byte and GetLastError is zero too.
I am using this code in the VisualStudio
command = "teste" Dim res As Integer = 0 Dim cbRead As Integer Dim textInLength As Integer Dim textOut() As Byte Dim textIn As String Dim textInArray() As Byte pipeName_ToMT4 = "\\.\pipe\teste" 'La no script mql ele vai analisar o comando e nos responder. Abaixo, ele envia o comando e lê a resposta. textOut = System.Text.Encoding.Default.GetBytes(command) textInLength = 255 ReDim textInArray(textInLength) res = CallNamedPipe(pipeName_ToMT4, textOut(0), command.Length + 1, textInArray(0), 255, cbRead, PIPE_NOWAIT)
In the Visual Studio side I am receiving the error 87...I need go further...
Você está perdendo oportunidades de negociação:
- Aplicativos de negociação gratuitos
- 8 000+ sinais para cópia
- Notícias econômicas para análise dos mercados financeiros
Registro
Login
Você concorda com a política do site e com os termos de uso
Se você não tem uma conta, por favor registre-se
Hi Everybody.
In mql5 pipes connection also works only in Common Folder rules?
I am trying to connect with a pipe connection that works perfectly in mt4 but in mt5 I always receive Access Violation...
I am using my old program created in Visual Studio that I connect via mt4 between pipes...In mt4 works fine.
In this app side I am using this simple line to connect
In the mt5 script I can print the message "Conected PipeServer" but after this in the line bool fSuccess = ReadFile(hPipe I am receiving the error.
I already question about it but many years ago but I neved thought about the Common Folder rules.
and here the error