» 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

~8d ago

~16d ago

joreg: Webinar on October 2nd: Rhino meets Realtime with vvvv https://visualprogramming.net/blog/2024/webinar-rhino-meets-realtime-with-vvvv/

~17d ago

joreg: 12-session online vvvv beginner course starting October 7th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-class/

~22d ago

joreg: Introducing: Support for latest Ultraleap hand-tracking devices: https://visualprogramming.net/blog/2024/introducing-support-for-new-ultraleap-devices/

~25d ago

joreg: 2 day vvvv/fuse workshop in Vienna as part of NOISE festival on Sept. 13 and 14: https://www.noise.ist/vienna

~1mth ago

joreg: New beginner video tutorial: World Cities https://youtu.be/ymzrK7tZLBI

~1mth ago

catweasel: https://colour-burst.com/2023/01/26/macroscopic/ yeah, ' is there anyone who cares about slides anymore...' Well me for a start! :D

~2mth ago

ventolinmono: The ELMO TRV-35 slides into your video feed > https://youtu.be/pcIM9mh1c9k?si=iB4FOfI2D6y0iETy

~2mth ago

joreg: The summer season of vvvv workshops is now complete, but you can still get access to all the recordings: https://thenodeinstitute.org/ss24-vvvv-intermediates/

~2mth ago