by Otto » Tue Aug 16, 2022 5:58 am
Dear Antonio,
can you please show how we can include this API function?
I tried different ways, but I am missing something. I get errors.
Best regards,
Otto
These are my tests:
- Code: Select all Expand view
function main
/*
UINT GetTempFileNameA(
[in] LPCSTR lpPathName,
[in] LPCSTR lpPrefixString,
[in] UINT uUnique,
[out] LPSTR lpTempFileName
);
*/
? GetTmpFileName('c:\fwh\samples',"ABC","123")
DLL32 Function GetTmpFileName ( lpszPath As String, lpPrefixString As String, wUnique As Long, lpTempFileName As String) As Long PASCAL ;
FROM "GetTempFileNameA" LIB "kernel32.dll"
/*
#pragma BEGINDUMP
#include <stdio.h>
#include <hbapi.h>
#include <windows.h>
HB_FUNC( GETTEMPFILENAMEA )
{
hb_retl( GetTempFileNameA( hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ) ) );
}
#pragma ENDDUMP
//----------------------------------------------------------------------------//
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club********************************************************************