Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
As in the Question all what i need is an example of code that run file in memory in visual basic with out extract it in HD so that i protect my original content

What I have tried:

Imports System, Microsoft.VisualBasic.CompilerServices

Dim ok As Object = LateBinding.LateGet(New AppDomainManager().EntryAssembly, Nothing, load, New Object() {this is some byte which is my file}, Nothing, Nothing)
Dim method As RuntimeMethodHandle = LateBinding.LateGet(ok.EntryPoint, Nothing, "MethodHandle", Nothing, Nothing, Nothing)
Dim Go As Object = Reflection.Emit.MethodBuilder.GetMethodFromHandle(method)
LateBinding.LateCall(Go, Go.GetType, invoke, New Object() {(0 + 0 + 0 + 0), Nothing}, Nothing, Nothing)


but i get this erorr
Public member '' on type 'Assembly' not found.
which i believe that the problem in "app-domain manager .entry" part
Posted
Updated 2-Jun-17 2:59am
Comments
Richard MacCutchan 2-Jun-17 8:58am    
The answer is the same as on the previous version of this question which you deleted: Visual basic code erorr[^].

1 solution

 
Share this answer
 
Comments
Member 13229306 2-Jun-17 9:06am    
so how can i fix the code so that it run
Richard MacCutchan 2-Jun-17 11:49am    
Sorry, no idea. Since that class is not supported in user code you will have to figure it out for yourself.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900