cinvoke-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cinvoke-svn] r108 - in trunk/cinvoke: . lib test


From: will
Subject: [cinvoke-svn] r108 - in trunk/cinvoke: . lib test
Date: 14 Aug 2006 21:21:14 -0400

Author: will
Date: 2006-08-14 21:21:13 -0400 (Mon, 14 Aug 2006)
New Revision: 108

Added:
   trunk/cinvoke/lib/cinvoke-dll.vcproj
Modified:
   trunk/cinvoke/cinvoke-vs2k3.sln
   trunk/cinvoke/lib/cinvoke.h
   trunk/cinvoke/lib/cinvoke.vcproj
   trunk/cinvoke/makeinstall.bat
   trunk/cinvoke/test/test.vcproj
Log:
added cinvoke-dll project


Modified: trunk/cinvoke/cinvoke-vs2k3.sln
===================================================================
--- trunk/cinvoke/cinvoke-vs2k3.sln     2006-08-14 22:23:12 UTC (rev 107)
+++ trunk/cinvoke/cinvoke-vs2k3.sln     2006-08-15 01:21:13 UTC (rev 108)
@@ -11,6 +11,10 @@
        ProjectSection(ProjectDependencies) = postProject
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cinvoke-dll", 
"lib\cinvoke-dll.vcproj", "{395E1DB9-CCFF-4DAF-BB33-8BB52097AE2F}"
+       ProjectSection(ProjectDependencies) = postProject
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfiguration) = preSolution
                Debug = Debug
@@ -29,6 +33,10 @@
                {27E9BF88-0702-48EF-8BD2-10A6AAFDA990}.Debug.Build.0 = 
Debug|Win32
                {27E9BF88-0702-48EF-8BD2-10A6AAFDA990}.Release.ActiveCfg = 
Release|Win32
                {27E9BF88-0702-48EF-8BD2-10A6AAFDA990}.Release.Build.0 = 
Release|Win32
+               {395E1DB9-CCFF-4DAF-BB33-8BB52097AE2F}.Debug.ActiveCfg = 
Debug|Win32
+               {395E1DB9-CCFF-4DAF-BB33-8BB52097AE2F}.Debug.Build.0 = 
Debug|Win32
+               {395E1DB9-CCFF-4DAF-BB33-8BB52097AE2F}.Release.ActiveCfg = 
Release|Win32
+               {395E1DB9-CCFF-4DAF-BB33-8BB52097AE2F}.Release.Build.0 = 
Release|Win32
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
        EndGlobalSection

Added: trunk/cinvoke/lib/cinvoke-dll.vcproj
===================================================================
--- trunk/cinvoke/lib/cinvoke-dll.vcproj                                (rev 0)
+++ trunk/cinvoke/lib/cinvoke-dll.vcproj        2006-08-15 01:21:13 UTC (rev 
108)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.10"
+       Name="cinvoke-dll"
+       ProjectGUID="{395E1DB9-CCFF-4DAF-BB33-8BB52097AE2F}"
+       Keyword="Win32Proj">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug-Dll"
+                       IntermediateDirectory="Debug-Dll"
+                       ConfigurationType="2"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ARCH_CL_X86_WIN;CINVOKE_BUILD;CINVOKE_DLL_EXPORT"
+                               MinimalRebuild="TRUE"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="1"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="FALSE"
+                               DebugInformationFormat="4"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               OutputFile="$(OutDir)/cinvoke-dll.dll"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile="$(OutDir)/cinvoke-dll.pdb"
+                               SubSystem="2"
+                               ImportLibrary="$(OutDir)/cinvoke-dll.lib"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="Release-Dll"
+                       IntermediateDirectory="Release-Dll"
+                       ConfigurationType="2"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ARCH_CL_X86_WIN;CINVOKE_BUILD;CINVOKE_DLL_EXPORT"
+                               RuntimeLibrary="0"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="FALSE"
+                               DebugInformationFormat="3"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               OutputFile="$(OutDir)/cinvoke-dll.dll"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="TRUE"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               ImportLibrary="$(OutDir)/cinvoke-dll.lib"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="arch"
+                       Filter="">
+                       <File
+                               RelativePath=".\arch\cl_x86_win.c">
+                       </File>
+                       <File
+                               RelativePath=".\arch\cl_x86_win.h">
+                       </File>
+               </Filter>
+               <File
+                       RelativePath=".\cinvoke-arch.h">
+               </File>
+               <File
+                       RelativePath=".\cinvoke-private.h">
+               </File>
+               <File
+                       RelativePath=".\cinvoke.c">
+               </File>
+               <File
+                       RelativePath=".\cinvoke.h">
+               </File>
+               <File
+                       RelativePath=".\hashtable.c">
+               </File>
+               <File
+                       RelativePath=".\hashtable.h">
+               </File>
+               <File
+                       RelativePath=".\structure.c">
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>

