1

I'm using the Win32api module. I want to know what the L's and P's mean in the following line:

function = Win32API.new('user32', 'MessageBox', ['L', 'P', 'P', 'L'], 'I')

I know that user32 is the dll from which the MessageBox function is called from, but what do the L's, P's, and the I do, more specifically what do they stand for?

sawa
  • 165,429
  • 45
  • 277
  • 381
Practical1
  • 789
  • 1
  • 8
  • 26
  • 3
    So your code means that call `MessageBox` method which has argment type of `(Long,Pointer,Pointer,Long)` and returns `Integer`. You can confirm that this matches https://learn.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox – ymonad Nov 05 '18 at 01:33
  • 1
    http://phrogz.net/programmingruby/lib_windows.html#Win32API – Nifriz Nov 05 '18 at 11:31
  • 1
    On another note, `Win32API` is quite deprecated, and you should be using `Fiddle` if your Ruby version > 2.0, as Win32API is simply translated into it anyways. – ForeverZer0 Nov 05 '18 at 14:27

0 Answers0