Changes between Version 46 and Version 47 of libwdi/usage


Ignore:
Timestamp:
01/22/11 01:49:34 (2 years ago)
Author:
pbatard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • libwdi/usage

    v46 v47  
    2929== Error Codes == 
    3030 
    31 All of the liwdi API function, apart from '''wdi_strerror''' and '''wdi_is_driver_supported''', return one of the error codes below.[[BR]] 
     31All of the liwdi API function, apart from '''wdi_strerror''', '''wdi_is_driver_supported''' and '''wdi_is_file_embedded''', return one of the error codes below.[[BR]] 
    3232The '''wdi_strerror''' function, documented in the next paragraph, is used to convert an error code to a human readable string.[[BR]] 
    3333Success is always indicated by a return value zero (WDI_SUCCESS) while any error will be a negative value.[[BR]] 
     
    134134}}} 
    135135|---------------- 
     136[[BR]] 
     137 
     138|---------------- 
     139{{{#!td style="background: #eef" 
     140  '''struct [=#wdi_options_install_cert wdi_options_install_cert]''' 
     141}}} 
     142|---------------- 
     143{{{#!td 
     144  This structure is used by ''wdi_install_trusted_certificate'' to set optional parameters. 
     145  * '''HWND hWnd''' [[BR]]Handle to a Window application that can receive a modal warning dialog. When this parameter is provided, a modal warning dialog may be displayed to let the user know that a certificate in the system's Trusted Publishers store is going to be added/updated. Note that this warning may also displayed in this parameter is NULL (this option is intended for re-centering of the warning with regards to the parent Windows application) 
     146  * '''bool disable_warning''' [[BR]]disables the above warning when set to true. For security reasons, disabling of the warning should only be set for distribution of a lwdi installer by the administrators of a corporate environment, as it will otherwise lead to a code signing certificate being installed as trusted without the end-user's knowledge, which is bad practice. 
     147}}} 
     148|---------------- 
    136149 
    137150== Function Calls == 
     
    192205 
    193206  '''Remarks:''' 
    194     The '''bool''' type is defined in libwdi.h if needed. 
     207    The '''bool''' type is defined in libwdi.h. 
     208}}} 
     209|---------------- 
     210[[BR]] 
     211 
     212|---------------- 
     213{{{#!td style="background: #eef" 
     214  '''bool [=#wdi_is_file_embedded wdi_is_file_embedded](char* path, char* name)'''  
     215}}} 
     216|---------------- 
     217{{{#!td 
     218  '''Synopsis:''' 
     219    Indicates if the file identified by (path, name) or just (name) is available from the library binary. This can be useful for instance if you are planning to install a driver signing certificate, and want to confirm that the .cer file has properly been embedded in the archive, before calling wdi_install_trusted_certificate. 
     220 
     221  '''Parameters:''' 
     222    '''path''' (optional): The directory path that will be used for extraction. If this is a user file, this would be the relative path from the user directory that was specified during the compilation of the library. If path is NULL, then it is ignored, with only the file name parameter below being compared for a match.[[BR]] 
     223    '''name''': the filename, stripped of any path information.   
     224  '''Return value:''' 
     225    A boolean indicating whether the file is embedded within the current library binary. 
     226 
     227  '''Remarks:''' 
     228    The '''bool''' type is defined in libwdi.h. 
    195229}}} 
    196230|---------------- 
     
    314348|---------------- 
    315349{{{#!td style="background: #eef" 
     350  '''int [=#wdi_install_trusted_certificate wdi_install_trusted_certificate](char* cert_name, struct wdi_options_install_cert* options)''' 
     351}}} 
     352|---------------- 
     353{{{#!td 
     354  '''Synopsis:''' 
     355    Installs or updates the certificate '''cert_name''' into the system's Trusted Publisher store. This call must be run from an application running with elevated privileges on platforms with UAC. 
     356 
     357  '''Parameters:''' 
     358    '''cert_name''': a string identifying the embedded certificate file to use. If two certificate files with the same name have been embedded, in different locations, only the first one found will be used[[BR]] 
     359    '''options''': a pointer to a '''[#wdi_options_install_cert struct wdi_options_install_cert]''' or NULL for the default options. Unless the disable_warning option is provided, a warning will be displayed before a new certificate is installed or an existing one renewed.[[BR]] 
     360 
     361  '''Return value:''' 
     362    '''WDI_SUCCESS''' if the certificate was installed successfully.[[BR]] 
     363    '''WDI_ERROR_EXISTS''' if an identical certificate already exists in the store.[[BR]] 
     364    '''WDI_ERROR_INVALID_PARAM''' if the name of the certificate is invalid.[[BR]] 
     365    '''WDI_ERROR_NOT_FOUND''' if the certificate could not be located in the embedded files.[[BR]] 
     366    '''WDI_ERROR_NEEDS_ADMIN''' if the application is not running with the required privileges on platforms with UAC.[[BR]] 
     367    '''WDI_ERROR_ACCESS''' if the application is unable to access the system store or create a certificate context.[[BR]] 
     368    '''WDI_ERROR_RESOURCE''' if some of the resources required for installation are unavailable (crypt32.dll, etc).[[BR]] 
     369    '''WDI_ERROR_USER_CANCEL''' if the user cancelled the installation process after an UAC prompt. 
     370}}} 
     371|---------------- 
     372[[BR]] 
     373 
     374|---------------- 
     375{{{#!td style="background: #eef" 
    316376  '''int [=#wdi_set_log_level wdi_set_log_level](int level)''' 
    317377}}}