Find Jobs
Hire Freelancers

Rewrite LoadLibrary() and CreateProcess()

$100-500 USD

Closed
Posted almost 19 years ago

$100-500 USD

Paid on delivery
The current versions of the Win32 API functions LoadLibrary() and CreateProcess() are required to load binaries from file. We need these two functions to be rewritten so that both can now load from a previously loaded memory block instead of from file. As such the current Win32 functions LoadLibrary() and CreateProcess() must be rewritten as such: HMODULE LoadLibraryFromMemory( PVOID pBinaryImageInMemory, ULONG ulSizeInBytesOfBinaryImage ); BOOL CreateProcessFromMemory( PVOID pBinaryImageInMemory, ULONG ulSizeInBytesOfBinaryImage LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCTSTR lpCurrentDirectory, LPSTARTUPINFO lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation ); The rewritten functions must be: 1) Win32 and Win64 compliant. 2) Programmed in C or C++. If some assembler is required, feel free to inline it within the C/C++ source code, but only do so if absolutely required (i.e. assembler reduces maintainability). 3) Must be able to run on Win2000 and WinXP (all versions). 4) Must compile at Warning Level 4 without errors or warnings. 5) Must be able to work on user accounts that are restricted (i.e. not administrator account). 6) Accompanied by a verbose explananition of the algorithm and very rich comments within the code. 7) None of the functions should EVER WRITE TO DISK or any other kind of permanent storage. ## Deliverables 1) Must deliver a static library that contains the following functions: HMODULE LoadLibraryFromMemory( PVOID pBinaryImageInMemory, ULONG ulSizeInBytesOfBinaryImage ); BOOL CreateProcessFromMemory( PVOID pBinaryImageInMemory, ULONG ulSizeInBytesOfBinaryImage LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCTSTR lpCurrentDirectory, LPSTARTUPINFO lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation ); 2) A primary Visual Studio project with all source files. The source files must be richly commented. This Visual Studio project produces a static library. 3) A second Visual Studio project that tests both functions (i.e. a small demo test project). This Visual Studio project produces an executable. 4) A [login to view URL] file that contains any special instructions, restrictions and/or limitations of the two functions. _Source Code Requirements _1) Please use the hungarian notation on all variables and please use verbose variable names (i.e. the variable "ULONG i" is not acceptable. Instead use "ULONG ulIndex"). 2) Source code must be richly commented. This includes the function header which must detail which error codes are returned under which condition as well as notes regarding any special instructions/limitations of the function. 3) Source code must be well formatted using 4 space tabs. Spaghetti code with incoherent or formatting that varies is not acceptable. 4) Any compound expressions that involve several operators must use parenthesis to deliniate the order of precedence. As such, the statement "A = B * C / D + 1" is NOT ACCEPTABLE. Instead we want something like "A = ((B * C) / D) + 1" which deliniates exactly the order of precedence. _Notes _The PVOID pBinaryImageInMemory parameter passed into both the LoadLibraryFromMemory() and CreateProcessFromMemory() functions was allocated using VirtualAllocEx(). ## Platform Windows 2000 (all versions, all service packs). Windows XP (all versions, all service packs).
Project ID: 3765492

About the project

3 proposals
Remote project
Active 19 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $510 USD for this job
User Avatar
See private message.
$510 USD in 20 days
5.0 (149 reviews)
6.9
6.9
User Avatar
See private message.
$170 USD in 20 days
4.9 (105 reviews)
6.4
6.4
User Avatar
See private message.
$850 USD in 20 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
1
Member since Jun 14, 2005

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.