cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to load custom mlreplay DLL

Former Member
0 Kudos

Hi everyone,

I am trying to use a custom mlreplay DLL to test synchronization performance. I have created the dll using the generated source files from 'mlgenreplayapi' utility but when I try to start mlreplay with the custom dll I get an error saying that the dll cannot be loaded. There is no additional information in the log so I can't figure out what I have done wrong.

The following is the command I use to start mlreplay:

mlreplay -n 10 -o mlreplay.log ml-replay.dll recorded_protocol_fw820syncserver_2.mlr

I'm using SQL Anywhere 12.0.1.3726 on x64 machine. The dll is built for x64 architecture. I have attached a link to download the project in case anyone want's to look at the set-up.

http://www.fileconvoy.com/dfl.php?id=g88dd2bc727da9ae9999431395d001cc30c3ccbe55

Documentation on mlreplay is sparse so any suggestions/recommendation would be much appreciated.

Thanks,

Ross

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Update: It looks like I forgot to add dependency dll to the work directory. Now the dll is loaded but none of the callbacks can be found. I get this in the log:

I. 2013-12-18 14:13:24.100. SQL Anywhere MobiLink Replay Tool Version 12.0.1.3726

I. 2013-12-18 14:13:24.100.

I. 2013-12-18 14:13:24.100. Copyright © 2001-2012, iAnywhere Solutions, Inc.

I. 2013-12-18 14:13:24.100. Portions copyright © 1988-2012, Sybase, Inc. All rights reserved.

I. 2013-12-18 14:13:24.100. Use of this software is governed by the Sybase License Agreement.

I. 2013-12-18 14:13:24.100. Refer to http://www.sybase.com/softwarelicenses.

I. 2013-12-18 14:13:24.100.

I. 2013-12-18 14:13:24.198. <Main> Option 1: -n 10

I. 2013-12-18 14:13:24.198. <Main> Option 2: -o mlreplay.log

I. 2013-12-18 14:13:24.198. <Main> Option 3: ml-replay.dll

I. 2013-12-18 14:13:24.198. <Main> Option 4: C:\ml_replay_82\recorded_protocol_fw820syncserver_2.mlr

I. 2013-12-18 14:13:24.198. <Main> Starting MLReplay with recorded protocol file, C:\ml_replay_82\recorded_protocol_fw820syncserver_2.mlr

I. 2013-12-18 14:13:24.200. <Main> The recorded protocol version is 65

W. 2013-12-18 14:13:24.702. <Main> [5003] MLReplay was unable to load the GetUploadTransaction callback

E. 2013-12-18 14:13:24.702. <Main> [-5039] MLReplay was unable to load the IdentifySimulatedClient callback, which is a required callback

E. 2013-12-18 14:13:24.709. <Main> [-5048] MLReplay was unable to load the FiniIdentifySimulatedClient callback, which is a required callback

W. 2013-12-18 14:13:24.709. <Main> [5004] MLReplay was unable to load the DelayCreationOfSimulatedClient callback

W. 2013-12-18 14:13:24.709. <Main> [5013] MLReplay was unable to load the DelayDestructionOfSimulatedClient callback

W. 2013-12-18 14:13:24.716. <Main> [5005] MLReplay was unable to load the GetDownloadApplyTime callback

W. 2013-12-18 14:13:24.716. <Main> [5002] MLReplay was unable to load the ReportEndOfReplay callback

W. 2013-12-18 14:13:24.716. <Main> [5012] MLReplay was unable to load the DelayStartOfReplay callback

W. 2013-12-18 14:13:24.716. <Main> [5006] MLReplay was unable to load the GlobalInit callback

W. 2013-12-18 14:13:24.716. <Main> [5007] MLReplay was unable to load the GlobalFini callback

E. 2013-12-18 14:13:24.716. <Main> [-5002] MLReplay failed to initialize correctly

I. 2013-12-18 14:13:24.737. <Main> Ending MLReplay

Former Member
0 Kudos

Found the answer!

I had to create a .def file and put the exported callback functions into it like so:

LIBRARY   ml-replay

EXPORTS

  CreateAndInitMLReplayUploadTransaction

  DelayCreationOfSimulatedClient

  DelayDestructionOfSimulatedClient

  DelayStartOfReplay

  DestroyMLReplayUploadTransaction

  FiniIdentifySimulatedClient

  FreeAllUploadRows

  GetDownloadApplyTime

  GetNumRows

  GetNumUploadTables

  GetRow

  GetUploadTable

  GetUploadTransaction

  GlobalFini

  GlobalInit

  IdentifySimulatedClient

  ReportEndOfReplay

Answers (0)