Changeset 4798 in vbox
- Timestamp:
- Sep 14, 2007 2:24:32 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 24500
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r4640 r4798 102 102 103 103 /** Handle for the shared object / DLL. */ 104 RTLDRMOD pluginHandle;104 RTLDRMOD hPlugin; 105 105 /** Function pointers for the various backend methods. */ 106 106 PVBOXHDDBACKEND Backend; … … 494 494 if (!pBackend) 495 495 { 496 RTLDRMOD ldrHandle;496 RTLDRMOD hPlugin; 497 497 char *pszPluginName; 498 498 int cbPluginName; … … 509 509 { 510 510 /* try to load the plugin (RTldrLoad appends the suffix for the shared object/DLL). */ 511 rc = RTLdrLoad(pszPluginName, & ldrHandle);511 rc = RTLdrLoad(pszPluginName, &hPlugin); 512 512 if (VBOX_SUCCESS(rc)) 513 513 { 514 514 PFNVBOXHDDFORMATLOAD pfnHDDFormatLoad; 515 515 516 rc = RTLdrGetSymbol (ldrHandle, VBOX_HDDFORMAT_LOAD_NAME, (void**)&pfnHDDFormatLoad);517 if (VBOX_FAILURE(rc) || !pfnHDDFormatLoad)516 rc = RTLdrGetSymbol(hPlugin, VBOX_HDDFORMAT_LOAD_NAME, (void**)&pfnHDDFormatLoad); 517 if (VBOX_FAILURE(rc)) 518 518 { 519 519 Log(("%s: Error resolving the entry point %s, rc = %d, pfnHDDFormat = %p\n", VBOX_HDDFORMAT_LOAD_NAME, rc, pfnHDDFormatLoad)); … … 561 561 pDisk->pvErrorUser = pvErrorUser; 562 562 pDisk->Backend = pBackend; 563 pDisk->hPlugin = NIL_RTLDRMOD; 563 564 *ppDisk = pDisk; 564 565 } … … 591 592 { 592 593 VDCloseAll(pDisk); 593 RTLdrClose(pDisk->pluginHandle); 594 if (pDisk->hPlugin != NIL_RTLDRMOD) 595 { 596 RTLdrClose(pDisk->hPlugin); 597 pDisk->hPlugin = NIL_RTLDRMOD; 598 } 594 599 RTMemFree(pDisk->Backend); 595 600 RTMemFree(pDisk);
Note:
See TracChangeset
for help on using the changeset viewer.