Permissions problem with ADOX and CreateProcess() on WinXP Pro

Permissions problem with ADOX and CreateProcess() on WinXP Pro

Post by Charles Calver » Thu, 19 Dec 2002 05:06:21



I have a DLL created with MSVC 6 that uses ADOX to create a database.
This DLL is called by a third party app, which is in turn launched by
my VB 6 app using CreateProcess().  When the DLL attempts to create
the database:

        TESTHR(hr = m_pCatalog.CreateInstance(__uuidof (ADOX::Catalog)));
        m_pCatalog->Create(bstrConn);

I get a _com_error exception at the Create() call:

        COM error #: -2147467262
        COM error source: Provider
        COM error desc: No such interface supported

Here's the VB code:

        Dim pi As PROCESS_INFORMATION
        Dim si As STARTUPINFO
        Dim sa As SECURITY_ATTRIBUTES
        dim lRes As Long

        ' Init the STARTUPINFO struct
        si.dwFlags = STARTF_USESHOWWINDOW
        si.wShowWindow = SW_SHOWDEFAULT
        si.cb = LenB(si)
        ' Init the SECURITY_ATTRIBUTES
        sa.nLength = LenB(sa)
        sa.bInheritHandle = False
        sa.lpSecurityDescriptor = 0
        ' Call the Win32 API function CreateProcess
        ' strExe is a String that contains the path and filename of the
        ' executable.  strDir contains the path.
        lRes = CreateProcess(vbNullString, strExe, sa, sa, True, _
                0, vbNull, strDir, si, pi)

Conditions:

  o If I launch the third party .exe directly (by doubleclicking on it
    or running it from the commandline) it works perfectly

  o I am running it under a user ID that is a member of the
    Administrators group and has rights to the entire HD

  o The problem does not occur under Windows 2000 Pro (also using
    Admin member user ID)

  o The XP box has MDAC 2.7, the Win2K boxes have MDAC 2.6

Help!

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

 
 
 

Permissions problem with ADOX and CreateProcess() on WinXP Pro

Post by Charles Calver » Fri, 20 Dec 2002 01:19:43




>It looks like the problem is caused by the lpProcessAttributes  and
>lpThreadAttributes  you passed.

That's my thought as well.  However, I don't know exactly what's
missing.

Quote:>Please try to use the Shell function in VB to run the exe and see
>whether it works.

>Shell(pathname[,windowstyle])

I tested it under Win2K (CreateProcess() works under Win2K).  It
works.  I'll test it under XP tonight when I get back to my office.

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

 
 
 

Permissions problem with ADOX and CreateProcess() on WinXP Pro

Post by Scot Ro » Fri, 20 Dec 2002 01:54:42


Perhaps some of the Jet components are not installedl (Jet components are NOT installed with MDAC 2.7, however they would have been on a Win2k machine
by default)... Try installing Jet 4 SP6 per:

282010 ACC2002: Updated Version of Microsoft Jet 4.0 Available in Download
http://support.microsoft.com/?id=282010

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com  or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support

This posting is provided AS IS, with no warranties, and confers no rights.

 
 
 

Permissions problem with ADOX and CreateProcess() on WinXP Pro

Post by Charles Calver » Fri, 20 Dec 2002 04:47:09




>Perhaps some of the Jet components are not installedl (Jet components
>are NOT installed with MDAC 2.7, however they would have been on a
>Win2k machine by default)... Try installing Jet 4 SP6 per:

If that were the case, the problem would occur even when launching the
third party prog directly as well as via CreateProcess().  That isn't
the case.

Thanks,

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

 
 
 

Permissions problem with ADOX and CreateProcess() on WinXP Pro

Post by Scot Ro » Fri, 20 Dec 2002 20:59:00


Is this problem on Multiple WinXP machines or have you seen the problem in multiple machines? Does this problem happen in the design environment on
WinXP machines?

I made an assumption before, but ARE you working with an Access database or SQL Server?

Have you tried installing MDAC 2.7 onto one of the Win2000 machines to see if the problem can be reproduced there (And thus possibly determine if the
problem is in fact in MDAC 2,7?

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com  or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support

This posting is provided AS IS, with no warranties, and confers no rights.

 
 
 

Permissions problem with ADOX and CreateProcess() on WinXP Pro

Post by Charles Calver » Sat, 21 Dec 2002 01:33:28




>Is this problem on Multiple WinXP machines or have you seen the
>problem in multiple machines?

I have only one XP machine at the moment, but we're working on getting
another to do more testing.

Quote:>Does this problem happen in the design environment on WinXP machines?

Not sure what you mean by "design environment".  I haven't tried
debugging the DLL when its calling process is launched via
CreateProcess(), no.

Quote:>I made an assumption before, but ARE you working with an Access
>database or SQL Server?

Access 2000, using Jet 4.

Quote:>Have you tried installing MDAC 2.7 onto one of the Win2000 machines
>to see if the problem can be reproduced there (And thus possibly
>determine if the problem is in fact in MDAC 2,7?

No, but that's a good thought.  Thanks.

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

 
 
 

1. Permissions problem with ADOX and CreateProcess() on WinXP Pro

I have a DLL created with MSVC 6 that uses ADOX to create a database.
This DLL is called by a third party app, which is in turn launched by
my VB 6 app using CreateProcess().  When the DLL attempts to create
the database:

        TESTHR(hr = m_pCatalog.CreateInstance(__uuidof (ADOX::Catalog)));
        m_pCatalog->Create(bstrConn);

I get a _com_error exception at the Create() call:

        COM error #: -2147467262
        COM error source: Provider
        COM error desc: No such interface supported

Here's the VB code:

        Dim pi As PROCESS_INFORMATION
        Dim si As STARTUPINFO
        Dim sa As SECURITY_ATTRIBUTES
        dim lRes As Long

        ' Init the STARTUPINFO struct
        si.dwFlags = STARTF_USESHOWWINDOW
        si.wShowWindow = SW_SHOWDEFAULT
        si.cb = LenB(si)
        ' Init the SECURITY_ATTRIBUTES
        sa.nLength = LenB(sa)
        sa.bInheritHandle = False
        sa.lpSecurityDescriptor = 0
        ' Call the Win32 API function CreateProcess
        ' strExe is a String that contains the path and filename of the
        ' executable.  strDir contains the path.
        lRes = CreateProcess(vbNullString, strExe, sa, sa, True, _
                0, vbNull, strDir, si, pi)

Conditions:

  o If I launch the third party .exe directly (by doubleclicking on it
    or running it from the commandline) it works perfectly

  o I am running it under a user ID that is a member of the
    Administrators group and has rights to the entire HD

  o The problem does not occur under Windows 2000 Pro (also using
    Admin member user ID)

  o The XP box has MDAC 2.7, the Win2K boxes have MDAC 2.6

Help!

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

2. Database Maintenance

3. Help, VB6 Pro WinXP Pro Win98 2nd

4. SERIAL wrap-around

5. ADOX, C# , WINXP

6. Help? How to Store Records?

7. Install SQL2000 Entrps on WinXp pro

8. Alternative Regular Cube creation besides Cube wizard/Editor method

9. MSDE 2000 install halts on WinXP Pro at final server config step

10. Upgrading from Win98SE to WinXP Pro

11. SqlServer2000 on WinXP Pro?

12. AS2K on WinXP Pro?

13. SQL2K Dev - WinXP Pro