[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    vc++ install requires NetUserModalsGet
From:       James Hawkins <truiken () gmail ! com>
Date:       2004-07-31 20:24:28
Message-ID: 22821af304073113243c3c20e1 () mail ! gmail ! com
[Download RAW message or body]

Hi,

    Taking the advice of Ivan, I downloaded the beta of Visual C++
2005 to see how far it could work in Wine, and these are the results:

# wine vcsetup.exe
fixme:ver:RtlVerifyVersionInfo (0x406df40c,64,180000): Not all cases
correctly implemented yet
fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),0,3,(nil),0,(nil)) - stub!
fixme:netapi32:NetUserModalsGet (null) 2 0x406df394

Then an error message pops up stating that "a problem has been
encountered while loading components" and then it exits.

Looking into netapi32/access.c, NetUserModalsGet is a stub and returns
NERR_InternalError by default.  I think vcsetup is requiring this call
to succeed so it bails out because of the error.

Reading the trace and the msdn docs about NetUserModalsGet, vcsetup is
calling with the level parameter == 2 so it is requesting the domain
name and identifier.

With the included patch, I have stubbed the structure of the 4 levels
that can be queried, but I haven't written the code to handle them
yet.  If anyone has any information or links that will enlighten me
about netapi32 or anything pertaining to this matter, I would greatly
appreciate it.

quote from MSDN:
"The NetUserModalsGet function retrieves global information for all
users and global groups in the security database, which is the
security accounts manager (SAM) database or, in the case of domain
controllers, the Active Directory."

Does wine have a security accounts manager or an Active Directory?
-- 
James Hawkins

["access-netusersmodalget.diff" (text/x-patch)]

Index: dlls/netapi32/access.c
===================================================================
RCS file: /home/wine/wine/dlls/netapi32/access.c,v
retrieving revision 1.8
diff -u -r1.8 access.c
--- dlls/netapi32/access.c	19 Apr 2004 20:12:14 -0000	1.8
+++ dlls/netapi32/access.c	31 Jul 2004 20:23:49 -0000
@@ -503,12 +503,51 @@
 }
 
 
-/************************************************************
- *                NetUserModalsGet  (NETAPI32.@)
+/******************************************************************************
+ * NetUserModalsGet  (NETAPI32.@)
+ *
+ * Retrieves global information for all users and global groups in the security
+ * database.
+ *
+ * PARAMS
+ *  servername [I] Specifies the DNS or the NetBIOS name of the remote server
+ *                 on which the function is to execute.
+ *  level      [I] Information level of the data.
+ *     0   Return global passwords parameters. bufptr points to a
+ *         USER_MODALS_INFO_0 struct.
+ *     1   Return logon server and domain controller information. bufptr
+ *         points to a USER_MODALS_INFO_1 struct.
+ *     2   Return domain name and identifier. bufptr points to a 
+ *         USER_MODALS_INFO_2 struct.
+ *     3   Return lockout information. bufptr points to a USER_MODALS_INFO_3
+ *         struct.
+ *  bufptr     [I] Buffer that receives the data.
+ *
+ * RETURNS
+ *  Success: NERR_Success.
+ *  Failure: 
+ *     ERROR_ACCESS_DENIED - the user does not have access to the info.
+ *     NERR_InvalidComputer - computer name is invalid.
  */
-NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR szServer, DWORD level, LPBYTE *pbuffer)
+NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR server, DWORD level, LPBYTE *bufptr)
 {
-    FIXME("%s %ld %p\n", debugstr_w( szServer ), level, pbuffer );
+    FIXME("%s %ld %p\n", debugstr_w(server), level, bufptr);
+    
+    switch (level)
+    {
+        case 0:
+            /* return global passwords parameters */
+        case 1:
+            /* return logon server and domain controller info */
+        case 2:
+            /* return domain name and identifier */
+        case 3:
+            /* return lockout information */
+        default:
+            ERR("Invalid level %ld is specified\n", level);
+            return ERROR_INVALID_LEVEL;
+    }
+    
     return NERR_InternalError;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic