Peter Chan
asked on
Problem to the line
Hi,
Within the Win 7 machine, when running this line
Within the Win 7 machine, when running this line
Set objFunc = CreateObject("CSDemo.ComClass1")
...
I get the attached error. Why?
It looks like our friends over on MS Technet have helped you get past this problem:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/bd0019e0-33a7-4bcc-833f-4dc7c8947bd1/problem-to-call-it?forum=ITCG
I suggest that you request this question be closed.
https://social.technet.microsoft.com/Forums/windowsserver/en-US/bd0019e0-33a7-4bcc-833f-4dc7c8947bd1/problem-to-call-it?forum=ITCG
I suggest that you request this question be closed.
ASKER
Yes, that is one related thread posted by me.
But now within one Win 7 machine, I have suffered from the problem mentioned.
But now within one Win 7 machine, I have suffered from the problem mentioned.
What you've asked here gives less than adequate information about the situation where you encounter the error. I did a Google search to try to get a clue, since it wasn't clear to me what the context of "CSDemo.ComClass1" might be. I have to admire the folks over there for digging into the problem and recognizing what you were trying to do.
To summarize, the message
Permission denied: 'CreateObject'
is often the result of an unregistered DLL or running under a user with insufficient priveleges to access the DLL. You can run Sysinternals' Process Monitor to try to discern which DLL is involved.
Process Monitor: https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Additional reference: http://forums.iis.net/t/1174101.aspx
To summarize, the message
Permission denied: 'CreateObject'
is often the result of an unregistered DLL or running under a user with insufficient priveleges to access the DLL. You can run Sysinternals' Process Monitor to try to discern which DLL is involved.
Process Monitor: https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Additional reference: http://forums.iis.net/t/1174101.aspx
ASKER
Thanks.
I have the relevant Visual studio project, to generate .TLB file, and then register it to Win 7 machine, using these steps
fine, while on another Win 7 machine, I got the above error, on which the same .tlb file from the same project, had been registered.
I have the relevant Visual studio project, to generate .TLB file, and then register it to Win 7 machine, using these steps
Start --> Run --> comexp.msc
Navigate to Console Root - Componet Services - Computers - My Computer - COM+ Applications.
Right click on 'COM+ Applications' and create New Application.
Follow the wizard carefully. Hit Next. Create an Empty Application. Name it (mycomapp1 for instance). Make sure Server application radio box is selected. Pick the user account based on the requirement. Hit Next. Next. Finish.
Now you have created a COM+ application named mycomapp1.
Now, you need to add individual COM components to it.
Expand mycomapp1 from the list. Right click on Components. Pick New Component.
Hit Next in the wizard. This next wizard screen is up to you. I would pick 'Install New components' if I haven’t run a regsvr32 or regasm on it. Pick the told or the dll (containing the tlb) file. And go ahead.. That’s how you do it.
and I don't know why on one Win 7 machine, I can call VBS script lineSet objFunc = CreateObject("CSDemo.ComClass1")
...
fine, while on another Win 7 machine, I got the above error, on which the same .tlb file from the same project, had been registered.
Time to try Procmon - perhaps on both machines - to see what's different.
ASKER
Any other help to this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
t985.png