diff --git a/build.xml b/build.xml index f714a92..1e6e16f 100644 --- a/build.xml +++ b/build.xml @@ -5,33 +5,22 @@ Created Feb 4, 2005 1:23:05 PM as part of migration from ANT Last Modified March 24, 2007 - Tested on Eclipse 3.2 with the Callisto plugis, Ant 1.6.1 and MS Visual C++ 6.0 + Tested on Eclipse 3.2 with the Callisto plugis, Ant 1.6.1 and MS Visual C++ 8 (2005) Eclipse users are pretty lucky because the whole project can be built inside eclipse due to their built in ANT support. - The COM portion of this build requires MS Visual C++ 6.0. + The COM portion of this build requires MS Visual C++ 8.0. (2005) The build proces defined in this build.xml file does not support - MS Visual C++ 8.0 (Visual C++ 2005 Express) when combined with the MS SDK. - The problem is that SafeArray.cpp will not compile because some of the - types have changed sizes in the newer 64bit aware world. YOU MUST define a file named compilation_tools.properties! - The file for MS Visual C++ 6.0 building only the 32 bit version + The file for MS Visual C++ 8.0 building 32 and 64 bit (releases up to 1.11 only supported 32 builds) looks something like: - JDK=d:/j2sdk1.4.2_13 - MSDEVDIR=d:\\apps\\Microsoft Visual Studio\\VC98 - version=1.11-pre2 - - Construction with 64 bit support requires the MS Platform SDK. - compilation_tools.properties in this situation should look - something like: - - JDK=d:/j2sdk1.4.2_13 - MSDEVDIR=d:\\apps\\Microsoft Visual Studio\\VC98 - MSSDKDIR=D:\\Apps\\Microsoft Platform SDK for Windows Server 2003 R2 - version=1.11-pre2 - + JDK=d:\\j2sdk1.4.2_14 + MSDEV_DIR=d:\\apps\\Microsoft Visual Studio 8\\VC + MSDEV_IDE_DIR=d:\\apps\\Microsoft Visual Studio 8\\Common7\\IDE + version=1.13 + DO NOT check compilation_tools.properties into source control as the values are specific to YOUR environment. @@ -46,14 +35,12 @@ Relies on the fact that properties cannot be reset once set. ================================================================== --> + + - - - - - - + + + - - - - + + + + + + + - - - - - - - - + - - - - - + - + - + - + - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + Clean up the (AMD64) target folders and file, for safety Compiling C++ (AMD64) classes with JDK JNI library ${JDK} - - - - - + + + + + + + + + + + + - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + Clean up the target folders and file, for safety + Using ${library.x86} Creating ${release.file.x86.dll} - + + + + - + + - - - - + + + + + + + + Clean up the target folders and file, for safety Creating {$release.file.AMD64.dll} - + + + + - - + + - - - - - + + + + + + + + +

JACOB 1.13

+

What's New

+
    +
  • + Now compiles with with Visual Studio 2005 +
  • +
+ +

Tracked Changes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bugs
  
Patches
1709841 (pre-release 1) Compiles with Visual Studio 2005
  
Feature Requests
  
Known Issues
+

JACOB 1.12

What's New

diff --git a/jni/Dispatch.cpp b/jni/Dispatch.cpp index 4b2a00c..73278b3 100644 --- a/jni/Dispatch.cpp +++ b/jni/Dispatch.cpp @@ -291,13 +291,13 @@ JNIEXPORT jintArray JNICALL Java_com_jacob_com_Dispatch_getIDsOfNames CoTaskMemFree(lps); CoTaskMemFree(dispid); char buf[1024]; - strcpy(buf, "Can't map names to dispid:"); + strcpy_s(buf, "Can't map names to dispid:"); for(i=0;iGetObjectArrayElement(names, i); const char *nm = env->GetStringUTFChars(s, NULL); - strcat(buf, nm); + strcat_s(buf, nm); env->ReleaseStringUTFChars(s, nm); env->DeleteLocalRef(s); } @@ -359,13 +359,13 @@ static char* CreateErrorMsgFromInfo(HRESULT inResult, EXCEPINFO* ioInfo, char* desc = ::BasicToCharString(ioInfo->bstrDescription); const size_t MSG_LEN = ::strlen(methName) + ::strlen(source) + ::strlen(desc) + 128; msg = new char[MSG_LEN]; - ::strncpy(msg, "Invoke of: ", MSG_LEN); - ::strncat(msg, methName, MSG_LEN); - ::strncat(msg, "\nSource: ", MSG_LEN); - ::strncat(msg, source, MSG_LEN); - ::strncat(msg, "\nDescription: ", MSG_LEN); - ::strncat(msg, desc, MSG_LEN); - ::strncat(msg, "\n", MSG_LEN); + ::strncpy_s(msg, MSG_LEN, "Invoke of: ", strlen("Invoke of: ")); + ::strncat_s(msg, MSG_LEN, methName, strlen(methName)); + ::strncat_s(msg, MSG_LEN, "\nSource: ", strlen("\nSource: ")); + ::strncat_s(msg, MSG_LEN, source, strlen(source)); + ::strncat_s(msg, MSG_LEN, "\nDescription: ", strlen("\nDescription: ")); + ::strncat_s(msg, MSG_LEN, desc, strlen(desc)); + ::strncat_s(msg, MSG_LEN, "\n", strlen("\n")); delete source; delete desc; } @@ -374,11 +374,12 @@ static char* CreateErrorMsgFromInfo(HRESULT inResult, EXCEPINFO* ioInfo, char* msg2 = CreateErrorMsgFromResult(inResult); const size_t MSG_LEN = ::strlen(methName) + ::strlen(msg2) + 128; msg = new char[MSG_LEN]; - ::strncpy(msg, "A COM exception has been encountered:\n" - "At Invoke of: ", MSG_LEN); - ::strncat(msg, methName, MSG_LEN); - ::strncat(msg, "\nDescription: ", MSG_LEN); - ::strncat(msg, msg2, MSG_LEN); + ::strncpy_s(msg, MSG_LEN, + "A COM exception has been encountered:\nAt Invoke of: ", + strlen("A COM exception has been encountered:\nAt Invoke of: ")); + ::strncat_s(msg, MSG_LEN, methName, strlen(methName)); + ::strncat_s(msg, MSG_LEN, "\nDescription: ", strlen("\nDescription: ")); + ::strncat_s(msg, MSG_LEN, msg2, strlen(msg2)); // jacob-msg 1075 - SF 1053872 : Documentation says "use LocalFree"!! //delete msg2; LocalFree(msg2); @@ -415,7 +416,7 @@ JNIEXPORT jobject JNICALL Java_com_jacob_com_Dispatch_invokev HRESULT hr; if (FAILED(hr = name2ID(pIDispatch, nm, (long *)&dispID, lcid))) { char buf[1024]; - sprintf(buf, "Can't map name to dispid: %s", nm); + sprintf_s(buf, 1024, "Can't map name to dispid: %s", nm); ThrowComFail(env, buf, -1); return NULL; } @@ -514,7 +515,7 @@ JNIEXPORT jobject JNICALL Java_com_jacob_com_Dispatch_invokev } else { dispIdAsName = new char[256]; // get the id string - _itoa (dispID,dispIdAsName,10); + _itoa_s (dispID, dispIdAsName, 256,10); //continue on mostly as before buf = CreateErrorMsgFromInfo(hr,&excepInfo,dispIdAsName); } diff --git a/jni/StdAfx.cpp b/jni/StdAfx.cpp deleted file mode 100644 index 4687243..0000000 --- a/jni/StdAfx.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -// stdafx.cpp : source file that includes just the standard includes -// stdafx.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -#ifdef _ATL_STATIC_REGISTRY -#include -#include -#endif - -#include diff --git a/jni/StdAfx.h b/jni/StdAfx.h index 7c94ac6..3d1a2d2 100644 --- a/jni/StdAfx.h +++ b/jni/StdAfx.h @@ -42,7 +42,7 @@ //You may derive a class from CComModule and use it if you want to override //something, but do not change the name of _Module extern CComModule _Module; -#include +//#include //{{AFX_INSERT_LOCATION}} diff --git a/vstudio/jacob/jacob.dsp b/vstudio/jacob/jacob.dsp deleted file mode 100644 index b096219..0000000 --- a/vstudio/jacob/jacob.dsp +++ /dev/null @@ -1,182 +0,0 @@ -# Microsoft Developer Studio Project File - Name="jacob" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=jacob - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "jacob.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "jacob.mak" CFG="jacob - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "jacob - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "jacob - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "jacob - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACOB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACOB_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 - -!ELSEIF "$(CFG)" == "jacob - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACOB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACOB_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "jacob - Win32 Release" -# Name "jacob - Win32 Debug" -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\jni\ComThread.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\ComThread.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\Dispatch.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\Dispatch.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\DispatchEvents.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\DispatchEvents.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\DispatchProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\DispatchProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\EnumVariant.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\EnumVariant.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\EventProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\EventProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\SafeArray.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\SafeArray.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\STA.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\STA.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\StdAfx.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\StdAfx.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\util.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\util.h -# End Source File -# Begin Source File - -SOURCE=..\..\jni\Variant.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\jni\Variant.h -# End Source File -# End Target -# End Project diff --git a/vstudio/jacob/jacob.dsw b/vstudio/jacob/jacob.dsw deleted file mode 100644 index 66a1a20..0000000 --- a/vstudio/jacob/jacob.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "jacob"=.\jacob.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/vstudio/jacob/jacob.ncb b/vstudio/jacob/jacob.ncb deleted file mode 100644 index bfca761..0000000 Binary files a/vstudio/jacob/jacob.ncb and /dev/null differ diff --git a/vstudio/jacob/jacob.opt b/vstudio/jacob/jacob.opt deleted file mode 100644 index f0814a1..0000000 Binary files a/vstudio/jacob/jacob.opt and /dev/null differ diff --git a/vstudio/jacob/jacob.plg b/vstudio/jacob/jacob.plg deleted file mode 100644 index 05ba310..0000000 --- a/vstudio/jacob/jacob.plg +++ /dev/null @@ -1,72 +0,0 @@ - - -
-

Build Log

-

---------------------Configuration: jacob - Win32 Debug-------------------- -

-

Command Lines

-Creating temporary file "C:\DOCUME~1\DANADL~1\LOCALS~1\Temp\RSP2A.tmp" with contents -[ -/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACOB_EXPORTS" /Fp"Debug/jacob.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\ComThread.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\Dispatch.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\DispatchEvents.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\DispatchProxy.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\EnumVariant.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\EventProxy.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\SafeArray.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\STA.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\StdAfx.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\util.cpp" -"C:\Documents and Settings\Dan Adler\My Documents\sourceforge\jacob\jni\Variant.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\DANADL~1\LOCALS~1\Temp\RSP2A.tmp" -Creating temporary file "C:\DOCUME~1\DANADL~1\LOCALS~1\Temp\RSP2B.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/jacob.pdb" /debug /machine:I386 /out:"Debug/jacob.dll" /implib:"Debug/jacob.lib" /pdbtype:sept -".\Debug\ComThread.obj" -".\Debug\Dispatch.obj" -".\Debug\DispatchEvents.obj" -".\Debug\DispatchProxy.obj" -".\Debug\EnumVariant.obj" -".\Debug\EventProxy.obj" -".\Debug\SafeArray.obj" -".\Debug\STA.obj" -".\Debug\StdAfx.obj" -".\Debug\util.obj" -".\Debug\Variant.obj" -] -Creating command line "link.exe @C:\DOCUME~1\DANADL~1\LOCALS~1\Temp\RSP2B.tmp" -

Output Window

-Compiling... -ComThread.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\comthread.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -Dispatch.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\dispatch.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -DispatchEvents.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\dispatchevents.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -DispatchProxy.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\comthread.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -EnumVariant.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\dispatch.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -EventProxy.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\eventproxy.h(37) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -SafeArray.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\safearray.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -STA.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\comthread.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -StdAfx.cpp -util.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\dispatch.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -Variant.cpp -c:\documents and settings\dan adler\my documents\sourceforge\jacob\jni\variant.h(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory -Error executing cl.exe. - - - -

Results

-jacob.dll - 10 error(s), 0 warning(s) -
- - diff --git a/vstudio/jacob/jacob.vcproj b/vstudio/jacob/jacob.vcproj new file mode 100644 index 0000000..15f314a --- /dev/null +++ b/vstudio/jacob/jacob.vcproj @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +