|
-
Jun 26th, 2008, 07:04 AM
#1
Thread Starter
New Member
Visual Basic and dll problem
Im doing some mp3 ripper. In really im using RealBasic to make user interface but i think that it is not important. The user interface has made by basic and rest of it is in dll which use c. I call dll functions with declare.
At the moment i have a problem that when i call the RipCD()- function in dll, user interface has freezed until the dll return a value. And in this case it really take several minutes to rip whole cd. Only if i put some messagebox to dll pop for example in every 2 sec, it refresh the user interface in the same time.
Is there any solution to dll?
It is developed by c-language but i think that many people with visual basic have had the same problem and can solve it better.
-
Jun 26th, 2008, 07:07 AM
#2
Re: Visual Basic and dll problem
Thread moved to 'Other BASIC' forum, which is for kinds of BASIC other than VB (while there are similarities between VB and RealBasic, several things are very different)
-
Jun 27th, 2008, 06:26 AM
#3
Thread Starter
New Member
Re: Visual Basic and dll problem
Ok then but if someone still have the solution for the problem even with visual basic, please tell me.
-
Aug 2nd, 2008, 09:00 AM
#4
Re: Visual Basic and dll problem
It sounds as if this DLL is doing a lengthy blocking operation instead of using async callbacks or event messages. If there isn't another way to call it you need another thread - and classic VB doesn't offer this, perhaps RB doesn't either.
One hack in VB would be to create a second program to run as a second process. The main process would start and monitor this process by using API calls or a component designed for the purpose. With a little clever coding this could all be in one EXE, the first one passing a command line parameter to the "slave" process so it knows how it should act in this instance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|