Share via


ProviderInitialize

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

A Provider DLL implements this function. The Location Framework calls this export during its initialization, immediately after loading the Provider DLL.

Syntax

DWORD ProviderInitialize(
  PROVIDER_INFORMATION* pProvInfo
);

Parameters

  • pProvInfo
    Pointer to a PROVIDER_INFORMATION structure containing configuration information about the Provider DLL that the Location Framework read from the registry.

Return Value

The Provider should return ERROR_SUCCESS if initialization succeeds or return an error code otherwise. If the function does not return ERROR_SUCCESS, the plugin will be immediately unloaded.

Remarks

There are a number of functions that are not safe to be called in DllMain, such as spinning threads, using Winsock, COM, or any other calls that may cause other libraries to be loaded. Such operations should be performed in this function instead.

Initialization functions are loaded serially by the Location Framework. Providers must not block for long periods of time in this function. Doing so will halt the Location Framework’s initialization and also that of servicesd.exe.

The PROVIDER_INFORMATION structure passed in does not need to be copied by the Provider for future reference. It will also be passed in on subsequent calls to ProviderGetLocation.

Requirements

Header lfplugin.h
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

Location Framework Plugin Functions