I gang

C++ Wrapper

I need a wrapper written for the VirtualBox API that makes the function TakeScreenShotToArray accessible (and functional) in .NET. This should be fairly trivial for someone familiar with C++.

The [url removed, login to view] API exposes the TakeScreenShotToArray function, however it fails with an error in .NET. I've read online that a C++ wrapper is required.

VirtualBox is a freely available virtualization package, similar to Virtual PC. The latest version can be downloaded freely online.

The website below mentions that a wrapper was written that allowed the function to work properly in VB.NET.

http://translate.google.com/translate?hl=en&sl=de&u=http://social.msdn.microsoft.com/Forums/de-DE/visualbasicde/thread/3f3d3375-459f-4249-bd43-3b4624edad53/&ei=L1pjTe_NGs-p8Ab6pvjRCw&sa=X&oi=translate&ct=result&resnum=7&ved=0CFMQ7gEwBg&prev=/search%3Fq%3DTakeScreenShotToArray%26hl%3Den%26client%3Dfirefox-a%26sa%3DN%26rls%3Dorg.mozilla:en-US:official%26prmd%3Divns

"you write a new DLL (in VC + +) and then binds this project in your VB.net.

Usage is quite simple.

HRESULT rc; HRESULT rc;

console->get_Display(&display); console-> get_Display (& display);

display->GetScreenResolution(0,&width,&height,&pixel); display-> GetScreenResolution (0, & width, & height, & pixel);
printf( "Screeninfo: width = %d
" , width); printf ("Screen Info: width =% d \ n", width);
printf( "Screeninfo: height = %d
" , height); printf ("Screen Info: height% d \ n", height);
printf( "Screeninfo: pixel = %d
" , pixel); printf ("Screen Info: pixel =% d \ n", pixels);
display->TakeScreenShotToArray(0,width,height,&data); display-> TakeScreenShotToArray (0, width, height, & data);

Na ja natürlich vorher noch console und display definieren. Well yes, of course, define beforehand and console display."

' An example of how the TakeScreenShotToArray function is used....

Public Function getScreenShot(ByVal virtualboxname As String) As Byte()

Dim vc As New VirtualBoxClient

For Each m As IMachine In vc.VirtualBox.Machines

If m.Name = virtualboxname Then

Dim s As New Session

m.LockMachine(s, LockType.LockType_Shared)

Dim w, h, bpp As UInteger

s.Console.Display.GetScreenResolution(0, w, h, bpp)

Dim sc() As Byte = s.Console.Display.TakeScreenShotToArray(0, w, h)

s.UnlockMachine()

Return sc

End If

Next

Return Nothing

End Function

Færdigheder: .NET, C++ Programmering, Software Arkitektur, Visual Basic

Se mere: virtualbox net api, wrapper net, virtualbox takescreenshottoarray, takescreenshottoarray, virtualbox net wrapper, takescreenshottoarray wrapper, visual c++ online, wrapper, net virtualbox api, interop, net wrapper, virtualbox wrapper, wrapper virtualbox, virtualbox api dll, virtualbox net api wrapper, virtualbox api wrapper, virtualbox api net, virtualbox api, wrapper api, dll api, visual wrapper, wrapper visual basic dll, wrapper visual, wrapper net, net virtual pc

Om arbejdsgiveren:
( 4 bedømmelser ) Indianapolis, United States

Projekt-ID: #958923

Tildelt til:

caoym

Hi,It's a simple project.I have rich experience in C++/Network Programming/Multithreading/Linux/Windows(Software Development Manager, 10+ years of experience).I'm looking forward to starting my first project as a freel Mere

$30 USD på 1 dag
(2 bedømmelser)
4.8

2 freelancers are bidding on average $140 for this job

YashpalSingh123

.net/C# experienced

$250 USD in 3 dage
(9 bedømmelser)
4.8