VS 2008 Loading Executable Into Memory?

Dec 18, 2009

Alright, for a school project i'm making a filecrypter, and i need to load the executable directly into the memory.

For those that don't know it yet, a crypter consists of a crypter, and a seperate "stub"

the crypter crypts the file, and the stub is binded to the file, and upon execution, the stub is executed, and in turn executes the file it's bound to.

I have a RunPE sub, and on itself it works fine

Imports System.Runtime.CompilerServices
Imports System.Reflection
Public Class Form1

[Code]....

View 4 Replies


ADVERTISEMENT

Loading An Image From A Jpeg That Exists In Memory (but Not On Disk) Using Direct Memory Access

Nov 5, 2009

In VB 2005, I am calling a C++ DLL function that returns the address in memory and size in bytes of a jpeg image. How can I load that jpeg image directly from memory into a picture box in my VB form? I cannot afford to save it to disk first.

View 10 Replies

Move IMAGE_DOS_HEADER Of Executable To Memory?

Sep 6, 2009

Public Declare Sub MoveMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByVal Destination As Object, ByVal Source As IntPtr, ByVal Length As Integer)

Private Structure IMAGE_DOS_HEADER
Dim e_magic As Short ' Magic number
Dim e_cblp As Short ' Bytes on last page of file

[code]....

But Always when it wants to run MoveMemory and move the 64 Bytes(DOS_HEADER) to Memory i get a ArgumentException:The value is outside the expected range.

View 2 Replies

C# - Dynamic Loading Working Fine, Except After The Executable Is ILMerged

Aug 16, 2011

I have a windows application that dynamically loads DLLs using Reflection.Assembly.LoadFrom(dll_file_name_here).

It works as expected, until I ILMerge the application with another DLL.

So this scenario works fine:

MyApp.exe
MyAppComponent.dll
Plugin.dll

Once I ILMerge MyApp.exe and MyAppComponent.dll resulting in:

MyApp.exe
Plugin.dll

Calling Reflection.Assembly.LoadFrom("Plugin.dll") seems to load successfully, however once I try to do anything with it eg:

foreach ( typeAsm in Reflection.Assembly.LoadFrom("Plugin.dll"))

I get an exception "unable to load one or more of the requested types. retrieve the loader exceptions property for more informtion".

The frustrating thing is I can't really debug it, because debugging pre merging works perfectly!

View 1 Replies

Loading Data Into Memory

Oct 2, 2009

I have a small VB program written using VB Express 2008Part of it uses an Access database this all works fine using the custom classes.I want to extend it to use some parameterised settings which I have stored in a table in the same Access database .I want to load these parameters from the table at program startup, then use them later in the code as needed.In SQL I want to execute :-select parameter, parameter_value from system_ parametersthen store this in an array which I want to index on the parameter column/elementAny suggestions on how I can load this data into the array ?

View 1 Replies

Loading SWF From Memory Stream?

Dec 5, 2006

I'm using the ShockwaveFlash ActiveX control in a VB.NET Windows Forms application and i'm wondering.Is it possible to load an SWF file into the ShockwaveFlash ActiveX object from a memory stream rather then from a file name?

I've noticed that the ActiveX object has such properties as "InlineData" and "MovieData", possibly these could be used.

I've also noticed someone has used Windows Messaging to send a pointer to a stream to the ActiveX control, has anyone seen this done?

View 1 Replies

Loading A File From Memory As A New Process?

Mar 1, 2012

how load a string containing the source for a .exe strait into a process without accessing the hard drive.

Currently my code goes something like this...

Imports System.IO
Dim file As String
file = file_source

[Code]...

View 1 Replies

Out Of Memory Exception While Loading Images?

Jan 31, 2011

I am using the following piece of code to load images as thumbnails to a FlowLayoutPanel control. Unfortunately i get an OutOfMemory exception.As you already guess the memory leak is found at line

Pedit.Image = System.Drawing.Image.FromStream(fs)

So how could i optimize the following code?

