# DLL Function Type Specifications

**URL:** <https://www.ruby-forum.com/t/dll-function-type-specifications/140085>\
**Category:** Ruby\
**Created:** [June 10, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/dll-function-type-specifications/140085 "2008-06-10T18:03:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenatron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Post date:** [June 10, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/dll-function-type-specifications/140085/1 "2008-06-10T18:03:40Z")

</div>

I’m not sure if this is Rails specific, but I’m leaning towards thinking  
it’s not, so please excuse me if this post is in the wrong forum.

I’m attempting to wrap a Windows DLL function, and I don’t know what the  
type specifications I should be using are. A working example in my app  
looks like:

* * *

require ‘dl/win32’  
AdvApi32 = DL.dlopen(“advapi32”)  
logon\_user = AdvApi32[‘LogonUser’, ‘ISSSIIp’]  
r,rs = logon\_user.call(username, domain, password,  
LOGON32\_LOGON\_NETWORK, LOGON32\_PROVIDER\_DEFAULT, ptoken)

* * *

The bit that I’m stuck on is the ‘ISSSIIp’ part, which defines the  
arguments that “LogonUser” is expecting to take. I have no idea what  
type specifications are available to me, and have found no documentation  
on it. Any help? So far, I’ve surmised that DD is a double, IS and S  
are strings (?), I is an int, and P is some sort of pointer maybe? It  
also looks like IL is some sort of pointer as well ?
