Re: Noob, learning how to use dll's.
- Posted by Bernie Ryan <xotron at blu?frog.?om> Jun 13, 2008
- 770 views
without warning include file.e include dll.e include safe.e atom file1,DLL,GMSx,mem,result object temp file1 = open("D:\\obscured\\test.txt","w") DLL = open_dll("kernel32.dll") GMSx = define_c_func(DLL,"GlobalMemoryStatusEx",{C_POINTER},C_INT) mem = allocate(512) -- dwLength: The size of the structure, in bytes. -- You must set this member before calling GlobalMemoryStatusEx. poke4(mem,512) result = c_func(GMSx,{mem}) for count = mem+8 by 8 do printf(file1,"%d\n",float64_to_atom(peek({count,8}))) end for puts(file1,peek({mem,512})) free(mem) close(file1) abort(0)
Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan