标签:style c class blog code java
1 typedef IUnknown * (* CREATEFUNCPTR)(); 2 3 IUnknown * CallCreateInstance(char * name) 4 { 5 HINSTANCE hComponent = ::LoadLibrary(name); 6 if (hComponent == NULL) 7 { 8 // ... 9 return NULL; 10 } 11 12 CREATEFUNCPTR pFunc = (CREATEFUNCPTR)::GetProcAddress(hComponent, "CreateInstace"); 13 if (pFunc == NULL) 14 { 15 // ... 16 return NULL; 17 } 18 19 return pFunc(); 20 }
标签:style c class blog code java
原文地址:http://www.cnblogs.com/aoun/p/3755205.html