>How do I define and pass Array binary data to a DLL procedure? I am accessing a API that requires I use a Array "BYTE DATA TYPE" to define a work area for the API to manipulate data. How is this done in VFP?
>
>Here is the funtion:
>
>FUNCTION : compress_ANSI_StringBuildALL()
>
>Parameter: workSpace = Points to a buffer, This is where the API holds the larger structures that it deals with . This releases the API from maintaining thses structures on the stack in order to remain re-entrant.
>
>I sent the API developer a email about the API function as here was his reply.. Mind you the developer is not a VFP programer and I'm not a C++ programer so here I am.
>
>****************************
>You probably declare workarea as a String and it can be a problem.
>When passing binary data to a DLL procedure, pass a variable
>as an array of the Byte data type, instead of a String
>variable. Strings are assumed to contain characters,
>and binary data may not be properly read in external
>procedures if passed as a String variable.
>****************************
>Any Ideas?
>
>
>Thanks,
>
>Gary
A string should work for this. Have you tried it? If so, can you post the code that you are using?
Erik Moore
Clientelligence