dll

When are referenced Assemblies loaded?

I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003. The program checks for the os and does not reference the dll if the os is 2003. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == Win...

using WrapCompressedRTFStream in C#

Hello, I am rewording this question: Csharp C# visual studio 2008 How do I use the WrapCompressedRTFStream when using DLLImport with mapi32.dll? Sample of code to import the WrapCompressedRTFStream method. (I found this, I did not figure this part out) [DllImport("Mapi32.dll", PreserveSig = true)] private static extern void...

Error while dynamically loading mapi32.dll

Our application uses Simple MAPI to send e-mails. One of our clients has problems sending e-mail from a session on his terminal server. The mapi32.dll is loaded with a call to LoadLibrary which succeeds, but then our application tries to get the addresses of the functions MAPILogon, MAPILogOff, MAPISendMail, MAPIFreeBuffer and MAPIResol...

Fatal error when using FILE* in Windows from DLL

Hi there. Recently, I found a problem with Visual C++ 2008 compiler, but using minor hack avoid it. Currently, I cannot use the same hack, but problem exists as in 2008 as in 2010 (Express). So, I've prepared for you 2 simple C file: one for DLL, one for program: DLL (file-dll.c): #include <stdio.h> __declspec(dllexport) void print_t...

Using custom dll in Qt Application

First, my compiler and OS: Qt Creator 1.3 Qt 4.6 (32 bit) Windows 7 Ultimate I want to learn how to create and import a dll in Qt. I've created a *.dll file using Qt Creator, called Shared1.dll which contains nothing but an empty class named Shared1. Now I'd like to use Shared1 class in another Qt project. How can I do that? Thanks ...

Wrapper c# using unmanaged dll

I am making a wrapper to read TDM and TDMS files but i have a problem [DllImport(lib, CharSet = CharSet.Auto)] static extern int DDC_OpenFileEx( [MarshalAs(UnmanagedType.LPStr)] string filePath, [MarshalAs(UnmanagedType.LPStr)] string fileType, int read_only, ...

How do I merge zlib1.dll into my executable in C?

My executable needs zlib1.dll to run, and I need to keep them together now and then. How can I merge it into the executable to save the trouble? I'm using cmake to build the executable. UPDATE zlib1.dll is not directly included by my programe,but required by libpng14-14.dll(one dll of the gtk bundle) ...

How do I change all shared libraries used in my programe to static libraries in windows?

The shared library is causing much trouble for me, and disk space is far less expensive than the trouble itself. How can I convert all shared libs(.dll) to static libs(.lib) and make my programe use them instead of using shared libs? Note some .dlls are not directly refered to by my programe,e.g. my programe requires libpng,and libpng...

Include code file into C#? Create library for others?

Hi, I would like to know how can I embedd a code source file (if possible), something like that: class X { include "ClassXsource" } My second question - Can I build DLL or something like that for my colleagues to use? I need them to be able to call methods from my "part" but do not modify or view their content. Basically just use name...

Element 'Chart' is not a known element - dotnetCHARTING

Hi, I am using dotnetCHARTING: the dll is installed in the GAC and referenced in my web.config (all versions appear to match). The project has a reference to the dll. web.config: <add assembly="dotnetCHARTING, Version=5.3.3540.17054, Culture=neutral, PublicKeyToken=af2cd47db69d93bd"/> The site code compiles ok, but all aspx pages us...

Is compiler able to do a procedural integration of functions imported from dll?

I know, that modern compilers can do procedural integration not only with functions defined inline, but also with functions residing in object files. But is this also true when you compile your program against shared library (especially dll)? Roughly speaking: will function code be copied into executable from dll, if that's desirable? ...

How to marshal the type of "Cstring" in .NET Compact Framework(C#)?

How to marshal the type of "Cstring" in .NET Compact Framework(C#)? DLLname:Test_Cstring.dll(OS is WinCE 5.0),source code: extern "C" __declspec(dllexport) int GetStringLen(CString str) { return str.GetLength(); } I marshal that in .NET Compact Framework(C#),for example: [DllImport("Test_Cstring.dll", EntryPoint = "GetStringLen...

Kernel mode calls a signed C# method in GAC

Can I call a signed DLL(placed in the GAC) of a C# project from a Kernel mode driver ? ...

Best way to implement plugin framework - are DLLs the only way (C/C++ project)?

Introduction: I am currently developing a document classifier software in C/C++ and I will be using Naive-Bayesian model for classification. But I wanted the users to use any algorithm that they want(or I want in the future), hence I went to separate the algorithm part in the architecture as a plugin that will be attached to the main ap...

passing data between modules

Hi I am going to build a very complex application and I need an advice please. Since the application will use a lot of dlls, I need a GOOD way to send data between the main module and the dlls. What do you recommend for that? Data would be passed in both ways(app->dll, dll->app, and maybe dll->dll) I'm using c# 2010 and wpf. Thanks ...

Call C (exposed) function from COBOL program

Hi, Some time ago, I had created a DLL to be used in another C program. Basically I exposed specific functions by using the following within my dll: void __declspec(dllexport) MyFunc(myFirstArg, mySecondArg); Then I added an external file (MyExposedDll.h) with all exposed functions and structures to the new C program and included it:...

C++ DLL Export: Decorated/Mangled names

Created basic C++ DLL and exported names using Module Definition file (MyDLL.def). After compilation I check the exported function names using dumpbin.exe I expect to see: SomeFunction but I see this instead: SomeFunction = SomeFunction@@@23mangledstuff#@@@@ Why? The exported function appears undecorated (especially compared to no...

PHP APC DLL Built with VC8

I am looking for a copy php_apc.dll that was built with VC8. I found one built with VC9, but my PHP distro I got with the ZendServer CE says it needs to be built with VC8. Any help would be greatly appreciated. Thanks, Dave ...

Including MSVRC100.dll in C++ exe

I created a simple C executable in Visual C++ 2010, but when others tried it they got a missing MSVCR100.dll error. Apparently, the user needs to install the Visual C++ Redistributable Package in order to run the exe. Is there any way I can instead include MSVCR100.dll inside the exe (so it's just one file, not sitting in the same folder...

How to tell the MinGW linker not to export all symbols?

Hello, I'm building a Windows dynamic library using the MinGW toolchain. To build this library I'm statically linking to other 2 which offer an API and I have a .def file where I wrote the only symbol I want to be exported in my library. The problem is that GCC is exporting all of the symbols including the ones from the libraries I'm l...