Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Calling Windows API

From: petr:krenzelok:trz:cz at: 13-Dec-2004 15:20

Romano Paolo Tenca wrote:
>Hi all, > >this stuff can be done, but in an insane mode. > >This is the hacked solution: > >kernel32.dll: load/library %/C/WINDOWS/system32/kernel32.dll >GetVolumeInfo: make routine! [ > disk [string!] > lpVolumeNameBuffer [string!] > size [integer!] > lpVolumeSerialNumber [integer!] > lpMaximumComponentLength [integer!] > lpFileSystemFlags [integer!] > lpFileSystemNameBuffer [string!] > size2 [integer!] > return: [integer!] >] kernel32.dll "GetVolumeInformationA" >st: make struct! [ > VolumeNameBuffer [string!] > FileSystemNameBuffer [string!] >] reduce [VNB: make string! 100 FSNB: make string! 100] >GetVolumeInfo "C:\" VNB 20 0 0 0 FSNB 20 >probe st/FileSystemNameBuffer >;"NTFS" > >There are many points about my example code which should need a >wish/issue/bug item in RAMBO. >
If there is any inconvenience or the way to help to improve library interface creation, do so, there is imo no need to let things work "old way".... -pekr-