Infraction of access in kernel32.dll

Post Reply
User avatar
goosfancito
Posts: 1392
Joined: Fri Oct 07, 2005 7:08 pm

Infraction of access in kernel32.dll

Post by goosfancito »

Hi all,

I have this lines of source, and when i run my app it produce error:

Image

Code: Select all

FUNCTION ComandoCEM( cPipe, xComando)

   LOCAL xInBuffer := 101
   LOCAL xOutbuffer
   LOCAL xRespuesta

   CallNamPip( cPipe,          ;              // lpNamedPipeName
               xComando,       ;              // lpInBuffer
               Len(xComando) + 1,           ;              // nInBufferSize
               xOutBuffer,     ;              // lpOutBuffer
               1024,           ;              // nOutBufferSize
               xRespuesta,     ;              // lpBytesRead
               20000 )              // nTimeOut

   RETURN ( NIL )

//------------------------------------------------------------------------------

DLL32 FUNCTION CallNamPip( lpNamedPipeName AS STRING,;
                           @lpInBuffer AS LPSTR,;
                           nInBufferSize AS LONG, ;
                           @lpOutBuffer AS LPSTR,;
                           nOutBufferSize AS LONG, ;
                           @lpBytesRead AS LONG,;
                           nTimeOut AS LONG ) ;
               AS LONG PASCAL;
               FROM "CallNamedPipeA" LIB "KERNEL32.DLL"
Idea?

Tank´s
Un aporte chico hace grandes cambios.
Apoyemos al proyecto "Hogar pimpinela"
Bajate la aplicación (gratuita) y encuentra en ella toda la info de como podes colaborar.
GRACIAS!
https://play.google.com/store/apps/deta ... .acomprar
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Gustavo,

Declare lpNamedPipeName AS LPSTR and remove @ from the DLL32 FUNCTION declaration.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply