|
I happened to read the white paper on boxed app, and it stated that they were hooking all the file system calls and creating a virtual file system within the process memory.
I didn't want to tinker with that, because intercepting all file system calls would be fairly complicated to get correct. I stopped into their forums, and the fact that there are threads that say "bug here... Found bug here... This doesn't work in this way..., etc." suggests to me that its not a robust way to do things.
Also note, that the article where they packaged .NET was when .NET 3.5 was available. Who knows what has changed since then.
I am fairly new to API hooking, so it if it possible to hook all file system calls easily and reliably like they apparently do, I can be persuaded otherwise.
However, note that I did some hooking tests to see what the Win32 LoadLibrary was doing. It turns out that it used ZwOpenFile to open a file, but never calls ZwReadFile. This means that windows is somehow internally reading the file without using its own API, unless I am missing something. If this is true, I have no clue how BoxedApp is seemingly intercepting ZwOpenFile and modifying the PHANDLE parameter to point to a valid file handle in memory. Sure if you knew the layout and structure of Win32 file handles AND can create your own arbitrary, valid Win32 handles (which I am not aware that you can), then maybe you can do what they are doing.
With that said, I don't know how they are hooking the file system calls if ReadFile is never called from LoadLibrary. If you could hook ReadFile, then you would have a much better chance of getting something done, because I would think you could just manually return some byte arrays from memory to the LoadLibrary call.
|
|
|
|
|
This is probably the wrong place to ask this question,...please direct me to the proper forum if it is.
The question is:
Is it possible to invoke a NET Framework interface (an object and its member functions) from a MASM assembly language program ??? Obviously, this assumes that a version of the NET Framework library exists on the computer that the program runs on, and, that the exported function is prototyped correctly.
|
|
|
|
|
Yes you can. It won't be easy, but it is possible.
|
|
|
|
|
PETE,
Thanks for the response. I assumed that it was possible, but, very inconvenient. I'll have to do some more research.
Just out of curiosity,...how exactly do you know it is possible ???
|
|
|
|
|
For example -> Windows C++ app hosts CLR[^]
You just have to do the same thing in Assembly Language. If you can write a Windows app in Assembly, you can host the CLR in it too.
|
|
|
|
|
DAVE,
Thanks,...I'll read through the source code. This is very encouraging.
modified 17-Jul-13 13:54pm.
|
|
|
|
|
Also, every .NET application starts as a normal Win32 application and then calls into the .NET runtime library. The rest of the executable 'contents' is usually MIDL (an intermediate language for .NET), which is then interpreted by the .NET runtime.
|
|
|
|
|
i want to show report based on date condition and show it in gridview. It is working in my local machine but not working in server after hosting.
query is SELECT * FROM table WHERE DATE(colmn1) between 'startdate' and 'enddate'
What could be the problem.
If anybody knows please reply me.
Thanks in advance
|
|
|
|
|
This has nothing to do with the .NET framework.
You would probably be better off posting this in the appropriate forum, the database forum for example[^]
You might want to supply a bit more information than "not working" as "not working" is neither helpful nor informative in describing a problem.
|
|
|
|
|
ven753 wrote: If anybody knows please reply me.
Could be several reasons due to bad assumptions some of possibilities of which follow.
- You are not running that code in production.
- You think you know what dates should work but they do not in fact represent data in the data base.
- Your code is working on one database and you are looking at another (thus the dates do not match.)
- The dates that you think are being used in the code are not in fact the ones being used.
- Your only information comes from someone else reporting the problem and they are reporting in wrong.
|
|
|
|
|
|
Sorry, flagged as spam.
Member 10154869 wrote: They have programmers online to help you now. Only cooks and werewolves here?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi all,
I'm a newbie at VB.net,
I want connect to access via VB.net and manager two table with a relation type "master-child",
Master table named "Book" consists of three columns: BookID [AutoNumber], Author [Text], Description [Text],
Child table named "Chapter" with three columns: ChapterID [AutoNumber], BookID [Number], Title [Text],
Then I create an application VB.net that has one main window using a dataset with two table Book and Chapter. I make a relation between them, from BookID in the table Chapter to BookID in the master table. I use a databindingsource to manager them, the table Book is displayed by a form detail, the Chapter by a datagridview. When I delete a row in Book-table, I also want delete all chapter located it. I tried to use Tableadapter but the chapters were not deleted.
Help me,
|
|
|
|
|
|
Truth be told I wanted to put this in design and infrastructure but for some reason the page was blank. Anyways this is a good spot because it has some .net specific issues. I am starting to write a rather large program. Easily my biggest ever by a long shot. Now I am having an issue with how the interface should deal with requirements of the dll. I will give an example. The dll will make a submission to a website and the submission should have at least 1 image. So as I see it I have 2 options and could actually do both. Should the interface know this requirement and check if the user has added at least one image (therefore alerting the user and not making the submission) or should the dll throw an exception to which the interface will catch and then let the user know. Or should I do both? Or is there another way that I am not thinking of?
|
|
|
|
|
I will make sure if I want to make only website submission's DLL or make another DLLs using the same interface.
In the first case make sense to write the check at application level because you'll produce less code at DLL level.
But if you want to write not only website submission plug-in I will write the check at plug-in level and will have the exception handling at application level as you write.
Generally whatever you choose it should be clear and documented for plug-in programming purposes.
|
|
|
|
|
Hi all,
I've got an issue I've been digging on for a few days and just can't seem to find an answer. I have this textbox that's in a grid. The way this page is set up, when the user enters the page for the first time, the first row of the grid (including my troublesome textbox) is in edit mode. When I change the number from 0 to 10 in the textbox and tab out, I expect the TextChanged event to fire, but it doesn't. But if I click back into the textbox and change the number again and tab out, the TextChanged event does fire.
I thought maybe it was in my page load so I put a breakpoint at the bottom of the pageload method. At that point, the textbox.text = 10. I checked the viewstate of the textbox and the value is 0 and IsDirty = true.
I'm stumped what to check next. I also don't know what code to send since it looks like everything's set the way it should be but it just doesn't work the first time.
Any help you can give would be GREATLY appreciated.
Hypermommy
|
|
|
|
|
When I click on run I get this error (VS 2010 and VB.NET)
Error Could not copy "C:\Users\Danial\pay.mdf" to "bin\Debug\pay.mdf". Exceeded retry count of 10. Failed.
I have just changed the connection string from
Dim con = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Danial\ESI_PF_Payroll_V1\Pay.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")
TO
Dim con As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Pay.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")
So that I could not get errors while installing application on the client machine.
I got the error.
How could I get rid of that error?
my application is not starting.
|
|
|
|
|
It is probably because the properties of that file indicate that it should be copied to the bin\Debug directory when starting the application in Visual Studio. Change the properties so it does not always copy, or run your application from outside of Visual Studio.
Use the best guess
|
|
|
|
|
It is indicated that 'copy if newer' in the properties.
|
|
|
|
|
Then you should check that it can write into the destination folder successfully. It's impossible (from here) to discover why the copy is failing.
Use the best guess
|
|
|
|
|
Yes I know it's difficult from (there)to discover .but thank you for your help.
I have tried few times opening the application and now it works ...but will check why it happened ,because it might fall apart again.
|
|
|
|
|
It may well be that you have some connection left open somewhere that is preventing the copy from succeeding. It is probably best to run your tests outside of Visual ~Studio so that the copying of the database is not actually part of your test.
Use the best guess
|
|
|
|
|
This is just a stab in the dark, but possibly a typo? Maybe "Danial" should be "Daniel"?
|
|
|
|
|