Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
add Com Dll to Exe
#1
I have a COM component named `ps.dll`, which was generated using C#. Before adding this DLL file to the EXE, I placed it in the same folder as the EXE, and it ran normally.(The Temp folder does not generate any DLL files.)

When I used the following code to add the DLL file to the EXE, it ran fine. However, two DLL files were generated in the following paths, and I believe the file in the second path is redundant. How can I prevent the generation of this file?
(These two files are identical, only the filenames are different.)
- `C:\Users\Administrator\AppData\Local\Temp\QM\ver 0x2040C02\Ps.dll`
- `C:\Users\Administrator\AppData\Local\Temp\QM\CsScript\47F0E45BC6D4E9FC.dll`

Function ExePsDll
Code:
Copy      Help
;/
function!

#if EXE=1
#exe addfile "$qm$\Ps.dll" 10086
int+ ___eqgd
if !___eqgd
,lock
,if !___eqgd
,,if !GetModuleHandle("Ps.dll")
,,,_s.expandpath(F"$temp qm$\ver 0x{QMVER}\Ps.dll")
,,,if !FileExists(_s)
,,,,if(!ExeExtractFile(10086 _s)) ret ;;also creates folders.
,,,if(!LoadLibraryW(@_s)) ret
,,___eqgd=1
#endif
ret 1


Messages In This Thread
add Com Dll to Exe - by Davider - 10-02-2024, 08:29 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)