完善目录结构

完善了目录结构,添加了以前的web段com组件调用的代码(在/测试目录下)(部署没有使用到)
This commit is contained in:
yanshui177
2017-05-17 20:43:16 +08:00
parent ad754709a5
commit 6dcd378738
1246 changed files with 671388 additions and 517 deletions

View File

@@ -0,0 +1,29 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HWCVDLL2", "HWCVDLL2\HWCVDLL2.vcxproj", "{358E1500-F6FA-41B9-B9DE-FF079F97A261}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HWCVDLL2PS", "HWCVDLL2\HWCVDLL2PS.vcxproj", "{F10C4A05-1935-4FB8-9400-187176FCA7A6}"
ProjectSection(ProjectDependencies) = postProject
{358E1500-F6FA-41B9-B9DE-FF079F97A261} = {358E1500-F6FA-41B9-B9DE-FF079F97A261}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{358E1500-F6FA-41B9-B9DE-FF079F97A261}.Debug|Win32.ActiveCfg = Debug|Win32
{358E1500-F6FA-41B9-B9DE-FF079F97A261}.Debug|Win32.Build.0 = Debug|Win32
{358E1500-F6FA-41B9-B9DE-FF079F97A261}.Release|Win32.ActiveCfg = Release|Win32
{358E1500-F6FA-41B9-B9DE-FF079F97A261}.Release|Win32.Build.0 = Release|Win32
{F10C4A05-1935-4FB8-9400-187176FCA7A6}.Debug|Win32.ActiveCfg = Debug|Win32
{F10C4A05-1935-4FB8-9400-187176FCA7A6}.Release|Win32.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,74 @@
// HWCVDLL2.cpp : DLL 导出的实现。
//
// 注意: COM+ 1.0 信息:
// 请记住运行 Microsoft Transaction Explorer 以安装组件。
// 默认情况下不进行注册。
#include "stdafx.h"
#include "resource.h"
#include "HWCVDLL2_i.h"
#include "dllmain.h"
#include "compreg.h"
using namespace ATL;
// 用于确定 DLL 是否可由 OLE 卸载。
STDAPI DllCanUnloadNow(void)
{
return _AtlModule.DllCanUnloadNow();
}
// 返回一个类工厂以创建所请求类型的对象。
STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID* ppv)
{
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}
// DllRegisterServer - 在系统注册表中添加项。
STDAPI DllRegisterServer(void)
{
// 注册对象、类型库和类型库中的所有接口
HRESULT hr = _AtlModule.DllRegisterServer();
return hr;
}
// DllUnregisterServer - 在系统注册表中移除项。
STDAPI DllUnregisterServer(void)
{
HRESULT hr = _AtlModule.DllUnregisterServer();
return hr;
}
// DllInstall - 按用户和计算机在系统注册表中逐一添加/移除项。
STDAPI DllInstall(BOOL bInstall, _In_opt_ LPCWSTR pszCmdLine)
{
HRESULT hr = E_FAIL;
static const wchar_t szUserSwitch[] = L"user";
if (pszCmdLine != NULL)
{
if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
{
ATL::AtlSetPerUserRegistration(true);
}
}
if (bInstall)
{
hr = DllRegisterServer();
if (FAILED(hr))
{
DllUnregisterServer();
}
}
else
{
hr = DllUnregisterServer();
}
return hr;
}

View File

@@ -0,0 +1,10 @@
; HWCVDLL2.def :
LIBRARY
EXPORTS
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
DllInstall PRIVATE

View File

@@ -0,0 +1,59 @@
// HWCVDLL2.idl : HWCVDLL2 的 IDL 源
//
// 此文件将由 MIDL 工具处理以
// 产生类型库(HWCVDLL2.tlb)和封送处理代码。
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(a817e7a2-43fa-11d0-9e44-00aa00b6770a),
dual,
pointer_default(unique)
]
interface _cHWCV : IDispatch
{
[id(1)] HRESULT Attach([in] BSTR bstrPath);
[id(2)] HRESULT RegisterAll();
[id(3)] HRESULT UnregisterAll();
[id(4)] HRESULT GetComponents([out] SAFEARRAY(BSTR)* pbstrCLSIDs, [out] SAFEARRAY(BSTR)* pbstrDescriptions);
[id(5)] HRESULT RegisterComponent([in] BSTR bstrCLSID);
[id(6)] HRESULT UnregisterComponent([in] BSTR bstrCLSID);
};
[
object,
uuid(E49365D0-22E5-4606-84FB-21337B4B13E6),
dual,
nonextensible,
pointer_default(unique)
]
interface IcHWCV : IDispatch{
[id(1)] HRESULT aspHWCV([in] BSTR filepath, [out, retval] BSTR* _arg2);
};
[
uuid(FC552832-4C05-43B6-9204-23C7BC570893),
version(1.0),
custom(a817e7a1-43fa-11d0-9e44-00aa00b6770a,"{CA35E0FE-B922-44CF-9AE1-49EDE515632F}")
]
library HWCVDLL2Lib
{
importlib("stdole2.tlb");
[
uuid(CA35E0FE-B922-44CF-9AE1-49EDE515632F)
]
coclass CompReg
{
[default] interface _cHWCV;
};
[
uuid(B4CF6355-DBD1-47CF-A296-2358D551C690)
]
coclass cHWCV
{
[default] interface IcHWCV;
};
};

View File

@@ -0,0 +1,15 @@
HKCR
{
NoRemove CLSID
{
ForceRemove {CA35E0FE-B922-44CF-9AE1-49EDE515632F} = s 'CompReg Class'
{
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
TypeLib = s '{FC552832-4C05-43B6-9204-23C7BC570893}'
Version = s '1.0'
}
}
}

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{358E1500-F6FA-41B9-B9DE-FF079F97A261}</ProjectGuid>
<Keyword>AtlProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<HeaderFileName>HWCVDLL2_i.h</HeaderFileName>
<InterfaceIdentifierFileName>HWCVDLL2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>HWCVDLL2_p.c</ProxyFileName>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)HWCVDLL2.tlb</TypeLibraryName>
<DllDataFileName />
<ValidateAllParameters>true</ValidateAllParameters>
</Midl>
<ResourceCompile>
<Culture>0x0804</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>.\HWCVDLL2.def</ModuleDefinitionFile>
<AdditionalDependencies>comsvcs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RegisterOutput>true</RegisterOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<HeaderFileName>HWCVDLL2_i.h</HeaderFileName>
<InterfaceIdentifierFileName>HWCVDLL2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>HWCVDLL2_p.c</ProxyFileName>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)HWCVDLL2.tlb</TypeLibraryName>
<DllDataFileName />
<ValidateAllParameters>true</ValidateAllParameters>
</Midl>
<ResourceCompile>
<Culture>0x0804</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>.\HWCVDLL2.def</ModuleDefinitionFile>
<AdditionalDependencies>comsvcs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<RegisterOutput>true</RegisterOutput>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="cHWCV.cpp" />
<ClCompile Include="compreg.cpp" />
<ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="HWCVDLL2.cpp" />
<ClCompile Include="HWCVDLL2_i.c">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="cHWCV.h" />
<ClInclude Include="compreg.h" />
<ClInclude Include="dllmain.h" />
<ClInclude Include="HWCVDLL2_i.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="HWCVDLL2.rc" />
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<None Include="cHWCV.rgs" />
<None Include="HWCVDLL2.def" />
<None Include="HWCVDLL2.rgs" />
</ItemGroup>
<ItemGroup>
<Midl Include="HWCVDLL2.idl" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="生成的文件">
<UniqueIdentifier>{dfd5d488-af86-48ac-9755-2a693c7e67f7}</UniqueIdentifier>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="HWCVDLL2.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="compreg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="HWCVDLL2_i.c">
<Filter>生成的文件</Filter>
</ClCompile>
<ClCompile Include="cHWCV.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Resource.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="dllmain.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="compreg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="HWCVDLL2_i.h">
<Filter>生成的文件</Filter>
</ClInclude>
<ClInclude Include="cHWCV.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="HWCVDLL2.rc">
<Filter>资源文件</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<None Include="HWCVDLL2.rgs">
<Filter>资源文件</Filter>
</None>
<None Include="HWCVDLL2.def">
<Filter>源文件</Filter>
</None>
<None Include="cHWCV.rgs">
<Filter>资源文件</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Midl Include="HWCVDLL2.idl">
<Filter>源文件</Filter>
</Midl>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F10C4A05-1935-4FB8-9400-187176FCA7A6}</ProjectGuid>
<Keyword>AtlPSProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IntDir>$(Configuration)PS\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>$(Configuration)PS\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;REGISTER_PROXY_DLL;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;rpcns4.lib;rpcrt4.lib;oleaut32.lib;uuid.lib;ole32.lib;advapi32.lib;comsvcs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>HWCVDLL2PS.def</ModuleDefinitionFile>
<RegisterOutput>true</RegisterOutput>
</Link>
<PreBuildEvent>
<Command>if exist dlldata.c goto :END
Echo 错误: MIDL 将不会生成 DLLDATA.C除非在主项目中至少有 1 个接口。
Exit 1
:END
</Command>
<Message>检查是否有所需的文件</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;REGISTER_PROXY_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;rpcns4.lib;rpcrt4.lib;oleaut32.lib;uuid.lib;ole32.lib;advapi32.lib;comsvcs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>HWCVDLL2PS.def</ModuleDefinitionFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<RegisterOutput>true</RegisterOutput>
</Link>
<PreBuildEvent>
<Command>if exist dlldata.c goto :END
Echo 错误: MIDL 将不会生成 DLLDATA.C除非在主项目中至少有 1 个接口。
Exit 1
:END
</Command>
<Message>检查是否有所需的文件</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="HWCVDLL2ps.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dlldata.c" />
<ClCompile Include="HWCVDLL2_i.c" />
<ClCompile Include="HWCVDLL2_p.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{63d4a2eb-8f6b-4201-aa10-4c4f61883cb8}</UniqueIdentifier>
</Filter>
<Filter Include="生成的文件">
<UniqueIdentifier>{56b6970f-a8df-4e7d-ab83-074695ef9f2a}</UniqueIdentifier>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="HWCVDLL2ps.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="HWCVDLL2_i.c">
<Filter>生成的文件</Filter>
</ClCompile>
<ClCompile Include="HWCVDLL2_p.c">
<Filter>生成的文件</Filter>
</ClCompile>
<ClCompile Include="dlldata.c">
<Filter>生成的文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,452 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.00.0603 */
/* at Thu Feb 23 10:08:59 2017
*/
/* Compiler settings for HWCVDLL2.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __HWCVDLL2_i_h__
#define __HWCVDLL2_i_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef ___cHWCV_FWD_DEFINED__
#define ___cHWCV_FWD_DEFINED__
typedef interface _cHWCV _cHWCV;
#endif /* ___cHWCV_FWD_DEFINED__ */
#ifndef __IcHWCV_FWD_DEFINED__
#define __IcHWCV_FWD_DEFINED__
typedef interface IcHWCV IcHWCV;
#endif /* __IcHWCV_FWD_DEFINED__ */
#ifndef __CompReg_FWD_DEFINED__
#define __CompReg_FWD_DEFINED__
#ifdef __cplusplus
typedef class CompReg CompReg;
#else
typedef struct CompReg CompReg;
#endif /* __cplusplus */
#endif /* __CompReg_FWD_DEFINED__ */
#ifndef __cHWCV_FWD_DEFINED__
#define __cHWCV_FWD_DEFINED__
#ifdef __cplusplus
typedef class cHWCV cHWCV;
#else
typedef struct cHWCV cHWCV;
#endif /* __cplusplus */
#endif /* __cHWCV_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef ___cHWCV_INTERFACE_DEFINED__
#define ___cHWCV_INTERFACE_DEFINED__
/* interface _cHWCV */
/* [unique][dual][uuid][object] */
EXTERN_C const IID IID__cHWCV;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a817e7a2-43fa-11d0-9e44-00aa00b6770a")
_cHWCV : public IDispatch
{
public:
virtual /* [id] */ HRESULT STDMETHODCALLTYPE Attach(
/* [in] */ BSTR bstrPath) = 0;
virtual /* [id] */ HRESULT STDMETHODCALLTYPE RegisterAll( void) = 0;
virtual /* [id] */ HRESULT STDMETHODCALLTYPE UnregisterAll( void) = 0;
virtual /* [id] */ HRESULT STDMETHODCALLTYPE GetComponents(
/* [out] */ SAFEARRAY * *pbstrCLSIDs,
/* [out] */ SAFEARRAY * *pbstrDescriptions) = 0;
virtual /* [id] */ HRESULT STDMETHODCALLTYPE RegisterComponent(
/* [in] */ BSTR bstrCLSID) = 0;
virtual /* [id] */ HRESULT STDMETHODCALLTYPE UnregisterComponent(
/* [in] */ BSTR bstrCLSID) = 0;
};
#else /* C style interface */
typedef struct _cHWCVVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
_cHWCV * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
_cHWCV * This);
ULONG ( STDMETHODCALLTYPE *Release )(
_cHWCV * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
_cHWCV * This,
/* [out] */ UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
_cHWCV * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
_cHWCV * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR *rgszNames,
/* [range][in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
_cHWCV * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *Attach )(
_cHWCV * This,
/* [in] */ BSTR bstrPath);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *RegisterAll )(
_cHWCV * This);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterAll )(
_cHWCV * This);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *GetComponents )(
_cHWCV * This,
/* [out] */ SAFEARRAY * *pbstrCLSIDs,
/* [out] */ SAFEARRAY * *pbstrDescriptions);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *RegisterComponent )(
_cHWCV * This,
/* [in] */ BSTR bstrCLSID);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterComponent )(
_cHWCV * This,
/* [in] */ BSTR bstrCLSID);
END_INTERFACE
} _cHWCVVtbl;
interface _cHWCV
{
CONST_VTBL struct _cHWCVVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define _cHWCV_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define _cHWCV_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define _cHWCV_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define _cHWCV_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define _cHWCV_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define _cHWCV_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define _cHWCV_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define _cHWCV_Attach(This,bstrPath) \
( (This)->lpVtbl -> Attach(This,bstrPath) )
#define _cHWCV_RegisterAll(This) \
( (This)->lpVtbl -> RegisterAll(This) )
#define _cHWCV_UnregisterAll(This) \
( (This)->lpVtbl -> UnregisterAll(This) )
#define _cHWCV_GetComponents(This,pbstrCLSIDs,pbstrDescriptions) \
( (This)->lpVtbl -> GetComponents(This,pbstrCLSIDs,pbstrDescriptions) )
#define _cHWCV_RegisterComponent(This,bstrCLSID) \
( (This)->lpVtbl -> RegisterComponent(This,bstrCLSID) )
#define _cHWCV_UnregisterComponent(This,bstrCLSID) \
( (This)->lpVtbl -> UnregisterComponent(This,bstrCLSID) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* ___cHWCV_INTERFACE_DEFINED__ */
#ifndef __IcHWCV_INTERFACE_DEFINED__
#define __IcHWCV_INTERFACE_DEFINED__
/* interface IcHWCV */
/* [unique][nonextensible][dual][uuid][object] */
EXTERN_C const IID IID_IcHWCV;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("E49365D0-22E5-4606-84FB-21337B4B13E6")
IcHWCV : public IDispatch
{
public:
virtual /* [id] */ HRESULT STDMETHODCALLTYPE aspHWCV(
/* [in] */ BSTR filepath,
/* [retval][out] */ BSTR *_arg2) = 0;
};
#else /* C style interface */
typedef struct IcHWCVVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IcHWCV * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IcHWCV * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IcHWCV * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
IcHWCV * This,
/* [out] */ UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
IcHWCV * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
IcHWCV * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR *rgszNames,
/* [range][in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
IcHWCV * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
/* [id] */ HRESULT ( STDMETHODCALLTYPE *aspHWCV )(
IcHWCV * This,
/* [in] */ BSTR filepath,
/* [retval][out] */ BSTR *_arg2);
END_INTERFACE
} IcHWCVVtbl;
interface IcHWCV
{
CONST_VTBL struct IcHWCVVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IcHWCV_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IcHWCV_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IcHWCV_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IcHWCV_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define IcHWCV_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define IcHWCV_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define IcHWCV_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define IcHWCV_aspHWCV(This,filepath,_arg2) \
( (This)->lpVtbl -> aspHWCV(This,filepath,_arg2) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IcHWCV_INTERFACE_DEFINED__ */
#ifndef __HWCVDLL2Lib_LIBRARY_DEFINED__
#define __HWCVDLL2Lib_LIBRARY_DEFINED__
/* library HWCVDLL2Lib */
/* [custom][version][uuid] */
EXTERN_C const IID LIBID_HWCVDLL2Lib;
EXTERN_C const CLSID CLSID_CompReg;
#ifdef __cplusplus
class DECLSPEC_UUID("CA35E0FE-B922-44CF-9AE1-49EDE515632F")
CompReg;
#endif
EXTERN_C const CLSID CLSID_cHWCV;
#ifdef __cplusplus
class DECLSPEC_UUID("B4CF6355-DBD1-47CF-A296-2358D551C690")
cHWCV;
#endif
#endif /* __HWCVDLL2Lib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * );
unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * );
unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * );
unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );
void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,8 @@
LIBRARY
EXPORTS
DllGetClassObject PRIVATE
DllCanUnloadNow PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE

