Notices
Non Scooby Related Anything Non-Scooby related

Long Shot - Windows API

Thread Tools
 
Search this Thread
 
Old 15 June 2001, 12:22 AM
  #1  
chiark
Scooby Regular
Thread Starter
 
chiark's Avatar
 
Join Date: Jun 2000
Posts: 13,735
Likes: 0
Received 0 Likes on 0 Posts
Post

I think Fosters is getting at the fact that CoCreateInstance will create an object and that you need to have registered the provider DLL of that object for each profile.

Run RegSvr32 in each user space on the stuff you've added? Not too sure how TS works, but this may well be necessary.
Old 15 June 2001, 11:43 AM
  #2  
Robertio
Scooby Regular
iTrader: (1)
 
Robertio's Avatar
 
Join Date: Aug 2000
Location: Glasgow
Posts: 9,844
Likes: 0
Received 0 Likes on 0 Posts
Question

A long shot I know, but:

I am trying to call the API function <B> CoCreateInstance </B>

Running it on an individual machine is fine, however when trying to run it through Windows NT Terminal Server unless you are logged in as the administrator you get the result as <I> No Such Interface Supported </I>

This would point to it being access rights of some kind, but as the users has full access on the 2 folders which are being used, and have all dlls + bpls copied into their profile. There appear to be around 4000 calls to the registry, as near as I can tell the users have write access to all setvalues commands, I don't really want to have go through all of them to check they have read access to all of the other entries.

Anyone got any idea? I've spent days on this now and appear to be getting nowhere
Old 15 June 2001, 11:50 AM
  #3  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

User's have infividual profiles - does the app need to be installed to register the dlls

either that or manually use regsv32.exe
Old 15 June 2001, 11:58 AM
  #4  
Robertio
Scooby Regular
iTrader: (1)
 
Robertio's Avatar
 
Join Date: Aug 2000
Location: Glasgow
Posts: 9,844
Likes: 0
Received 0 Likes on 0 Posts
Post

It is unknown which dlls are required, hence all of the ones on the machine being copied into the profiles (should not require any, butcan sort it out later), we have not had to previously re-register any dlls we have had to move to the users profiles, (could always be a first time though ) this command does not appear to use any files according to the file monitor program which I have run.
Old 20 June 2001, 08:19 AM
  #5  
Robertio
Scooby Regular
iTrader: (1)
 
Robertio's Avatar
 
Join Date: Aug 2000
Location: Glasgow
Posts: 9,844
Likes: 0
Received 0 Likes on 0 Posts
Question

OK we are getting closer now

Having changed to full control the access level on the registry entry hkey_local_machinesoftwaremicrosoftole*

The error has changed to:
'a remote activation was necessary but was not allowed'

Trying to run regsvr32 on the oleaut32.dll returns failed, any suggestions? (btw this is when trying to launch a word mail merge form our own application)
Old 20 June 2001, 09:32 AM
  #6  
ChrisB
Moderator
 
ChrisB's Avatar
 
Join Date: Dec 1998
Location: Staffs
Posts: 23,573
Likes: 0
Received 0 Likes on 0 Posts
Post

Hmm,

Ensure that the users in question have full access rights to the copy of that DLL in WINNTSYSTEM32 (or whever it lives inside WINNT).

If that works, try trimming down the privs to that file until it falls over again.

Might be barking up the wrong tree here, but oleaut32.dll rings a bell that the permissions are wrong as standard.

ChrisB.
Old 20 June 2001, 09:51 AM
  #7  
Robertio
Scooby Regular
iTrader: (1)
 
Robertio's Avatar
 
Join Date: Aug 2000
Location: Glasgow
Posts: 9,844
Likes: 0
Received 0 Likes on 0 Posts
Unhappy

Chris, cheers, the problem is they do not want the users to have access rights on the system32 folder but I'll see if I can get away with it as a temporary fix.
Unfortunately I now have to wait until tomorrow for someone with admin rights to let me try it Security gone mad

Trending Topics

Old 20 June 2001, 03:24 PM
  #8  
