Initializes the library.

InitVFP2C32(nFlags)

Parameters

nFlags (additional)

Flag which specifies which parts of the library to initilalize.

One or a combination of the following values.
Flag
VFP2C_INIT_MARSHAL
VFP2C_INIT_ENUM
VFP2C_INIT_ASYNC
VFP2C_INIT_FILE
VFP2C_INIT_WINSOCK
VFP2C_INIT_ODBC
VFP2C_INIT_PRINT
VFP2C_INIT_NETAPI
VFP2C_INIT_CALLBACK
VFP2C_INIT_SERVICES
VFP2C_INIT_WINDOWS
VFP2C_INIT_RAS
VFP2C_INIT_IPHELPER
VFP2C_INIT_URLMON
VFP2C_INIT_ALL

Note

Initialization is not needed for all functions in the library.
The initialization flag a function might need is displayed in the header section.

Return Value

.T. if the library was initialized without errors, .F. otherwise.

Example

Initialize the whole library.

Copy code
#INCLUDE vfp2c.h
IF !InitVFP2C32(VFP2C_INIT_ALL)
  LOCAL laError[1], lnCount, xj, lcError
  lnCount = AERROREX('laError') 
  lcError = 'VFP2C32 Library initialization failed:' + CHR(13)
  FOR xj = 1 TO lnCount
    lcError = lcError + ;
    'Error No : ' + TRANSFORM(laError[1]) + CHR(13) + ;
    'Function : ' + laError[2] + CHR(13) + ;
    'Message : "' + laError[3] + '"'
  ENDFOR
  && show/log error and abort program initialization ..
ENDIF

See Also

Reference

AErrorEx
FormatMessageEx
VFP2CSys

Used WinApi functions

GetModuleHandle
LoadLibrary
HeapCreate
GetProcAddress
GetClassInfoEx
CreateWindowEx
RegisterClassEx
InitializeCriticalSection
WSAStartup