473,715 Members | 6,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shutdown/Restart Windows XP Pro using VB .NET program

I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0
was able to shut down or restart the (windows XP) machine using a series of
API calls. (Getlasterror, GetCurrentProce ss, OpenProcessToke n,
LookupPrivilege Value, AdjustTokenPriv ilegese, ExitWindowsEx.

I am trying to avoid using any API calls if possible and to use managed code
instead. I couldn't find any easy way of doing this but searching the
Internet with Google I found the following code for C:

using System;
using System.Manageme nt;
using System.Runtime. InteropServices ;
// Shutdown a system using WMI (management classes)
public class Wmis {
public static void Main() {
ManagementObjec t o;
ManagementPath path = new ManagementPath( );
path.Server = "xxxxxx"; // your server name here
path.NamespaceP ath = @"root\CIMV2 ";
// check your boot.ini file for the correct operating system entry & boot
partition
path.RelativePa th = @"Win32_Operati ngSystem.Name=" "Microsoft Windows XP
Professional|C: \\WINNT|\\Devic e\\Harddisk0\\P artition1""";
o = new ManagementObjec t(path);
ManagementBaseO bject inParams = null;
bool EnablePrivilege s = o.Scope.Options .EnablePrivileg es; // set required
privileges
o.Scope.Options .EnablePrivileg es = true;
// Invoke method (shutdown or reboot)
ManagementBaseO bject outParams = o.InvokeMethod( "Shutdown", inParams, null);
<============== ======
o.Scope.Options .EnablePrivileg es = EnablePrivilege s; // restore privs
(optional)

I don't know C at all but I tried nevertheless to convert it to VB .NET 2002
as follows:

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim o As New ManagementObjec t()
Dim BWManagementPat h As New ManagementPath( )
Dim inParams As System.Manageme nt.ManagementBa seObject()
Dim OptParams As InvokeMethodOpt ions
Dim OutParams As ManagementBaseO bject()
Dim enableprivilege s As Boolean
BWManagementPat h.Server = "DESKTOP"
BWManagementPat h.NamespacePath = "root\CIMV2 "
BWManagementPat h.RelativePath =
"Win32_Operatin gSystem.Name="" Microsoft Windows XP
Professional|C: \\WINDOWS|\\Dev ice\\Harddisk0\ \Partition1"""
o = New ManagementObjec t(BWManagementP ath)
EnablePrivilege s = o.Scope.Options .EnablePrivileg es
o.Scope.Options .EnablePrivileg es = True
OutParams = o.InvokeMethod( "Shutdown", inParams)
<============== ============
o.Scope.Options .EnablePrivileg es = enableprivilege s ' restore privs
(optional)
End Sub

When I tried to convert the outParams=o.Inv okeMethod line, I couldn't find a
way of specifying "Null" without the compiler objecting with the following
message:

"\Shutdown Test\Form1.vb(7 3): Overload resolution failed because no
accessible 'InvokeMethod' can be called with these arguments:
'Public Overloads Function InvokeMethod(me thodName As String,
inParameters As System.Manageme nt.ManagementBa seObject, options As
System.Manageme nt.InvokeMethod Options) As
System.Manageme nt.ManagementBa seObject': Value of type '1-dimensional array
of System.Manageme nt.ManagementBa seObject' cannot be converted to
'System.Managem ent.ManagementB aseObject'.
'Public Overloads Function InvokeMethod(me thodName As String,
inParameters As System.Manageme nt.ManagementBa seObject, options As
System.Manageme nt.InvokeMethod Options) As
System.Manageme nt.ManagementBa seObject': Value of type 'String' cannot be
converted to 'System.Managem ent.InvokeMetho dOptions'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Manageme nt.ManagementOp erationObserver , methodName As String, args()
As Object)': Value of type 'String' cannot be converted to
'System.Managem ent.ManagementO perationObserve r'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Manageme nt.ManagementOp erationObserver , methodName As String, args()
As Object)': Value of type '1-dimensional array of
System.Manageme nt.ManagementBa seObject' cannot be converted to 'String'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Manageme nt.ManagementOp erationObserver , methodName As String, args()
As Object)': Value of type 'String' cannot be converted to '1-dimensional
array of System.Object'. "

So I left the "null" bit off and ran the program.
When I do this, the outparams=o.Inv okeMethod line fails with
"Privilege Not Held"

Any help would be greatefully received.

