2012-10-05 02:57:32 +04:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <winpr/crt.h>
|
|
|
|
#include <winpr/file.h>
|
2012-10-05 07:19:05 +04:00
|
|
|
#include <winpr/tchar.h>
|
2012-10-05 02:57:32 +04:00
|
|
|
#include <winpr/windows.h>
|
2012-10-05 22:45:54 +04:00
|
|
|
#include <winpr/library.h>
|
2012-10-05 02:57:32 +04:00
|
|
|
|
|
|
|
int TestLibraryFreeLibrary(int argc, char* argv[])
|
|
|
|
{
|
2012-10-05 07:19:05 +04:00
|
|
|
HINSTANCE library;
|
|
|
|
|
|
|
|
library = LoadLibrary(_T("kernel32.dll"));
|
|
|
|
|
|
|
|
if (!library)
|
|
|
|
{
|
|
|
|
printf("LoadLibrary failure\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!FreeLibrary(library))
|
|
|
|
{
|
|
|
|
printf("FreeLibrary failure\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2012-10-05 02:57:32 +04:00
|
|
|
return 0;
|
|
|
|
}
|