Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error -2147024882 Out of Memory, when clicking on .exe

Status
Not open for further replies.

DarkhorseDave

Technical User
Jan 13, 2004
3
GB
I am currenly supporting a VB application written in VB6. I have loaded it on to a computer running Windows XP SP1 which has 504M of RAM and 69.5 GB free space on C drive. When I click on the exe to go in to the programme its starts to open and then i get a message Runtime error -2147024882, Out of Memory. I click OK and it just closes down. I have uninstalled and reinstall a number of times. Tried running JetSP8, MDAC 2.8 and the MDAC Component checker, there are no mismatched files. Also tried running VBScript Setup and VBRun Set Up. Then putting on VBScript6 SP6 and VBRun SP6. I have been searching for HELP on other sites and tried replacing the VB5DB.dll with the latest version. I checked the error log for the application and it states:

Error Number: -2147024882
Description: out of memory
Build Number: 216
Application: Inertia
Module Name: flogin
Procedure Name: load
Line Number: 1540

Any help would be greatly appreciated.

Thanks
Dave
 
You probably need to post the code for the Load procedure in the flogin Module if you want us to help much!

Read faq222-2244 for forum usage guidelines

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
The lines of code at this point are:

1530 fNoLogon.txtInformation.Locked = False
1540 fNoLogon.txtInformation.text = "To Register this product, please contact Paymentshield on: " _
& " 08000 32 22 12"
1550 fNoLogon.txtInformation.Locked = True


Thanks
Dave
 
Sorry, posted wrong code then...... here is the right code


fLogin line erroring = 1540

Private Sub Form_Load()

... other code for this procedure removed for confidentiality

1540 CenterForm fExternalSelection

... other code for this procedure removed for confidentiality

2170 Exit Sub
errhandler:
2180 LogError "fLogin", "Load"

End Sub



Public Sub CenterForm(formname As Form)
Dim lLeft As Long
Dim lTop As Long

With formname
lLeft = (Screen.TwipsPerPixelX * (GetSystemMetrics(SM_CXFULLSCREEN) / 2)) - (.Width / 2)
lTop = (Screen.TwipsPerPixelY * (GetSystemMetrics(SM_CYFULLSCREEN) / 2)) - (.Height / 2)
'The above code doesn't quite cut the mustard, as the top of the screen
'is a few pixels off the edge of the screen, whilst the bottom has a
'small gap, on an 800 x 600 display. So ...
lTop = lTop + Screen.TwipsPerPixelY * 10
'Move it ten pixels down!
.Move lLeft, lTop
End With
End Sub
 
That routine works fine for me!

1. Has this app worked before?
2. If so, has there been any work on the source code since?
3. If not, is it now installed with all its dependencies, or just the .exe copied over?

If all those questions are OK, and it works on other machines, you might check that USER32.DLL is not corrupt, as that is where the SystemMetrics routine comes from

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top