fs/_tests/fsDll/main.cpp

Go to the documentation of this file.
00001 
00002 //---------------------------------------------------------------------------
00003 #include <fs/sys/fsDll.h>
00004 
00005 #include <cassert>
00006 //---------------------------------------------------------------------------
00007 int main()
00008 {
00009     fs::sys::Dll_t Dll("user32.dll");
00010     assert(Dll.IsValid() && "Couldn't load the DLL!");
00011         
00012     typedef int (__stdcall * MsgBox_f)(const void *, const char *,
00013      const char *, unsigned int);
00014     
00015     MsgBox_f pfnMsgBox = static_cast<MsgBox_f>(Dll.GetSymb("MessageBoxA"));
00016     assert(pfnMsgBox && "Couldn't export the function!");
00017         
00018     (*pfnMsgBox)(0, "MessageBoxA - Hello World!", Dll.GetFile(), 0);
00019         
00020     return 0;
00021 }
00022 //---------------------------------------------------------------------------

FipS' Code (Thu Feb 15 22:43:35 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]