Partager via


SHGetAutoRunPath (Windows Embedded CE 6.0)

1/6/2010

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

MIPS IV/MIPS64

5000

SH4

10005

Note

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

Requirements

Header windows.h
Library aygshell.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

AYGShell Functions