Bay Six Software Forum Index Bay Six Software
Beyond the Basics
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GPF when closing MDI Frame Window

 
Post new topic   Reply to topic    Bay Six Software Forum Index -> WMLiberty DLL
View previous topic :: View next topic  
Author Message
BASICwebmaster
Guest





PostPosted: Apr 11th, 2007, 7:01pm    Post subject: GPF when closing MDI Frame Window Reply with quote

Hi Brent, all.

I'm using the MDI features of WMLiberty.dll and, for some reason, I'm getting a GPF when the frame window is closed. I've eliminated any unecessary callbacks, and so on. This is probably something obvious, but I just can't spot it. I've attached the code below, help/advice is much appreciated.

Download JBWorkshop.zip (1.7 MB)
Back to top
Brent
Site Admin


Joined: 01 Jul 2005
Posts: 797

PostPosted: Apr 12th, 2007, 4:49am    Post subject: Re: GPF when closing MDI Frame Window Reply with quote

Hi Bill,

Indeed there are a few silly mistakes in your code. Your biggest boo-boo is defining global hInst but using variables named hIns and hInstance.

Here's a comparison of your original file (jbworkshop.bas) and my edits (JBWORKSHOP-EDIT.BAS):
Code:
Comparing files jbworkshop.bas and JBWORKSHOP-EDIT.BAS
***** jbworkshop.bas
    calldll #wmlib, "RegisterMDIFrameClass", FRAMECLASS$ as ptr, style as long, _
        0 as long, 0 as long, hIns as ulong, hIcon as long, hCursor as long, _
***** JBWORKSHOP-EDIT.BAS
    calldll #wmlib, "RegisterMDIFrameClass", FRAMECLASS$ as ptr, style as long, _
        0 as long, 0 as long, hInst as ulong, hIcon as long, hCursor as long, _
*****

***** jbworkshop.bas
    calldll #wmlib, "RegisterMDIChildClass", CHILDCLASS$ as ptr, style as long, _
        0 as long, 0 as long, hIns as ulong, 0 as long, _hCursor as ulong, _
***** JBWORKSHOP-EDIT.BAS
    calldll #wmlib, "RegisterMDIChildClass", CHILDCLASS$ as ptr, style as long, _
        0 as long, 0 as long, hInst as ulong, 0 as long, hCursor as ulong, _
*****

***** jbworkshop.bas
    calldll #user32, "GetSubMenu", hMenu as ulong, 1 as long, hWindow as ulong
***** JBWORKSHOP-EDIT.BAS
    calldll #user32, "GetSubMenu", hMenu as ulong, 1 as long, hWindowMenu as ulong
*****

***** jbworkshop.bas
    calldll #wmlib, "CreateMDIClient", style as long, 0 as long, 0 as long, -1 as long, _
        -1 as long, hWndFrame as ulong, 0 as long, hInstance as ulong, hWindowMenu as ulong, _
***** JBWORKSHOP-EDIT.BAS
    calldll #wmlib, "CreateMDIClient", style as long, 0 as long, 0 as long, -1 as long, _
        -1 as long, hWndFrame as ulong, 0 as long, hInst as ulong, hWindowMenu as ulong, _
*****

***** jbworkshop.bas
    r = UnregisterClass(FRAMECLASS$, hInstance)
    'r = FreeLibrary(hEXE)
***** JBWORKSHOP-EDIT.BAS
    r = UnregisterClass(FRAMECLASS$, hInst)
    r = UnregisterClass(CHILDCLASS$, hInst)
    r = FreeLibrary(hEXE)
*****

BUT the biggest problem is that you're using an outdated version of WMLiberty! The version included with your download is 1.0.3.0. My computer has version 1.1.0.1.

Oddly enough, the file on my site is also 1.0.3 labelled as 1.0.2. It's been so long since I've worked on it, I honestly don't know what happened. The RC file in the distro says version 1.0.3 and I search my entire harddrive for other versions without success. Maybe the newer files are on a CD-ROM somewhere. I'll post the version 1.1 DLL here for now so that you can confirm whether it fixes the GPF.

//EDIT: Moved attachment to the WMLiberty main page.

_________________
Brent


Last edited by Brent on Sep 23rd, 2007, 8:55pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
BASICwebmaster
Guest





PostPosted: Apr 12th, 2007, 8:35pm    Post subject: Re: GPF when closing MDI Frame Window Reply with quote

Truth be told, I didn't know there even was a v1.1. I'll try out those fixes.

(Oh, and this won't be released as JB Workshop Rolling Eyes)
Back to top
BASICwebmaster
Guest





PostPosted: Apr 12th, 2007, 8:48pm    Post subject: Re: GPF when closing MDI Frame Window Reply with quote

It seems the old version of WMLiberty was the root problem. All changes made, and it's running a-OK now.
Back to top
carlo
Guest





PostPosted: May 25th, 2007, 1:43pm    Post subject: Re: GPF when closing MDI Frame Window Reply with quote

Dear Brent :

first of all, thanks for creating WMLiberty, it helped me resolving erratic errors in autoresizing a bunch of controls in my software project using native LB code. It will be nice to have it included in LB5.

I experienced the same problem with the WMLiberty version. Everything is going fine now after downloading the file from the site you suggested above.
The file I had previosly downloaded from your site was smaller (around 18 K against 49K) and made me crazy.


Anyhow, thanks again, and I will continue to use your DLL in my future (hopefully) projects.

Yours Carlo
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bay Six Software Forum Index -> WMLiberty DLL All times are GMT
Page 1 of 1
Jump to:  
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
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Lo-Fi Version
Powered by phpBB © 2001, 2005 phpBB Group