View File

@@ -0,0 +1,68 @@
========================================================================
活动模板库HWCVDLL2 项目概述
========================================================================
应用程序向导已为您创建了此 HWCVDLL2 项目,作为编写动态链接库 (DLL) 的起点。
本文件概要介绍组成项目的每个文件的内容。
HWCVDLL2.vcxproj
这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。
HWCVDLL2.vcxproj.filters
这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。
HWCVDLL2.idl
此文件包含项目中定义的类型库、接口和组件类的 IDL 定义。
此文件将由 MIDL 编译器处理,用于生成:
C++ 接口定义和 GUID 声明 (HWCVDLL2.h)
GUID 定义 (HWCVDLL2_i.c)
类型库 (HWCVDLL2.tlb)
封送处理代码 HWCVDLL2_p.c 和 dlldata.c
HWCVDLL2.h
此文件包含 HWCVDLL2.idl 中定义的项目的 C++ 接口定义和 GUID 声明。它将在编译过程中由 MIDL 重新生成。
HWCVDLL2.cpp
此文件包含对象映射和 DLL 导出的实现。
HWCVDLL2.rc
这是程序使用的所有 Microsoft Windows 资源的列表。
HWCVDLL2.def
此模块定义文件为链接器提供有关 DLL 所要求的导出的信息,它包含用于以下内容的导出:
DllGetClassObject
DllCanUnloadNow
DllRegisterServer
DllUnregisterServer
DllInstall
/////////////////////////////////////////////////////////////////////////////
其他标准文件:
StdAfx.h, StdAfx.cpp
这些文件用于生成名为 HWCVDLL2.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。
Resource.h
这是用于定义资源 ID 的标准头文件。
/////////////////////////////////////////////////////////////////////////////
代理/存根 (stub) DLL 项目和模块定义文件:
HWCVDLL2ps.vcxproj
此文件是用于生成代理/存根 (stub) DLL 的项目文件(若有必要)。
主项目中的 IDL 文件必须至少包含一个接口,并且在生成代理/存根 (stub) DLL 之前必须先编译 IDL 文件。
此过程生成 dlldata.c、HWCVDLL2_i.c 和 HWCVDLL2_p.c这些是生成代理/存根 (stub) DLL 所必需的。
HWCVDLL2ps.vcxproj.filters
此文件是代理/存根项目的筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。
HWCVDLL2ps.def
此模块定义文件为链接器提供有关代理/存根 (stub) 所要求的导出的信息。
/////////////////////////////////////////////////////////////////////////////
其他注释:
“COM+ 1.0 支持”选项可用于将 COM+ 1.0 库构建到您的主干应用程序中,从而让您能够使用 COM+ 1.0 类、对象和函数。
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,29 @@
// cHWCV.cpp : CcHWCV 的实现
#include "stdafx.h"
#include "cHWCV.h"
// CcHWCV
STDMETHODIMP CcHWCV::aspHWCV(BSTR filepath, BSTR* _arg2)
{
// TODO: 在此添加实现代码
//调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试
char *fo = "H:\\HWCVDLL2.txt";
char rec[200] = "可以调用com端口!\n";
//char* filepath_c = (_bstr_t)filepath;
strcat(rec, (char*)filepath);
strcat(rec, "\n");
FILE *fpzz3 = NULL;//需要注意
fpzz3 = fopen(fo, "w"); //创建文件
if (NULL == fpzz3) return NULL;//要返回错误代码
fprintf(fpzz3, rec);
fclose(fpzz3);
fpzz3 = NULL;//需要指向空,否则会指向原打开文件地址
//调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息调试信息
*_arg2 = L"success";
return S_OK;
}

