Question : Developing for W2K3 - Missing MSCVP100.DLL & MSVCR100.DLL

I'm using Visual Studio 2010 C++ to develop a small DLL that will run on Windows 2003 (and 2008) servers. The DLL I created works fine on the same desktop I'm developing on but it is missing the MSCVP100.DLL and MSVCR100.DLL files (only has MSCV*71.DLL's).

In order to get the DLLs to run should I copy the MSVC*100 DLLs over to my target platform? Or should I set a compile flag to make it use MSCV*71 (if so how)? What's the the recommended approach to get a DLL compiled in VC 2010 to run on Windows Server 2003/2008?

Thanks!
Dan

Answer : Developing for W2K3 - Missing MSCVP100.DLL & MSVCR100.DLL

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
Function Networkdaysvba(startDate As Double, endDate As Date, Optional holidays As Variant) As Integer
    Dim i As Integer
    Dim tmp As Integer
    Dim dt As Date, dtStart As Date
    
    startDate = Fix(startDate)
    tmp = ((endDate - startDate + 1) \ 7) * 5 ' entire work weeks
    dtStart = startDate + (tmp * 7 / 5) ' move to last week
    For dt = dtStart To endDate
        If Weekday(dt, vbMonday) <= 5 Then tmp = tmp + 1 ' add work days in the last week
    Next
    
    If IsArray(holidays) Then
        For Each h In holidays
            ' if any holiday falls in the range, remove it
            If Weekday(h, vbMonday) <= 5 And _
                startDate <= h And endDate >= h Then
                tmp = tmp - 1
            End If
        Next
    End If
    Networkdaysvba = tmp
End Function

Function EOMonthVBA(startDate As Double, months As Long) As Date
    startDate = Fix(startDate)
    EOMonthVBA = DateAdd("m", months + 1, startDate - Day(startDate) + 1) - 1
End Function

Function EDateVBA(startDate As Double, months As Long) As Date
    startDate = Fix(startDate)
    EDateVBA = DateAdd("m", months, startDate)
End Function
Random Solutions  
 
programming4us programming4us