Hi vegas scripting newbies,
thought it could be a good idea to share this brief Hello World C++ sample. While I found some samples for C#, I failed to find some for C++ or Visual C++ in particular. Nevertheless, Visual C++ was the only environment capable of attaching the running vegas process to get into debugging in its free version. So, I worried a bit with my abilities...
and here is the sample.
Have fun,
Thomas
************ IMPLEMENTATION ************
launch Visual C++ 2008 Express Edition
File -> New Project
- Template: class library
- Name: VegasCppHelloWorld
Project -> Properties
- new reference to Sony.Vegas (on the file system search tab to be choosen from within Vegas install folder: sony.vegas.dll)
- new reference to System.Windows.Forms (on the .NET tab)
Replace the template body of VegasCppHelloWorld.h with:
Hit F7 (make)
create a link from the VegasCppHelloWorld.dll and store it in the vegas Script Menu folder
launch vegas and execute the dll
:-)
************ DEBUGGING ************
Extras (english wording?) -> Attach Process
- select vegas70.exe
set a breakpoint on the MessageBox call
run the script
debugger stops at the breakpoint
:-)
thought it could be a good idea to share this brief Hello World C++ sample. While I found some samples for C#, I failed to find some for C++ or Visual C++ in particular. Nevertheless, Visual C++ was the only environment capable of attaching the running vegas process to get into debugging in its free version. So, I worried a bit with my abilities...
and here is the sample.
Have fun,
Thomas
************ IMPLEMENTATION ************
launch Visual C++ 2008 Express Edition
File -> New Project
- Template: class library
- Name: VegasCppHelloWorld
Project -> Properties
- new reference to Sony.Vegas (on the file system search tab to be choosen from within Vegas install folder: sony.vegas.dll)
- new reference to System.Windows.Forms (on the .NET tab)
Replace the template body of VegasCppHelloWorld.h with:
// VegasCppHelloWorld.h
#pragma once
using namespace System::Windows::Forms;
using namespace Sony::Vegas;
public ref class EntryPoint
{
public:
void FromVegas(Vegas vegas) {
MessageBox::Show("hello world");
}
};
Hit F7 (make)
create a link from the VegasCppHelloWorld.dll and store it in the vegas Script Menu folder
launch vegas and execute the dll
:-)
************ DEBUGGING ************
Extras (english wording?) -> Attach Process
- select vegas70.exe
set a breakpoint on the MessageBox call
run the script
debugger stops at the breakpoint
:-)