>>>h=cdll.LoadLibrary('dll.dll')
>>>h.hello() # messageBox
1
>>>windll.kernel32.FreeLibrary(h._handle)
1
>>>h.hello() #and still have messageBox,Why....
1
这是dll源
#include <windows.h>
#define DLL_EXPORT __declspec(dllexport)
BOOL APIENTRY DllMain(HANDLE hModule, DWORD fdwReason,LPVOID lpReserved) {}
DLL_EXPORT void hello (void)
{
MessageBox (0, "Hello World!", "From DLL", MB_ICONINFORMATION);
}