PathEngine home previous: DLLExport_GetIPathEnginenext: PathEngine_InitialiseAndObtainRootInterface
Contents, API Reference, Functions, DLLExport_SetDefaultAllocator



Enables a custom allocation strategy to be supplied for PathEngine internal allocations (default allocator).


This function is defined internally by the PathEngine dll, as follows:
extern "C"
    void __stdcall DLLExport_SetDefaultAllocator(iAllocator* allocator);


allocator A pointer to an object inheriting from the iAllocator interface, which PathEngine will call for memory allocations.


This function is for use when dynamically linking against the SDK.
(Use PathEngine_SetDefaultAllocator() for static linkage situations.)

This function can only be called

obtaining the PathEngine SDK entrypoint with (for example) DLLExport_GetIPathEngine().

The function pointer can be obtained with GetProcAddress in the same way as described in Linking with the PathEngine DLL, but with exported function ordinal 3:

typedef void (__stdcall* tFunctionPtrType)(iAllocator*);
FARPROC procAddress;
procAddress = GetProcAddress(hInstance, (LPCSTR)3);
tFunctionPtrType functionPtr = (tFunctionPtrType)procAddress;

The pointed to allocator object must then remain valid either until the DLL has been unloaded.

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: PathEngine_InitialiseAndObtainRootInterface