SHGetAutoRunPath (Compact 7)

3/12/2014

This function will search for the first storage card and construct the path that is used to look for an autorun file. The autorun file and directory do not need to be present on the storage card, but a storage card must be inserted for this function to succeed.

Syntax

BOOL SHGetAutoRunPath(
  LPTSTR pAutoRunPath
);

Parameters

  • pAutoRunPath
    [out] Pointer to a user-allocated string allocated to at least MAX_PATH characters. If successful, the full path name to the autorun directory will be copied here (for example, \Storage Card 1\2577\autorun.exe).

Return Value

Returns TRUE if a path was successfully constructed and copied to pAutoRunPath. Returns FALSE if a path could not be copied. FALSE indicates that either the input parameter is invalid or a storage card is not currently inserted.

Remarks

This function returns a string in the form \Storage Card 1\2577\autorun.exe. The operating system (OS) looks for the file autorun.exe in an appropriate subdirectory, which should be named using the microprocessor ID number found in Winnt.h. The following table shows microprocessor IDs for some common microprocessor families.

Microprocessor family Microprocessor ID

All x86 microprocessors

486

MIPS II/MIPS32

4000

Note

You can call GetSystemInfo to determine the microprocessor type and architecture for your device.

Requirements

Header

windows.h

Library

aygshell.lib

See Also

Reference

AYGShell Functions