On 3/18/2011 14:45, Raul Miller wrote:
> On Fri, Mar 18, 2011 at 12:17 PM, Eric Iverson<[email protected]>  
> wrote:
>> Likely not relevant, but I think jreg.bat runs j.exe to do the register and
>> it registers both j.exe and j.dll. Sound to me like you are only interested
>> in j.dll in which case you are probably better off using regsvr32 (MS
>> utility). That might also give you a clean way to unregister without mucking
>> about in the registry directly.
>
> Thank you.
>
> Unfortunately, though, I have not been able get anywhere, yet, with this 
> advice.
>
> On my own machine, deleting the keys at:
>
> HKEY_CLASSES_ROOT\JDLLServer
> HKEY_CLASSES_ROOT\JDLLServer.3
> HKEY_CLASSES_ROOT\JEXEServer
> HKEY_CLASSES_ROOT\JEXEServer.3
> HKEY_CLASSES_ROOT\CLSID\{21EB05E0-1AB3-11CF-A2AC-8FF70874C460}
> HKEY_CLASSES_ROOT\CLSID\{21EB05EA-1AB3-11CF-A2AC-8FF70874C460}
> HKEY_CLASSES_ROOT\Typelib\{21EB05E1-1AB3-11CF-A2AC-8FF70874C460}
> HKEY_CLASSES_ROOT\Typelib\{21EB05EB-1AB3-11CF-A2AC-8FF70874C460}
> HKEY_CLASSES_ROOT\Interface\{21EB05E2-1AB3-11CF-A2AC-8FF70874C460}
> HKEY_CLASSES_ROOT\Interface\{21EB05EC-1AB3-11CF-A2AC-8FF70874C460}
>
> and then re-running j602\bin\jreg.bat had been sufficient to let me
> run without that file not found error on the network drive.
>
> On Gary's machine, re-running jreg.bat did not help, running regsvr32
> /u j.dll and then regsvr32 j.dll did not help, removing the above keys
> and then re-running jreg.bat did not help, running regsvr32 /u jdll
> and regsvr32 j.dll (again) still did not help.
>
> Currently my program is not able to find j.dll on his machine (and I
> have it on his C: drive).  (And he has a full install of j602 at
> c:\Program Files\j602\.)
>
> Frankly, this seems like a particularly bad design, on the part of
> Microsoft -- they apparently have a lot of different failure modes,
> all with this same "could not load file or assembly..." error message.
>    And they apparently do not provide a way of tracing through what is
> happening here, to find the underlying point of failure (though
> presumably if I were better with assembly language debugging I would
> be able to trace things through using a debugger).
>
> Still... I have not given up, yet.
>
> And if anyone has anything else they think I should try (or comments
> on how I should have tried something that I professed to have already
> tried), please let me know.
>
> (For now, I will try my hand with a debugger.)
>
> Thanks again,
>

I have a small C# program that calls j.dll:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JDLLServerLib;

namespace ConsoleApplication1
{
     class Program
     {
         static void Main(string[] args)
         {
             JDLLServer j = new JDLLServer();
             object result;
             int status = j.DoR("2| !/~i.4", out result);
             System.Console.WriteLine(string.Format("J DoR ended with status 
{0} 
and result\n{1}", status, result));

         }
     }
}

I built it on win7_64 system and ran it there:

C:\>"J DLL Test.exe"
J DoR ended with status 0 and result
1 1 1 1
0 1 0 1
0 0 1 1
0 0 0 1

I put the .exe on a flash drive and took it to my winxp_32 system and ran it 
there.  I got this error:

Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the
  COM class factory for component with CLSID 
{21EB05EA-1AB3-11CF-A2AC-8FF70874C46
0} failed due to the following error: 80040154 Class not registered (Exception f
rom HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

I went to the j bin directory and ran regsvr32 j.dll and reran the program.  It 
now ran and gave the expected results.

So, I can't duplicate the problem you are seeing.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to