View File

@@ -0,0 +1,59 @@
// cHWCV.h : CcHWCV 的声明
#pragma once
#include "resource.h" // 主符号
#include "HWCVDLL2_i.h"
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
#error "Windows CE 平台(如不提供完全 DCOM 支持的 Windows Mobile 平台)上无法正确支持单线程 COM 对象。定义 _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA 可强制 ATL 支持创建单线程 COM 对象实现并允许使用其单线程 COM 对象实现。rgs 文件中的线程模型已被设置为“Free”原因是该模型是非 DCOM Windows CE 平台支持的唯一线程模型。"
#endif
using namespace ATL;
// CcHWCV
class ATL_NO_VTABLE CcHWCV :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CcHWCV, &CLSID_cHWCV>,
public IDispatchImpl<IcHWCV, &IID_IcHWCV, &LIBID_HWCVDLL2Lib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
CcHWCV()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_CHWCV)
BEGIN_COM_MAP(CcHWCV)
COM_INTERFACE_ENTRY(IcHWCV)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
STDMETHOD(aspHWCV)(BSTR filepath, BSTR* _arg2);
};
OBJECT_ENTRY_AUTO(__uuidof(cHWCV), CcHWCV)

View File

@@ -0,0 +1,26 @@
HKCR
{
HWCVDLL2.aspHWCV.1 = s 'cHWCV Class'
{
CLSID = s '{B4CF6355-DBD1-47CF-A296-2358D551C690}'
}
HWCVDLL2.aspHWCV = s 'cHWCV Class'
{
CurVer = s 'HWCVDLL2.aspHWCV.1'
}
NoRemove CLSID
{
ForceRemove {B4CF6355-DBD1-47CF-A296-2358D551C690} = s 'cHWCV Class'
{
ProgID = s 'HWCVDLL2.aspHWCV.1'
VersionIndependentProgID = s 'HWCVDLL2.aspHWCV'
ForceRemove Programmable
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
TypeLib = s '{FC552832-4C05-43B6-9204-23C7BC570893}'
Version = s '1.0'
}
}
}

