Home > Software engineering >  Consult everybody warrior, there's a problem for a long time
Consult everybody warrior, there's a problem for a long time

Time:09-16

Background: I use vb6.0 by use of a few months time to write a data processing software, in order to batch processing of data, currently has twelve thousand lines of code
Events: in the later time there was a problem, every time to run the program, debugging once an error into the state, not point "end," a little "termination" vb6 editor software immediately flash back,
Vb6 software should be no problem, because other code in the debug state flash back end will not lead to the editor
For help: what code can lead to debug mode to click to flash back end vb6.0 by use, consult an experienced teacher, help to analyze, thank you first!

CodePudding user response:

The most common is some hooks (or "subclass"),
Before the "stop" must have the corresponding UnHook,
Otherwise it will cause a collapse,

CodePudding user response:

According to what you said is "data processing", generally do not have a HOOK or something like that, in theory, can be "stop",

Did you use a "interface beautification" of the library or DLL?
If any, are likely in the "start", Attach to call it, such as Bind interface;
And before the end of operation, you must call the corresponding remove detach and relevant interface functions,

CodePudding user response:

With piecewise log position the problem step by step,
Nine times out of ten was the result of external call DLL, the incoming object pointer is wrong or not closing what cause,

CodePudding user response:

refer to the second floor Chen8013 response:
according to what you said is "data processing", generally do not have a HOOK or something like that, in theory can be "stop",

Did you use a "interface beautification" of the library or DLL?
If any, are likely in the "start", Attach to call it, such as Bind interface;
And before the end of operation, you must call the corresponding remove detach and relevant interface functions,

Thank you for your answer, is called a "interface beautification" of the library, and would like to ask you how to solve, could you provide some statements reference, first thank you

I statements in the program is:
Private Sub Form_Load ()
'adjustment parameters (255 is opaque, shadow depth 80, degree of edge sharpness of 10 is clear, the shadow size 5,0,0,0,0,0)
SkinH_AttachEx "C: \ Windows \ favored. She", ""
SkinH_SetAero (1)
SkinH_AdjustAero 255, 80, 10, 5, 0, 0, 0, 0, 0
End Sub

The statement is as follows:
Public Declare Function SkinH_AttachEx Lib "SkinH_VB6. DLL" (ByVal lpSkinFile As String, ByVal lpPasswd As String) As Long
Public Declare Function SkinH_Attach Lib "SkinH_VB6. DLL () As" Long
Public Declare Function SkinH_AttachExt Lib "SkinH_VB6. DLL" (ByVal lpSkinFile As String, ByVal lpPasswd As String, ByVal nHue As an Integer, ByVal nSat As an Integer, ByVal nBri As Integer) As Long
Public Declare Function SkinH_AttachRes Lib "SkinH_VB6. DLL" (lpRes As Any, ByVal nSize As Long, ByVal lpPasswd As String, ByVal nHue As an Integer, ByVal nSat As an Integer, ByVal nBri As Integer) As Long
Public Declare Function SkinH_AdjustHSV Lib "SkinH_VB6. DLL" (ByVal nHue As an Integer, ByVal nSat As an Integer, ByVal nBri As Integer) As Long
Public Declare Function SkinH_Detach Lib "SkinH_VB6. DLL () As" Long
Public Declare Function SkinH_DetachEx Lib "SkinH_VB6. DLL" (ByVal HWND) As Long As Long
Public Declare Function SkinH_SetAero Lib "SkinH_VB6. DLL" (ByVal HWND) As Long As Long
Public Declare Function SkinH_SetWindowAlpha Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal nAlpha As Integer) As Long
Public Declare Function SkinH_SetMenuAlpha Lib "SkinH_VB6. DLL" (ByVal nAlpha As Integer) As Long
Public Declare Function SkinH_GetColor Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal nPosX As an Integer, ByVal nPosY As Integer) As Long
Public Declare Function SkinH_Map Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal nType As Integer) As Long
Public Declare Function SkinH_LockUpdate Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal nLocked As Integer) As Long
Public Declare Function SkinH_SetBackColor Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal nRed As an Integer, ByVal nGreen As an Integer, ByVal nBlue As Integer) As Long
Public Declare Function SkinH_SetForeColor Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal nRed As an Integer, ByVal nGreen As an Integer, ByVal nBlue As Integer) As Long
Public Declare Function SkinH_SetWindowMovable Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal bMove As Integer) As Long
Public Declare Function SkinH_AdjustAero Lib "SkinH_VB6. DLL" (ByVal nAlpha As an Integer, ByVal nShwDark As an Integer, ByVal nShwSharp As an Integer, ByVal nShwSize As an Integer, ByVal nX As an Integer, ByVal nY As an Integer, ByVal nRed As an Integer, ByVal nGreen As an Integer, ByVal nBlue As Integer) As Long
Public Declare Function SkinH_NineBlt Lib "SkinH_VB6. DLL" (ByVal hDtDC As Long, ByVal left As an Integer, ByVal top As an Integer, ByVal right As an Integer, ByVal bottom As an Integer, ByVal nMRect As Integer) As Long
Public Declare Function SkinH_SetTitleMenuBar Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal bEnable As an Integer, ByVal nMenuY As an Integer, ByVal nTopOffs As an Integer, ByVal nRightOffs As Integer) As Long
Public Declare Function SkinH_SetFont Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal hFont As Long) As Long
Public Declare Function SkinH_SetFontEx Lib "SkinH_VB6. DLL" (ByVal HWND As Long, ByVal szFace As String, ByVal nHeight As an Integer, ByVal nWidth As an Integer, ByVal nWeight As an Integer, ByVal nItalic As an Integer, ByVal nUnderline As an Integer, ByVal nStrikeOut As Integer) As Long
Public Declare Function SkinH_VerifySign Lib "SkinH_VB6. DLL () As" Long

CodePudding user response:

Chewinggum
reference 3 floor response:
section logging ways, position the problem step by step,
Nine times out of ten was the result of external call DLL, the incoming object pointer is wrong or not closing what cause,

Thank you for your answer, will you please provide the next example, did not experience these, a mass of mist, thank you

CodePudding user response:

Not give you said it!!!!!!!!!!
In front of the stop, want to call it "Detach" interface!
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related