liblnk(3)

NAME
liblnk.h - Library to support the Windows Shortcut File (LNK) format

LIBRARY
liblnk

SYNOPSIS
#include <liblnk.h>

Support functions
const char *
liblnk_get_version(void);
int
liblnk_get_access_flags_read();
int
liblnk_get_codepage(int *codepage, liblnk_error_t **error);
int
liblnk_set_codepage(int codepage, liblnk_error_t **error);
int
liblnk_check_file_signature(const char *filename, liblnk_error_t **error);

Available when compiled with wide character string support:
int
liblnk_check_file_signature_wide(const wchar_t *filename, liblnk_error_t **error);

Available when compiled with libbfio support:
int
liblnk_check_file_signature_file_io_handle(libbfio_handle_t *bfio_handle, liblnk_error_t **error);

Notify functions
void
liblnk_notify_set_verbose(int verbose);
int
liblnk_notify_set_stream(FILE *stream, liblnk_error_t **error);
int
liblnk_notify_stream_open(const char *filename, liblnk_error_t **error);
int
liblnk_notify_stream_close(liblnk_error_t **error);

Error functions
void
liblnk_error_free(liblnk_error_t **error);
int
liblnk_error_fprint(liblnk_error_t *error, FILE *stream);
int
liblnk_error_sprint(liblnk_error_t *error, char *string, size_t size);
int
liblnk_error_backtrace_fprint(liblnk_error_t *error, FILE *stream);
int
liblnk_error_backtrace_sprint(liblnk_error_t *error, char *string, size_t size);

File functions
int
liblnk_file_initialize(liblnk_file_t **file, liblnk_error_t **error);
int
liblnk_file_free(liblnk_file_t **file, liblnk_error_t **error);
int
liblnk_file_open(liblnk_file_t *file, const char *filename, int access_flags, liblnk_error_t **error);
int
liblnk_file_close(liblnk_file_t *file, liblnk_error_t **error);
int
liblnk_file_get_ascii_codepage(liblnk_file_t *file, int *ascii_codepage, liblnk_error_t **error);
int
liblnk_file_set_ascii_codepage(liblnk_file_t *file, int ascii_codepage, liblnk_error_t **error);

Available when compiled with wide character string support:
int
liblnk_file_open_wide(liblnk_file_t *file, const wchar_t *filename, int access_flags, liblnk_error_t **error);

Available when compiled with libbfio support:
int
liblnk_file_open_file_io_handle(liblnk_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, liblnk_error_t **error);

Link information functions
int
liblnk_file_get_data_flags(liblnk_file_t *file, uint32_t *data_flags, liblnk_error_t **error);
int
liblnk_file_link_refers_to_file(liblnk_file_t *file, liblnk_error_t **error);
int
liblnk_file_get_file_creation_time(liblnk_file_t *file, uint64_t *creation_time, liblnk_error_t **error);
int
liblnk_file_get_file_modification_time(liblnk_file_t *file, uint64_t *modification_time, liblnk_error_t **error);
int
liblnk_file_get_file_access_time(liblnk_file_t *file, uint64_t *access_time, liblnk_error_t **error);
int
liblnk_file_get_file_size(liblnk_file_t *file, uint32_t *file_size, liblnk_error_t **error);
int
liblnk_file_get_file_attribute_flags(liblnk_file_t *file, uint32_t *file_attribute_flags, liblnk_error_t **error);
int
liblnk_file_get_drive_type(liblnk_file_t *file, uint32_t *drive_type, liblnk_error_t **error);
int
liblnk_file_get_drive_serial_number(liblnk_file_t *file, uint32_t *drive_serial_number, liblnk_error_t **error);
int
liblnk_file_get_utf8_volume_label_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_volume_label(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_volume_label_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_volume_label(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_local_path_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_local_path(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_local_path_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_local_path(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_network_path_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_network_path(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_network_path_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_network_path(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_description_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_description(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_description_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_description(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_relative_path_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_relative_path(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_relative_path_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_relative_path(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_working_directory_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_working_directory(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_working_directory_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_working_directory(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_command_line_arguments_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_command_line_arguments(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_command_line_arguments_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_command_line_arguments(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_icon_location_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_icon_location(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_icon_location_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_icon_location(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_environment_variables_location_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_environment_variables_location(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_environment_variables_location_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_environment_variables_location(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_link_target_identifier_data(liblnk_file_t *file, uint8_t **data, size_t *data_size, liblnk_error_t **error);

Distributed link tracking data functions
int
liblnk_file_has_distributed_link_tracking_data(liblnk_file_t *file, liblnk_error_t **error);
int
liblnk_file_get_utf8_machine_identifier_size(liblnk_file_t *file, size_t *utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf8_machine_identifier(liblnk_file_t *file, uint8_t *utf8_string, size_t utf8_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_machine_identifier_size(liblnk_file_t *file, size_t *utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_utf16_machine_identifier(liblnk_file_t *file, uint16_t *utf16_string, size_t utf16_string_size, liblnk_error_t **error);
int
liblnk_file_get_droid_volume_identifier(liblnk_file_t *file, uint8_t *guid, size_t size, liblnk_error_t **error);
int
liblnk_file_get_droid_file_identifier(liblnk_file_t *file, uint8_t *guid, size_t size, liblnk_error_t **error);
int
liblnk_file_get_birth_droid_volume_identifier(liblnk_file_t *file, uint8_t *guid, size_t size, liblnk_error_t **error);
int
liblnk_file_get_birth_droid_file_identifier(liblnk_file_t *file, uint8_t *guid, size_t size, liblnk_error_t **error);

DESCRIPTION
The liblnk_get_version() function is used to retrieve the library version.

RETURN VALUES
Most of the functions return 1 if successful or -1 on error. The close function is an exception since it returns 0 if successful or -1 on error. More details about the return values can be found in liblnk.h

ENVIRONMENT
None

FILES
None

NOTES
None

BUGS
Please report bugs of any kind to <joachim.metz@gmail.com> or on the project website: http://code.google.com/p/liblnk/

AUTHOR
These man pages were written by Joachim Metz.

COPYRIGHT
Copyright (c) 2009-2013, Joachim Metz <joachim.metz@gmail.com>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
the liblnk.h include file