FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Infraction of access in kernel32.dll
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Infraction of access in kernel32.dll
Posted: Tue Sep 26, 2006 02:52 PM
Hi all,

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




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/
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Infraction of access in kernel32.dll
Posted: Tue Sep 26, 2006 09:27 PM

Gustavo,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion