문제해결1. Windows 7 64Bit Office 2010 64 Bit 1). function return value 및 parameter가 integer로 되어 있는데 이것을 Long으로 바꿈(Excel에서). //#If Win64 Then Private Declare PtrSafe Function AddInteger Lib "D:/Test/MyDll32.dll" (ByVal a As Long, ByVal b As Long) As Long #Else Private Declare Function AddInteger Lib "D:/Test/MyDll32.dll" (ByVal a As Long, ByVal b As Long) As Long #End If 2. Windows 7 64Bit Office 2007 32 Bit 1) C에서 DLL 파일을 만들때 def 파일을 이용해서 만들것 Ex) MyDll32.defLIBRARY "MyDll32"EXPORTSAddInteger @1 VC, VB로 만든 실행파일과 Excel2010으로서 동일한 dll 파일을 loading하는것은 전혀 문제가 없었으나 Excel 2007에서는 문제가 발생,따라서 dll 파일을 만들때 함수 export부분을 구 방식으로 만들어야 합니다.
Private Declare PtrSafe Function AddInteger Lib "D:/Test/MyDll32.dll" (ByVal a As Long, ByVal b As Long) As Long
#Else
Private Declare Function AddInteger Lib "D:/Test/MyDll32.dll" (ByVal a As Long, ByVal b As Long) As Long
#End If 2. Windows 7 64Bit Office 2007 32 Bit 1) C에서 DLL 파일을 만들때 def 파일을 이용해서 만들것 Ex) MyDll32.defLIBRARY "MyDll32"EXPORTSAddInteger @1 VC, VB로 만든 실행파일과 Excel2010으로서 동일한 dll 파일을 loading하는것은 전혀 문제가 없었으나 Excel 2007에서는 문제가 발생,따라서 dll 파일을 만들때 함수 export부분을 구 방식으로 만들어야 합니다.