Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / March 2008

Tip: Looking for answers? Try searching our database.

How to detect if file contains function DllRegisterServer???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin Zugec - 15 Feb 2008 11:53 GMT
Hi guys,

I am trying to write small utility that will be able to show you if
specified file is COM or not (if it needs registration) or if there
are any COM files in specified directory (this is extremely useful for
deployment of applications).

Currently I am trying to achieve that by calling LoadLibraryA from
Kernell32.dll and then GetProcAddress...

This tool is command line, however it is not really working now,
because LoadLibraryA sometimes popup some error message box (for
example "The application or DLL amcompat.tlb is not a valid Windows
image. Please check this against your installation diskette." or "This
application has failed to start because borlndmm.dll was not found. Re-
installing the application may fix this problem.").

Any ideas how to approach this????

Thanks,
Martin
Phil Wilson - 15 Feb 2008 18:15 GMT
The convention is that the Dll developer adds OLESelfRegister  to the
resources. That's used as a clue for a lot of the tools out there.
I'm puzzled by the reference to a tlb file - did you try to loadlibrary on
it? That's not how  tlb files are used. Also, you've noticed that
LoadLibrary requires that any dependent Dlls get loaded too, and if they
can't be found then the Dll won't load. There might be some LoadLibraryEx
flags that might help if all you want to do is see if there is a
DllRegisterServer, and not actually call it.
Signature

Phil Wilson
[MVP Windows Installer]

> Hi guys,
>
[quoted text clipped - 17 lines]
> Thanks,
> Martin
Martin Zugec - 10 Mar 2008 11:05 GMT
Hello Phil,

thanks for answer, using OLESelfRegister looks like better way to
handle it... Any idea how to detect if it is in file resources??? Any
help is really appreciated, specially any bit of code ;)

Thanks,
Martin

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.