Infraction of access in kernel32.dll

Infraction of access in kernel32.dll

Postby goosfancito » Tue Sep 26, 2006 2:52 pm

Hi all,

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

Image


Code: Select all  Expand view
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
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Postby Antonio Linares » Tue Sep 26, 2006 9:27 pm

Gustavo,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 27 guests