Runtime error:453 cannot find dllentrypoint

Reply

Join Date: May 2007
Posts: 7
Reputation: Vaishali Chavda is an unknown quantity at this point 
Solved Threads: 0
Vaishali Chavda Vaishali Chavda is offline Offline
Newbie Poster

Runtime error:453 cannot find dllentrypoint

 
0
  #1
May 25th, 2007
Hi
I have an application in vb which encountes this two errors:

cannot find dlllentrypoint:setLayered.window attributes in user32.dll


and 2nd

runtime error 91: Object variable or block variable not set.

when i run it on windows 98 , but it works fine with windows XP..

Can any one please help me in this..so that i can run it on both OS..
And also make clear this doubts..

thanx.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 59
Reputation: PVBert is an unknown quantity at this point 
Solved Threads: 5
PVBert PVBert is offline Offline
Junior Poster in Training

Re: Runtime error:453 cannot find dllentrypoint

 
0
  #2
May 25th, 2007
runtime error 91:
somewhere in your code you probably
didn't use SET , example:

Dim a as SOMEOBJECT
a = ....

instead of:
SET a = New SOMEOBJECT
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 7
Reputation: Aaraggornn is an unknown quantity at this point 
Solved Threads: 1
Aaraggornn Aaraggornn is offline Offline
Newbie Poster

Re: Runtime error:453 cannot find dllentrypoint

 
0
  #3
May 28th, 2007
The error: cannot find dlllentrypoint:setLayered.window attributes in user32.dll is caused in Windows 98 because Windows 98 cannot make windows transparent (the SetLayeredWindowAttribute API call is used to make windows or forms transparent).
Windows XP supports transparent windows so it works there.
The only way to make it work in Windows 98 is to remove or comment out all references to the SetLayeredWindowAttributes API call or code it so that it only runs that code if the operating system is Windows 2000/XP/Vista (I'm not sure how to do that right at the moment, but I can find out if you want).
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 7
Reputation: Vaishali Chavda is an unknown quantity at this point 
Solved Threads: 0
Vaishali Chavda Vaishali Chavda is offline Offline
Newbie Poster

Re: Runtime error:453 cannot find dllentrypoint

 
0
  #4
May 29th, 2007
Hi..Aaraggornn.
Thank you so much for ur reply..
And yes, if you can find it for me i would be a great help.
And also can u tell me which are those references to the SetLayeredWindowAttributes API call or code ??? Any example that u can give me.

Thank u.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 7
Reputation: Aaraggornn is an unknown quantity at this point 
Solved Threads: 1
Aaraggornn Aaraggornn is offline Offline
Newbie Poster

Re: Runtime error:453 cannot find dllentrypoint

 
0
  #5
May 29th, 2007
Note: All this code should work in Microsoft Visual Basic 5 or 6. It won't work if you are using the .Net version.

To code it so that the SetLayeredWindowAttributes function is only called if you are running Windows NT and higher you would need to add the following code. This declares the SetLayeredWindowAttributes function, the OSVERSIONINFO type which is used to store the information and the constants used to determine the OS type. It also declares the variable we will use to store whether we can use the function.

In the declaration section of the form you would add (the declaration section is usually up the top of the code window):
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Declare Function GetVersionEx Lib "kernel32.dll" Alias "GetVersionExA" (ByRef lpVersionInformation As OSVERSIONINFO) As Long
  2.  
  3. Private Type OSVERSIONINFO
  4. dwOSVersionInfoSize As Long
  5. dwMajorVersion As Long
  6. dwMinorVersion As Long
  7. dwBuildNumber As Long
  8. dwPlatformId As Long
  9. szCSDVersion As String * 128 ' Maintenance string for PSS usage
  10. End Type
  11.  
  12. Private Const VER_PLATFORM_WIN32_NT As Long = 2
  13. Private Const VER_PLATFORM_WIN32_WINDOWS As Long = 1
  14. Private Const VER_PLATFORM_WIN32s As Long = 0
  15.  
  16. Dim CanUseLayered as Boolean

In the Form_Load subroutine (which is usually what comes up when you double click the form in the editor) you would add:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim OSVersion As OSVERSIONINFO
  2. OSVersion.dwOSVersionInfoSize = Len(OSVersion)
  3. Call GetVersionEx(OSVersion)
  4.  
  5. If OSVersion.dwPlatformId >= VER_PLATFORM_WIN32_NT Then
  6. CanUseLayered = True
  7. Else
  8. CanUseLayered = False
  9. End If
The first three lines are used to retrieve the OS version.
The other lines work out if you are using Windows 2000 or higher. If you are it sets CanUseLayered to True otherwise it sets it to False.

You would now need to find all the SetLayeredWindowAttributes calls in your code. They could look something like this:
SetLayeredWindowAttributes hwnd, 0, 255, LWA_ALPHA
or
variable = SetLayeredWindowAttributes(hwnd, 0, 50, LWA_ALPHA)
SetLayeredWindowAttributes has 4 different parts.
The first one, hwnd, is the handle to the form that is being made transparent, this could look like Form1.Hwnd or it could be any variable.
The second, 0, is the transparent colour of the window but is not used.
The third, 255, is the amount of transparency you want, 0 is completly transparent and 255 is completly opaque. This could also be a variable.
The fourth, LWA_ALPHA, is telling it that you want to make it transparent. This could also be the number 2. If it is LWA_COLORKEY or the number 1 then the second option, the transparent color, is used and not the level of tranparency.

You would need to add before each SetLayeredWindowAttributes call the following line:
If CanUseLayered = True Then
After each SetLayeredWindowAttributes call you would add:
End If
These just make it that if CanUseLayered is True then it will call the SetLayeredWindowAttributes function. If it is not True then it won't call the function.

It would look something like this:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. If CanUseLayered = True Then
  2. SetLayeredWindowAttributes hwnd, 0, 50, LWA_ALPHA
  3. End If

If you only wanted to comment out the SetLayeredWindowAttributes calls you would just put an apostrophe (') before each line that calls the function.

I hope this helps you.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC