It is currently Wed Aug 22, 2018 3:06 am

All times are UTC + 1 hour

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Process hangs when OpenLibrary() is called twice in this way
PostPosted: Tue Nov 07, 2017 7:48 am 
User avatar

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 3222
This was actually a mistake on my part but I was surprised that it hung. Run the following snippet and the process will fail to terminate.

Tested on Windows 10 x64 with PureBasic 5.60 x64 with the debugger on:

OpenLibrary(Lib_advapi32, "advapi32.dll")

The process will not hang when using the same code to load user32.dll:

OpenLibrary(Lib_user32, "user32.dll")

And it does not hang when using LoadLibrary_() to load the library twice:


I would argue that despite this being a bug on my part I was lucky that I was only testing a small bit of code. Because it only hung as the process was attempting to terminate, there is no indication as to the source of the problem.


Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye