How can I edit header in dll file? - dll

I have exe file and, that uses my own .dll library. When I launch exe file I get the error
The procedure entry point for SomeFunction could not be located in the
dynamic link library mylib.dll.
How can I fix this problem ? Is this possible to change the header in .dll using CFF Explorer or Windbg ?

Related

how to install my customs' cuix,vlx and mnr files to autocad supported files programmatically

I would like to know how I can load my own custom autocad files to the autocad working supported files without options inside Autocad software, but programmatically.
I have these following files that I want to load to supported files of autocad programatically ,
.cuix file
.vlx file
.mnl file
.mnr file
.fas file.
I tried with inno setup.
Honestly, I don't know how to do.
Please guide me or teach me how to do.
As per my understanding, you can achieve this stuff by Autoloading those File, while the AutoCAD is started, there is plenty amount of solution available on internet you may check this link1 Link2
Or you can refer below step(Before following this step read above link)
1.Write a function to load the required file as you mention in Question
(defun Load_File()
;To load CUIX file "<..MyPath.../MYMENU.CUIX>" replace this with you CUIX file path
(command "_MENULOAD" "<..MyPath.../MYMENU.CUIX>" "")
;To load VLX file "<..MyPath.../MY.VLX>" replace this with you VLX file e path
(command "_appload" "<..MyPath.../MY.VLX>")
;Loading a MNU file overwites the corresponding .MNR, .MNS and .MNC files. Keep in mind that if you make any custom toolbars ;and/or buttons using the graphical on-screen method - they will be wiped when you load the MNU
;(I am not sure about MNL/MNR file loading you may try this )
;To load MNLfile "<..MyPath.../MY.MNL>" replace this with you MNL file e path
(command "_appload" "<..MyPath.../MY.MNL>")
;To load Fas file
(load "<your .Fas file path/my.fas>"
)
(load_File)
2.save this file with name as Load_file.Lsp on trusted path (ie "c:/trusted path/...../Load_File.lsp")
(if lisp file is save in trusted path of AutoCAD so AutoCAD not show pop-up while lisp file is load )
3.make new lisp file so it can Autoload as AutoCAD is started with name "acad.lsp" put below code inside file (this code say that load our first "Load_File.lsp" file)
(load "c:/trusted path/...../Load_File.lsp")
this lisp file must be save in install directory of autocad (Ex. "C:\Program Files\Autodesk\AutoCAD 2018") this step is for automatically load "acad.lsp"
As soon as acad.lsp is loaded all your files are load in Autocad.
InnoSetup is a very good choice for You. I use it for few years and it let me do anything I need.
If You have InnoSetup installed, just click File->New and InnoSetup Script Wizard will guide you through the process of creation script. One of the steps is Application Files, where just select Your files mnu, cuix, fas whatever You like
After that compile ( just one click ) and You have Your setup.exe
Using Innosetup You may install files, but also manipulate OS registry - which may be helpful for Your application, but also set Acad supported files paths.
here
You can find more details about how to load Your application to Acad after is installed.

Adding a custom theme as a resource

I have a custom theme.dll. My program works fine loading the DLL externally. What I am trying to do is make the theme and the program as one file. I added it as project resource, however I don't know if it will work or how to code it.
I got my problem solved! I merge the theme.dll and the Application.exe using ILMerge.
Copy the DLL and the Application.exe into the ILMerge folder
Open command prompt in the current folder ( SHIFT + Right Click )
Type in this command
C:\ilmerge> ilmerge Application.exe theme.dll /out:MergedApp.exe /target:winexe /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1"
*I know this answer is not how to add a custom theme as a resource, but this solves my problem to make the DLL and EXE as a single file.

Can I provide absolute path for .dll at compile time in windows?

I created one .dll(Dynamic link library). Using this library I want create executable file.
But I want to provide absolute path for .dll to link with .exe. So when I execute .exe it links with .dll.
I don't want to set PATH(environment variable), don't want to put .dll into system directory or into same directory within executable.
I know that it is possible into linux using -rpath option.
I am new to windows. I try to find rpath equal option in window, but I failed.

Include and Call PDF File in vb.net (after Deployement)

Glad to see this site, Thanks guys for being active. :)
I have a problem in Visual Studio 2010/VB.Net
I have windows form in Visual Basic, I deployed the software(form) to one installer
Now I want to open My PDF file( i-e: Specific) with Button_Click_Event
I know that:
Process.Start("MyPDF.pdf")
But I dont know if user install my software in his PC so may be he install the software in C D or other directory, and also I dont know How to include PDF file in my project :)
Please suggest for me, I am searching this every where but failed so pl help me
Use Add->Existing Item on your Project. Then add the PDF File to your Project.
Afterwards you have to set the Properties of the newly added file to the following:
Now the file will be added to your "Output" Directory after you build your Project.
Now use your Process.Start("MyPDF.pdf") call. It will open up, as it resides in the same directory.
This is rather easy:
Simply include the file by dragging it to your project folder and in its options, tell it to copy to the build directory.
Thereafter, find the path through the my.application methods.
Build a correct path from that and launch it via process.start

Using a dll.config file for a dll in the GAC

Is it correct that mydll.dll which is located in the GAC will read mydll.dll.config from the the same path that it is effectively called from? As an example, if myprogram.exe runs in c:\test, all I need do is copy mydll.dll.config into c:\test and all will work OK?
In replies to a similar question, mention is made of setting the location of the config file via code using AppDomainSetup.ConfigurationFile. Given the dll is not a standalone executable, it doesn't have a load event or an entry point so where are you supposed to enter that code. I to presume that I can/must create a public static method that sets the location and that method must be called by my executable before actually using the dll?