dll

Is it possible to add a directory to DLL search path from a batch file or cmd script?

MSDN says that the function SetDllDirectory() can be used to insert a directory into the DLL Search Path. Can this function be accessed from a batch file or cmd script, perhaps using via cscript? The aim is to have our development version of a dll found before a pre-existing older one in %WINDIR% etc. without having to write a program j...

Conflict between GAC and Bin dll

I'm customizing a SharePoint application, and I am referencing in my Visual Studio project a dll that also exists in the GAC. The project builds just fine, but when I hit the page I get the following error: An error occurred during the processing of . c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\bef9a111\5...

How do I limit an external DLL to one CPU?

I have a program that I would like to run on just one CPU so it doesn't take up too much system resources. The problem is, it makes a call into an external DLL that automatically uses all available CPU cores. I do not have the source code to the external DLL. How can I limit the DLL to only using one CPU? EDIT: Thanks for the help, here...

What is the best way to deal with shared dlls in C#?

In my team we have hundreds of shared dlls, which many also reference other dlls that themselves reference other dlls, and so on. We have started to use a 'Shared' directory for all the dlls that we feel are generic enough to use in other projects, such as a database comms dll. The problem is that if one of the dlls all the way down ...

Debugging a DLL which is in another solution on VS2003

I'm am trying to debug a DLL which is called from a VC++ application, but cannot step-inside the DLL function because the DLL source is located in another solution project. I have tried to set a break point right before the DLL function call but when I try to step-in it just passes right down. I am aware that it is possible to just de...

Building resources into a DLL for reuse, MFC/VC++

For example, I want to build a DLL exporting a function called ShowDialog, which displays a dialog and changes the text in one of the dialog buttons. The dialog and all other resources should be bundled in the DLL. I did a quick test and when the DLL tries GetDlgItem() with a certain control ID, it gets a null pointer back. I'm assuming...

What is the correct way to sequence DLL versions

I've always understood that each number in the version (ex: 1.2.3.4) is treated as an regular int value. We are using some third party DLLs that follow a different convention and it seems to be causing problems with our patching process (patch won't overwrite the old DLL with the new one). The old version of the DLL is 1.38 The new ver...

dll size (debug and release)

I have read in other discussions that Release dlls have reduced size compared to Debug dlls. But why is it that the size of the dll I have made is the other way around: the Release dll is bigger than the Debug dll. Will it cause problems? ...

I have VS C++ Express. Is there a way to create .DEF files?

I would be extremely appreciative if anybody can help me. I am learning C++ and I have been trying figure this one out. Basically, VS C++ Express does not come with the .DEF template. What other way can I go about creating this file? Is there a parameter I can set in VS so that the linker can create this on the fly? Thanks!!! ...

SQL Server SMO complains of missing DLL

Ok, I've scoured the web, BOL, various forums and I'm no closer to an answer...hopefully you fine folks can lend a hand... We've got a dozen or so SQL Servers (some 2k, some 2005) on a network. I'm using SMO objects in a .NET application to get some standard information. My problem appears to boil down to a missing DLL - Microsoft.SqlSe...

Exporting functions from a DLL with dllexport

I'd like a simple example of exporting a function from a C++ windows DLL. I'd like to see the header, the cpp file, and the def file (if absolutely required). I'd like the exported name to be undecorated. I'd like to use the most standard calling convention (stdcall?). I'd like the use **__declspec(dllexport) and not have to use a DEF ...

Calling functions in a DLL from C++

I have a solution in VS 2008 with 2 projects in it. One is a DLL written in C++. The other is a simple c++ console application created from a blank project. I would like know how to call the functions in the DLL from the application. Assume I am starting with a blank C++ project and that i want to call a function called "int IsolatedFun...

If I want to rebase my DLL's, how do I go about doing it?

This is a continuation of this question. I'm in the process of testing whether rebasing the .NET DLLs, and NGENning them will provide me with more shared code in memory on terminal servers. However, my plan seems to have a flaw, and it's that I seem unable to find a working method to figure out a working set of addresses. What I thoug...

Reference one inline class from another.

Guys, I’m having difficulty referencing one main VB file from a new vb file. Here's the problem - the code file is ancient, and runs on ASP.NET 1.1. It runs without being compiled to a DLL, and changes regularly. for that reason, I'd rather not compile either New Person or Old Person to a DLL. A default page look something like this....

How to change a .NET DLL version after it is built?

I have a build system that is complex enough that AssemblyInfoTask ends up being too fragile to use pre-compile to set AssemblyFileVersion. Is there a way (code or tool) where I can update the file version, product, copyright information for a DLL, EXE, etc. post-build. I want to make sure that I'm updating both the real file version i...

dll problem

FOLLOW-UP question : i'm calling the function repeatedly in a loop. when there are multiple items needed to to processed using that function, the application crashes. it works fine when only one item is processed. what to do? [solved] i have a function in a dll that involves reading and writing a file. i'm calling the dll function in ...

How can I reverse engineer scrambled packets in a windows app?

I have a windows exe app that used to sends packets to a server in the clear. This app (lets call it the client app) is definitely close sourced, but some clever hacker hex-edited the binary, and made it send packets that are scrambled. Now, obviously, those packets are scrambled in a way that is decipherable (otherwise the server would...

Where can I get php_tidy.dll for PHP 4.4.2 or 4.4.4?

Hi! I need to get tidy extension for PHP 4.4.2 and 4.4.4 (win32). I have tried to find dlls for these old PHP versions, but with no luck. ...

Not necessary to export class with only virtual/inline functions?

In C++ on Win32: Suppose I have a DLL with a header file that declares a class. The DLL exports some means of obtaining a pointer/reference to an instance of that class, such as a factory function. Am I correct in believing that it is not necessary to mark that class as exported using __declspec if one is only going to call virtual or...

py2exe to generate dlls?

Is there a way using py2exe or some other method to generate dll files instead of exe files? I would want to basically create a normal win32 dll with normal functions but these functions would be coded in python instead of c++. ...