Nov 20 '05 #1
2 11409
Thanks very much for your help. Where could I find information about the
InvokeMethod("S hutdown") as I assume I could pass different parameters and
get it to do a restart instead??

Thanks and regards,

Brian.
"Michal Sampson [MSFT]" <mi******@onlin e.microsoft.com > wrote in message
news:h0******** ******@cpmsftng xa06.phx.gbl...
Hi Brian,
I made a couple tweaks to your code and ran a test and sure enough, I
shutdown one of my desktops from another computer. Here's the code that I
ran:

Dim o As ManagementObjec t
Dim BWManagementPat h As New ManagementPath
Dim inParams As System.Manageme nt.ManagementBa seObject
Dim OptParams As InvokeMethodOpt ions
Dim OutParams As ManagementBaseO bject
Dim enableprivilege s As Boolean
BWManagementPat h.Server = "MY COMPUTER NAME"
BWManagementPat h.NamespacePath = "root\CIMV2 "
BWManagementPat h.RelativePath =
"Win32_Operatin gSystem.Name="" Microsoft Windows XP
Professional|C: \\WINDOWS|\\Dev ice\\Harddisk0\ \Partition1"""
o = New ManagementObjec t(BWManagementP ath)
enableprivilege s = o.Scope.Options .EnablePrivileg es
o.Scope.Options .EnablePrivileg es = True
OutParams = o.InvokeMethod( "Shutdown", inParams, Nothing)
o.Scope.Options .EnablePrivileg es = enableprivilege s ' restore privs (optional)

Here are the differences:
- The null keyword in C# is the equivalent of Nothing in VB .Net so on the
InvokeMethod call I passed Nothing where the null parameter was.
- You had some of the types above marked with an empty pair of parentheses: Dim BWManagementPat h As New ManagementPath( )
Dim inParams As System.Manageme nt.ManagementBa seObject()
This creates those variables as arrays and I could not compile until I
removed those parens.
- You may not have security permissions to shutdown the remote machine.
Make sure you have administrator rights on the machine that you wish to
shutdown.

Good luck!

--
Mike Sampson, VB .Net Developer in Deployment
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "Brian Worth" <Noname@Nowhere >
Subject: Shutdown/Restart Windows XP Pro using VB .NET program
Date: Mon, 6 Oct 2003 18:48:50 +0100
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uc************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
NNTP-Posting-Host: ppp-0-16.milt-a-2.access.uk.tis cali.com 80.40.51.16
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:144270
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0was able to shut down or restart the (windows XP) machine using a series ofAPI calls. (Getlasterror, GetCurrentProce ss, OpenProcessToke n,
LookupPrivileg eValue, AdjustTokenPriv ilegese, ExitWindowsEx.

I am trying to avoid using any API calls if possible and to use managed code
instead. I couldn't find any easy way of doing this but searching the
Internet with Google I found the following code for C:

using System;
using System.Manageme nt;
using System.Runtime. InteropServices ;
// Shutdown a system using WMI (management classes)
public class Wmis {
public static void Main() {
ManagementObje ct o;
ManagementPa th path = new ManagementPath( );
path.Server = "xxxxxx"; // your server name here
path.Namespace Path = @"root\CIMV2 ";
// check your boot.ini file for the correct operating system entry & boot
partition
path.RelativeP ath = @"Win32_Operati ngSystem.Name=" "Microsoft Windows XP
Professional|C :\\WINNT|\\Devi ce\\Harddisk0\\ Partition1""";
o = new ManagementObjec t(path);
ManagementBase Object inParams = null;
bool EnablePrivilege s = o.Scope.Options .EnablePrivileg es; // set required
privileges
o.Scope.Option s.EnablePrivile ges = true;
// Invoke method (shutdown or reboot)
ManagementBase Object outParams = o.InvokeMethod( "Shutdown", inParams,

null);
<============= =======
o.Scope.Option s.EnablePrivile ges = EnablePrivilege s; // restore privs
(optional)

I don't know C at all but I tried nevertheless to convert it to VB .NET

