通用dll是否有一些变化?他们还可以使用.def文件吗? [英] Is there some changes to universal dll's? Can they still use .def files?

查看:58
本文介绍了通用dll是否有一些变化?他们还可以使用.def文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

testdll.h

testdll.h

#include< DirectXMath.h>

//#包括< D3D12.h>

#ifdef TESTDLL_EXPORTS

#define TESTDLL_API __declspec(dllexport) 

#else

#define TESTDLL_API __declspec(dllimport) 

#endif

//这被认为是不好的做法考虑删除。

using namespace DirectX;



TESTDLL_API bool TestXMVerifyCPUSupport();



TESTDLL_API bool TestIsProcessorFeaturePresent();

#include <DirectXMath.h>
//#include <D3D12.h>
#ifdef TESTDLL_EXPORTS
#define TESTDLL_API __declspec(dllexport) 
#else
#define TESTDLL_API __declspec(dllimport) 
#endif
//this is considered poor practice consider removing.
using namespace DirectX;

TESTDLL_API bool TestXMVerifyCPUSupport();

TESTDLL_API bool TestIsProcessorFeaturePresent();

testdll.cpp

testdll.cpp

#include< DirectXMath.h>

// #include< D3D12.h>

#ifdef TESTDLL_EXPORTS

#define TESTDLL_API __declspec(dllexport) 

#else

#define TESTDLL_API __declspec(dllimport) 

#endif



TESTDLL_API bool TestXMVerifyCPUSupport();



TESTDL L_API bool TestIsProcessorFeaturePresent();

#include <DirectXMath.h>
//#include <D3D12.h>
#ifdef TESTDLL_EXPORTS
#define TESTDLL_API __declspec(dllexport) 
#else
#define TESTDLL_API __declspec(dllimport) 
#endif

TESTDLL_API bool TestXMVerifyCPUSupport();

TESTDLL_API bool TestIsProcessorFeaturePresent();

testdll.def

testdll.def

LIBRARY testdll

  EXPORTS 

  TestXMVerifyCPUSupport @ 1

  TestIsProcessorFeaturePresent @ 2

  TestCheckFeatureSupport @ 3 

LIBRARY testdll
 EXPORTS 
 TestXMVerifyCPUSupport @1
 TestIsProcessorFeaturePresent @2
 TestCheckFeatureSupport @3 

这是包装器directx12 dll i的源代码的开始正在写作。在visual studio 2013上,如果我为典型的windows dll构建它,它可以工作,我能够分别使用LoadLibrary()和GetProcAddress()显式加载导出的函数。
至少我现在更喜欢直到我测试性能。

This was the start of the source code for wrapper directx12 dll i was writing. On visual studio 2013 if I built it for typical windows dll it worked and I was able to explicitly load the exported functions with LoadLibrary() and GetProcAddress() respectively. Which I prefer at least right now until I test performance.

问题似乎是当我尝试在Universal dll的环境中执行此操作时。由于.def文件,我收到链接错误。现在使用.def和dll是否已弃用?

The problem seems to be when I try and do this in the context of a Universal dll. I get link errors because of the .def file. Is it deprecated to use .def with dll now or something?

推荐答案

Hi marshal craft,

Hi marshal craft,

感谢您在MSDN论坛上发帖。

Thanks for posting in MSDN forum.

此问题与UWP开发有关这个DLL在本机项目中加载得很好。所以我将把它转移到UWP开发论坛以获得更好的支持。谢谢你的理解。

This issue is related to UWP development since this dll is loaded well in a native project. So I will move this to a UWP development forum for better support. Thanks for you understanding.

祝你好运,


这篇关于通用dll是否有一些变化?他们还可以使用.def文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