Modified: trunk/cinvoke/lib/cinvoke.h
===================================================================
--- trunk/cinvoke/lib/cinvoke.h 2006-08-14 22:23:12 UTC (rev 107)
+++ trunk/cinvoke/lib/cinvoke.h 2006-08-15 01:21:13 UTC (rev 108)
@@ -37,6 +37,14 @@
 extern "C" {
 #endif
 
+#ifdef CINVOKE_DLL_EXPORT
+#define CINVOKE_EXPORT __declspec(dllexport)
+#elif CINVOKE_DLL_IMPORT
+#define CINVOKE_EXPORT __declspec(dllimport)
+#else
+#define CINVOKE_EXPORT
+#endif
+
 /**
 
 \mainpage C/Invoke Reference Documentation
@@ -171,25 +179,25 @@
 /** Creates a new C/Invoke context
 * \return A new C/Invoke context object, or NULL if an error occurs.
 */
-CInvContext *cinv_context_create();
+CINVOKE_EXPORT CInvContext *cinv_context_create();
 /** Gets the error message corresponding to the error which occurred
 when a C/Invoke function fails.
 * \param[in] context A C/Invoke context.
 * \return An error message.
 */
-const char *cinv_context_geterrormsg(CInvContext *context);
+CINVOKE_EXPORT const char *cinv_context_geterrormsg(CInvContext *context);
 /** Gets the error code corresponding to the error which occurred when
 * a C/Invoke function fails, or 0 if the last call succeeded.
 * The code returned will be platform-specific.
 * \param[in] context A C/Invoke context.
 * \return An error code, or 0 if no error occurred.
 */
-cinv_int32_t cinv_context_geterrorcode(CInvContext *context);
+CINVOKE_EXPORT cinv_int32_t cinv_context_geterrorcode(CInvContext *context);
 /** Deletes a C/Invoke context
 * \param[in] context A C/Invoke context.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_context_delete(CInvContext *context);
+CINVOKE_EXPORT cinv_status_t cinv_context_delete(CInvContext *context);
 
 /** Loads a shared library and creates a library object.
 * \param[in] context A C/Invoke context.
@@ -198,21 +206,23 @@
 * portability, always specify a fully-qualified path.
 * \return A new library object, or NULL if an error occurred.
 */
-CInvLibrary *cinv_library_create(CInvContext *context, const char *path);
+CINVOKE_EXPORT CInvLibrary *cinv_library_create(CInvContext *context,
+       const char *path);
 /** Loads an entrypoint (function pointer) from a shared library.
 * \param[in] context A C/Invoke context.
 * \param[in] library The library to load from.
 * \param[in] name The name of the symbol (function) to load.
 * \return A pointer to the entrypoint, or NULL if an error occurred.
 */
-void *cinv_library_load_entrypoint(CInvContext *context,
+CINVOKE_EXPORT void *cinv_library_load_entrypoint(CInvContext *context,
        CInvLibrary *library, const char *name);
 /** Deletes a library object
 * \param[in] context A C/Invoke context.
 * \param[in] library The library to delete.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_library_delete(CInvContext *context, CInvLibrary *library);
+CINVOKE_EXPORT cinv_status_t cinv_library_delete(CInvContext *context,
+       CInvLibrary *library);
 
 /** Creates a function object, which descibes the prototype of a function
 * which can be invoked.
@@ -251,7 +261,7 @@
 * \endcode
 * \return A new function object, or NULL if an error occurred.
 */
-CInvFunction *cinv_function_create(CInvContext *context,
+CINVOKE_EXPORT CInvFunction *cinv_function_create(CInvContext *context,
        cinv_callconv_t callingconvention, const char *returnformat,
        const char *parameterformat);
 /** Calls the entrypoint given using the prototype specified.
@@ -272,7 +282,7 @@
 * memory for the parameters.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_function_invoke(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_function_invoke(CInvContext *context,
        CInvFunction *function, void *entrypoint, void *returnvalout,
        void *parameters[]);
 /** Deletes a function object.
@@ -280,14 +290,14 @@
 * \param[in] function The function to delete.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_function_delete(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_function_delete(CInvContext *context,
        CInvFunction *function);
 
 /** Creates a new structure description.
 * \param[in] context A C/Invoke context.
 * \return A new structure description object, or NULL if an error occurred.
 */
-CInvStructure *cinv_structure_create(CInvContext *context);
+CINVOKE_EXPORT CInvStructure *cinv_structure_create(CInvContext *context);
 /** Adds a simple type member to a structure description.
 * \param[in] context A C/Invoke context.
 * \param[in] structure The structure description to add to.
@@ -295,7 +305,7 @@
 * \param[in] type The type of the member to add.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_addmember_value(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_addmember_value(CInvContext 
*context,
        CInvStructure *structure, const char *name, cinv_type_t type);
 /** Adds a structure type member to a structure description.  Note that
 * this is distinct from adding a pointer to a structure, to do that one
@@ -307,7 +317,7 @@
 * member to add.  This description must be finished.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_addmember_struct(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_addmember_struct(CInvContext 
*context,
        CInvStructure *structure, const char *name, CInvStructure *type);
 /** Finishes a structure, completing its description.  This function
 * must be called before using the structure description object.
@@ -315,7 +325,7 @@
 * \param[in] structure The structure description to finish.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_finish(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_finish(CInvContext *context,
        CInvStructure *structure);
 /** Returns the size, in bytes, of a structure.
 * \param[in] context A C/Invoke context.
@@ -324,14 +334,14 @@
 * in memory.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_getsize(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_getsize(CInvContext *context,
        CInvStructure *structure, int *size_out);
 /** Allocates memory for a structure instance.
 * \param[in] context A C/Invoke context.
 * \param[in] structure The structure description to allocate memory for.
 * \return A pointer to memory which can hold the given structure.
 */
-void *cinv_structure_create_instance(CInvContext *context,
+CINVOKE_EXPORT void *cinv_structure_create_instance(CInvContext *context,
        CInvStructure *structure);
 /** Sets the value of a member inside of a structure.  
 * \param[in] context A C/Invoke context.
@@ -347,7 +357,7 @@
 * pointer.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_instance_setvalue(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_instance_setvalue(CInvContext 
*context,
        CInvStructure *structure, void *instance, const char *name,
        void *value_ptr);
 /** Gets a pointer to the value of a member inside of a structure.  
@@ -364,14 +374,14 @@
 * In all cases, the pointer being returned is internal to the
 * structure instance and does not need to be deallocated separately.
 */
-void *cinv_structure_instance_getvalue(CInvContext *context,
+CINVOKE_EXPORT void *cinv_structure_instance_getvalue(CInvContext *context,
        CInvStructure *structure, void *instance, const char *name);
 /** Frees the memory associated with a structure instance.
 * \param[in] context A C/Invoke context.
 * \param[in] instance The structure instance to delete.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_delete_instance(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_delete_instance(CInvContext 
*context,
        void *instance);
 /** Deletes a structure description.  Note that the descriptions of
 * any embedded structure members are not deleted.
@@ -379,7 +389,7 @@
 * \param[in] structure The structure description to delete.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_structure_delete(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_structure_delete(CInvContext *context,
        CInvStructure *structure);
 
 /** Creates a callback object.
@@ -391,7 +401,7 @@
 * \param[in] cbfunc The function to forward calls to.
 * \return A new callback object, or NULL if an error occurred.
 */
-CInvCallback *cinv_callback_create(CInvContext *context,
+CINVOKE_EXPORT CInvCallback *cinv_callback_create(CInvContext *context,
        CInvFunction *prototype, void *userdata, cinv_cbfunc_t cbfunc);
 /** Returns a function pointer which can be passed as a callback
 * to a function being invoked.
@@ -399,14 +409,14 @@
 * \param[in] callback A callback object.
 * \return A function pointer.
 */
-void *cinv_callback_getentrypoint(CInvContext *context,
+CINVOKE_EXPORT void *cinv_callback_getentrypoint(CInvContext *context,
        CInvCallback *callback);
 /** Deletes a callback object.
 * \param[in] context A C/Invoke context.
 * \param[in] callback A callback object.
 * \return A standard C/Invoke status code.
 */
-cinv_status_t cinv_callback_delete(CInvContext *context,
+CINVOKE_EXPORT cinv_status_t cinv_callback_delete(CInvContext *context,
        CInvCallback *callback);
 ///////////////////
 ///////////////////

Modified: trunk/cinvoke/lib/cinvoke.vcproj
===================================================================
--- trunk/cinvoke/lib/cinvoke.vcproj    2006-08-14 22:23:12 UTC (rev 107)
+++ trunk/cinvoke/lib/cinvoke.vcproj    2006-08-15 01:21:13 UTC (rev 108)
@@ -23,7 +23,7 @@
                                
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;ARCH_CL_X86_WIN;CINVOKE_BUILD"
                                MinimalRebuild="TRUE"
                                BasicRuntimeChecks="0"
-                               RuntimeLibrary="5"
+                               RuntimeLibrary="1"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                WarnAsError="TRUE"

Modified: trunk/cinvoke/makeinstall.bat
===================================================================
--- trunk/cinvoke/makeinstall.bat       2006-08-14 22:23:12 UTC (rev 107)
+++ trunk/cinvoke/makeinstall.bat       2006-08-15 01:21:13 UTC (rev 108)
@@ -3,3 +3,7 @@
 copy lib\cinvoke-arch.h install
 copy lib\arch\cl_x86_win.h install\cinvoke-archspec.h
 copy lib\Release\cinvoke.lib install
+copy lib\Release-Dll\cinvoke-dll.dll install
+copy lib\Release-Dll\cinvoke-dll.lib install
+echo #define CINVOKE_DLL_IMPORT > install/cinvoke-dll.h
+echo #include "cinvoke.h" >> install/cinvoke-dll.h

Modified: trunk/cinvoke/test/test.vcproj
===================================================================
--- trunk/cinvoke/test/test.vcproj      2006-08-14 22:23:12 UTC (rev 107)
+++ trunk/cinvoke/test/test.vcproj      2006-08-15 01:21:13 UTC (rev 108)
@@ -23,7 +23,7 @@
                                
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;ARCH_CL_X86_WIN;CINVOKE_BUILD"
                                MinimalRebuild="TRUE"
                                BasicRuntimeChecks="3"
-                               RuntimeLibrary="5"
+                               RuntimeLibrary="1"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                WarnAsError="TRUE"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]