FreeRDP/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c

29 lines
432 B
C
Raw Normal View History

#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
2012-10-05 07:19:05 +04:00
#include <winpr/tchar.h>
#include <winpr/windows.h>
2012-10-05 22:45:54 +04:00
#include <winpr/library.h>
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;
}
return 0;
}