by Ariston (BR) » Sun Jun 19, 2011 12:53 pm
After some small changes, It worked, with a small problem: It does not work if the app is stored in the “Storage Card”. Only if it is stored in the own device. When the EXE is placed in the storage card this error message shows: “Cannot find ‘Storage’. Check if required components are not missing…” (Something like this).
Here is the function changed:
- Code: Select all Expand view
HB_FUNC( SHCREATESHORTCUT )
{
LPWSTR szShortcut = AnsiToWide( ( char * ) hb_parc( 1 ) );
LPWSTR szTarget = AnsiToWide( ( char * ) hb_parc( 2 ) );
hb_retl( SHCreateShortcut( szShortcut, szTarget ) );
}
Here is how I call the funciton:
- Code: Select all Expand view
SHCREATESHORTCUT("\Windows\Start Menu\Programs\SisPed.lnk", CurDir()+"\sisped.exe")
Ariston Santos (Macapá-Amapá-Brasil)
FWPPC, Fwh26, xHb, xDev, WorkShop, Php, MySQL.