@DllPassBlob

Parent Previous Next

@DllPassBlob.

Pass a blob by reference to/from the DLL.


Syntax.


 @DllPassBlob(Integer handle; String funcName; Integer &cmd; Blob &bytes; Integer length)

 


Arguments:


Example:


 Integer dllHandle := 1;

 Integer cmd := -1;

 Integer len := 1000;

 Blob bytes.SetLength(len);

 @DllPassBlob(dllHandle, "My_DLL_API_FunctionName_Foo125", cmd, bytes, len);

 //Now both cmd and bytes may have other values.



The API Signature.

Any DLL function called using @DllPassBlob must match the argument signature presented here:



 //Same API signature in either Pascal or C/C++.


 // Pascal:

 procedure Foo(var cmd : int32; bytes : PByte; len : int32); stdcall;


 // C/C++:

 void foo(int& cmd, unsigned char* bytes, int len);



When using these or any other programming languages for the DLL please keep in mind to use 32 bit integers, and in case a call convention must be explicitly specified please choose either cdecl or stdcall.