[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Export MFC App advice

OK, so I've finished my little MFC-based
application and its time to export it to
throngs of eager users!  This is my first MFC/C++ project, so I'm trying to
figure out how to do things...

My app is pretty simple, I do not use
any active X stuff, nor COM, nor ATL, etc.  Its just MFC and C++.  Hence, from
something I read somewhere, I guessed that it needs 2 DLLs - namely, MFC42.DLL
and MSVCRT.DLL.  I ran depends.exe on it
and it showed these 2, and also showed
3 others which I think are pretty clearly from the windows OS itself, and
so I don't think I need to worry about them - they would be on any 32bit windows machine (I would like my app to
run on 98,NT,2000, maybe 95?)

OK.  As I've been learning stuff in the
windows/MFC world, I've kinda ignored
learning about DLLs cause I always said
that "I'll just statically link my app".
Now I discover that VC++ "standard
edition" doesn't support static linking
of the MFC lib; I need to upgrade to the
professional edition for that.  Arg.
By the way, why did MS set it up this
way?  In my mind statically linking is
a "simple basic" thing thta I thought
would be available everywhere -- why put
it in the "fancier" version of VC++?
Anyway... I'm getting to my question(s),
please bear with my ramblings....

So, looks like I have two choices:
A) upgrade to Prof edition, ask for
   static linking, and be done with it.
B) learn how to export those 2 DLLs and
   "register" them with the target
   machine.

My problem is that I have no clue how to
export DLLs and register them -- I think
the logic is that my installer program
needs to check the target machine, and if there's no DLL or an older version,
then I need to stick the DLL on the target machine and then I have to incant
some mysterious "registration" command
to tell the OS its there.  Is that about
right?

My current plan to actually do the export and the setup/install at the
target is based on using a little
product called "INF-Tool" from
Inner-Smile.com.  anyone used it?  Is it
going to help me check and register my
DLLs?

I would appreaciate any suggestions or
corrections to my understanding of all
this!  Thanks in advance!!

0
tullhead
Asked:
tullhead
  • 3
  • 2
1 Solution
 
chensuCommented:
0
 
tullheadAuthor Commented:
Thanks for that reference Chensu, but
I need a little more help.  That article
still doesn't give the "how to".  It
says thinks like "you should redistribute and register mfc42.dll".
OK, but HOW?!

How do I check for a DLL at a target
machine and then how do I install and
register one if its needed there?
0
 
chensuCommented:
The following articles tell you how to do it.

Copying Files
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/buildapp/setup_3ks4.htm

Replacing DLLs in Memory
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/buildapp/setup_66es.htm

If you use some installation programs such as InstallShield, you don't have to do it yourself.
0
 
tullheadAuthor Commented:
My latest status:

Making a setup program for a small MFC-
based App.  I need to export mfc42.dll
and msvcrt.dll.  But it seems that I
only need to "register" mfc42.dll on
the target machine, and NOT msvcrt.dll.

I conclude this because when I tried to
register msvcrt.dll, I got an error,
something like "RegisterDllServer not
found for msvcrt.dll".

Amazingly, the article on
"Redistributing Microsoft Visual C++ 6.0 Applications" is unclear on this.

Can someone (chensu?) just confirm that I am right about this?
0
 
chensuCommented:
Don't register it. COM objects need to be registered. You need to only copy these DLLs.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now