Problems with C++ DLL on Server 2000 vs XP

I added some functionality to a C++ DLL which originally ran fine on a Server 2000 machine.  After adding the new functionality the DLL runs fine on Windows XP, but now it doesn't return and times out when it is run on Server 2000.  Is there any common functionality issues or gotchas that I need to watch out for when creating a DLL on XP for Server 2000?  Would upgrading the environment to Server 2003 be likely to fix the problem?

While adding the new functionality, the only major thing that I used that the previous version did not is a new struct I created.  The rest of it just uses functions and data types that were already in use.

It is difficult for me to debug the DLL since another 3rd party software application is calling the routine during it's execution.  Does anyone have any ideas off the top of their head on what it could be?

Thanks for any and all help.

--Charly
struct RA_STRING
{
	unsigned long Len;
	char  Data[82];
};

Open in new window

LVL 1
dleehansonAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
>>which has no debugging mode or tools :(

You can try the DependencyWalker (www.dependencywalker.com) in "Profile" mode and check the output, that already reveals a lot.
0
 
jkrCommented:
1st of all: What error are you getting? "Does not run" can stand for a lot...
0
 
itsmeandnobodyelseCommented:
>>>> After adding the new functionality the DLL runs fine on Windows XP
As the dll depends on other dlls, the executable built in a XP environmemnt now may load different dlls than when you build it at 2000 server. For example it may call some UNICODE dlls or registered COM dlls which have different versions for XP as they have for 2000 Server. Moreover, an XP executable may run with a .manifest which contains taken-out registry information while that information is not available in a 2000 Server environment.

>>>> struct RA_STRING
That struct most likely isn't the reason, beside you would have different alignment in two dlls using that struct.

Regards, Alex
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
dleehansonAuthor Commented:
I'm not on-site right now, but The 3rd party application's watchdog timer would expire after a set amount of time when the called DLL routine wouldn't return control.  I'm pretty sure it had enough time to properly execute since on my XP machine it took about 50ms, and I was allowing 2000ms before the watchdog timer fault would fire.  I'm not getting any runtime errors from the OS or anything like that, the routine just isn't returning after it is called.

I know that I am being very vague, and I apologize for that.  I was just looking for any common problems or things I need to watch out for when moving a DLL from XP to Server 2000?  I thought I would just check with the experts to see if there is any common problems to check before I go about trying to find a way to debug the DLL routine as it is called from the 3rd party application, which has no debugging mode or tools :(

I'm compiling the DLL for the machine via a Visual Studio 2005 generated installer if that matters...

Thanks.

--Charly
0
 
itsmeandnobodyelseConnect With a Mentor Commented:
>>>> I'm compiling the DLL for the machine via a
>>>> Visual Studio 2005 generated installer if that matters...

Visual Studio 2005 generates a .manifest file that doesn't work on 2000 Server (afaik). You may search for build options to not creating a manifest.

Can't you build a separate version using a 2000 Server environment? Or on a W2k ? Maybe with a VC6 or VC7.1 compiler (or that one that worked in the past)?
0
 
dleehansonAuthor Commented:
Alex,

I'm setting up a machine for it right now in the shop.  I did some searching, and at first glance it looks like I need to generate a Merge Module for my DLL instead of a windows installer.  I have to read up on it more though, since I haven't done this before.

jkr,

That is a neat program!  All I get for referenced modules with both the original and the new DLL is:

Kernel32.dll
 - NTDLL.dll

I think my issue is somewhere with building it on Server 2000 like Alex has suggested, but I'll need to dig into it some more to find out for sure.  Once I get my test rig up-and-running I'll try making a merge module and see how that works.

--Charly
0
 
jkrCommented:
Also try the "Profile" mode, the logging is pretty useful.
0
 
dleehansonAuthor Commented:
It looks like we are going to upgrade to Server 2003.  Am I still going to run into the manifest problem with 2003?  I don't really know what to search for to find out myself...

Thanks.

--Charly
0
 
dleehansonAuthor Commented:
I think I am going to open another question, since my problems have changed somewhat.  Thanks for the help guys.

--Charly
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.