Questions tagged [declspec]
67 questions
0
votes
0 answers
Windows DLLs, exporting, templates, and linker issues
I have an issue. I have a class structure that looks somewhat like this:
// Common.hpp
template
class CommonInternalRegistrar
{
CommonInternalRegistrar ( Type* pointerToRegister ) ;
} ;
template
class…

iAdjunct
- 2,739
- 1
- 18
- 27
0
votes
0 answers
Linking against DLL with no __imp__ exports
I'm trying to link my project with a DLL (let's call it A.DLL) and I'm getting the unresolved external symbol __imp__?func@@YA_JXZ. I "dumpbin /exports"ed the DLL and the lib and I saw only ?func@@YAJXZ.
So I would be very grateful if some1 could…

Anorflame
- 376
- 3
- 12
0
votes
0 answers
c++ how to use __declspec property get & set with a fixed sized array
I am dealing with a struct mf fixed arrays of char, but the size and placement of some of these members depend on other members. so I want to use __declspec(property) to dynamically retrieve these 'variable' members
so Ideally it would look…

dmjalund
- 285
- 2
- 9
0
votes
1 answer
Having trouble importing function from C++ dll error LNK 2019
I am trying to write and test a dll file in C++ that I can call whenever I want filesystem level access to things. I am currently having a huge headache when trying to access the methods in this dll in C++. Strangely enough, I was able to call the…

Drigax
- 3
- 1
0
votes
1 answer
Symbol not exported in DLL
I'm generating a DLL within VS2010 in two steps:
First a static .LIB file is generated where a function is defined as __declspec(dllexport). Second a DLL is generated that links against that .LIB file. This resulting DLL does not contain the…

Elmi
- 5,899
- 15
- 72
- 143
0
votes
2 answers
__declspec(dllimport) causes compiler crash on MSVC 2010
In a *.cpp file, trying to use a third party lib:
#define DLL_IMPORT
#include
// Third party header has code like:
// #ifdef DLL_IMPORT
// #define DLL_DECL __declspec(dllimport)
// fatal error C1001: An internal error has…

Zero
- 11,593
- 9
- 52
- 70
0
votes
1 answer
GUID explanation - C++
I use a sample from windows to learn DirectShow, and in a class I have this code in the header file:
struct __declspec(uuid("{71771540-2017-11cf-ae26-0020afd79767}")) CLSID_TextureRenderer;
And this line in the cpp…

anbuf
- 91
- 2
- 8