summaryrefslogtreecommitdiff
path: root/lib/chef/win32/api
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-08-27 15:05:20 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-08-28 17:19:35 -0700
commit093e2cb93d5f8e14fc86d6eb67f174945b7b05af (patch)
tree3e3b24ba68b6458a8f12a7dadb9ee424edf6bea0 /lib/chef/win32/api
parent895c8718463029135cc1fe9b3084ff25957ac94d (diff)
downloadchef-093e2cb93d5f8e14fc86d6eb67f174945b7b05af.tar.gz
FFI NetUseGetInfo
Diffstat (limited to 'lib/chef/win32/api')
-rw-r--r--lib/chef/win32/api/net.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb
index 90154e7661..b4be47e418 100644
--- a/lib/chef/win32/api/net.rb
+++ b/lib/chef/win32/api/net.rb
@@ -154,6 +154,21 @@ class Chef
layout :lgrpi0_name, :LPWSTR
end
+ class USE_INFO_2 < FFI::Struct
+ include StructHelpers
+
+ layout :ui2_local, :LMSTR,
+ :ui2_remote, :LMSTR,
+ :ui2_password, :LMSTR,
+ :ui2_status, :DWORD,
+ :ui2_asg_type, :DWORD,
+ :ui2_refcount, :DWORD,
+ :ui2_usecount, :DWORD,
+ :ui2_username, :LPWSTR,
+ :ui2_domainname, :LMSTR
+ end
+
+
#NET_API_STATUS NetLocalGroupAdd(
#_In_ LPCWSTR servername,
#_In_ DWORD level,
@@ -287,6 +302,13 @@ class Chef
#);
safe_attach_function :NetUseDel, [:LMSTR, :LMSTR, :DWORD], :DWORD
+#NET_API_STATUS NetUseGetInfo(
+ #_In_ LMSTR UncServerName,
+ #_In_ LMSTR UseName,
+ #_In_ DWORD Level,
+ #_Out_ LPBYTE *BufPtr
+#);
+ safe_attach_function :NetUseGetInfo, [:LMSTR, :LMSTR, :DWORD, :pointer], :DWORD
end
end
end