MCPcopy Index your code
hub / github.com/MapServer/MapServer / loadCustomLayerDLL

Function loadCustomLayerDLL

mappluginlayer.c:116–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116static VTFactoryItemObj *
117loadCustomLayerDLL(layerObj *layer, const char *library_path)
118{
119 int (*pfnPluginInitVTable)(layerVTableObj *, layerObj *);
120
121 VTFactoryItemObj *pVTFI;
122
123 pfnPluginInitVTable = msGetSymbol(library_path, "PluginInitializeVirtualTable");
124 if ( ! pfnPluginInitVTable) {
125 msSetError(MS_MISCERR, "Failed to load dynamic Layer LIB: %s", "loadCustomLayerDLL", library_path);
126 return NULL;
127 }
128
129 pVTFI = createVTFItem(library_path);
130 if ( ! pVTFI) {
131 return NULL;
132 }
133
134 if (pfnPluginInitVTable(&pVTFI->vtable, layer)) {
135 destroyVTFItem(&pVTFI);
136 msSetError(MS_MISCERR, "Failed to initialize dynamic Layer: %s", "loadCustomLayerDLL", library_path);
137 return NULL;
138 }
139 return pVTFI;
140}
141
142/*
143 * copyVirtualTable

Callers 1

Calls 4

msGetSymbolFunction · 0.85
msSetErrorFunction · 0.85
createVTFItemFunction · 0.85
destroyVTFItemFunction · 0.85

Tested by

no test coverage detected