ChrisB
Moderator
 
ChrisB's Avatar
 
Join Date: Dec 1998
Location: Staffs
Posts: 23,573
Likes: 0
Received 0 Likes on 0 Posts
Post

Shouldn't need to be the whole SYS32 folder, just give Everyone read rights on that file.
Old 20 June 2001, 04:06 PM
  #9  
IWatkins
Scooby Regular
 
IWatkins's Avatar
 
Join Date: Mar 2000
Location: Gloucestershire, home of the lawnmower.
Posts: 4,531
Likes: 0
Received 0 Likes on 0 Posts
Post

Robertio,

According to my docs, CoCreateInstance should and can only be called on a local machine. If you are doing stuff on a remote system (which I *think* (not 100% on that) Terminal Server is classed as) then you should use the API call CoCreateInstance<B>Ex</B>.

CoCreateInstance and CoCreateInstanceEx header is declared in objbase.h and the library ole32.lib.

It all in the MSDN API docs, but hey, I've no idea if I was just talking crap or not

Another reason for that eror message is the wrong version of <B>ComCat.DLL</B> in the system32 directory. By this may be totally unrelated to your problem of course.

Cheers

Ian
Old 20 June 2001, 04:58 PM
  #10  
Robertio
Scooby Regular
iTrader: (1)
 
Robertio's Avatar
 
Join Date: Aug 2000
Location: Glasgow
Posts: 9,844
Likes: 0
Received 0 Likes on 0 Posts
Smile

Chris, as close to bu66er all as possible will check tomorrow

Ian, that would not explain why it works fine when logged in as an administrator. You are right about using the ex one for an external machine, but it is run on the same machine as the exe, therefore local, the code does run the ex stuff if it is required.
Old 21 June 2001, 12:30 AM
  #11  
gareth
Scooby Regular
 
gareth's Avatar
 
Join Date: Jan 1999
Posts: 572
Likes: 0
Received 0 Likes on 0 Posts
Post

If you're trying to call Word via COM/OLE automation, and this works only when logged in as administrator, maybe you installed Word on the terminal server in "execute" mode instead of "install" mode.

All TS applications have to be installed via the Control Panel/Add Remove Programs applet or by first running "change user /install" at a command prompt. This ensures that all users get the right registry settings when running the app. Depending on the Word version, there may also be a compatibility script you need to run.

Hope this helps.

G
Old 21 June 2001, 09:06 AM
  #12  
BryanC
Scooby Regular
 
BryanC's Avatar
 
Join Date: Nov 2000
Posts: 168
Likes: 0
Received 0 Likes on 0 Posts
Post

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:<HR>Originally posted by Robertio:
<B>Trying to run regsvr32 on the oleaut32.dll returns failed, any suggestions? (btw this is when trying to launch a word mail merge form our own application)[/quote]

AFAIK oleaut32.dll is not an ActiveX dll, it's a vanilla Win32 one, which means you don't need to (and indeed can't) run regsvr32 on it.

Old 22 June 2001, 09:53 AM
  #13  
ChrisB
Moderator
 
ChrisB's Avatar
 
Join Date: Dec 1998
Location: Staffs
Posts: 23,573
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

BTTT - Interested to know if any of us found a fix.

ChrisB.
Old 22 June 2001, 10:21 AM
  #14  
Robertio
Scooby Regular
iTrader: (1)
 
Robertio's Avatar
 
Join Date: Aug 2000
Location: Glasgow
Posts: 9,844
Likes: 0
Received 0 Likes on 0 Posts
Thumbs down

Chris, Not as yet, been moved to another task of 'higher priority' for the moment, will keep you updated if we find a fix.

gareth, yep it was installed in the correct mode via the add remove programs (I have been reliably informed)

BTW everyone has full control for the system folder.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
FuZzBoM
Wheels, Tyres & Brakes
16
04 October 2015 09:49 PM
Ganz1983
Subaru
5
02 October 2015 09:22 AM



Quick Reply: Long Shot - Windows API



All times are GMT +1. The time now is 03:20 PM.