 |
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
On Which File Should I Run Regsvr32?
Normally it is easy to register a .dll so that it appears in your References -- i.e. using regsvr32 nameofdll.dll
I have a case where I have both a .dll and a .tlb having the same name and I do not know which one to run the regsvr32 for, do I run it with just the nameof.dll as argument, do I run it with just the nameofdll.tlb as argument or do I run the regsvr32 twice once for each of those two files.
My other machine which is able to run good seems to be referencing the .tlb file as seen from the References dialog box of VB.
The thing that really confuses me is when I go navigate to the location of that .tlb I find another file with the same name but a .dll
Thank you so much for all the kind help you can give.
Matt
|
|
07-04-2005 at 05:43 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: On Which File Should I Run Regsvr32?
the dll
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
07-04-2005 at 06:42 PM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
By the way, if I make a mistake and register something that should not be, is there a way I can unregister it?
Thank you so much for all the kind help you can give
Gratefully,
Matt
quote: matt_1ca wrote:
Normally it is easy to register a .dll so that it appears in your References -- i.e. using regsvr32 nameofdll.dll
I have a case where I have both a .dll and a .tlb having the same name and I do not know which one to run the regsvr32 for, do I run it with just the nameof.dll as argument, do I run it with just the nameofdll.tlb as argument or do I run the regsvr32 twice once for each of those two files.
My other machine which is able to run good seems to be referencing the .tlb file as seen from the References dialog box of VB.
The thing that really confuses me is when I go navigate to the location of that .tlb I find another file with the same name but a .dll
Thank you so much for all the kind help you can give.
Matt
|
|
07-04-2005 at 06:44 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: On Which File Should I Run Regsvr32?
well... the tlb could be too possibly... it's used by the IDE... but I'd just do the dll first.
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
07-04-2005 at 06:45 PM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
Thank you for your answer -- I am now trying it but I am getting stopped by error from regsvr32 saying cannot find the file I am passing to it as argument.
The files are sitting in a directory c:\Program Files\Map dll\AMV.dll but the moment I start typing from the Dos prompt something like regsvr32 c:\Program Files\Map dll\AMV.dll
regsvr32 returns an error saying cannot find the file.
It seems to me that the spaces in the path is the issue and regsvr32 for example interprets c:\Program Files\ for example as merely c:\Program\ -- I vaguely remember a long time ago using ~ for pathnames which have spaces -- but now I cannot seem to recall anymore -- and not even sure if it will work in XP
Is it possible to run regsvr32 from windows and then browse to the files I want it to take as parameter?
Thanks,
Matt
quote: JLRodgers wrote:
well... the tlb could be too possibly... it's used by the IDE... but I'd just do the dll first.
|
|
07-04-2005 at 07:24 PM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: On Which File Should I Run Regsvr32?
Is this dll used for further developing? If not, then, I think you dont need to distribute/register tlb file together with the dll, but only the dll.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
07-04-2005 at 07:51 PM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: On Which File Should I Run Regsvr32?
I didnt saw the last posts that were made .....If you have Total Commander on computer, locate the dll in it, then click on the command line at the bottom of the commander, and type
This way you wont need to write path to it, cause regsvr command is executed in the same directory where the dll resides.
As for the unregistering it
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
07-04-2005 at 07:58 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: On Which File Should I Run Regsvr32?
Put the path in "" 's
Otherwise it (I believe) only interprets the path up to the space, and omits the rest
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
07-04-2005 at 09:29 PM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
Thank you for your valuable answer.
I think I have total control now of how to tell the regsvr32
where to look for the file. I tried to quickly create my own .dll and tested it from the problem folder and it is also giving me error LoadLibrary (c:\program ... ) failed - The specified module could not be found.
So the next thing I did was to transfer said personally created .dll into a folder I created on my machine -- and regsvr32 works perfectly.
The next thing I did was take the problem .dll and put it in the folder I created where my own created .dll successfully worked with regsvr32 but the problem (LoadLibrary (c:\program ... ) failed - The specified module could not be found still persists for that file.
In all those error popping out thing -- I even called up another IT guy upstairs and he tried and ended up with the same LoadLibrary ... failed specified module could not be found error problem.
The only thing that comes to my mind which could be causing the problem is that there is already a file a newer one by that name that is registered in the machine -- but I am not so sure about that either -- because even if it were so, the error message should not say -- module could not be found -- I think what it would then be saying is -- error, module already exist or something like that.
If I unregister the .dll that is in that machine and rerun a regsvr32 this time using the older .dll (i.e. the problematic .dll file) -- do you suppose it will fix the problem
Thank you so much for all the kind help you can give.
Matt
--------------------------------------------------------------
quote: Goran wrote:
I didnt saw the last posts that were made .....If you have Total Commander on computer, locate the dll in it, then click on the command line at the bottom of the commander, and type
This way you wont need to write path to it, cause regsvr command is executed in the same directory where the dll resides.
As for the unregistering it
|
|
07-04-2005 at 10:15 PM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: On Which File Should I Run Regsvr32?
YOu can register several dll's with the same name, in diiferent folders, no error will occur. If you try to register the same dll several times, no error will occur also. I suppose that you are putting quotes around the dll path, sa JL said you should, it is necessary to do so.
| Regsvr32 "c:\Program Files\Map dll\AMV.dll" |
If you are, then most probably you are not supplying the correct path to it, since the error message tells you that OS cant find dll at the location you provided. Make sure that OS is not installed on a drive with a diifferent letter then "c:"...
[Edited by Goran on 08-04-2005 at 12:57 AM GMT]
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
07-04-2005 at 11:55 PM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
The reason why I am trying to register in a machine an older .dll than what it already has .. is because I developed a program that works on machines with that old .dll but fails on the newly bought machine with only the latest, the new dll version.
As usual for applications version1 will have its own version1 directory path, versionNew also has its own versionNew directory path etc.
The machine where my program fails contains only the versionNew directory path and I had to create manually in the new machine the version1 directory path, exactly as it is in the old machines, placed the old .dll there and I am hoping that if I can regsvr32 that old .dll in the new machine, I can have the program working in the new machine like it does in the old machines.
Matt
|
|
08-04-2005 at 12:04 AM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
Is the thing I am trying to do possible? Or do I need to uninstall something to make regsvr32 possible in my case where I am trying to register an older .dll when a newer version exists in a different path?
Thank you so much for all the kind help you can give
Gratefully
Matt
|
|
08-04-2005 at 08:59 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: On Which File Should I Run Regsvr32?
It may be impossible to register an older DLL.... given that two DLLs exist on the machine, both with the same GUID like entries (or something in code so that the computer knows which is which), the OS may prevent an older being registered.
A similar thing being the MDAC components. You can't register MDAC 2.5 if MDAC 2.7 is installed.
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
08-04-2005 at 09:17 PM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
Thank you for your answer, now that I know what is not possible -- I think I will devote sometime today soul searching maybe I'd be able to figure out somekind of a workaround.
Matt
|
|
09-04-2005 at 12:44 AM |
|
|
matt_1ca Level: Scholar
 Registered: 27-03-2005 Posts: 42
|
Re: On Which File Should I Run Regsvr32?
This is a brilliant concept! I tried it and it worked like a charm.
Thanks,
Matt
|
|
08-10-2006 at 05:09 AM |
|
|
|
|
 |
 |