hi Antonio,
i try
Can you show me the code of a program written in the Harbour language that show video Property of SHELLEXECUTEINFO which use ShellExecuteExA and return hb_arraySetL ?
and got
#include "hbapi.h"
#include "hbvm.h"
#include "shellapi.h"
HB_FUNC( SHELLEXECUTEINFO )
{
SHELLEXECUTEINFO sei;
sei.cbSize = sizeof( SHELLEXECUTEINFO );
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
sei.hwnd = NULL;
sei.lpVerb = NULL;
sei.lpFile = ( LPCTSTR ) hb_parc( 1 );
sei.lpParameters = ( LPCTSTR ) hb_parc( 2 );
sei.lpDirectory = ( LPCTSTR ) hb_parc( 3 );
sei.nShow = SW_SHOW;
sei.hInstApp = NULL;
sei.lpIDList = NULL;
sei.lpClass = NULL;
sei.hkeyClass = NULL;
sei.dwHotKey = 0;
sei.hIcon = NULL;
sei.hProcess = NULL;
if( ShellExecuteExA( &sei ) )
{
PHB_ITEM pArray = hb_itemArrayNew( 2 );
hb_arraySetL( pArray, 1, TRUE );
hb_arraySetNInt( pArray, 2, ( HB_MAXINT ) sei.hProcess );
hb_itemReturnRelease( pArray );
}
else
{
PHB_ITEM pArray = hb_itemArrayNew( 2 );
hb_arraySetL( pArray, 1, FALSE );
hb_arraySetNInt( pArray, 2, 0 );
hb_itemReturnRelease( pArray );
}
}
it does compile and run ...
it does "open" Explorer Folder of File :? and show
I just did it and this answer seems ok to me
"how" did you ask ChatGPT ... i would like to try it
---
i got this CODE which seems to do what i want
FUNCTION FileInfo(cPath, cFilename, nItem, cHDR)
/**********************************************/
LOCAL objFolder
LOCAL objFolderItem
LOCAL cFileInfo
LOCAL cHeaderInfo
Public objShell := CreateObject("Shell.Application")
objFolder := objShell:Namespace(cPath)
objFolderItem := objFolder:ParseName(cFilename)
cFileInfo := objFolder:GetDetailsOf(objFolderItem, nItem)
cHeaderInfo := objFolder:GetDetailsOf(objFolder:Items, nItem)
IF cHDR == 'H'
RETURN cHeaderInfo
ELSE
RETURN cFileInfo
ENDIF
RETURN NIL
? 'H-HDR', FileInfo(cPath, aFiles [XX, F_NAME ] , 021, 'H') // TITLE
? 'F-HDR', FileInfo(cPath, aFiles [XX, F_NAME ] , 021, 'F') // TITLE
FOR YY = 1 TO LEN(aMusic_FileInfo) -1
cTITLE2 := FileInfo(cPath, aFiles [ XX, F_NAME ], aMusic_FileInfo [ YY ], 'F')
Problem :
i need to "know Name" of Property
aMusic_Headers := {}
AADD(aMusic_Headers, {001, 'Grootte '} )
AADD(aMusic_Headers, {016, 'Genre '} )
AADD(aMusic_Headers, {027, 'Time '} )
AADD(aMusic_Headers, {015, 'Year '} )
AADD(aMusic_Headers, {009, 'Type '} )
AADD(aMusic_Headers, {011, 'Kind '} )
AADD(aMusic_Headers, {013, 'Contr_art'} )
AADD(aMusic_Headers, {220, 'Composers'} )
but how to get "Name" :?: