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
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
;/
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