Currently everything is on my development workstation, except for the
portion that lives on the the Terminal Server that activates the virtual
channel.
The virtual channel activates a C# assembly on the local machine. That C#
component references the Vb 6 DLL.
Calls to the VB 6 DLL works fine when accessed via a simple windows forms
application.
void button_click()
{
MyDll.MyClass myClass = new MyDll.MyClass();
myClass.Test();
}
Calls to creation of the VB 6 DLL fail when accessed via my solution's
workflow.
void DataRecieved(byte[] data)
{
MyDll.MyClass myClass = new MyDll.MyClass(); //<-- Code fails here
myClass.OnDataWrite += new DataWriteHandler(myClass_DataWrite);
myClass.ProcessData(data);
}
The error I receive is FileNotFound - Could not load file or assembly
'Interop.MyDLL, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' or
one of its dependencies. The system cannot find the file specified.
The DLL itself is registered in the registry and VB 6 calls to it or C#
calls to it work fine. I guess I don't know where this solution is looking
to find the Interop.MyDLL in my particular solution. Currently, all the C#
binaries and VB 6 binaries live in the same directory and are
registered/regasmed there. Also the Virtual Channel setup in the registry
points to this directory.
The only thing I can think of is that the actuall calling assembly should be
MSTSC and so perhaps the VB 6 binary needs to live in the %winsys%
directory. I am not sure on this.
Here is my trace output
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
'mstsc.exe' (Managed): Loaded
'D:\Dev\prototypes\rdpvirtualchannels\chanclient.dll', Symbols loaded.
A first chance exception of type 'System.IO.FileNotFoundException' occurred
in chanclient.dll --> Here is my issue
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
'mstsc.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
I realize not everyone deals with this aspect of development and my
situation may be rather unique and I am sure I overlooked something. I am
just hoping someone in the community has seen this or has an idea as to
where to look.
step through illustration:
launch mstsc, connect to the terminal server
launch application, click the "make it go" button
application opens a virtual channel for this session and issues a call
(obviously over simplified)
mstsc finds the corresponding virtual channel definition in the registry and
launches the corresponding dll.
corresponding dll opens the virtual channel on the client machine and
listens for data
corresponding dll loads vb 6 dll.to process incoming messages <-- this part
fails
Thanks in advance.
Post by Bill McCarthyHi amdrit,
Is this VB6 dll on the remote machine ? I'd package the VB6 dll with the
C# application using XCopy deployment. A manifest is created so as the VB6
app is easily distributed side by side.
Failing that, create a simple test case and step through to where the
error is. ProcessMon (the newer version of FileMon) from the SysInternals
pages on the TechEd site will show you the file being looked for and also
the registry keys being accessed.