如何使用string作为嵌入式dll的路径和File.Readallbytes问题 [英] How to use string for path to embedded dll and File.Readallbytes problem

查看:65
本文介绍了如何使用string作为嵌入式dll的路径和File.Readallbytes问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个嵌入式DLL https://gyazo.com/be6737d3c739198f96fd247edbd6fc37,我想注入另一个进程,我有这行代码https://gyazo.com/9975502fb7fb8cba9e792d300bd7da51,我需要创建一个字符串,这是被称为
的路径将等于我的嵌入式dll的路径,但我不知道如何获取我的嵌入式dll的路径并将其用作字符串我尝试了一些东西,但我尝试过的东西已经返回当我的var文件尝试从字符串中读取所有字节时,路径'
中的错误System.Argumentexception'非法字符。所以基本上我需要获取我的嵌入式DLL的路径,所以我可以做string path = path到嵌入式dll;然后我需要我的文件变量才能从文件中读取所有字节。


解决方案

https://www.codeproject.com/Articles/528178/Load-DLL-From-Embedded-Resource

I have an embedded dll https://gyazo.com/be6737d3c739198f96fd247edbd6fc37 which i want to inject into another process and i have this line of code https://gyazo.com/9975502fb7fb8cba9e792d300bd7da51 and i need to make a string which is called path which will equal to the path to my embedded dll but i do not know how to get the path to my embedded dll and use it as a string i have tried some things but the things i have tried have returned with the error System.Argumentexception 'illegal characters in path' when my var file tries to read all bytes from the string. So basically i need to get the path to my embedded dll so i can do string path = path to embedded dll; and then i need my file variable to be able to readallbytes from the file.

解决方案

https://www.codeproject.com/Articles/528178/Load-DLL-From-Embedded-Resource


这篇关于如何使用string作为嵌入式dll的路径和File.Readallbytes问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