
www.web-discovery.net
UINT YourClassName::LoadDisplayList(char *YOUR_DISPLAY_LIST_DLL){ // Function prototypes typedef UINT (*DISP_LIST_MODULE_FUNC)(VOID); // Function pointers DISP_LIST_MODULE_FUNC pCreateList = NULL; // Module handle HINSTANCE hInst = NULL; hInst = LoadLibrary(YOUR_DISPLAY_LIST_DLL); if(hInst) { // Based on whatever you call your function exported by the DLL, use it in place of the string here pCreateList = (DISP_LIST_MODULE_FUNC)GetProcAddress(hInst, "DisplayListFuncExported"; // If you get a valid pointer to the function, use it if(pCreateList) { // Call the function and store the display list ID UINT dispListID = pCreateList(); FreeLibrary(hInst); return dispListID; } else // some error occured { // Message the error however you like, free the library FreeLibrary(hInst); return NULL; } // If the module failed to load, message the error however you like else { // Message the error or return NULL or whatever return NULL; }}
ifstream fileName("model.foo");int x, y, z;fileName >> x >> y >> z;