Importing DLL and running application under mono

I import "winmm.dll" by using the below code snippet.
 MyUtils = public static class
class method timeBeginPeriod(period:Integer):Integer; external;
class method timeEndPeriod(period:Integer):Integer; external;

Access the methods as below.
MyUtils.timeBeginPeriod(1); //within winform load event
MyUtils.timeEndPeriod(1); //within winform formclosing event

Under Windows 7 it's working fine as expected. Under mono on Linux System it works as well but with one exception. As soon as The code is started it pops up with a msg box with the name of the dll that is imported and OK button as shown following. When I click the OK button my program continues and runs as expected without any errors.

I have combed thru my program to see if I'm intentionally showing the dll file name anywhere but I simply can not find anything like that.
EDIT: Little bit more info the reason I want to work with winmm.dll is I want to be capable to adjust thread sleep granularity or default delay down to about 1 milliseconds or close to it - NOT to play movie or music file. The only approach I capable to adjust is thru these methods timeBeginPeriod and timeEndPeriod. So that my program can successfully talk thru serial port. My program is to be talking back and forth each some milliseconds nonstop 24/7/365 days. it's critical that it is communication is 90% or more. After having imported the dll file my programs communication is flawless on windows and linuxs except I'm facing that annoying messagebox on Linux under mono.
I have never seen or heard of such an problem before. Does someone why?
Thank You

Get Source Code

  Views 25   Posted on : Thursday, March 21, 2013 10:41:34 AM
Related Tags:

Replies on "Importing DLL and running application under mono" :

Nobody has replied on this post , be first to post answer.

Post Your Answer/Comment:

Please Login first to post Reply !

Note: Please Put Code into <code></code> block.

Also See: