Jump to content
  • 0

cbWinBufFree


Erick Baziw

Question


I have been using measurement computing universal library (CBW64.dll and CBW64.pas) for data acquisition code for years. The development environment I am using is Embarcadero RAD Studio (Delphi). The following calls have been working for years (up to and including RAD Studio XE10):

 var
    MemHandle            : THandle;

Begin
   MemHandle := cbWinBufAlloc ( LastIndex );
   ULStat := cbWinBufFree ( MemHandle);
End;

I am now compiling my code in RAD Studio XE11. Now when I execute my program,  I get the error "Range check error" in the call cbWinBufFree ( MemHandle): 

Note that I have also tried to declare MemHandle as the following types but get the same error:

   MemHandle            : UInt64;
   MemHandle            : Longint;
   MemHandle      : Integer;
   MemHandle            : NativeUint;

I have attached the file CBW64.pas provided by Measurement Computing. In this file the following is declared:

function cbWinBufAlloc (NumPoints:Longint):NativeUInt;{Integer;} StdCall;
function cbWinBufFree (MemHandle:Integer):NativeUInt;{Integer;}  StdCall;

Thanks, Erick 

CBW64.pas

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello,

Sorry, but we no longer provide technical support for the Embarcadero (pascal) programming language. We dropped support probably about the same time you received the cbw64.pas file, which was around 2008

This is a guess, but the cbw64.pas file you included wants to use InstaCal version 5.89. 

CURRENTREVNUM = 5.89;

If you've upgraded InstaCal, change this number to match InstaCal's version.

If that suggestion is of no help, look into generating a new.Lib linking library.

Otherwise, we have no reports of an issue with cbWinBufFree throwing a range check error.

Best regards,
John

 

Link to comment
Share on other sites

  • 0

Hi John,

Thanks for the feedback. Unfortunately, changing CURRENTREVNUM didn't help.  It is unfortunate that Measurement Computing no longer supports Delphi. How would I generate a new.lib linking library. Not clear on what this means and entails.

Regards,

Erick 

 

 

Link to comment
Share on other sites

  • 0

Hi John,

Some additional information -when I trace into    MemHandle := cbWinBufAlloc( LastIndex ); I am sent to CBW64.pas call 

function cbWinBufAlloc; external 'CBW64.DLL';

When I trace into ULStat := cbWinBufFree ( MemHandle); I am sent to System call 

procedure _BoundErr;
{$IFDEF PUREPASCAL}
begin
  ErrorAt(Byte(reRangeError), ReturnAddress);
end;

not 

o CBW64.pas call

function cbWinBufFree; external 'CBW64.DLL';

 

Also, please provide further information on how to generate a new.lib linking library. Not clear on what this means and entails.

Regards,

Erick 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...