Private Sub LoadImagesCommon(ByVal FlowPanel As FlowLayoutPanel, ByVal fi As FileInfo)
Pedit = New DevExpress.XtraEditors.PictureEdit
Pedit.Width = txtIconsWidth.EditValue

[code]....

Update: The problem occurs while loading a number of images (3264x2448px at 300dpi - each image is about 3Mb's)

View 4 Replies

Loading HTML Content Into A WebBrowser Control From Memory?

Oct 4, 2005

WebBrowser Example.zip IntroductionBecause the WebBrowser control that we use in .NET is a COM control, not all of its uses are straightforward and some of them (even those which seem like they should be easy) require that we dip into our Interop toolbox in order to properly implement them.

A perfect example of this is loading HTML content into the WebBrowser from memory, rather than a file or a URL. Anyone who's ever used the WebBrowser control before is familiar with the Navigate2 method, which tells the control to load content from a URL (or path to a file). Loading HTML content from memory, however, is a rather elusive practice because of the many steps involved in making it work.

MSHTML.HTMLDocumentYou might notice that the WebBrowser control exposes a "document" property. The object returned by this property can be coerced to the type of "mshtml.HTMLDocument" (you must add a reference to MSHTML to your project in order to make this work) as follows:

Code:Dim clsDocument As mshtml.HTMLDocument = CType(WebBrowser.Document, mshtml.HTMLDocument)

(NOTE: You will have to add a reference to the COM library MSHTML to your project to make this compile)

Once we create an instance of HTMLDocument, a whole new world opens up to us, providing all sorts of DOM access to the content of any given Web page.

If we were to create our own HTMLDocument object from memory, we could use the "write" method to write HTML content to the document from a string variable, like this:

Code:'initialize the document object within the HTMLDocument class... clsDocument.close() clsDocument.open("about:blank")

'write the HTML to the document using the MSHTML "write" method... Dim clsHTML() As Object = {sHTML} m_clsDocument.write(clsHTML) clsHTML= Nothing

WebBrowser Control ImplementationUsing the HTMLDocument returned by the "document" property of the WebBrowser control, however, is not as straight-forward. Because of the way that this object is created and initialized in memory (by the COM WebBrowser control), the "write" method fails when called as above. In order to write content to the HTMLDocument exposed by the WebBrowser control, we must first marshal the string value to a memory space that is compatible with COM. Once the string is properly marshalled, the COM interface IPersistStreamInit (implemented by the HTMLDocument class) must be used to pass the value into the object.

Interop DeclarationsIn order to pull all of this off, we must declare several Interop pieces, including an enumeration, a function, and two interfaces. The declarations for these pieces are as follows:

[Code]....

View 10 Replies

2008 Express Edition: Attempted To Read Or Write Protected Memory, This Is Often An Indication That Other Memory Is Corrupt?

May 27, 2009

I cannot use Visual Basic 2008 at all. When I go to "new project" and choose "Windows Form Application" I get this error.I have tried multiple uninstall/reinstall with no result.A microsoft reply to this suggested that I needed: " .NET Framework 2.0 Service Pack 1 " I checked, and I did not have the .netframework 2.0 service Pack 1.
When I tried to download and install the above from Microsoft.com, the istaller said that "it was not allowsed" and I was not able to install the service pack 1.

I tried Uninstalling net framework 3.5, 3.0, 2.0 and then reinstalling .netframework 2.0 sevice pack 1; then reinstalling Visual basic 2008 express edition. At the reinstall of Visual basic 2008, .netframework 2.0 sevice pack 1 is unistalled by .net framework service pack 2.When I check the foruims for simiar problems, the formus are mostly for Visual basic 5.0, or other programs that I do not have.

Here is the programs I have installed:

Operating system: Windows XP
Microsoft .net framework 1.1
Microsoft .NET framwork 1.1 Hotfix(KB928366)
Microsoft .Net Framework 2.0 Service Pack 2

[code]....

All the security updates and hotfixes for Widows XP.

View 4 Replies

Deployment :: Can An Executable Program Create An Executable File

May 17, 2012

I have a program that outputs a file. I want the user to be able to just double-click the output file and launch the program, just like Word and Excel. In Word for instance, one doesn't necessarily have to open WORD then click on File--> Open and locate another Word doc. He can just go to the folder and open the Word doc. I want to implement the exact scenario in my program.

So far I have tried creating TextFile and added it to the Resources. On FormLoading, I simply I stream-read the Resouce file, but I can't write to the Resource on FormClosing, since the Resource is ReadOnly. Also, the Resource is built & compiled so I suppose you can't add anything to it at run time.How you lunch an output file without launching the Executable program that created it?

View 1 Replies

Executable On Vista - Open The Executable It Goes To A "WindowsApplication1?

Jun 1, 2009

I have an executable that I was able to get working on all XP machines by registering all the .dll's associated with it.On Vista, however, I go through the exact same registration process but right when I open the executable it goes to a "WindowsApplication1 has stopped working" dialog. I registered the DLLs in the SysWOW64 folder. I also ran Dependency Walker which came up with IEFrame.dll as flagged, don't know if that is relevant though.

View 6 Replies

Loading A File Into Memory Stream Buffer And Creating New File With Same Content And With Different Filename?

May 31, 2011

I don't know whether it is simple or not because i am new to programming. my requirement is : In my vb.net winform application, the filenames of the files present in "D:Project" willbe displayed in DataGridView1 control. Now I want to load these files one after another into memory stream buffer and add the headers("ID","Name","Class") to the content in the file. Then I want to save these files in "C:" with "_de" as suufix to the filename i.e.,sample_de.csv.

View 1 Replies

Loading Image "Out Of Memory"?

Feb 19, 2009

When im using this code, i encounter an "Out of Memory" error;

If System.IO.File.Exists("C: est.jpg") = True Then
Dim fs As New IO.FileStream("C: est.jpg", IO.FileMode.Open, IO.FileAccess.Read)
PictureBox1.Image = Image.FromStream(fs)

[Code].....

View 2 Replies

Executable Conversion With VB 2008?

May 24, 2012

My issue is when I read from an existing executable and convert it to string and back to executable windows says it is not a recognized 32 bit or 64 bit application? The code below is real code I have rewritten many times but to no avail. If I leave out the part where I convert the bytes to string and just copy the binary and create a new exe with the binary the program works. But the whole concept of string converting back to valid binary has me stumped? This is Visual Basic 2008 code:

Imports System.IO
Imports System.Text
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tempPath = System.IO.Path.GetTempPath

[code]....

View 3 Replies

VS 2008 Wrap App Into Executable

Jan 6, 2011

How can I wrap my app into an executable file?

View 1 Replies

VS 2008 : Run A Fortran Executable From A VB Form?

Nov 18, 2009

My challenge is to prepare for a presentation using a GUI interface to access a program written in Fortran.The Fortran program reads a data file and then writes an output file.For the presentation I need to be able to change a variable value in a VB form, update the data file, and run the Fortran program from the VB form.I also need to be able to create graphs using VB forms using the output file generated by the Fortran program.

View 2 Replies

VS 2008 Compile Resources Into One Executable?

Dec 9, 2009

If I have a Win32 Form project that requires to load a text file and also other picture files that is resides in the bin folder, is there anyway that I can deploy into a single standalone EXE file to user so that user won't see the extra files.

View 4 Replies

VS 2008 Executable's Settings Not Remembering?

Feb 12, 2011

my project uses my.resources + my.settings, + both are working perfectly in debug, but when i move the exe to my desktop, some of the my.settings variables aren't saving. has anyone seen this before? i checked + my project is setup to save settings on exit...

View 1 Replies

2008 : Can VS Copy The Executable To A Separate Directory

Dec 18, 2009

VS sets your project up with the default directory structure: ...indebug which also seems to contain some other files besides your dll (I assume these are related to the debug symbols, etc).So how do you set it up to copy your dll to another directory when debugging?Right now, I'm having to manually copy the built dll with every run and that's getting to be a bit annoying.I'm using VS 2008?

View 11 Replies

Setup Or An Executable File In 2008 Note

Nov 24, 2009

how Work setup or an executable file in Visual Basic Dot Net 2008 note that the program is linked to a database

View 1 Replies

IDE :: Make An Executable File In Express Edition 2008?

Sep 19, 2010

How to Make an executable file in visual basic express edition 2008?

View 2 Replies

Launching Executable File With Process Component In 2008?

Sep 16, 2010

i am trying to open an external executable file during runtime using a process component and the process.start() method. I've been testing out my code with various executable files on my C: drive....some work and some do not work. I've been able to successfully open Adobe Acrobat, Microsoft Excel, and Notepad; however, when I try opening various other executables the following exception gets thrown:

A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll

I cannot figure out why some programs open just fine while others cause the above exception to be thrown.

View 3 Replies

VS 2008 Merge Two Executable Files , File Binding?

Sep 7, 2009

What i need exactly is to make a program that have a button called "browse" , when the user clicks it , it prompts the explorer and let the user choose a .exe file, then theres another button called "merge", when the user clicks it, i want the file that was already selected to be merged with one that will be already on my project, and the result would be a single executable file, that will open the 2 .exe files when running it. Obviously i could do all the steps, but im stuck on the file merging part.

View 4 Replies

VS 2008 Run An Executable With Arguments From An HTML Mail Message

Oct 22, 2009

I want one of my applications to send an HTML email message to a user with a hyper link in it to start up an executable with arguments passed to it. It works fine if I just specify the executable path with no arguments. But if I pass the arguments then Outlook says it can't find the file. Here is the line that I add to the email message body to start the exe only:

[Code]...

View 3 Replies

VS 2008 Published Projects - Get Hold Of The Actual Executable File

Jul 31, 2009

When a project has been published the file that is put in my start menu is an application reference. How do i get hold of the actual executable file so i can post a demo?

View 3 Replies

Generate Executable From An Executable?

Jul 24, 2011

I Actually want to provide a new service which requires creating executables on the fly from executables generated in vb.net. For example lets say I have a form with a textbox and in that textbox we pass an argument which is for example the serial of the product, then we have a button which once clicked will generate an executable on the fly which has also a textbox requiring that serial to run? That was only an example but the main thing is how to generate that exe on the fly.

View 4 Replies

Attempted To Read Or Write Protected Memory / Often An Indication That Other Memory Is Corrupt

May 22, 2007

Im getting a problem with one of my programs I have made in visual basic.NET where it gives me a memory error when i debug the program in the IDE. the exact error is this: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt". My program basically has a few forms with text fields on that get their text values from an access database on the same hard drive. Im wondering if im doing something wrong because my program just seems to eat up memory whenever it does anything. For example I have one form that has a combobox on it and when you change the drop down list selection it retreives a few strings from the database and puts them into the relevant text boxes, if you keep changing the selection then the memory usage (in task manager) just keeps going up and up. occasionally I get the error mentioned above when debugging but in my built version of the program it throws an exception everytime the memory usage gets past 49K.

Also I noticed when debugging in the "immediate window" frame I get the following message often:A first chance exception of type 'System. Invalid OperationException' occurred in System.Data.dll...Do I need to somehow be "releasing" the memory that is used to gather data once it becomes redundant?

View 12 Replies

Attempted To Read Or Write Protected Memory. This Is Often An Indication That Other Memory Is Corrupt

Nov 24, 2011

I am using the following code

This error occurs :

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Public Class FormRegEnumValue

[CODE]......................

View 2 Replies

Attempted To Read Or Write Protected Memory. This Is Often An Indication That Other Memory Is Corrupt?

Feb 1, 2009

QuoteSystem.AccessViolationException was unhandled Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Source="System.Windows.Forms"

Im designing a web browser and i continue to receive this error after going to about 3 websites it crashes with that error.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved