• 大小: 17.45MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-18
  • 语言: C/C++
  • 标签: c++  dll  消息回调  

资源简介

c++程序调用dll函数进行数据处理,并将dll处理后消息返回给c++程序

资源截图

代码片段和文件信息

// DllAutoSend.cpp : 定义 DLL 应用程序的入口点。
//

#include “stdafx.h“
#include “DllAutoSend.h“


#ifdef _MANAGED
#pragma managed(push off)
#endif

BOOL APIENTRY DllMain( HMODULE hModule
                       DWORD  ul_reason_for_call
                       LPVOID lpReserved
 )
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
    return TRUE;
}

#ifdef _MANAGED
#pragma managed(pop)
#endif

// 这是导出变量的一个示例
DLLAUTOSEND_API int nDllAutoSend=0;

// 这是导出函数的一个示例。
DLLAUTOSEND_API int fnDllAutoSend(void)
{
return 42;
}

// 这是已导出类的构造函数。
// 有关类定义的信息,请参阅 DllAutoSend.h
EXECUTECALLBACK CDllAutoSend::AutoSendMessage = NULL;
CDllAutoSend::CDllAutoSend()
{
}

void CDllAutoSend::SetCallBack(EXECUTECALLBACK cmd)
{
CDllAutoSend::AutoSendMessage =cmd;
}

void CDllAutoSend::SendDLLMessage(void)
{
if(AutoSendMessage)
AutoSendMessage(“DLL Auto Send Message OK“);
}

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

     文件       1798  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\cl.command.1.tlog

     文件       7722  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\CL.read.1.tlog

     文件       1044  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\CL.write.1.tlog

     文件         71  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\DllAutoSend.lastbuildstate

     文件       2055  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\DllAutoSend.log

     文件       7042  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\DllAutoSend.obj

     文件    3932160  2014-01-09 16:40  CALLBACK\DllAutoSend\DllAutoSend\Debug\DllAutoSend.pch

     文件        692  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\DllAutoSend.write.1.tlog

     文件       1376  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\link.command.1.tlog

     文件       3090  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\link.read.1.tlog

     文件        710  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\link.write.1.tlog

     文件     114903  2014-01-09 16:40  CALLBACK\DllAutoSend\DllAutoSend\Debug\stdafx.obj

     文件     240640  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\vc100.idb

     文件     380928  2014-01-09 16:45  CALLBACK\DllAutoSend\DllAutoSend\Debug\vc100.pdb

     文件       1070  2014-01-09 18:49  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.cpp

     文件        872  2007-09-30 09:57  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.h

     文件       4620  2007-09-30 09:54  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.vcproj

     文件       1379  2007-09-30 11:12  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.vcproj.JS32.Administrator.user

     文件       5711  2014-01-09 16:40  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.vcxproj

     文件       1304  2014-01-09 16:40  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.vcxproj.filters

     文件        143  2014-01-09 16:40  CALLBACK\DllAutoSend\DllAutoSend\DllAutoSend.vcxproj.user

     文件        962  2007-09-30 09:54  CALLBACK\DllAutoSend\DllAutoSend\ReadMe.txt

     文件        216  2007-09-30 09:54  CALLBACK\DllAutoSend\DllAutoSend\stdafx.cpp

     文件       1049  2007-09-30 09:54  CALLBACK\DllAutoSend\DllAutoSend\stdafx.h

     文件   56053760  2014-01-10 16:29  CALLBACK\DllAutoSend\DllAutoSend.sdf

     文件       1736  2014-01-09 16:41  CALLBACK\DllAutoSend\DllAutoSend.sln

     文件        898  2007-09-30 09:54  CALLBACK\DllAutoSend\DllAutoSend.sln.old

    ..A..H.     14848  2014-01-10 16:29  CALLBACK\DllAutoSend\DllAutoSend.suo

    ..A..H.      9728  2007-09-30 11:12  CALLBACK\DllAutoSend\DllAutoSend.suo.old

     文件       3150  2014-01-09 16:40  CALLBACK\DllAutoSend\UpgradeLog.xml

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

评论

共有 条评论