View File

@@ -0,0 +1,7 @@
// compreg.cpp : CCompReg 的实现
#include "stdafx.h"
#include "compreg.h"
// CCompReg

View File

@@ -0,0 +1,7 @@
// compreg.h : CCompReg 的声明
#pragma once
#include "resource.h" // 主符号
#include "HWCVDLL2_i.h"

View File

@@ -0,0 +1,38 @@
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( HWCVDLL2 )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( HWCVDLL2 ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */

View File

@@ -0,0 +1,16 @@
// dllmain.cpp : DllMain 的实现。
#include "stdafx.h"
#include "resource.h"
#include "HWCVDLL2_i.h"
#include "dllmain.h"
#include "compreg.h"
CHWCVDLL2Module _AtlModule;
// DLL 入口点
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
hInstance;
return _AtlModule.DllMain(dwReason, lpReserved);
}

View File

@@ -0,0 +1,10 @@
// dllmain.h : 模块类的声明。
class CHWCVDLL2Module : public ATL::CAtlDllModuleT< CHWCVDLL2Module >
{
public :
DECLARE_LIBID(LIBID_HWCVDLL2Lib)
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_HWCVDLL2, "{4D061C50-9AC8-40B3-97CA-D1EF3B306D8B}")
};
extern class CHWCVDLL2Module _AtlModule;

View File

@@ -0,0 +1,5 @@
// stdafx.cpp : 只包括标准包含文件的源文件
// HWCVDLL2.pch 将作为预编译头
// stdafx.obj 将包含预编译类型信息
#include "stdafx.h"

View File

@@ -0,0 +1,27 @@
// stdafx.h : 标准系统包含文件的包含文件,
// 或是经常使用但不常更改的
// 特定于项目的包含文件
#pragma once
#ifndef STRICT
#define STRICT
#endif
#include "targetver.h"
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
#include <comsvcs.h>
#define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW
#include "resource.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>

View File

@@ -0,0 +1,8 @@
#pragma once
// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h并将
// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
#include <SDKDDKVer.h>