diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-29 12:15:34 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-29 13:03:12 -0700 |
commit | ce7268fd7f09e2f0ca30d664df541ca89e983258 (patch) | |
tree | ff0c900fd2cc5c0446be5066ca84a06241e1c151 /lib/chef/win32/api | |
parent | 69a8fc2f30188e8947af304d7f804d51d05de00a (diff) | |
download | chef-ce7268fd7f09e2f0ca30d664df541ca89e983258.tar.gz |
Convert NetLocalGroupAdd to use FFI
Diffstat (limited to 'lib/chef/win32/api')
-rw-r--r-- | lib/chef/win32/api/net.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb index 72caf46628..d2a05523ed 100644 --- a/lib/chef/win32/api/net.rb +++ b/lib/chef/win32/api/net.rb @@ -136,6 +136,18 @@ class Chef layout :lgrmi3_domainandname, :LPWSTR end + class LOCALGROUP_INFO_0 < FFI::Struct + layout :lgrpi0_name, :LPWSTR + end + +#NET_API_STATUS NetLocalGroupAdd( + #_In_ LPCWSTR servername, + #_In_ DWORD level, + #_In_ LPBYTE buf, + #_Out_ LPDWORD parm_err +#); + safe_attach_function :NetLocalGroupAdd, [ :LPCWSTR, :DWORD, :LPBYTE, :LPDWORD], :DWORD + # NET_API_STATUS NetUserEnum( # _In_ LPCWSTR servername, # _In_ DWORD level, |