2002
as follows:

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventAr gs) Handles Button1.Click
Dim o As New ManagementObjec t()
Dim BWManagementPat h As New ManagementPath( )
Dim inParams As System.Manageme nt.ManagementBa seObject()
Dim OptParams As InvokeMethodOpt ions
Dim OutParams As ManagementBaseO bject()
Dim enableprivilege s As Boolean
BWManagementPat h.Server = "DESKTOP"
BWManagementPat h.NamespacePath = "root\CIMV2 "
BWManagementPat h.RelativePath =
"Win32_Operati ngSystem.Name=" "Microsoft Windows XP
Professional|C :\\WINDOWS|\\De vice\\Harddisk0 \\Partition1"""
o = New ManagementObjec t(BWManagementP ath)
EnablePrivilege s = o.Scope.Options .EnablePrivileg es
o.Scope.Options .EnablePrivileg es = True
OutParams = o.InvokeMethod( "Shutdown", inParams)
<============= =============
o.Scope.Options .EnablePrivileg es = enableprivilege s ' restore privs(optional)
End Sub

When I tried to convert the outParams=o.Inv okeMethod line, I couldn't find a
way of specifying "Null" without the compiler objecting with the

followingmessage:

"\Shutdown Test\Form1.vb(7 3): Overload resolution failed because no
accessible 'InvokeMethod' can be called with these arguments:
'Public Overloads Function InvokeMethod(me thodName As String,
inParameters As System.Manageme nt.ManagementBa seObject, options As
System.Managem ent.InvokeMetho dOptions) As
System.Managem ent.ManagementB aseObject': Value of type '1-dimensional arrayof System.Manageme nt.ManagementBa seObject' cannot be converted to
'System.Manage ment.Management BaseObject'.
'Public Overloads Function InvokeMethod(me thodName As String,
inParameters As System.Manageme nt.ManagementBa seObject, options As
System.Managem ent.InvokeMetho dOptions) As
System.Managem ent.ManagementB aseObject': Value of type 'String' cannot be
converted to 'System.Managem ent.InvokeMetho dOptions'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Managem ent.ManagementO perationObserve r, methodName As String, args()As Object)': Value of type 'String' cannot be converted to
'System.Manage ment.Management OperationObserv er'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Managem ent.ManagementO perationObserve r, methodName As String, args()As Object)': Value of type '1-dimensional array of
System.Managem ent.ManagementB aseObject' cannot be converted to 'String'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Managem ent.ManagementO perationObserve r, methodName As String, args()As Object)': Value of type 'String' cannot be converted to '1-dimensional
array of System.Object'. "

So I left the "null" bit off and ran the program.
When I do this, the outparams=o.Inv okeMethod line fails with
"Privilege Not Held"

Any help would be greatefully received.

Nov 20 '05 #2
Hi. I tried the amended code but I still get System Management Exception:
Privilege Not Held from the o.InvokeMethod line.

I ran it under my Administrator signon as well and still got the same. I
tried from both the Visual Studio environment and also running the .EXE.

The code I used was:

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim o As ManagementObjec t
Dim BWManagementPat h As New ManagementPath( )
Dim inParams As System.Manageme nt.ManagementBa seObject
Dim OptParams As InvokeMethodOpt ions
Dim OutParams As ManagementBaseO bject
Dim enableprivilege s As Boolean
BWManagementPat h.Server = "PRECISION340TS T"
BWManagementPat h.NamespacePath = "root\CIMV2 "
BWManagementPat h.RelativePath =
"Win32_Operatin gSystem.Name="" Microsoft Windows XP
Professional|C: \\WINDOWS|\\Dev ice\\Harddisk0\ \Partition1"""
o = New ManagementObjec t(BWManagementP ath)
enableprivilege s = o.Scope.Options .EnablePrivileg es
o.Scope.Options .EnablePrivileg es = True
OutParams = o.InvokeMethod( "Shutdown", inParams, Nothing)
o.Scope.Options .EnablePrivileg es = enableprivilege s ' restore privs
(optional)
End Sub

I just built a simple form with a button called Button1 which I click to
invoke the code above.

Any ideas what may be wrong? - I replaced my code with yours totally -
except I altered BWManagementPat h.Server to reflect the system name I was
trying to close down. I am trying to shut down the machine the program is
running on.

Thanks and regards,

Brian.
"Brian Worth" <Noname@Nowhere > wrote in message
news:em******** ******@TK2MSFTN GP09.phx.gbl...
Thanks very much for your help. Where could I find information about the
InvokeMethod("S hutdown") as I assume I could pass different parameters and
get it to do a restart instead??

Thanks and regards,

Brian.
"Michal Sampson [MSFT]" <mi******@onlin e.microsoft.com > wrote in message
news:h0******** ******@cpmsftng xa06.phx.gbl...
Hi Brian,
I made a couple tweaks to your code and ran a test and sure enough, I
shutdown one of my desktops from another computer. Here's the code that I
ran:

