把任意文件打包到lsp程序中[汇编语言版]bin2lsp
本帖最后由 baitang36 于 2024-1-9 15:13 编辑把任意文件打包到lsp程序中,很多高手都用lsp做过,很多病毒也这样做,不是什么新技术。
空闲时用汇编语言做了一下,好处是非常快,打包一个6M的文件用时不到两秒。这程序可能是世界上最快的二进制文件打包成lsp的工具了。
文件太大时cad会死,不知道什么原因,望高手指点。
试验过6M的文件没问题,7M的加载时cad2008就不动了。
我把它自身打包成lsp了,用法是加载一下就能生成d:\bin2lsp.exe
汇编写的程序,杀毒软件会误报,请选择信任,保证无毒。
程序里面的函数是 【迷你工具箱】作者老迈写的,在此表示感谢。
baitang36 发表于 2022-8-6 13:34
试验过6M以下打包没问题,太大有时会莫名出错。可能是adobe的问题
桌子的程序大了确实会死机,但我没看到是多大的限制。bricscad有明确的限制
VM_MAXIMUM_MEM
On a typical machine, the memory block pre-allocated for LISp is around 256 MB - this is sufficient for 99% of all Lisp applications.
Nevertheless, we got around 2...3 cases reported by Lisp developers, where this memory was not sufficient, and an "out-of-memory"situation happened.
Usually, such LISP code temporarily required some more memory for huge list data ... normally, fixing and redesigning the way way as such huge amount of data is to be processed will prevent such out-of-memory cases.
But if necessary, the amount of reserved LISP memory can be adjusted by VM_MAXIMUM_MEM.
Arguments
integer number 0 ... 850, specifies the amount of memory to be used (0 means "automatically adjusted")
Default
0 - memory size is automatically adjusted, normally reserves ~256 MB as LISP memory
Example
VM_MAXIMUM_MEM # 400
will result in 400 MB LISP memory reserved
Remarks
effect of VM_MAXIMUM_MEM setting can be verified with (mem) function, which reports actual memory usage 香远益清 发表于 2020-6-15 17:11
具体怎么用,能举例子说明吗,测试了程序可行,生成了一堆数字字符,不知道怎么调用生成的打包文件。
你看这帖子的6楼,有个幻灯片使用的例子。
http://bbs.mjtd.com/plugin.php?id=imc_attachplug:attachad&aid=MTA3MTAwfGY1NzVhYzQ4fDE1OTIzNTIzMTh8NzMwMjUyMHwxODA4MzU%3D 本帖最后由 caoliu023 于 2020-1-10 09:01 编辑
生成的代码默认的文件名还是“d:/bin2lsp.exe”,不过用户一般要修改路径,顺便修改文件名也还是可以的 那位大师来个示范
要有个实例就好了,如打包幻灯片到VLX中,并调用。 ynhh 发表于 2020-1-10 09:01
那位大师来个示范
要有个实例就好了,如打包幻灯片到VLX中,并调用。
你提供个幻灯片和播放程序,我给你做进去示范一下 有高手说,不要老迈的程序,只要后面的表。
这个是把文件变成表的。 例子做好了
最终还是要生成文件再调用,不能在VLX里直接调用啊。 这么牛的! baitang36 发表于 2020-1-10 09:19
有高手说,不要老迈的程序,只要后面的表。
这个是把文件变成表的。
密码是什么呢! guankuiwu 发表于 2020-1-10 16:54
密码是什么呢!
密码200200,看文件名