473,378 Members | 1,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

project in vb

Desciption : This VB project enables you to logoff
programme:
Expand|Select|Wrap|Line Numbers
  1. const EWX_LogOff as long=0
  2. const EWX_SHUTDOWN as long=1
  3. const EWX_REBOOT as long=2
  4. const EWX_FORCE as long=4
  5. Private Declare Function ExitWindow _
  6. Lib "User32" Alias "ExitWindowEx" _
  7. (Byval dwOption as Long, Byval dwReserved as Long) as Long
  8. Private Sub command1_Click()
  9.   ExitWindow EWX_SHUTDOWN,&HFFFFFFFF
  10. End Sub
  11. Private Sub command2_Click()
  12.   ExitWindow EWX_REBOOT ,&HFFFFFFFF
  13. End Sub
ERROR :
But there is error as compiler error :
expected :Lib
I can't understand it and also &HFFFFFFFF what is that?
It will not work on the window ntos.
Feb 7 '08 #1
11 2098
debasisdas
8,127 Expert 4TB
use this

Expand|Select|Wrap|Line Numbers
  1. Private Declare Function ExitWindow Lib "User32" Alias "ExitWindowEx" (ByVal dwOption As Long, ByVal dwReserved As Long) As Long
  2.  
  3.  
and is not supported on NT.

Please find details here .
Feb 7 '08 #2
VACEPROGRAMER
168 100+
Hi. Dont do taht , this is easy way . . . .

Shell("ShutDown -i , -t 01)

' i don't know was -i or something other
It works whit VB5,VB6 and VB.Net

*VACE*
Feb 7 '08 #3
Killer42
8,435 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1. Private Declare Function ExitWindow Lib "User32" Alias "ExitWindowEx" (ByVal dwOption As Long, ByVal dwReserved As Long) As Long
That's exactly what the original post said. Except that it was typed in and was missing some capitals, of course (I've corrected it now).

nimbalkar, the &HFFFFFFFF you asked about is a hexadecimal (base 16) value. Look it up in your documentation, or on the web. Wikipedia probably has a good description.
Feb 8 '08 #4
ERROR:
while running again there run time error:
can't find dll entry point exitwindowex in user 32
-------------------------------------------------------------------------------------------------------------------
[quote=nimbalkar]Desciption : This VB project enables you to logoff
programme:
Expand|Select|Wrap|Line Numbers
  1. const EWX_LogOff as long=0
  2. const EWX_SHUTDOWN as long=1
  3. const EWX_REBOOT as long=2
  4. const EWX_FORCE as long=4
  5. Private Declare Function ExitWindow _
  6. Lib "User32" Alias "ExitWindowEx" _
  7. (Byval dwOption as Long, Byval dwReserved as Long) as Long
  8. Private Sub command1_Click()
  9.   ExitWindow EWX_SHUTDOWN,&HFFFFFFFF
  10. End Sub
  11. Private Sub command2_Click()
  12.   ExitWindow EWX_REBOOT ,&HFFFFFFFF
  13. End Sub
Feb 8 '08 #5
ERROR:
while running again there run time error:
can't find dll entry point exitwindowex in user 32
Feb 8 '08 #6
QVeen72
1,445 Expert 1GB
Hi,

When you Shut-Down a WindowsNT , / Win2K, you need to have Sufficient Privileges, and the Status of Shut-Down.
Check the code here

Regards
Veena
Feb 8 '08 #7
Killer42
8,435 Expert 8TB
My initial guess would be that ExitWindowEx is a mis-typed ExitWindowsEx. This is based merely on the observation that we're dealing with Microsoft Windows.
Feb 12 '08 #8
werks
220 100+
Try this code..

Shell("rundll32.exe user32.dll, LockWorkStation")
Feb 12 '08 #9
My initial guess would be that ExitWindowEx is a mis-typed ExitWindowsEx. This is based merely on the observation that we're dealing with Microsoft Windows.

I have saw that there is nothing missing .again there is same error cant find the dll entry point. what is that
Feb 12 '08 #10
Killer42
8,435 Expert 8TB
I have saw that there is nothing missing .again there is same error cant find the dll entry point. what is that
I'm afraid your post is a bit hard to understand. But a little research on the web has shown that the suggestion I made in post #8 is almost certainly correct. For details, see this link.
Feb 12 '08 #11
[quote=nimbalkar]Desciption : This VB project enables you to logoff
programme:
Expand|Select|Wrap|Line Numbers
  1. const EWX_LogOff as long=0
  2. const EWX_SHUTDOWN as long=1
  3. const EWX_REBOOT as long=2
  4. const EWX_FORCE as long=4
  5. Private Declare Function ExitWindow _
  6. Lib "User32" Alias "ExitWindowEx" _
  7. (Byval dwOption as Long, Byval dwReserved as Long) as Long
  8. Private Sub command1_Click()
  9.   ExitWindow EWX_SHUTDOWN,&HFFFFFFFF
  10. End Sub
  11. Private Sub command2_Click()
  12.   ExitWindow EWX_REBOOT ,&HFFFFFFFF
  13. End Sub
PROBLEM:
now there is no error but the system willnot shut down
Feb 13 '08 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: public heath vb developer | last post by:
We have a solution with 29 projects including a main menu and 28 dlls. One of the projects (Project B) was created by copying an existing project (Project A), making changes including the assembly...
2
by: Rudy Ray Moore | last post by:
How can I modify the project build order of a multi-project workspace under "Visual Studio .net 2003 7.1 c++"? I tried to modify the .sln by hand to influence the build order, but it didn't seem...
1
by: Jerad Rose | last post by:
Hello, I have searched all over for the answer to this, to no avail. I have a web project already set up and running on a remote server, that I created from my home computer. I am now trying...
11
by: Dave | last post by:
I copied the project files from an ASP.NET project on one computer and want to create the project on another computer, There is no connection between the two computers so I simply copied the...
4
by: Brad | last post by:
I'm not one to rant or flame....so please excuse me while I do so for this once. I've now spent a bit of time working with VS2005 beta 2 to see how it functions for web development, especially how...
7
by: Mantorok | last post by:
Hi all We have an ASP.Net project (and the Solution) under source-control. Here is the example - I create the Solution, I create an ASP.Net project and then check it all in to source control,...
6
by: liu | last post by:
Hi all, in my vb.net solution, i have 3 project: 1. Main-this is the startup or the base of my window application. 2. Sales-this is the project that contains all the sales info 3. Product-this...
9
by: Anubhav Jain | last post by:
Hi, I am having few .net source files(.cs or .vb) and I want to dynamically generate the corresponding .net project file(.csproj or .vbproj) for them without using visual studio.So that I could...
3
by: Jerad Rose | last post by:
This is regarding Visual Studio 2003 (framework 1.1). We have several projects/libraries. Of course, many of these reference each other. If we only had one solution, we would simply add all of...
29
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.