Discussion:
VB6 Resource Editor doesn't start if RDP client running
(too old to reply)
Lucvdv
2004-04-14 08:04:33 UTC
Permalink
After moving from Win2000 to XP, I've been having intermittent
problems with the VB6 Resource Editor add-in.

When the VB6 IDE is started, the add-in fails to initialize with a
"Method ~ of ~ failed" error popup.
The add-in manager then says the registry editor plugin is loaded and
running, but it doesn't work (doesn't open when it is requested).


Today I finally noticed a correllation with something else: I often
have the Remote Desktop client running on my second monitor, connected
to a W2k server in remote administration mode (MSDE version, used for
testing my software).
[VB6 isn't installed on the server, but on the machine where the RDP
client is running.]

As weird as it sounds, this is what causes the plugin to fail.
I tried a number of times, with 100% failures if the RDP client was
running when VB was launched, and 0% failures if it wasn't.


This didn't occur under Win2000, yet I was using the XP version of the
RDP client there too (and used it just as often, so I should have
noticed it at least a few times).
Peter Huang
2004-04-15 05:02:37 UTC
Permalink
Hi,

The behavior is somewhat strange.
Do you mean you just upgrade your OS from windows 2000 to windowsXP or
install a fresh windowsXP?


I think you may try to re-register the Resource Editor by using the regsvr32
The Resource Editor is usually located under the path
C:\Program Files\Microsoft Visual Studio\VB98\Wizards\RESEDIT.DLL
regsvr32 /u RESEDIT.DLL
and then
regsvr32 RESEDIT.DLL

What is the version of the RESEDIT.DLL?(6.0.0.8450 on my
machine,windowsxp+sp1)
Have you tried to install the lastest service pack for vb6+sp5 and windows
xp+sp1?


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Lucvdv
2004-04-15 07:24:42 UTC
Permalink
Post by Peter Huang
Hi,
The behavior is somewhat strange.
Do you mean you just upgrade your OS from windows 2000 to windowsXP or
install a fresh windowsXP?
A fresh install two weeks ago (I retired my old machine and
reinstalled everything on new hardware). SP1 and all later updates
were installed before anything else was added.

VS6 was one of the first things installed after the XP updates (I
usually install software in approximate order of age, oldest first),
SP5 was applied immediately after.

After that, Visual Studio .Net, Office 2003 and the XP Embedded target
designer were added as major packages, plus a lot of smaller tools.

Everything that's installed now was there under Win2000 too, with one
exception: Office 2003 was O2k before.
Post by Peter Huang
I think you may try to re-register the Resource Editor by using the regsvr32
That didn't make any difference.
Post by Peter Huang
What is the version of the RESEDIT.DLL?(6.0.0.8450 on my
machine,windowsxp+sp1)
6.0.0.8450 here too (BTW, the VB or VS service pack level determines
what version you have, not the windows service pack).
Post by Peter Huang
Have you tried to install the lastest service pack for vb6+sp5 and windows
xp+sp1?
I already had them.


It's not a real problem, if I need the resource editor I just close
any open RDP connection. Restarting VB after that isn't necessary,
unloading and reloading the plugin in the add-in manager is enough.

I just found it strange, and was curious if anyone else had it too.



BTW, there was a typo in my OP: where it said "MSDE version" of W2k
server that should have been "MSDN version" ;)
Peter Huang
2004-04-15 08:23:31 UTC
Permalink
Hi,

The problem seems somewhat strange.
Have you tried to use just one monitor? That is to say , you may try to run
the Remote desktop on the same monitor with the VB6 and do not enable the
other monitor to see if the problem persists.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Lucvdv
2004-04-19 12:51:49 UTC
Permalink
Post by Peter Huang
Hi,
The problem seems somewhat strange.
Have you tried to use just one monitor? That is to say , you may try to run
the Remote desktop on the same monitor with the VB6 and do not enable the
other monitor to see if the problem persists.
Sorry for the delay, I didn't get around to it any sooner.

I tried what you suggested: still the same.

I got the opportunity to try it on someone else's machine with only
one monitor, and there the problem doesn't occur. Both are XP Pro
with SP1 and all post-SP1 updates, and VS6 SP5.

I also reapplied SP5, that didn't help either.
Peter Huang
2004-04-20 01:34:05 UTC
Permalink
Hi,

To avoid the effect by the other software installed on your machine, I
think you may try the following steps.

1.Firstly, I would like you to download and install VB6 SP6 at
http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp6/download/defa
ult.aspx
This problem may be corrected by the service pack.

2. Please start Visual Basic, click Add-In-Manager from the Add-Ins menu,
remove all available Add-Ins by selecting them and clearing the
Loaded/Unloaded and Load on Startup check boxes in the Loaded Behavior
option box, and then exit Visual Basic.

3.This problem may also be caused by some drivers or programs. Please
restart your compute and press F8 to enter Safe Mode when the Windows is
coming up. You may try to create a new project and to see if the problem
persists. Does the problem occur in Safe Mode?


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Lucvdv
2004-04-20 16:18:36 UTC
Permalink
Post by Peter Huang
1.Firstly, I would like you to download and install VB6 SP6 at
Still the same.
Post by Peter Huang
2. Please start Visual Basic, click Add-In-Manager from the Add-Ins menu,
remove all available Add-Ins by selecting them and clearing the
Loaded/Unloaded and Load on Startup check boxes in the Loaded Behavior
option box, and then exit Visual Basic.
Still the same, after re-enabling the resource editor (also if all
other add-ins are left unloaded).
Post by Peter Huang
3.This problem may also be caused by some drivers or programs. Please
restart your compute and press F8 to enter Safe Mode when the Windows is
coming up. You may try to create a new project and to see if the problem
persists. Does the problem occur in Safe Mode?
It remains the same in safe mode too.


I should have checked for DLL conflicts before, but I didn't :/
Now I noticed that there are three different files called RESEDIT.DLL
on my system, all three of them part of Microsoft products.

The one VB6 installs:
C:\Program Files\Microsoft Visual Studio\VB98\Wizards\
Version: 6.0.0.8450
Size 360 kB
Date July 15, 2000

A completely different file of the same name that comes with the
Windows XP Embedded Tools:
C:\Program Files\Windows Embedded\bin
Version 2.0.807.0
Size 274 kB
Date September 4, 2002

A third one, part of VS.Net:
C:\Program Files\Microsoft Visual Studio .NET\Vc7\vcpackages
Version 7.0.9466.0
Size 2052 kB
Date January 5, 2002


Renaming the version in the VS.Net directory doesn't seem to have any
effect on VB6.

When I rename the version in the XPe directory and then start VB6,
Windows Installer pops up and prompts for the MS Windows XP Embedded
Tools CD to reinstall the file. I canceled out of the installer
before it could install a new copy of the file, but it didn't fix the
problem.

I tried starting VB6 with both "alien" copies of the file renamed, and
also with a copy of the VB6 version in the XPe bin directory: it
didn't help.



Installer popping up may still indicate a conflict between VB6 and the
XPe target designer, but I can't miss either, and the problem is easy
to circumvent (just don't open any terminal server windows before
starting VB6), so I think I best live with it.

Closing the RDP client and reopening it after VB6 is started is
enough: once the resedit.dll has been initialized, it keeps working
even while an RDP connection is open.
Peter Huang
2004-04-21 03:25:59 UTC
Permalink
Hi,

A windows installer will be lauched is because there is something missing.
Also we can check the event log to see what had happened when the windows
installed is lauched.

When VB6 loads its addin, it will check the progID and then the CLSID of
the addin to located the addin dll.

We can find them under the registry key below.

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2D25A55E-AFC1-11D1-BE67-CAEC58000
000}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2D25A561-AFC1-11D1-BE67-CAEC58000
000}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{44335351-9BA4-4EDC-96D3-92065CCE3
591}

The first two is the vb6 addin, the last one is the windows embedded one.

We can check the InprocServer32 under the three registry, they should point
to the path of the addin dll.


To know what had happen to the registry when we load addin from vb6, we can
use the regmon tool to monitor the registry.
http://www.sysinternals.com/ntw2k/source/regmon.shtml

1.We can set the filter to VB6.exe and unload all the vb6 addin.
2.Start the capture of the regmon, and then load the resource editor into
vb6 and run the addin.
3. Stop the capture and see if what the VB6.exe is access when it load and
access the addin.

We can do the same thing with filemon to see what is the file vb6 attempt
to load when load the addin.
http://www.sysinternals.com/ntw2k/source/filemon.shtml


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Lucvdv
2004-04-21 08:54:44 UTC
Permalink
I had already used regmon and filemon to try and find the problem, but
only looking for differences around lines where resedit.dll appeared.
At that time I compared short sections in two logs manually (one log
where it worked, and one where it didn't).

I still had both regmon logs, and now I went further:

- renamed them to .txt (it's tab-delimited ASCII)
- opened them in Excel and removed the first, second and last column
(these contain expected differences: line numbers, timestamps and
handle values).
The process name, action type, key and value names, and each
action's result remain in the file.
- did a search & replace on both files, removing the process ID after
'vb6.exe'.
- ran the resulting files through WinDiff.

They're fully identical up to the point where the fail log was stopped
(i.e. when the error popup was on screen), the other log is just
longer because it didn't stop at that error.
That's 4651 identical lines.


Filemon shows that VB6.exe also accesses the Embedded Tools version of
the DLL, but just once, with "QUERY_INFORMATION" as request.
Post by Peter Huang
Hi,
A windows installer will be lauched is because there is something missing.
Also we can check the event log to see what had happened when the windows
installed is lauched.
When VB6 loads its addin, it will check the progID and then the CLSID of
the addin to located the addin dll.
We can find them under the registry key below.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2D25A55E-AFC1-11D1-BE67-CAEC58000
000}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2D25A561-AFC1-11D1-BE67-CAEC58000
000}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{44335351-9BA4-4EDC-96D3-92065CCE3
591}
The first two is the vb6 addin, the last one is the windows embedded one.
We can check the InprocServer32 under the three registry, they should point
to the path of the addin dll.
To know what had happen to the registry when we load addin from vb6, we can
use the regmon tool to monitor the registry.
http://www.sysinternals.com/ntw2k/source/regmon.shtml
1.We can set the filter to VB6.exe and unload all the vb6 addin.
2.Start the capture of the regmon, and then load the resource editor into
vb6 and run the addin.
3. Stop the capture and see if what the VB6.exe is access when it load and
access the addin.
We can do the same thing with filemon to see what is the file vb6 attempt
to load when load the addin.
http://www.sysinternals.com/ntw2k/source/filemon.shtml
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Peter Huang
2004-04-22 05:40:09 UTC
Permalink
Hi,

I think sometimes, the reinstallation is needed to correct the problem. You
may try to re-install VS6 by following the steps in KB article below to
perform a clean installation.

HOWTO: Prepare for and Perform a Clean Installation of Visual Studio 6.0
<http://support.microsoft.com/?id=248347>

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Loading...