I have my sources split up in several directories, so for each directory I get back a DLL. Is it possible to create a DLL from several other DLL's ?
EDIT: I'm using C++ with Windows CE Platform Builder 6.0 ( it's not managed )
There is no tool that will do this automatically for native code DLLs. You would have create a new DLL and add the existing source code to that project. However, doing this is likely to require changes to the source code.
Use ILMerge
Here you can download this.
Here is Sample for implementation.
You can't create one DLL from multiple DLLs. Any such tool would be awkward since each DLL could have it's own DllMain.
You CAN create a DLL from multiple static libraries though. It shouldn't be too hard to reconfigure your setup that way.
Related
I have a project that I am developing that uses a third party COM library as a reference and I would like to build this project on a Visual Studio Team Services build client. My first idea is to create a MSBuild task that checks to see if the COM library is installed on the local computer and if it is not, go ahead and install it, but this seems like a really messy way to do this. I have searched around but it seems as though all the answers date back years and I can't seem to make the few I have found work in a VS 2013 project. How have other people solved this problem? Is there a cleaner way?
For reference I have also tried this solution, which looks really clean, to no avail.
I would go one of these routes:
Generate interop dll with tlbimp, add it to your project and reference it directly:
In VS command prompt, execute tlbimp.exe <your_dll> to generate the interop dll. You can specify the name with /out option.
put this dll somewhere with your code
reference it by going to Add reference > Browse and click Browse... to add the dll
Generate the tlb from COM dll , add it to the project and reference the tlb:
Generate the tlb (e.g. using OLE/COM Object viewer) or extract it from the dll resources,
put this tlb somewhere with your code
reference it by going to Add reference > COM and click Browse... to add the tlb reference to project
As #HansPassant noted in comments, this solution still relies on registry, but you can register it with regtlb, regtlib or similar tool, as a prebuild step, which should be easier than installing the server (though if it is just a dll, you could use regsvr32 to register it instead of full install). However, this is still more complex than the approach with interop dll
I'm building a windows mobile 6.0 application and I wanted to use restsharp library to consume data from a rest service. I've found information that RestSharp can be compiled for compact framework 3.5 (as is not available from the official site).
But, does anybody have successfully compiled the assembly for CF? If yes, could anybody provide a link to download the assembly. Thanks
I do not know a download location for the ready-to-use assembly.
I would start a new CF2 project and in another instance of VS open the original restsharp solution. Additionally open two file explorer to copy files of the restsharp source to the new CF2 project directory. You should maintain the same solution layout and folders (if any). Then copy the files over to CF2 dirs and use Add Existing Files in the CF2 solution. You need to use the same namespace and project and solution names (makes live easier).
Now try to compile. If you are lucky, everything compiles without error. But mostly you have to either adjust code or write CF2 compatible wrappers. If there are two many FullFramework constructs that can not be 'emulated' in CF2, you may have to give up. But as you said, there are CF compatible sources.
You mentionend CF3.5 and asked for CF2. Possibly RestSharp will only compile as CF3.5 assembly.
See also: RestSharp: Don’t Serialize null Properties
BTW: the GitHub repo (https://github.com/restsharp/RestSharp) shows a CF solution file RestSharp.Compact.sln and RestSharp.Compact.csproj. These should work with VS2008.
I've been able to create a signed CAB file for web deployment containing my control and dll, but my control seems unable to access classes and functions in my dll even though it is listed as a dependency in the CAB's inf file. For all my research, I can't even tell if what I'm trying to do is "allowed". Followup: if it is possible to talk to a non-com dll, is it a security risk?
I'm using msvc 2010. Thanks for your time!
Pretty certain what I was trying to do wasn't possible. Ended up creating a class library instead so that I could reference and include the functions I needed at compile time.
So, I've got a single VB6 executable that references multiple VB6 COM DLLs. Is it possible for me to generate, on-the-fly, a manifest for the executable as well as a manifest for each of the referenced DLLs? If so, then how?
I would like to perform this operation as part of our build process without having to register the COM DLLs as part of the process.
NOTE: All the reg-free COM examples that I've found so far involve .NET interop, which is not a requirement for what I'm doing.
[EDIT]
After performing some preliminary testing using Unattended Make My Manifest, I've found that its just not as user-friendly as I would like. And, since there's only a Sample.ini file for documentation I've had a pretty hard time understanding what should be put into that file compared to what doesn't need to go into that file. Anyways, I've decided to craft manifests using my own tool. Hopefully, I'll get permission from my employers to release the code as open source.
*For now, if you're in the same position that I'm in and you would like to create a build and production environment that uses side-by-side/registration-free COM interactions, just know that its possible. I would recommend crafting them by hand with a simple DLL and consumer app at first, and then incrementally building on that until it suites your specific needs.**
We are using Unattended Make My Manifest in daily builds to create portable versions. It creates a single manifest that can be embedded to the executable with mt.exe
You could try Make my manifest which is a tool to create the manifest for a VB6 program. I don't know whether it can run automatically as part of a build process.
I'm looking for a simple example how to create a DLL library on Windows with WxWidgets.
I need use some wxWidgets API on DLL and it'll called from Delphi.
There is the "dll" sample showing how to do it in your wxWidgets directory or you can view it online at https://github.com/wxWidgets/wxWidgets/tree/v3.1.0/samples/dll
I think the easiest way is to install the free Visual C++ Express Edition, compile the DLL with that (Visual Studio project files are provided with WxWidgets). If it still works like in the old days, then you will also have to import the library for use in delphi with with the implib command.