Dim o As ManagementObjec t
Dim BWManagementPat h As New ManagementPath
Dim inParams As System.Manageme nt.ManagementBa seObject
Dim OptParams As InvokeMethodOpt ions
Dim OutParams As ManagementBaseO bject
Dim enableprivilege s As Boolean
BWManagementPat h.Server = "MY COMPUTER NAME"
BWManagementPat h.NamespacePath = "root\CIMV2 "
BWManagementPat h.RelativePath =
"Win32_Operatin gSystem.Name="" Microsoft Windows XP
Professional|C: \\WINDOWS|\\Dev ice\\Harddisk0\ \Partition1"""
o = New ManagementObjec t(BWManagementP ath)
enableprivilege s = o.Scope.Options .EnablePrivileg es
o.Scope.Options .EnablePrivileg es = True
OutParams = o.InvokeMethod( "Shutdown", inParams, Nothing)
o.Scope.Options .EnablePrivileg es = enableprivilege s ' restore privs
(optional)

Here are the differences:
- The null keyword in C# is the equivalent of Nothing in VB .Net so on the InvokeMethod call I passed Nothing where the null parameter was.
- You had some of the types above marked with an empty pair of

parentheses:
Dim BWManagementPat h As New ManagementPath( )
Dim inParams As System.Manageme nt.ManagementBa seObject()
This creates those variables as arrays and I could not compile until I removed those parens.
- You may not have security permissions to shutdown the remote machine.
Make sure you have administrator rights on the machine that you wish to
shutdown.

Good luck!

--
Mike Sampson, VB .Net Developer in Deployment
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "Brian Worth" <Noname@Nowhere >
Subject: Shutdown/Restart Windows XP Pro using VB .NET program
Date: Mon, 6 Oct 2003 18:48:50 +0100
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uc************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
NNTP-Posting-Host: ppp-0-16.milt-a-2.access.uk.tis cali.com 80.40.51.16
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:144270
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB

4.0was able to shut down or restart the (windows XP) machine using a series of
API calls. (Getlasterror, GetCurrentProce ss, OpenProcessToke n,
LookupPrivileg eValue, AdjustTokenPriv ilegese, ExitWindowsEx.

I am trying to avoid using any API calls if possible and to use managed

code
instead. I couldn't find any easy way of doing this but searching the
Internet with Google I found the following code for C:

using System;
using System.Manageme nt;
using System.Runtime. InteropServices ;
// Shutdown a system using WMI (management classes)
public class Wmis {
public static void Main() {
ManagementObje ct o;
ManagementPa th path = new ManagementPath( );
path.Server = "xxxxxx"; // your server name here
path.Namespace Path = @"root\CIMV2 ";
// check your boot.ini file for the correct operating system entry &
bootpartition
path.RelativeP ath = @"Win32_Operati ngSystem.Name=" "Microsoft Windows XP
Professional|C :\\WINNT|\\Devi ce\\Harddisk0\\ Partition1""";
o = new ManagementObjec t(path);
ManagementBase Object inParams = null;
bool EnablePrivilege s = o.Scope.Options .EnablePrivileg es; // set requiredprivileges
o.Scope.Option s.EnablePrivile ges = true;
// Invoke method (shutdown or reboot)
ManagementBase Object outParams = o.InvokeMethod( "Shutdown", inParams,

null);
<============= =======
o.Scope.Option s.EnablePrivile ges = EnablePrivilege s; // restore privs
(optional)

I don't know C at all but I tried nevertheless to convert it to VB .NET

2002
as follows:

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventAr gs) Handles Button1.Click
Dim o As New ManagementObjec t()
Dim BWManagementPat h As New ManagementPath( )
Dim inParams As System.Manageme nt.ManagementBa seObject()
Dim OptParams As InvokeMethodOpt ions
Dim OutParams As ManagementBaseO bject()
Dim enableprivilege s As Boolean
BWManagementPat h.Server = "DESKTOP"
BWManagementPat h.NamespacePath = "root\CIMV2 "
BWManagementPat h.RelativePath =
"Win32_Operati ngSystem.Name=" "Microsoft Windows XP
Professional|C :\\WINDOWS|\\De vice\\Harddisk0 \\Partition1"""
o = New ManagementObjec t(BWManagementP ath)
EnablePrivilege s = o.Scope.Options .EnablePrivileg es
o.Scope.Options .EnablePrivileg es = True
OutParams = o.InvokeMethod( "Shutdown", inParams)
<============= =============
o.Scope.Options .EnablePrivileg es = enableprivilege s ' restore

privs(optional)
End Sub

When I tried to convert the outParams=o.Inv okeMethod line, I couldn't find
a
way of specifying "Null" without the compiler objecting with the

followingmessage:

"\Shutdown Test\Form1.vb(7 3): Overload resolution failed because no
accessible 'InvokeMethod' can be called with these arguments:
'Public Overloads Function InvokeMethod(me thodName As String,
inParameters As System.Manageme nt.ManagementBa seObject, options As
System.Managem ent.InvokeMetho dOptions) As
System.Managem ent.ManagementB aseObject': Value of type '1-dimensional arrayof System.Manageme nt.ManagementBa seObject' cannot be converted to
'System.Manage ment.Management BaseObject'.
'Public Overloads Function InvokeMethod(me thodName As String,
inParameters As System.Manageme nt.ManagementBa seObject, options As
System.Managem ent.InvokeMetho dOptions) As
System.Managem ent.ManagementB aseObject': Value of type 'String' cannot beconverted to 'System.Managem ent.InvokeMetho dOptions'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Managem ent.ManagementO perationObserve r, methodName As String, args()As Object)': Value of type 'String' cannot be converted to
'System.Manage ment.Management OperationObserv er'.
'Public Overloads Sub InvokeMethod(wa tcher As
System.Managem ent.ManagementO perationObserve r, methodName As String, args()As Object)': Value of type '1-dimensional array of
System.Managem ent.ManagementB aseObject' cannot be converted to 'String'. 'Public Overloads Sub InvokeMethod(wa tcher As
System.Managem ent.ManagementO perationObserve r, methodName As String, args()As Object)': Value of type 'String' cannot be converted to '1-dimensionalarray of System.Object'. "

So I left the "null" bit off and ran the program.
When I do this, the outparams=o.Inv okeMethod line fails with
"Privilege Not Held"

Any help would be greatefully received.


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1189
by: Senthil | last post by:
Hi, I would like to know the code for reboot and shutdown windows xp professional using VB.Net. thanx Senthil
4
42257
by: Mohammed Abdel-Razzak | last post by:
Dear sirs I want to know how can I shutdown or restart my computer using C# Also I want to know how can I open any windows program using C# (EX: opening the windows calculator from my application) thanks Mohammed
6
8760
by: carbon_dragon | last post by:
Ok, so here is the problem. I'm working on a headless server program implemented as a .NET C# Console project. There is a UPS mounted to this server (though not a windows compliant UPS). I can only talk to the UPS over a special device driver. Through this device driver I can detect that the UPS is going to notify Windows 2000 server to shut down. So I start doing a graceful termination. But Windows shuts down pretty quickly and there...
3
2298
by: Chris Knievel | last post by:
Hi, i am trying to save some data in a excel spreadsheet, whenever the programm shuts down. Mostly this happens when a user is logging off or shuts the computer down. im am using the Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing to save the data before the shutdown. The problem is that i can't open excel. Windows is prompting that it can't close my programm....
2
2566
by: Sin Jeong-hun | last post by:
I created a windows form application. It has a Threading.Timer and when the timer ticks it does some work and show a popup window. The problem is that while this program is running if the user tries to shutdown Windows, my application doesn't quit and neither does Windows. Of course, if the user first click of my application and then tries to shutdown, there is no problem. To solve this problem, I overrode WndProc of the main form,...
5
17411
by: Phil Tusa | last post by:
Greetings to all .... I have a need to issue a shutdown and/or Restart Windows XP inside my application. Any help or example code would be appreciated! -- Phil
1
10348
by: CyberSoftHari | last post by:
I want to get applications running (Showing) in Task bar (and show those applications running) and Cancel windows LogOff, Shutdown, Restart when user try to Click windows LogOff, Shutdown, Restart
1
3059
by: chandru | last post by:
hai friends, Iam developing a application using .NET remoting ,in which it shuts down,logs off , restart , locks remote PC.i tried to use windows ExwindowsEXAPI for shutdown,logoff , restart and SetSuspendState for lock PC and the later worked perfectly but the problem is ExwindowsEx only Logsoff the PC and shutdown and restart is not working .Although i achieved the result using shutdown.exe ,but iam not convinced,so could anyone say...
3
4284
by: IdleBrain | last post by:
Gurus, I am trying to delay Windows Shutdown/Restart to perfrom cleanup and I am using the following code: protected override void WndProc(ref Message ex)
0
8823
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8718
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9198
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.