**Task Description:
**A native C++ DLL needs to be wrapped so that it is accessible from managed Visual Studio .NET languages, specifically C#. The C++ DLL uses DirectX; therefore, the managed language wrapper must also make use of DirectX through the managed DirectX interface in DirectX 9.0. The C++ DLL makes extensive use of polymorphism and objects are used as method parameters. As a result, all C++ functions in the DLL are decorated (name mangled). The DLL provides a total of 115 public functions.
**Possible Solutions**
There are several possible solutions to achieving interop from a managed language. The solution you choose may be different.
The first option is the brute force approach. Create a C++ language wrapper that flattens the object-oriented design of the native C++ interface. With a flattened C++ wrapper it is possible to create a DLL that may be accessed directly from managed code. This option is the least attractive because it requires wrapping for the entire interface - method signatures would likely change to remove polymorphism.
The second option is to use an open source tool like SWIG (<[login to view URL]>) to autogenerate this interface. SWIG is able to generate C# language bindings from a native C++ library - therefore, this may be a viable option.
A third option is to thunk or make method calls into the DLL using decorated functions. This approach is not desirable because the underlying DLL, when recompiled, may have different function names.
It is likely that a better solution is available. The key design criteria is that the wrapper is extensible and maintainable
## Deliverables
**Deliverables**
The wrapper to this DLL is to be delivered in three increments. The first increment demonstrates basic functionality of the chosen concept/approach. The second deliverable is a sample program that uses approximately ten functions in the DLL. The third and final deliverable is a fully functioning example demonstrating successfull invocation of all 115 methods on the C++ DLL via C#. If bugs are identified in the final deliverable it is incumbent on the developer to provide bug fixes.
**Payment**
Although final compensation is determined by the bidding process, a bonus of 10% per week is offered for early project completion. This work must be completed on a four week schedule. Payment is delivered in full upon completion of the product.
Close of week 1: 30% pay bonus to final bid
Close of week 2: 20% pay bonus to final bid
Close of week 3: 10% pay bonus to final bid
Close of week 4: Final product deliverable is due, 0% bonus.
**Terms**
1) The finished product (wrapper, source code, resulting tools) becomes the sole property of the buyer. This product may not be resold or used in other products.
2) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
3) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
4) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
5) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Visual Studio .NET 2003, C#
WindowsXP
Managed DirectX 9.0c (October 2004)
DirectX 9.0c (October 2004)
.NET Framework 1.1