dllexport

error C1854: cannot overwrite information formed during creation of the precompiled header in object file

foo.cpp(33918) : fatal error C1854: cannot overwrite information formed during creation of the precompiled header in object file: 'c:\somepath\foo.obj' Consulting MSDN about this gives me the following information: You specified the /Yu (use precompiled header) option after specifying the /Yc (create precompiled header) option ...

Making headers from DLL exports.

Is there a tool to extract/generate .h headers for DLL exports given only the DLL? Manually typing them is proving a pain in the backside... ...

__declspec(dllimport/dllexport) and inheritance

Given a DLL with the following classes : #define DLLAPI __declspec(...) class DLLAPI Base { public: virtual void B(); }; class Derived : public Base { public: virtual void B(); virtual void D(); }; Will my "Derived" class be visible outside of the dll even if the "DLLAPI" keyword is not applied to the class defin...

How do you write a Module Definition File in Visual C++ ?

Here is the code for my head file... #pragma once #pragma unmanaged __declspec(dllexport) public void CallMe(wchar_t *p); Here is all the code SO FAR for my definition file... LIBRARY "CppWrapper" My "CallMe" function's name compiles to "?CallMe@@YAXPA_W@Z". What do I need to add/write in my .def file to correct the compiled name ...

Delphi 5 calling C++ dll causing Access Violation

Here is the Delphi code calling the C++ dll... implementation {$R *.DFM} procedure CallMe(x: Integer); stdcall; external 'CppWrapper.dll'; procedure TForm1.Button1Click(Sender: TObject); begin CallMe(1); end; end. Here is the error message...(Access Violation at 00000001. Read of Address 00000001.) The CallMe procedure exec...

Exporting shared library symbols in a crossplatform way?

Is there a cross platform way to selectively export certain functions and structs from a C project which builds a shared library? I want to do in a way that does not require a specific build system (the visibility should be defined in the code, eg as a macro), and in a way which both GCC and MSVC can understand. Thank you. ...

Creating a dll which links to another dll (MSVS2008 C++)

Hello all, I am currently creating my own framework in C++ (MSVS 2008) which exports a dll with a bunch of functions for a user of my framework to use/call. In the beginning, when my project was still small, all worked fine. I compiled my project. A MyFramework.dll and MyFramework.lib were spit out. I pretended to be a user; put the MyF...

DLL example in Delphi Prism 2010

Can somebody tell me where to find an example in how to make an DLL (WindowsControlLibrary) in prism? In the old Delphi, you make an export section. ...

How to export all functions inside PHP extension?

I opened php_sqlite.dll & php_sockets.dll using Depends.exe. I saw only 1 function in both: get_module How can I export all functions in extension to dll files when compiling the .dll? AFAIK, ZEND_FUNCTION is used to declare functions in the modules. Please kindly advise. Thank you very much! ...

Passing C++ structure pointer from Perl to arbitary dll function call

Hi, I am using Win32::API to call an arbitary function exported in a DLL which accepts a C++ structure pointer. struct PluginInfo { int nStructSize; int nType; int nVersion; int nIDCode; char szName[ 64 ]; char szVendor[ 64 ]; int nCertifi...

Exported function names does not contain argument list

I'm creating a plugin DLL using c++ in Eclipse. When trying to load the plugin I get an error: ?CTC_Cleanup@YAXXZ not found. Function is not available in myplugin.dll When comparing another working plugin with my plugin using Dependency Walker I notice that the function name in the other plugin is: "void CTC_Cleanup(void)", enabling ...

Cannot export template function

I have a class named "SimObject": namespace simBase { class __declspec(dllexport) SimObject: public SimSomething { public: template <class T> void updateParamValue( const std::string& name, T val ); } } I have another class named "ITerrainDrawable": namespace simTerrain { class __decls...

MissingmethodException in C#SmartDevice project Can't find Pinvoke DLL

Hi, I am getting this error. when i am importing a dll from c++ appliaction. in my C# code i am importing this dll like this [DllImport("Assemble.dll", EntryPoint = "Settpdu")] static extern void Settpdu(byte[] VALUE); in my C++ code i am exporting this function like this extern "C" __declspec(dllexport) void Settpdu(BYTE * VAL...

DLL : export as a C/C++ function ?

Hello, I generated a DLL in Visual from a C++ code. Dependency Walker sees 3 functions exported as C functions. I made an SCons project to do the generate the DLL, and 2 of the 3 functions are not seen as C functions. What makes a function seen as a or C++ function, without modifying the code ? It must be in the compilation/linking op...

Warning C4251 when building a DLL that exports a class containing an ATL::CString member

I am converting an ATL-based static library to a DLL and am getting the following warning on any exported classes that use the ATL CString class (found in atlstr.h): warning C4251: 'Foo::str_' : class 'ATL::CStringT' needs to have dll-interface to be used by clients of class 'Foo' I am correctly declaring the Foo class as exp...

How can a DLL have zero exports?

I recently ran across a DLL installed on my system that Dependancy Walker (and every other utility I tried) says has zero exports by name or ordinal, yet the file is approximately 4mb in size. I thought the sole purpose of a DLL was to export functions for use by other code so what would be the purpose of a dll with no visible exports? ...

Automatically generate a DLL .DEF file in Visual Studio?

Is there any way to automatically generate the DEF file for a DLL in Visual Studio? I've always just manually created them before, but there's gotta be an easier way. ...

need to call non exported functions of DLL

Hello, I need to call(get) non exported functions of DLL. Unlike PE export table, non exports do not have any table having entries for these. More over all disassembler like IDAPro and other debuggers only show exported function names with decorated names(After Shift+F3 incase of IDA) and show all other functions like sub_000FF sorts of...

Can distutils use a custom .def to expose extra symbols when it compiles a Windows .dll?

I'm abusing distutils to compile an extension module for Python, but rather than using the Python C API I'm using ctypes to talk to the resulting shared library. This works fine in Linux because it automatically exports all symbols in a shared library, but in Windows distutils provides a .def to export only the Python module init functi...

Using ACE_Service_Object

I'm trying to use the ACE_Service_Object or the ACE_Shared_Object. I'm not sure which one is applicable. I'm trying to encapsulate some functionality in a DLL so a consumer of the DLL would open the library, create an instance of the exported class, call some functions on the class, and then destroy the class. A basic plug-in architec...