I would like to know if creating a VB6 DLL(using MS visual studio 6.0 enterprise edition) in Windows Server 2003 SE 32-bit and Windows XP SP3 makes any difference. I mean will there be any compatibility issues when I port VB6 DLL from XP to Windows Server 2003. Just like to know the internals of how it works.
It shouldn't make any difference AFAIK, provided you have the same versions of the VB6 IDE and run-time and any other components on both machines.
One "gotcha" when building on different machines: make sure you have the correct version of any components. In simple terms, when VB6 builds, it records the version number of the components used to build. Then the built executable won't run unless it has compatible versions of the components.
Another gotcha (though not in your case), is that building certain VB6 dll's on 64bit machines will not work on a 32bit machine. I haven't quite figured out the exact vector of what is required, but if your dll is failing on a 32 bit machine and your built it on a 64 bit machine that is the reason (found this one out the hard way). This is why all our build machines are vanilla 32 bit Windows XP.
Also to echo MarkJ's point, this is another reason why when you build your installer, make sure not to use DLL's from the system but from a directory of pre-approved DLL's.