dll

writing a dll in Visual Studio in C (not C++) causing unresolved symbols

I've been going through the dll walkthrough on MSDN and it works fine. I then removed all the C++ style code in the dll and replaced it with the C equivalent, and it still works. BUT, when I rename the file from X.cpp to X.c (which I guess causes compilation in C-mode), I get error LNK2019 (unresolved external symbol) for every functio...

trying to make a "Hello Word" dll in Visual Studio that Java Native Access will accept

I've successfully compiled my library on Linux and Mac and used it with Java Native Access. Unfortunately nothing I do seems to work with Visual Studio's compiler and Java Native Access. I'm going back to the basics and trying to create a super simple dll in Visual Studio that Java Native Access will work with, any help would be appreci...

How can you get a DLL to be deleted when its owner process exits?

I have a .NET assembly DLL that is created on-the-fly from pre-compiled code in a database. Is there a way to create the DLL file, put data into it, load it with the Assembly class, then when the process exits, have that DLL be deleted? My first thoughts were to open it with the FILE_SHARE_DELETE flag, load it with Assembly.LoadFrom, an...

Why would a DLL fail to load from one part of the dependency graph but not others?

Consider the following DLL dependency graph (snipped from within Dependency Walker): How is it that MSVCR80 can be found at the top level but not from within MSVCP80? I realize that in theory MSVCP80 could have a broken manifest, but since it's built by Microsoft, I haven't touched it, and it works fine in other projects, let's assum...

How do I exclude specific .dlls from Visual Studio 2003 C++ .NET?

How do I exclude specific .dlls from Visual Studio 2003 C++ .NET? During release build I get the following warnings. Any help is appreciated. Generating Code... Linking... LINK : warning LNK4089: all references to 'ADVAPI32.dll' discarded by /OPT:REF LINK : warning LNK4089: all references to 'SHELL32.dll' discarded by /OPT:REF LINK : wa...

Problem related to dll

Hi all! Can anyone guide me what could be the problem in the mentioned below:- This PP folder is present in the following path at my desk "E:\WINCE600\PLATFORM\COMMON\SRC\SOC\COMMON_FSL_V2_PDK1_7\IPUV3" In this IPUV3 folder, PP folder is present which does the resize,rotation & conversion task of an image. This PP folder consists of...

Exporting functions from a C# class library

How would I export functions defined in a C# class library, while enabling them to be imported to and called from an unmanaged C++ application/DLL ? ...

How do I import and call unmanaged C dll with ansi string "char *" pointer string from VB.net?

I have written my own function, which in C would be declared like this, using standard Win32 calling conventions: int Thing( char * command, char * buffer, int * BufSize); I have the following amount of VB figured out, which should import the dll and call this function, wrapping it up to make it easy to call Thing("CommandHere",GetDat...

How can we protect ourselves from other third parties installing DLLs with the same names as some of ours into C:\WINDOWS?

Our product includes several DLLs built from open source into files with default names as delivered by the open source developers. We're careful to install the files in our own directories and we carefully manage the search path (only for our processes) to keep the loader happy. Another developer -- a towering intellect -- decided it wo...

Intro to COM DLL

Before you tell me "google it" - hear me out. I come from C++ & Perl/Python (on Linux) background but I have a few projects coming up where I have to jump in to Windows development. Specifically creating some COM DLLs (not .Net). BTW, after reading some resources, I do have basic idea of what COM & what DLL is. I tried to search on Goog...

How do I find the root path of a website from a dll?

I have a C# website. It references several compiled dlls. My dlls need to access folders on the website. How do I find the root path of the website from the dlls? I've tried System.Environment.CurrentDirectory - > "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" Assembly.GetExecutingAssembly().Location - > C:\WINDOWS\Micro...

Check the compatibility of the dll to work on 32/64 bit

How to check the compatibility of a dll to work on 32 bit / 64 bit? is there any tool available to check this? I saw somewhere that we can use coflags, but wont be ableto read native dll it seems. Somewhere i read few other things like IMAGE_FILE_HEADER. How can i do this check. ...

How do I make a HTTP POST request to an url from within a c++ dll?

Hi, there's an open-source application I need to use. It allows you to use a custom dll. Unfortunately, I can't code c++; i don't like it; it don't want to learn it. I do know PHP very well however, thus you can see that I'll rather do my logic within a PHP application. Thus I'm thinking about posting the data from c++/dll to a url on m...

C# wrapper of c++ dll; "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call." error

Here is the code in C++ dll: extern "C" _declspec(dllexport) int testDelegate(int (*addFunction)(int, int), int a, int b) { int res = addFunction(a, b); return res; } and here is the code in C#: public delegate int AddIntegersDelegate(int number1, int number2); public static int AddIntegers(int a, int b) { return a + b; } ...

What should happen when a reference is deleted?

I have a vb.net 3.5 application which references a dll (abc.dll, also in .net 3.5) This dll is accessed by the application from time to time. If at anytime during execution, if I delete the dll, I expect the application to throw an error the next time it tries to use a class from the dll. But, this is not the behaviour I see. If I delet...

OpenCV to JNI how to make it work?

I am tring to use opencv and java for face detection, and in that pursit i found this "JNI2OPENCV" file....but i am confused on how to make it work, can anyone help me? http://img519.imageshack.us/img519/4803/askaj.jpg and the following is the FaceDetection.java class JNIOpenCV { static { System.loadLibrary("JNI2OpenCV");...

PHP won't parse MySQL statements

I just installed Apache 2.2.15/PHP 5.3.2/MySQL 5.1.44 on Windows Vista. Apache is working fine, PHP is functional, and MySQL works on the CLI. However, when I try to access MySQL via PHP, I get an error (Fatal error: Call to undefined function mysql_connect()). extension=php_mysql.dll and extension=php_mbstring.dll are uncommented in the...

Monovation: Assembly Injection into Live Processes

I read this article by Miguel de Icaza on attaching an assembly into a live mono process. How is this any different to attaching a DLL to a running process? I do this already, but once the DLL is attached, it can't be unloaded without using an AppDomain (which I am trying to avoid). Miguel talks about "patch[ing] running programs", but...

Referencing DLLs for Objective-C (GNUStep on Windows)

Hi, How do you reference DLLs from Objective-C? I use GNUStep Make files on Windows. RIch ...

C# Putting the required DLLs somewhere other than the root of the output

I am using EmguCV for a project and when our program runs it needs some dlls like "cxcore.dll" etc. (or it throws runtime exceptions). At the moment, I put the files in the root of the output folder (selected "Copy Always" in the file's properties in Visual Studio). However it looks a bit messy, to have about 10 different dlls just ther...