• 大小: 6.18M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-29
  • 语言: C/C++
  • 标签: 实例  C#  c++  c  源码  

资源简介


资源截图

代码片段和文件信息

// CalcCom.cpp : Defines the entry point for the DLL application.
//

#include “stdafx.h“
//声明为C编译连接方式的外部函数
extern “C“_declspec(dllexport)BOOL Add(char* achar* blong* c);
extern “C“_declspec(dllexport)void Join(char* achar* bchar* c);
BOOL APIENTRY DllMain( HANDLE hModule 
                       DWORD  ul_reason_for_call 
                       LPVOID lpReserved
 )
{
    return TRUE;
}


BOOL Add (char* achar* blong* c)
{
CoInitialize(NULL);
CalcClass::ICalcPtr CalcPtr(__uuidof(Calc));//获取Calc所关联的GUID
VARIANT_BOOL ret = CalcPtr->Add(_bstr_t(a)_bstr_t(b)c);
CalcPtr->Release();
CoUninitialize();   
if( ret == -1 )
return 1;
else
return ret;
}



void Join (char* achar* bchar* c){
CoInitialize(NULL);
CalcClass::ICalcPtr CalcPtr(__

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        316  2016-12-10 16:29  UnmanagecodeCallManagecode\build.CalcClass.bat

     文件       4608  2016-12-10 16:29  UnmanagecodeCallManagecode\C++\CalcCom\CalcClass.dll

     文件       1984  2016-12-10 16:29  UnmanagecodeCallManagecode\C++\CalcCom\CalcClass.tlb

     文件       1015  2016-12-12 09:01  UnmanagecodeCallManagecode\C++\CalcCom\CalcCom.cpp

     文件       4313  2016-12-09 16:21  UnmanagecodeCallManagecode\C++\CalcCom\CalcCom.dsp

     文件        733  2016-12-09 14:24  UnmanagecodeCallManagecode\C++\CalcCom\CalcCom.dsw

     文件      66560  2016-12-12 09:08  UnmanagecodeCallManagecode\C++\CalcCom\CalcCom.ncb

     文件      53760  2016-12-12 09:08  UnmanagecodeCallManagecode\C++\CalcCom\CalcCom.opt

     文件       1900  2016-12-12 09:01  UnmanagecodeCallManagecode\C++\CalcCom\CalcCom.plg

     文件      35044  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.aps

     文件        952  2016-12-12 09:08  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.clw

     文件       2100  2016-12-09 14:24  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.cpp

     文件       4253  2016-12-09 16:21  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.dsp

     文件       1379  2016-12-09 14:24  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.h

     文件        763  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.plg

     文件       4698  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemo.rc

     文件       4183  2016-12-10 16:00  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemoDlg.cpp

     文件       1398  2016-12-09 14:31  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\CalcComDemoDlg.h

     文件     241747  2016-12-12 09:01  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcCom.dll

     文件    4817920  2016-12-10 16:00  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.bsc

     文件     106595  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.exe

     文件     255460  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.ilk

     文件      13327  2016-12-09 15:35  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.obj

     文件    6939060  2016-12-09 15:35  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.pch

     文件     361472  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.pdb

     文件       2320  2016-12-12 09:03  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.res

     文件          0  2016-12-09 15:35  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemo.sbr

     文件      22818  2016-12-10 16:00  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemoDlg.obj

     文件          0  2016-12-10 16:00  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\CalcComDemoDlg.sbr

     文件     105830  2016-12-09 15:35  UnmanagecodeCallManagecode\C++\CalcCom\CalcComDemo\Debug\StdAfx.obj

............此处省略66个文件信息

评论

共有 条评论