WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

!! WIL SDK !!
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Working with Binary Buffers

 Keywords:  

Question:

What do I need to do to work with the contents of a Binary Buffer in an Extender?

Answer:

Take a look at the WIL Extender SDK documentation... there are helper functions that allow you to interact with WIL binary buffer handles that were passed in to an extender function as a parameter.

For Binary Buffers see the DllBinaryServices helper function.

Hopefully this untested and undebugged code sample will help you get started.


// Verify that the argument is a binary buffer.
// (Using the first argument In this example.)
If ( lpvvArg[0].inittype & VARTYPE_BINARY ) {
    LONG_PTR lSize;
     LONG_PTR lResult = 0;
      BYTE * pData = NULL;

    // Get the size of the binary buffer In bytes.
    lSize = lpViperStruct->lpfnDllBinaryServices(lpViperStruct->hBatData, lpvvArg[0].x, 0, 5);


    // Get a pointer To the buffer data.
   If ( lSize > 0 )  {
         lResult =   lpViperStruct->lpfnDllBinaryServices(lpViperStruct->hBatData, lpvvArg[0].x, 0, 3);
   }

    // After checking For errors do whatever with the data.
      If (  lResult > 0 )
            pData = (BYTE *) lResult;

}

Article ID:   W17516
Filename:   Working with Binary Buffers.txt
File Created: 2017:07:28:12:58:14
Last Updated: 2012:11:26:08:50:23