I use __declspec(dllexport) with several methods in a library. But one of the symbols do not get exported properly. The value in question is called "restart". I've given the output from dumpbin.exe, below:
1 0 0002DB27 ev_err = @ILT+2850(_ev_err)
2 1 0002DADC m_foutput = @ILT+2775(_m_foutput)
3 2 0002D361 m_...
I have a DLL which contains a class with static members. I use __declspec(dllexport) in order to make use of this class's methods. But when I link it to another project and try to compile it, I get "unresolved external symbol" errors for the static data.
e.g.
In DLL, Test.h
class __declspec(dllexport) Test{
protected:
static int d;...
I have two WIN32 DLL projects in the solution, main.dll should call a function in mgn.dll.
mgn.dll has mgn.h header file:
#ifdef MGN_EXPORTS
#define MGN_API __declspec(dllexport)
#else
#define MGN_API __declspec(dllimport)
#endif
extern "C" bool MGN_API AttachMGN(void);
and mgn.cpp source file:
#include "stdafx.h"
#include "mgn.h"
...
I have a native (unmanaged) C++ application (using wxWidgets for what it's worth). I'm considering a separate tool application to be written in C# which would contain winform-based dialogs. putting some of those dialogs in a separate DLL would be useful as I'd hope to be able to use them from my C++ app.
But I have no idea how much mess...
I want to use some Matlab functions via .dlls and use them in C#, please let me know how to do that.
...
I have a rather big Core project that I'm working with, I'm attempting to adapt it to use a DLL Engine I've built, I'm getting a bunch of errors like:
unresolved external symbol "private: static class
When including some of the headers from the Core in the DLL, the class is exported via __declspec(dllexport) but any header with static ...
I've got two unmanaged C++ functions, Compress and Decompress. The arguments and returns go as followed:
unsigned char* Compress (unsigned char*,int)
unsigned char* Decompress (unsigned char*,int)
Where all uchars are arrays of uchars.
Could someone please help me lay out a way to convert these into managed C# code using the Byte[] a...
Hello,
I need to extract the types from PE files.
e.g if whole class exported , I should have all exported methods(whole signature including return type) and their types(i.e class as Type) OR IF whole class not exported but just functions exported, I should be able to get class as Type of those methods and all exported methods of that c...
Hi all -
I have the following static function:
static inline HandVal
StdDeck_StdRules_EVAL_N( StdDeck_CardMask cards, int n_cards )
Can I export this function in a DLL? If so, how?
Thanks,
Mike
Background information:
I'm doing this because the original source code came with a VS project designed to compile as a sta...
#include "Calc.h"
#include<iostream>
#include <windows.h>
#include <WINERROR.H.>
typedef void (WINAPI * PCTOR) ();
int main()
{
HMODULE hMod = LoadLibrary (L"Calci.dll");
if (NULL == hMod)
{
printf ("LoadLibrary failed\n");
return 1;
}
CCalc *pCCalc = (CCalc *) malloc (sizeof (CCalc));
if (NULL ==...
Hi, I have an excel file with mannually input functions, which use an add-in from a third party. I want to use functionalities of the excel file in Java. I could think of two ways of doing it.
code the functions in VBA, or VB with excel reference, then generate .dll or .exe files for Java to use.
Feed data to excel file using jxl (wou...
Hi,
I came across this article on Code Project that talks about using an abstract interface as an alternative to exporting an entire class from a C++ DLL to avoid name mangling issues. The author has a Release() method in his interface definition that is supposed to be called by the user to free the class object's resources after using i...
If you inspect a dll using depends.exe (Dependency Walker) it shows you the functions that the dll exports. In Windows 98, when I look at user32.dll, it lists both MessageBoxA and MessageBoxW. Similarly, kernel32.dll lists both GetModuleFileNameA and GetModuleFileNameW.
MSDN descriptions for these two functions state that MessageBox is ...
How do you export a GIT file map so you just keep the local files without GIT files?
The tortoiseGIT export keeps some GIT files hanging around (and only does a zip export), and the 'delete (keep local)' option isn't helping either it seems.
...
Hello all,
I want to have multiple instances of a DLLInterface class but as each object will have pointers to the same DLL functions I want these to be static.
The below code doesn't compile. (I do have a reason for needing multiple instances containing the same pointers which the stripped down code below doesn't illustrate.)
//Heade...
Hello experts,
We are using an external Dlls as :
[DllImport("DemoExport.dll")]
public static extern string GetDBConnection(string sDBName);
[DllImport("DemoExport.dll")]
public static extern int CreateEmptyDBFromDB(string SourceDBName, string DestinationDBName);
[DllImport("DemoExport.dll")]
Now, we want to add new m...
dll export header
extern "C"
void _declspec(dllexport) __stdcall foo();
.def file
EXPORTS
foo @1
When I build the dll by 64bit build config, I meet this warning.
warning LNK4197: export 'foo' specified multiple times; using first specification
But If I build the dll by 32bit build config, the warning never occurs.
Wha...
What is my main concern is , I am able to write a C++ dll using VC++ . Now the dll is present in the Debug folder.
How can I use my DLL in other C++ Console Application. How to add reference or link the DLL to the application.
Another point, While creating a DLL , The VC++ wizard gives me thre option:
An Empty DLL project
A Simple DL...
I create a simple dll project with visual studio 2010 wizard, haven't filled any code.
When I build it on Win32 platform, everything works fine. The problem is when I switch to x64 platform, there is Link error.
2>LINK : fatal error LNK1561: entry point must be defined
The export marco has been define in the stdafx.h like:
#define A...
Hello,
We have a DLL, built with MS Visual Studio 2010, in release mode. We provide this DLL to different customers, along with a .lib file. The functions in the DLL are exported with:
extern "C" __declspec(dllexport) int analyze(int id);
Our customers have two applications that makes use of this DLL. Both of these applications im...