|
A server application i made on PC having Windows XP and Visual Studios 6 is running fine on another windows XP machine (after supplying 4 DLL files). But it is not running on a Windows 2000 professional platform. Any solutions ??
Sid.
|
|
|
|
|
Possibly XP had a library already that you depend on, and 2000 did not ? It would help to find out what the exact problem is.
Also, perhaps you used an API that was new to XP in your code ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Download the Dependency Walker application and run it on your DLL files. If you find a DLL with a function that has an exclamation point by it that means that that dependency is not resolved hence the dll cannot be loaded. This could be why your application is failing.
Deus caritas est
|
|
|
|
|
Use from Dependency Walker.Maybe you use from a service that is in xp and isnt in 2000
|
|
|
|
|
If bring the *.exe which build by VC++ to run in another PC that don't have VC++ is installed, it will show error and can't use this program.
Anybody know, how to solve this problem.
|
|
|
|
|
probably you are missing libraries ...
SkyWalker
|
|
|
|
|
|
If you're running on XP and using VS2005, you need to run the redistributable file which will install them to the correct WinSXS folders. The .manifest file also needs to ship with your app in this case. If you're < VS2005, then files like the MSVCRT and the MFC dll need to be put in the system32 folder of the target machine, if you used MFC and the C runtime ( cancel one or the other as appropriate ), unless you link them into your app, which makes your exe bigger.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The application program will ask for DLL files when you run it in another PC which does not have Visual Studio installed. Copy the required DLL files from a PC having Visual Studio into the folder which has the application and run it.
Sid.
|
|
|
|
|
WinSXS means this does not work anymore for XP, at least not for VS2005 built programs, AFAIK.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Select static linking for the MFC libraries then they are built into the binary.
Elaine
|
|
|
|
|
Where is this option?
Is it in VC++?
|
|
|
|
|
You've probably found it by now, but it's in your project properties.
|
|
|
|
|
Right click in solution->select property->in Use of MFC select Static
|
|
|
|
|
You should add many ".dll" to the other PC!
If you do that,the problem will be solved!
DaHongying
|
|
|
|
|
I will start to learn win32 and com.Com is a part of win32.right?
I am vague of starting win32 books and com books first?
In fact i don't sure what are the steps for learning win32.I see that most of the tutorials showing win32: learning message dispatch system of windows or to learning what functions included in system32 dlls.
Which roadmap must i follow to learning win32 and com.
I decided that first learning com(I have 3 books) and then win32(ı have 2 books).
Is this right way?
What do you advice me?
|
|
|
|
|
sawerr wrote: Com is a part of win32.right?
No. COM was first called ActiveX and ActiveX didn't even exist when Win32 came along.
sawerr wrote: In fact i don't sure what are the steps for learning win32.
First, get used to pain. Programming Win32 style is a lot harder than MFC, which is itself a lot harder than using C#/Winforms. WPF brings something new to the table, I think it's harder than C#/Winforms
But, if you want to use Win32, by 'Programming Windows' by Charles Petzold. There's not other book half as good.
sawerr wrote: I decided that first learning com(I have 3 books) and then win32(ı have 2 books).
Unless your terminology is strange, that's a weird order. COM is a way of creating dlls that expose an interface which is mainly useful for being able to call stuff without having any idea where it is on the file system ( otherwise, you could just use plain old dlls ), and for exposing an interface through your app ( as Office does, for example ).
What are you trying to learn exactly, and what is your background ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks Christian
I start programming with c and after that i learned c# and.Net well.I see that they are not enough for me for writing low level(i mean orginial) applications.So I started to learn c++ and STL and I finished them.
In fact i know both com and win32 generally.
I am member of safari bookshelf and in my bookshelf there are 5 books and i can not decide to order of reading these books.
1-)COM+ Programming: A Practical Guide Using Visual C++ and ATL
2-)Microsoft Windows 2000 API SuperBible
3-)Win32 System Services: The Heart of Windows® 98 and Windows® 2000
4-)Applying COM+
5-)COM and .NET Component Services
So i want your advices to learning win32-com-mfc with visual c++.If you tell me order of reading these books will very helpful.An other advices will be greatly appreciated
Thanks again
|
|
|
|
|
sawerr wrote: I start programming with c and after that i learned c# and.Net
Wow - C to C# is a big leap. So C# was your first OOP ?
sawerr wrote: I see that they are not enough for me for writing low level(i mean orginial) applications.
I totally disagree. C is indeed hard, but if you learn WinAPI programming instead of MFC, you're basically learning windows in C, that's where it comes from. But, I write 'original' programs in C# that interact with digital cameras, do image processing, video capture, etc.
sawerr wrote: So I started to learn c++ and STL and I finished them.
LOL - I doubt that. No-one finishes learning any language, especially C++ and STL.
sawerr wrote: COM+ Programming: A Practical Guide Using Visual C++ and ATL
COM+ is a superset of COM. That means any COM+ book will teach you more than you need to know to use COM.
sawerr wrote: COM and .NET Component Services
This book is probably mostly about interop.
sawerr wrote: If you tell me order of reading these books will very helpful.An other advices will be greatly appreciated
I would forget Win32 and go straight to MFC. For this, I can't even remember the books I used. I do know the best COM book I read, the one that made me understand it all, was called 'Building lightweight components with ATL' by Jonathan Bates.
I still don't get why you feel the need to learn COM, but if you do, I'd certainly recommend learning MFC first.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: I would forget Win32 and go straight to MFC.
I wouldn't say that, starting with Win32 allows you to gain a better understanding of exactly what the code is doing. I feel MFC takes the fun away, sure it makes things easier and faster, but all the work is already done for you.
I started out with BASIC on a Vic20, moved on to C now going through C++ (after a long break).
Regarding books, personaly I wouldn't bother. The internet already has all the books, tutorials, forums and examples you will ever need.
|
|
|
|
|
Sorry to disagree with almost everything you said, but...
waldermort wrote: starting with Win32 allows you to gain a better understanding of exactly what the code is doing
Yeah, perhaps, but Win32 is complex enough, I think it's a better approach to learn MFC, THEN go on to learn Win32 so you can appreciate what MFC is doing for you. Just like I'd teach beginners to use std::string before showing them how to work with char *
waldermort wrote: I feel MFC takes the fun away
I tend to agree, but coding is not about fun, it's about getting the job done. That's why I use C# a lot, and Win32 almost never.
waldermort wrote: I started out with BASIC on a Vic20, moved on to C now going through C++ (after a long break).
I started with AppleSoft BASIC, went to Blitz Basic on the Amiga, and then C++ MFC, followed by Win32, followed by C, with some Python in there. That's not counting C#, VB.NET ( yuck), VB script ( double yuck ) et al.
waldermort wrote: Regarding books, personaly I wouldn't bother. The internet already has all the books, tutorials, forums and examples you will ever need.
I totally disagree. The web is a huge collection of disjointed one off articles of various quality. Sites like CP are invaluable, but so is having a good core book or two to work through, especially when starting a new language/framework. I live online, I use CP a lot, I still buy a lot of books.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Yeah, perhaps, but Win32 is complex enough, I think it's a better approach to learn MFC, THEN go on to learn Win32 so you can appreciate what MFC is doing for you. Just like I'd teach beginners to use std::string before showing them how to work with char *
Each to their own I suppose, I have a habit of always jumping into the deep end otherwise I become lazy.
Christian Graus wrote: I totally disagree. The web is a huge collection of disjointed one off articles of various quality. Sites like CP are invaluable, but so is having a good core book or two to work through, especially when starting a new language/framework. I live online, I use CP a lot, I still buy a lot of books.
Usually, I will go to a bookshop to find something suitable, then scoure the net for it. You are sure to find an E-book out there. If feel if you are goint to spend a fortune on books, you might aswell pay for an evening class or private tutor.
|
|
|
|
|
I would disagree with you that learning Win32 is harder C#/Winforms. I agree that MFC is a PITA and makes Windows UI programming more difficult than need be. You end up getting HWNDs and calling thin wrappers around the Win32 calls anyway. In fact, learning the Win32 API is vital to the fundamentals in Windows UI programming and getting one's head around this ensures successful use of MFC, C#/Winforms, or whatever framework that Microsoft may come up with next. I see many programmers who cannot write custom controls or extend the Winforms controls to implement missing features because they are bound by this framework and don't have the fundamentals down. These frameworks wrap the Win32 API anyway, so if you really want to be a top-level Windows UI developer I suggest learning the Win32 API and fundamentals of Windows programming. This will serve you well.
Deus caritas est
|
|
|
|
|
Andy Moore wrote: I would disagree with you that learning Win32 is harder C#/Winforms
Wow - I'd say that's a pretty strong allegation. I doubt many people would agree.
Andy Moore wrote: In fact, learning the Win32 API is vital to the fundamentals in Windows UI programming and getting one's head around this ensures successful use of MFC, C#/Winforms, or whatever framework that Microsoft may come up with next.
This is absolutely true. And, as you said, MFC really is just Win32 wrappers, and that's half my point. MFC is easier in a lot of ways, and if you do MFC for a while, Win32 is easy to learn, you learned half of it without ever realising it.
Andy Moore wrote: These frameworks wrap the Win32 API anyway
Yes, this is still true today, until WPF takes over
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I was wondering if anybody knows if there is some gui library that allows you to create freshly looking menus and controls which resemble windows vista (looking fresh and clean) and that would run on XP and Windows 2000?
I also like the GUI of real player 10 - this would also be good.
The normal standard issue MFC menus and controls are kind of outdated for the app that I'm working on.
Any idea would be greatly appreciated.
Thanks.
|
|
|
|
|