CTL3DV2.DLL causes STACK Fault 
Author Message
 CTL3DV2.DLL causes STACK Fault

Quote:

>  Hi All!

>  I got a stumper for you. I am trying to use CTL3DV2.DLL in a VB
>  app. I initialize the DLL with no problem and I get my nifty
>  3d Message boxes! My app then shells out to another app which
>  uses CTL3DV2.DLL. Like clockwork, I get a Stack Fault in
>  USER.EXE which then GPFs (under 16-bit Windows 3.11). I am
>  blaming CTL3DV2.DLL because I switched to CTL3D.DLL everything
>  worked!  This situation doesn't even crop up under NT!  Does
>  anyone have any ideas, as I am really stumped!

>  Any help is appreciated!

>  Joe Hayes



Try this code:

'************************************************************************************
'   The following Declare statements are used to display Common Dialog in 3d.
'   Please move these statements to the Declaration section of a .BAS module.
Declare Function GetWindowWord Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer)
As Integer
Declare Function Ctl3DAutoSubclass Lib"Ctl3Dv2.DLL" (ByVal hInst As Integer) As Integer
Declare Function Ctl3DRegister Lib"Ctl3Dv2.DLL"(ByVal hInst As Integer) As Integer
Declare Function Ctl3DUnregister Lib "Ctl3Dv2.DLL" (ByVal hInst As Integer) As Integer
'************************************************************************************

        ' used with GetWindowWord
        Const GWW_HINSTANCE = (-6)
        'This variable will be used to store the instance of the application
        Dim hInst as Integer
        'This variable will be used as the return value for the Ctl3d functions
        Dim iRc as Integer
        ' This variable will contain the sum of the options
        Dim iOptions as Integer
        iOptions = MB_DEFBUTTON1+ MB_APPLMODAL+ MB_ICONSTOP+ MB_OK

' Get the instance of your App
        hInst = GetWindowWord(Me.hWnd, GWW_HINSTANCE)
        ' These statements turn on the 3D effects if there was a valid instance
        If hInst <> 0 Then
                iRc = Ctl3DRegister(hInst)
                iRc = Ctl3DAutoSubclass(hInst)
        EndIf
        MSGBOX "test", iOptions, "test"
        ' This statement turns off the 3D effects
        If hInst <> 0 Then
                iRc = Ctl3DUnregister(hInst)
        EndIf



Sat, 25 Oct 1997 03:00:00 GMT  
 CTL3DV2.DLL causes STACK Fault
Hi All!

I got a stumper for you. I am trying to use CTL3DV2.DLL in a VB
app. I initialize the DLL with no problem and I get my nifty
3d Message boxes! My app then shells out to another app which
uses CTL3DV2.DLL. Like clockwork, I get a Stack Fault in
USER.EXE which then GPFs (under 16-bit Windows 3.11). I am
blaming CTL3DV2.DLL because I switched to CTL3D.DLL everything
worked!  This situation doesn't even crop up under NT!  Does
anyone have any ideas, as I am really stumped!

Any help is appreciated!

Joe Hayes




Sat, 25 Oct 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Instr Causing Out of Stack Space Fault

2. Can't open VB6 because VB6 caused a stack fault in module VB6.EXE

3. Can't open VB6 because VB6 caused a stack fault in module VB6.EXE

4. Oracle - Stack Fault in CTL3D.DLL

5. Stack Faults in VBRun300.dll

6. Stack fault in Kernel32.dll

7. VB3: Stack fault in CRPE.DLL?????

8. MSACCESS caused an invalid page fault in module VBA332.DLL

9. MSACCESS caused an invalid page fault in module vba332.dll

10. Winword caused an invalid page fault in module VBE6.DLL

11. VB5 caused an invalid page fault in module KERNEL32.DLL

12. VB6 caused invalid page fault in module MSXBSE35.DLL

 

 
Powered by phpBB® Forum Software