» blackbox sdk
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

blackbox sdk

acl(admin devvvv vvvvgroup)

the blackbox SDK allows developers to load encrypted patches.
vvvv looks on startup if a certain 'Decrypt.dll' is in the '/bin' directory. if so, it loads the dll and links 4 methods the dll must provide:

begin
 
 //assign dll handle
 DLLHandle := LoadLibrary('..\Decrypt.dll');
 
 if DLLHandle <> 0 then
 begin
   @Init    := GetProcAddress(DLLHandle, 'Init');
   @Decrypt := GetProcAddress(DLLHandle, 'Decrypt');
   @Tick    := GetProcAddress(DLLHandle, 'Tick');
   @GetErrorString := GetProcAddress(DLLHandle, 'GetErrorString');
 end;
end;

the dll has to declare the functions as follows:

function Init: Integer; stdcall;
 
begin
  //init decrytion system, called by vvvv only once on startup
 
  Result := 0; //tell vvvv everything is ok
end;
 
 
// check if still valid
 
function Tick: Integer; stdcall;
begin
  //this method is called every frame, so be very careful what you do here
 
  Result := 0; //the result of this method is the output of the Blackbox node
end;
 
// get the decrypted patch from file
function Decrypt(const PFileName: Pointer; const FileNameLength: LongWord; PFileContent: Pointer): Integer; stdcall;
 
var
  PDecrypted: PWidestring;
  filename: String;
 
begin
 
  //cast the pointer content to a string
  filename := PString(PFilename)^;
 
  // try to open the file:
 
  // point to the mem location from the caller
  PDecrypted := PFileContent;
 
  //fill the memory location with a decrypted patch xml string
  PDecrypted^ := DecyptFile(filename);
 
  Result := 0; //values below 0 will cause an error and vvvv will display an error message
end;
 
// get the error string whenever Init or Decrypt return values below 0
function GetErrorString(PErrorString: Pointer): Integer; stdcall;
 
var
  PString: PWidestring;
 
begin
 
  Result := 0;
  try
    // point to the mem location from the caller
    PString := PErrorString;
 
    // assign memory
    PString^ := "your human readable error string";
 
  except on E: Exception do
    Result := -100;
  end;
 
end;
 
//dont forget to export the methods
exports Init, Decrypt, Tick, GetErrorString;

anonymous user login

Shoutbox

~2d ago

joreg: vvvvTv S0204 is out: Custom Widgets with Dear ImGui: https://youtube.com/live/nrXfpn5V9h0

~2d ago

joreg: New user registration is currently disabled as we're moving to a new login provider: https://visualprogramming.net/blog/2024/reclaiming-vvvv.org/

~10d ago

joreg: vvvvTv S02E03 is out: Logging: https://youtube.com/live/OpUrJjTXBxM

~12d ago

~13d ago

joreg: Follow TobyK on his Advent of Code: https://www.twitch.tv/tobyklight

~17d ago

joreg: vvvvTv S02E02 is out: Saving & Loading UI State: https://www.youtube.com/live/GJQGVxA1pIQ

~17d ago

joreg: We now have a presence on LinkedIn: https://www.linkedin.com/company/vvvv-group

~24d ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~1mth ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~1mth ago