Mi código estaba hecho para FWH, pero ahora necesito pasarlo tambien para FW, comencé pero me tira un error al compilar, podrían ayudarme?
- Code: Select all Expand view
#include "winten.h"
#include "windows.h"
#ifndef __HARBOUR__
#include "clipapi.h"
#else
#include "hbapi.h"
#endif
#define BUFSIZE 512
#ifndef __HARBOUR__
CLIPPER COMANDOCEM( PARAMS )
#else
HB_FUNC ( COMANDOCEM )
#endif
{
#ifndef __HARBOUR__
char chReadBuf[BUFSIZE];
#else
TCHAR chReadBuf[BUFSIZE];
#endif
BOOL fSuccess;
DWORD cbRead, cbWritten, dwMode;
#ifndef __HARBOUR__
LPSTR lpszPipename = _parc( 1 ) ;
LPSTR lpszWrite = _parc( 2 ) ;
#else
LPTSTR lpszPipename = hb_parc( 1 ) ;
LPTSTR lpszWrite = hb_parc( 2 ) ;
#endif
OutputDebugString( _parc(1) );
#ifndef __HARBOUR__
fSuccess = CallNamedPipe(
lpszPipename,
lpszWrite,
(lstrlen( lpszWrite) + 1 ) * sizeof( char ),
chReadBuf,
BUFSIZE * sizeof( char ),
&cbRead,
200000 );
#else
fSuccess = CallNamedPipe(
lpszPipename,
lpszWrite,
( lstrlen( lpszWrite ) + 1 ) * sizeof( TCHAR ),
chReadBuf,
BUFSIZE*sizeof( TCHAR ),
&cbRead,
20000);
#endif
}
Error:
Warning source\pipeclte.c 74: Call to function 'CallNamedPipe' with no prototype in function COMANDOCEM
Warning source\pipeclte.c 89: 'fSuccess' is assigned a value that is never used in function COMANDOCEM