![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Windows Server 2008, CreateObject and a VB6 dll I wonder if anyone has come across the following:- Create an empty ActiveX dll project and just compile it as is. Drop the dll somewhere on a 2008 server and register it. In VBScript use:- Set o = CreateObject("Project1.Class1") I get the classic "can't create" 800A01AD error. Now create a Standard Exe project in the Form_Load place similar code:- Dim o As Object Set o = CreateObject("Project1.Class1") Build the Exe and place it on the 2008 server Run the Exe, no problem works fine. Add a MsgBox "Hello" to the Class_Initialise in the DLL just to be sure. From the Exe all is well, but VBScript is unable to instance the class. Any one know whats going on here? Whats changed in VBScript on 2008 to cause this problem? Specifically I'm getting this problem in ASP hosted VBScript with some but not all of my VB6 dlls and I can't see what it is that allows some to work and not others. -- Anthony Jones - MVP ASP/ASP.NET |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "Anthony Jones" <Ant@xxxxxx> wrote in message news:%23hW0yLI$IHA.3756@xxxxxx <snipped> Quote: > Specifically I'm getting this problem in ASP hosted VBScript with some but > not all of my VB6 dlls and I can't see what it is that allows some to work > and not others. > > and just in case ... <g> Are you sure you have a ProgID with that name in the Registery? It contains the correct CLSID to dereference the correct component? And it is in a Hive the VBScript can see? Also check for versions - project.component.<version>. Is the default (non-versioned) entry correct? -ralph |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "Anthony Jones" wrote... Quote: >Specifically I'm getting this problem in ASP hosted VBScript with some >but not all of my VB6 dlls and I can't see what it is that allows some >to work and not others. permissions on the the ActiveX file are proper, that is if you use a special account name for IIS, make sure that compiled file gets proper rights. -- Jim Carlock |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "Ralph" <nt_consulting64@xxxxxx> wrote in message news:eCacdXJ$IHA.4800@xxxxxx Quote: > > "Anthony Jones" <Ant@xxxxxx> wrote in message > news:%23hW0yLI$IHA.3756@xxxxxx > <snipped> Quote: > > Specifically I'm getting this problem in ASP hosted VBScript with some Quote: Quote: > > not all of my VB6 dlls and I can't see what it is that allows some to Quote: Quote: > > and not others. > > > > > As an MVP you have probably already done this, but since you didn't say Quote: > and just in case ... <g> > > Are you sure you have a ProgID with that name in the Registery? It Quote: > the correct CLSID to dereference the correct component? The entries are identical to the entries as I see them on the Windows 2003 server that I use to compile on. Quote: >And it is in a Hive the VBScript can see? HKEY_LOCAL_MACHINE. Its strange that very nearly identical usage of the dll compiled into an Exe works but the VBScript usage doesn't. I suspect that is some kind of additional security feature that I need to work through yet that doesn't explain why other dlls manage to work. (I've tried it in JScript but it fails there as well). Quote: > Also check for versions - project.component.<version>. Is the default > (non-versioned) entry correct? > Thanks for the ideas. -- Anthony Jones - MVP ASP/ASP.NET |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "JC" <news@xxxxxx> wrote in message news:uhkEZmJ$IHA.4124@xxxxxx Quote: > "Anthony Jones" wrote... Quote: > >Specifically I'm getting this problem in ASP hosted VBScript with some > >but not all of my VB6 dlls and I can't see what it is that allows some > >to work and not others. > Thinking along the lines that you are using IIS 5 or 5.1, make sure the > permissions on the the ActiveX file are proper, that is if you use a > special account name for IIS, make sure that compiled file gets proper > rights. > Being Server 2008 this wiil be under IIS7. However I'm just experimenting with VBScript running as the machine administrator. Permissions should not be an issue. However there are all sorts of new protocols for security, I'm fairly sure I'm missing something very Server 2008 specific but I've no clue what that is. -- Anthony Jones - MVP ASP/ASP.NET |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "Anthony Jones" wrote... Quote: >Being Server 2008 this wiil be under IIS7. However I'm experimenting >with VBScript running as the machine administrator. Permissions >should not be an issue. However there are all sorts of new protocols >for security, I'm fairly sure I'm missing something very Server 2008 >specific but I've no clue what that is. Files" folder to get executable permissions. And IF there's a way to let the IIS server know that an executable resides somewhere else, then perhaps you need to go back into the server configuration and tell it to accept the "newly compiled" file. When the file gets compiled it should get the default permissions for that folder it resides in. You may need to reset the permissions during a recompile. Just curious, how do you configure IIS 7 to use a particular .dll? -- Jim |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "Anthony Jones" <Ant@xxxxxx> wrote in message news:%23hW0yLI$IHA.3756@xxxxxx Quote: > I wonder if anyone has come across the following:- > > Create an empty ActiveX dll project and just compile it as is. > > Drop the dll somewhere on a 2008 server and register it. > > In VBScript use:- > > Set o = CreateObject("Project1.Class1") > > I get the classic "can't create" 800A01AD error. > > Now create a Standard Exe project in the Form_Load place similar code:- > > Dim o As Object > > Set o = CreateObject("Project1.Class1") > > Build the Exe and place it on the 2008 server > > Run the Exe, no problem works fine. > > Add a MsgBox "Hello" to the Class_Initialise in the DLL just to be sure. > > From the Exe all is well, but VBScript is unable to instance the class. > > Any one know whats going on here? Whats changed in VBScript on 2008 to > cause this problem? ![]() A VBS file will by default be executed by the WScript.exe in System32 folder but on a 64 bit system this is a 64 bit process. Trying to instance the class fails since the dll is 32 bit. Using the WScrpt.exe in the SysWOW64 folder works fine. Quote: > > Specifically I'm getting this problem in ASP hosted VBScript with some but > not all of my VB6 dlls and I can't see what it is that allows some to work > and not others. > registration problem however since after registration I still had a problem with VBS I thought it was the same problem. I should've have re-tested in ASP also. -- Anthony Jones - MVP ASP/ASP.NET |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Windows Server 2008, CreateObject and a VB6 dll "Anthony Jones" <Ant@xxxxxx> wrote in message news:%23RcGqyg$IHA.4032@xxxxxx Quote: > > I knew it had to be embarrasingly simple. ![]() > Quote: > A VBS file will by default be executed by the WScript.exe in System32 Quote: > but on a 64 bit system this is a 64 bit process. Trying to instance the > class fails since the dll is 32 bit. Using the WScrpt.exe in the SysWOW64 > folder works fine. > Quote: > > > > Specifically I'm getting this problem in ASP hosted VBScript with some Quote: Quote: > > not all of my VB6 dlls and I can't see what it is that allows some to Quote: Quote: > > and not others. > > > I suspect that I thought had this problem in ASP but it was really only a > registration problem however since after registration I still had a Quote: > with VBS I thought it was the same problem. I should've have re-tested in > ASP also. > -ralph |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Error when installing SQL Express 2008 on Windows Server 2008 | PowerShell | |||
| Windows Server 2008 hosted on Virtual Server 2005 R2 very slow | Virtual Server | |||
| Cna't Install Windows Server 2008 under Virtual Server SP1 | Virtual Server | |||
| Error installing Windows Server 2008 as Virtual Server | Virtual Server | |||
| Bug: Windows Modules Service Is Broken In Windows Server 2008 Beta 3 Web Server Addition. | Vista General | |||