Oppure

Loading
Questo topic e' stato chiuso dal moderatore.
12/06/11 10:08
Qwertj
Salve a tutti,
Vorrei, dato il percorso di un collegamento (es.: "C:\UnCollegamento.lnk";), ottenere a quale cartella/file punta.
E' possibile? :-|

Per intenderci meglio:
Ho una cartella "C:\Pincopallo", ho fatto "Crea collegamento" e ho messo il collegamento creato (chiamato "Pinco.lnk";) sul desktop. Aprendo il collegamento apro la cartella "C:\Pincopallo"
Ora, sapendo "C:\Documents and Settings\Gigio\Desktop\Pinco.lnk", voglio poter ottenere "C:\Pincopallo"

EDIT: Grazie Totem per i link, in particolare per il secondo che è stato molto utile.
Ti volevo però chiedere chiarimenti riguardo a questo commento al flag SLR_NO_UI nell'enumeratore SLR_FLAGS

Do not display a dialog box if the link cannot be resolved. When SLR_NO_UI is set, the high-order word of fFlags can be set to a time-out value that specifies the maximum amount of time to be spent resolving the link. The function returns if the link cannot be resolved within the time-out duration. If the high-order word is set to zero, the time-out duration will be set to the default value of 3,000 milliseconds (3 seconds). To specify a value, set the high word of fFlags to the desired time-out duration, in milliseconds.

In una funzione io mi servo di quel campo, che sembra possa impostare il numero di millisecondi di timeout per cercare di ritrovare il file di destinazione.
Come faccio a settare "the high-order word" al valore che desidero? (credo si riferisca alla high-order word del campo stesso)
Ultima modifica effettuata da Qwertj 12/06/11 13:02
aaa
14/06/11 12:00
Il Totem
Sarebbe la parola più significativa del campo fFlags, ossia i primi 16 bit. Secondo le specifiche del formato:
stdlib.com/…
i flags sono un campo a 32 bit con offset di 20 bytes. A seconda dell'endianness dovrai leggere la word di offset 20 o quella di offset 22 e cambiarne il valore.
aaa