
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.*-*-*.com/ ;| Technical Writing
(703) 580-0210 | Research