Vbnt pool
Publish: 2021-04-17 09:38:10
1. PPLNs + is a mining pool
income distribution
mode, which is created by AA mining pool. The optimized combination of traditional PPLNs, pplnt and prop modes makes it more accurate and efficient in
computing power
and income distribution. The concrete intuitive embodiment is that the income obtained from digging blocks is accurately distributed, and the long-term mining improves the miners' income.
income distribution
mode, which is created by AA mining pool. The optimized combination of traditional PPLNs, pplnt and prop modes makes it more accurate and efficient in
computing power
and income distribution. The concrete intuitive embodiment is that the income obtained from digging blocks is accurately distributed, and the long-term mining improves the miners' income.
2. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function NtSuspendProcess Lib "NTDLL.DLL" (ByVal hProc As Long) As Long
Private Declare Function NtResumeProcess Lib "NTDLL.DLL" (ByVal hProc As Long) As Long
以上是声明
调用:
NtSuspendProcess OpenProcess(&H1F0FFF, 0, PID)'其中PID是你要暂停的进程
恢复进程:
NtResumeProcess OpenProcess(&H1F0FFF, 0, PID)
Private Declare Function NtSuspendProcess Lib "NTDLL.DLL" (ByVal hProc As Long) As Long
Private Declare Function NtResumeProcess Lib "NTDLL.DLL" (ByVal hProc As Long) As Long
以上是声明
调用:
NtSuspendProcess OpenProcess(&H1F0FFF, 0, PID)'其中PID是你要暂停的进程
恢复进程:
NtResumeProcess OpenProcess(&H1F0FFF, 0, PID)
3. Is to use some classes in system. IO to achieve
create a text file with the code, then write the HTML code in, save it to the specified path, and name it HTM.
create a text file with the code, then write the HTML code in, save it to the specified path, and name it HTM.
4. 1、 NT service program
the so-called NT service is actually a process that can be started automatically with a certain identity when the system starts and exists for a long time with the system. For example, FTP server, HTTP server and offline printing are all provided in the form of NT services. This is actually similar to the UNIX root daemon process. To sum up, NT services have the following characteristics:
1. They can be self started and do not need to be started interactively. This is an important feature for servers. Of course, you can decide whether a service is self starting or not, or even block a service
2. NT service has no user interface, which is basically similar to a DOS program. Because NT service must run for a long time, it doesn't have its own interface like ordinary Win32 process. But NT service can interact with user interface, which is a special kind of service process. You can see the service process through NT's task manager
3. NT services are managed through SCM (Services Control Manager) interface. SCM interface functions are needed to install, start, stop and remove NT services. The service controller of the control panel uses SCM Interface to manage all the services in the system. In fact, there are some programs or commands that can control services, such as net.exe, server manager, scm.exe, etc
4. These processes all run in a certain identity to facilitate the access of server resources. In general, the local system account in the domain is used to run. This account has full access to most of the resources on the local machine (unless it is specially Forbidden), which can ensure the "powerful" of the service program. However, some services run with special accounts. You can also set up a service account
5. The system automatically runs in thread mode. Generally, it only takes up more system resources, which is different from ordinary processes. If the thread mode is not adopted, the general processes often consume the whole CPU resources. Generally, tasks that need to exist all the time and cannot consume too much resources are most suitable to be realized by services< It is generally believed that writing NT services requires C / C + +. VC6 uses ATL wizard to provide a basic service framework. The specific implementation steps are: file à New… à ATL COM AppWizard à service à But using VC to write NT services requires too much code, which also means too much debugging and maintenance. In fact, NT services can not be written by C / C + +, but can be implemented by any language, including VB, which can realize the features of the previous section
What are the advantages of VB writing services? At least the following items can be listed:
1. The coding is simple. Anyone who is familiar with VB syntax can write after understanding this article
2. It means that the logic of modifying the service implementation is simple and the maintenance is simple
3. You can use almost most of the component functions in VB to write a powerful service, such as ADO. If you use VC to implement it, I believe anyone will be afraid
4. (far fetched) can prove how strong VB is in Bill's sky
then, how does VB implement NT service writing? As far as I know, there are at least two ways:
1
2. Using components to implement in VB traditional way
if using method 1 is actually ing the routine of C / C + +, if there is a better way to achieve it, I believe no one will take this "dead end", because compared with other languages, this kind of programming completely loses the characteristics of VB itself, and at the same time does not gain any advantages of other languages. Here, I want to tell you that OCX is used to realize a service. If you search MSDN for samples / MSDN / Techart / 4920 /, you can see a written project file of VC5. Compiling this project will actually get a ntsvc. OCX. If you are not familiar with C / C + +, you can http://www.mywebtech.net/download/ntsvc.zip Download a ntsvc.ocx, which I got from backoffice disk, it to / WinNT / system32 / and register it with Regsvr32 ntsvc.ocx command. In this way, your VB can see the item named "Microsoft NT service control" from the list of dialog boxes led out by project / components. This component has the basic function of creating a service. If we want to write an NT service, we can drag it into our window, set its properties, and call its function of interacting with the system, registry and SCM to complete a service
let's first understand the properties of this component and explain the usage of these properties to you:
account string, account property, which NT domain account this NT service runs under. The default is the localsystem account. In fact, most NT services can run safely and successfully under this account number
controlsaccepted long, which SCM controls are accepted by this service, with the following values:
0 allows start and stop.
2 allows pause and continue.
4 allows shutdown< Other values are user-defined events.
with this attribute, you can decide whether SCM is allowed to stop, pause, start and other operations at a certain time (such as a non interruptible operation) of NT service process
dependencies string: if the service you write depends on one or some services to run normally, you must specify the list of dependent services when registering the service. Dependencies separate multiple services by Chr (0) according to the dependency order, and must end with two Chr (0) You can see that this is a trace of C / C + +)
displayName string, display name, and the name of NT service to be displayed to the viewer
interactive Boolean, whether interactive parts with desktop users are allowed
loadordergroup string, which is related to dependencies, determines which services must be started before the service is started, and the format is similar. It is also divided by Chr (0) and ends with two consecutive Chr (0)
password string, the password to start the service. If the default account is used, it is not necessary to set the account to start the service
servicename string, the name of the service. If net.exe is used to control the service, the parameter of the specified service in net.exe is the string in this attribute
startmode enumeration type, specifically:
vcstartautomatic 2 service can be started by itself
svcstartmanual 3 service can be started manually
svcstartdisabled 4 service can not be started by itself
there is another debug attribute, which will not be discussed
if we want to treat a VB program as an NT service, we must make some "applications" to the system, and the corresponding work cannot be well completed by VB. Therefore, ntsvc.ocx provides corresponding methods for us to transfer relevant information to the system
install to install the current VB program as an NT service. Before this, you must at least set the properties of displayName, servicename, controlaccepted and startmode. In addition, you may need to set account, password, loadordergroup, dependencies, etc. Whether the information is set correctly or not determines whether your service program can start and run normally
uninstall to delete the service specified by ntsvc.ocx from the system registry. NT service depends on the setting of system service registry, which is a well-known secret
startservice to start the specified service, if the service is registered
stopservice, stop the service if it is running
logevent to record service events. During service operation, errors and unexpected events may occur, which can be recorded by this method for administrators to view relevant information through "Event Viewer" to optimize service. This method has three parameters event, ID and message. Event refers to the type of event that occurs, It can be set to the following values:
svceventerror 1 error event
svceventwarning 2 warning event.
svceventinformation 4 provides reference information.
svceventauditsuccess 8 audit success.
svceventauditfailure 10 audit failure
in addition to the above methods, users may also need to read and write the registry, This control also provides access to the registry:
deletesetting (Section [, key])
getallsettings (section)
getsetting (section, key [, default])
savesetting (section, key, setting).
3. Write a service
to understand the above content, let's start to design a service, Let's understand how to write services in VB.
before that, we decided what kind of services to write. I refer to an example in C + + build to write a service process that constantly alarms. After the process is started, beep calls are continuously sent out in the background at an interval of 5 seconds, which can let everyone know more about the existence of this service, although it is somewhat annoying. The name of the service is vbbeepsvc, which is displayed as the VB NT SVC view in SCM
follow me
1. Create a project and set the relevant controls
all VB controls must have a form as the carrier, so first we create a standard project and select the menu project - & gt; Components..., and then select (Microsoft NT service control), the NT service control will appear in the toolbar. Drag another timer control onto the form. Then save it. Basically, the creation process is complete
2. Set control properties
select the instance of ntsvc.ocx, and set displayName: the VB NT SVC view, servicename: vbbeepsvc, startm in the property bar ode:3 (start the service manually). The rest is the default
since we want beep every 5 seconds, we have to rely on a timing mechanism, so we set the interval of timer to 5000 milliseconds
the setting of the above attributes depends on your needs. I just say that it is enough to set them in my vbbeepsvc
3. Write code to realize service logic, installation and removal of service
because the service program is actually an EXE file and needs to solve the problem of installation and removal by itself, it is necessary to add NT service control to the program to realize the problem of installation and removal. So, when should it be carried out. VB program starts when the form is loaded, so we need to add some code to the load event of the form:
on error goto err_ Load 'if there is an error, record it for reference
dim strdisplayname as string
strdisplayname = ntservice1. DisplayName
If command = & quot- install" Then 'when starting with the – install parameter,
ntservice1. Interactive = true
if ntservice1. Install then
call ntservice1. Saving & quot; Parameters", & quot; TimerInterval", & quot; 1000") ‘ System parameter storage
msgbox strdisplayname & quot; Installation successful& quot;< br />Else
MsgBox strDisplayName & " Installation failed & quot
end if
end 'terminate installation
else
If command = & quot- uninstall" Then 'if start with remove parameter
if ntservice1. Install then
msgbox strdisplayname & quot; Successful removal & quot< br />Else<
the so-called NT service is actually a process that can be started automatically with a certain identity when the system starts and exists for a long time with the system. For example, FTP server, HTTP server and offline printing are all provided in the form of NT services. This is actually similar to the UNIX root daemon process. To sum up, NT services have the following characteristics:
1. They can be self started and do not need to be started interactively. This is an important feature for servers. Of course, you can decide whether a service is self starting or not, or even block a service
2. NT service has no user interface, which is basically similar to a DOS program. Because NT service must run for a long time, it doesn't have its own interface like ordinary Win32 process. But NT service can interact with user interface, which is a special kind of service process. You can see the service process through NT's task manager
3. NT services are managed through SCM (Services Control Manager) interface. SCM interface functions are needed to install, start, stop and remove NT services. The service controller of the control panel uses SCM Interface to manage all the services in the system. In fact, there are some programs or commands that can control services, such as net.exe, server manager, scm.exe, etc
4. These processes all run in a certain identity to facilitate the access of server resources. In general, the local system account in the domain is used to run. This account has full access to most of the resources on the local machine (unless it is specially Forbidden), which can ensure the "powerful" of the service program. However, some services run with special accounts. You can also set up a service account
5. The system automatically runs in thread mode. Generally, it only takes up more system resources, which is different from ordinary processes. If the thread mode is not adopted, the general processes often consume the whole CPU resources. Generally, tasks that need to exist all the time and cannot consume too much resources are most suitable to be realized by services< It is generally believed that writing NT services requires C / C + +. VC6 uses ATL wizard to provide a basic service framework. The specific implementation steps are: file à New… à ATL COM AppWizard à service à But using VC to write NT services requires too much code, which also means too much debugging and maintenance. In fact, NT services can not be written by C / C + +, but can be implemented by any language, including VB, which can realize the features of the previous section
What are the advantages of VB writing services? At least the following items can be listed:
1. The coding is simple. Anyone who is familiar with VB syntax can write after understanding this article
2. It means that the logic of modifying the service implementation is simple and the maintenance is simple
3. You can use almost most of the component functions in VB to write a powerful service, such as ADO. If you use VC to implement it, I believe anyone will be afraid
4. (far fetched) can prove how strong VB is in Bill's sky
then, how does VB implement NT service writing? As far as I know, there are at least two ways:
1
2. Using components to implement in VB traditional way
if using method 1 is actually ing the routine of C / C + +, if there is a better way to achieve it, I believe no one will take this "dead end", because compared with other languages, this kind of programming completely loses the characteristics of VB itself, and at the same time does not gain any advantages of other languages. Here, I want to tell you that OCX is used to realize a service. If you search MSDN for samples / MSDN / Techart / 4920 /, you can see a written project file of VC5. Compiling this project will actually get a ntsvc. OCX. If you are not familiar with C / C + +, you can http://www.mywebtech.net/download/ntsvc.zip Download a ntsvc.ocx, which I got from backoffice disk, it to / WinNT / system32 / and register it with Regsvr32 ntsvc.ocx command. In this way, your VB can see the item named "Microsoft NT service control" from the list of dialog boxes led out by project / components. This component has the basic function of creating a service. If we want to write an NT service, we can drag it into our window, set its properties, and call its function of interacting with the system, registry and SCM to complete a service
let's first understand the properties of this component and explain the usage of these properties to you:
account string, account property, which NT domain account this NT service runs under. The default is the localsystem account. In fact, most NT services can run safely and successfully under this account number
controlsaccepted long, which SCM controls are accepted by this service, with the following values:
0 allows start and stop.
2 allows pause and continue.
4 allows shutdown< Other values are user-defined events.
with this attribute, you can decide whether SCM is allowed to stop, pause, start and other operations at a certain time (such as a non interruptible operation) of NT service process
dependencies string: if the service you write depends on one or some services to run normally, you must specify the list of dependent services when registering the service. Dependencies separate multiple services by Chr (0) according to the dependency order, and must end with two Chr (0) You can see that this is a trace of C / C + +)
displayName string, display name, and the name of NT service to be displayed to the viewer
interactive Boolean, whether interactive parts with desktop users are allowed
loadordergroup string, which is related to dependencies, determines which services must be started before the service is started, and the format is similar. It is also divided by Chr (0) and ends with two consecutive Chr (0)
password string, the password to start the service. If the default account is used, it is not necessary to set the account to start the service
servicename string, the name of the service. If net.exe is used to control the service, the parameter of the specified service in net.exe is the string in this attribute
startmode enumeration type, specifically:
vcstartautomatic 2 service can be started by itself
svcstartmanual 3 service can be started manually
svcstartdisabled 4 service can not be started by itself
there is another debug attribute, which will not be discussed
if we want to treat a VB program as an NT service, we must make some "applications" to the system, and the corresponding work cannot be well completed by VB. Therefore, ntsvc.ocx provides corresponding methods for us to transfer relevant information to the system
install to install the current VB program as an NT service. Before this, you must at least set the properties of displayName, servicename, controlaccepted and startmode. In addition, you may need to set account, password, loadordergroup, dependencies, etc. Whether the information is set correctly or not determines whether your service program can start and run normally
uninstall to delete the service specified by ntsvc.ocx from the system registry. NT service depends on the setting of system service registry, which is a well-known secret
startservice to start the specified service, if the service is registered
stopservice, stop the service if it is running
logevent to record service events. During service operation, errors and unexpected events may occur, which can be recorded by this method for administrators to view relevant information through "Event Viewer" to optimize service. This method has three parameters event, ID and message. Event refers to the type of event that occurs, It can be set to the following values:
svceventerror 1 error event
svceventwarning 2 warning event.
svceventinformation 4 provides reference information.
svceventauditsuccess 8 audit success.
svceventauditfailure 10 audit failure
in addition to the above methods, users may also need to read and write the registry, This control also provides access to the registry:
deletesetting (Section [, key])
getallsettings (section)
getsetting (section, key [, default])
savesetting (section, key, setting).
3. Write a service
to understand the above content, let's start to design a service, Let's understand how to write services in VB.
before that, we decided what kind of services to write. I refer to an example in C + + build to write a service process that constantly alarms. After the process is started, beep calls are continuously sent out in the background at an interval of 5 seconds, which can let everyone know more about the existence of this service, although it is somewhat annoying. The name of the service is vbbeepsvc, which is displayed as the VB NT SVC view in SCM
follow me
1. Create a project and set the relevant controls
all VB controls must have a form as the carrier, so first we create a standard project and select the menu project - & gt; Components..., and then select (Microsoft NT service control), the NT service control will appear in the toolbar. Drag another timer control onto the form. Then save it. Basically, the creation process is complete
2. Set control properties
select the instance of ntsvc.ocx, and set displayName: the VB NT SVC view, servicename: vbbeepsvc, startm in the property bar ode:3 (start the service manually). The rest is the default
since we want beep every 5 seconds, we have to rely on a timing mechanism, so we set the interval of timer to 5000 milliseconds
the setting of the above attributes depends on your needs. I just say that it is enough to set them in my vbbeepsvc
3. Write code to realize service logic, installation and removal of service
because the service program is actually an EXE file and needs to solve the problem of installation and removal by itself, it is necessary to add NT service control to the program to realize the problem of installation and removal. So, when should it be carried out. VB program starts when the form is loaded, so we need to add some code to the load event of the form:
on error goto err_ Load 'if there is an error, record it for reference
dim strdisplayname as string
strdisplayname = ntservice1. DisplayName
If command = & quot- install" Then 'when starting with the – install parameter,
ntservice1. Interactive = true
if ntservice1. Install then
call ntservice1. Saving & quot; Parameters", & quot; TimerInterval", & quot; 1000") ‘ System parameter storage
msgbox strdisplayname & quot; Installation successful& quot;< br />Else
MsgBox strDisplayName & " Installation failed & quot
end if
end 'terminate installation
else
If command = & quot- uninstall" Then 'if start with remove parameter
if ntservice1. Install then
msgbox strdisplayname & quot; Successful removal & quot< br />Else<
5. BitBlt target HDC, target X, target y, image height, image width, source HDC, source x, source y, raster operation constant
[function]
BitBlt
[operating system]
Win9x: Yes
WinNT: Yes
[statement]
BitBlt lib & quot; gdi32" Alias " BitBlt" ( ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwrop as long) as long
[description]
copies a bitmap from one device scene to another. The source and target DC must be compatible with each other
[return value]
long. Non zero means success and zero means failure. GetLastError will be set
[Others]
in NT environment, if clipping or rotation is required in the source device scene in a world transfer, the execution of this function will fail
if the mapping relationship between the target and the source DC requires that the size of the pixels in the rectangle must be changed ring the transfer, Then this function will automatically expand, rotate, fold, or cut off as needed to complete the final transmission process
[parameter table]
hdestdc -------- long, target device scene
x, y -------- long, the point describing the position of the upper left corner of the target rectangle in the target DC. Use the logical coordinates of the target DC to represent
nwidth, nheight - long, the width and height of the image to be transmitted
hsrcdc -------- long, the scene of the source device. If the raster operation does not specify the source, it should be set to 0
xsrc, ysrc --- long, the point describing the upper left corner of the source rectangle in the source DC. The logic coordinates of the source DC are used to represent
dwrop -------- long, the raster operation to be performed in the transmission process
[function]
BitBlt
[operating system]
Win9x: Yes
WinNT: Yes
[statement]
BitBlt lib & quot; gdi32" Alias " BitBlt" ( ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwrop as long) as long
[description]
copies a bitmap from one device scene to another. The source and target DC must be compatible with each other
[return value]
long. Non zero means success and zero means failure. GetLastError will be set
[Others]
in NT environment, if clipping or rotation is required in the source device scene in a world transfer, the execution of this function will fail
if the mapping relationship between the target and the source DC requires that the size of the pixels in the rectangle must be changed ring the transfer, Then this function will automatically expand, rotate, fold, or cut off as needed to complete the final transmission process
[parameter table]
hdestdc -------- long, target device scene
x, y -------- long, the point describing the position of the upper left corner of the target rectangle in the target DC. Use the logical coordinates of the target DC to represent
nwidth, nheight - long, the width and height of the image to be transmitted
hsrcdc -------- long, the scene of the source device. If the raster operation does not specify the source, it should be set to 0
xsrc, ysrc --- long, the point describing the upper left corner of the source rectangle in the source DC. The logic coordinates of the source DC are used to represent
dwrop -------- long, the raster operation to be performed in the transmission process
6. VB is an interpretive language. If you use VB6, you can run in any system above win 9x (excluding win 9x and including win me) (including the latest win 7). Win 9x needs to install VB6 runtime to run (default 9x only has VB5 runtime). At the same time, as an interpretive language, the efficiency of VB is slightly lower than that of compiled languages (such as Pascal, VB, etc.) But it is much more efficient than virtual machine programs such as Java (although Java rarely uses desktop applications), but I personally think that the difference in efficiency can hardly be reflected in the current computer operation efficiency (unless the efficiency of the code is particularly low),
if you use vb.net Then it can run in any system above win NT 4.0 (but it needs additional installation of. Net runtime, integration of win 2003 into. Net 1.1, integration of viata into. Net 3.5, integration of win 7 into. Net 4.5, system below win 2003 does not come with any version of. Net runtime, and it needs to be installed by users), but the former VB6 is Win32 programming, and the later vb.net is. Net programming In essence, there are differences, and according to Microsoft's wishes, future programs based on. Net can be cross platform (similar to Java), but at present. Net only supports windows series, and it is said that Microsoft's internal testing already has. Net that can support MAC
as for Pascal, which has been mentioned earlier, is a compiler language Now the latest Delphi 2010 also supports the programming of both. Net and Win32. The programming of Delphi is the same as that of VB6, but there is no requirement of runtime. In theory, the program has no special design, so it only supports any system from win 9x (including) to the latest win7. As for. Net programming, it is completely the same as vb.net, but the language is different
I hope it can help you, support originality, create, create Against the answer
if you use vb.net Then it can run in any system above win NT 4.0 (but it needs additional installation of. Net runtime, integration of win 2003 into. Net 1.1, integration of viata into. Net 3.5, integration of win 7 into. Net 4.5, system below win 2003 does not come with any version of. Net runtime, and it needs to be installed by users), but the former VB6 is Win32 programming, and the later vb.net is. Net programming In essence, there are differences, and according to Microsoft's wishes, future programs based on. Net can be cross platform (similar to Java), but at present. Net only supports windows series, and it is said that Microsoft's internal testing already has. Net that can support MAC
as for Pascal, which has been mentioned earlier, is a compiler language Now the latest Delphi 2010 also supports the programming of both. Net and Win32. The programming of Delphi is the same as that of VB6, but there is no requirement of runtime. In theory, the program has no special design, so it only supports any system from win 9x (including) to the latest win7. As for. Net programming, it is completely the same as vb.net, but the language is different
I hope it can help you, support originality, create, create Against the answer
7.
& quot; kernel32" Alias" GetVersionExA"() AsLong
privateTypeOSVERSIONINFO
dwOSVersionInfoSizeAsLong
dwMajorVersionAsLong
dwMinorVersionAsLong
dwBuildNumberAsLong
dwPlatformIdAsLong
szCSDVersionAsString*128' Maintenancestringforpssusage
osNameAsString' I added the name of the operating system
endtype < / pre >
' Basically meet your requirements< br />' Note: because proct or home edition are XP systems, there is no need to judge carefully
& quot; kernel32" Alias" GetVersionExA"() AsLong
privateTypeOSVERSIONINFO
dwOSVersionInfoSizeAsLong
dwMajorVersionAsLong
dwMinorVersionAsLong
dwBuildNumberAsLong
dwPlatformIdAsLong
szCSDVersionAsString*128' Maintenancestringforpssusage
osNameAsString' I added the name of the operating system
endtype < / pre >
8. Unknown_Error
9. This is the statement of StretchBlt API -- /
what else to translate, just look at the meaning of each parameter
* *
function function: the function copies a bitmap from the source rectangle to the target rectangle, and stretches or compresses the image according to the current mode set by the target device when necessary
function prototype: bool StretchBlt (HDC hdcdest, int nxorigindest, int nyorigindest, int nwidthdest, int nheighdest, HDC hdcsrc, int nxoriginsrc, int nyoriginsrc, int nwidthsrc, int nheightsrc, DWORD dwrop)
parameter:
hdcdest: handle to the target device environment
nxorigindest: Specifies the x-axis coordinates of the upper left corner of the target rectangle, which are expressed in logical units
nyorigindest: Specifies the x-axis coordinates of the upper left corner of the target rectangle, which are expressed in logical units
nwidthdest: Specifies the width of the target rectangle in logical units
nheightdest: Specifies the height of the target rectangle, which is expressed in logical units
hdcsrc: handle to the source device environment
nxoriginsrc: the x-axis coordinate pointing to the upper left corner of the source rectangle, expressed in logical units
nyoriginsrc: the y-axis coordinate pointing to the upper left corner of the source rectangle, which is expressed in logical units
nwidthsrc: Specifies the width of the source rectangle in logical units
nheightsrc: Specifies the height of the source rectangle in logical units
dwrop: Specifies the raster operation to be performed. Raster opcodes define how the system combines colors in output operations, which include objects such as brushes, source bitmaps, and target bitmaps. Refer to BitBlt for a list of commonly used raster opcodes
return value: if the function is executed successfully, the return value is non-zero; if the function fails, the return value is zero. Windows NT: for more error information, call the GetLastError function.
what else to translate, just look at the meaning of each parameter
* *
function function: the function copies a bitmap from the source rectangle to the target rectangle, and stretches or compresses the image according to the current mode set by the target device when necessary
function prototype: bool StretchBlt (HDC hdcdest, int nxorigindest, int nyorigindest, int nwidthdest, int nheighdest, HDC hdcsrc, int nxoriginsrc, int nyoriginsrc, int nwidthsrc, int nheightsrc, DWORD dwrop)
parameter:
hdcdest: handle to the target device environment
nxorigindest: Specifies the x-axis coordinates of the upper left corner of the target rectangle, which are expressed in logical units
nyorigindest: Specifies the x-axis coordinates of the upper left corner of the target rectangle, which are expressed in logical units
nwidthdest: Specifies the width of the target rectangle in logical units
nheightdest: Specifies the height of the target rectangle, which is expressed in logical units
hdcsrc: handle to the source device environment
nxoriginsrc: the x-axis coordinate pointing to the upper left corner of the source rectangle, expressed in logical units
nyoriginsrc: the y-axis coordinate pointing to the upper left corner of the source rectangle, which is expressed in logical units
nwidthsrc: Specifies the width of the source rectangle in logical units
nheightsrc: Specifies the height of the source rectangle in logical units
dwrop: Specifies the raster operation to be performed. Raster opcodes define how the system combines colors in output operations, which include objects such as brushes, source bitmaps, and target bitmaps. Refer to BitBlt for a list of commonly used raster opcodes
return value: if the function is executed successfully, the return value is non-zero; if the function fails, the return value is zero. Windows NT: for more error information, call the GetLastError function.
10. Transparentblt function function function: this function performs bit block (bit) analysis on the color data of the pixels in the rectangular area in the specified source device environment_ The result is placed in the target device environment. Function prototype: bool transparentblt (HDC hdcdest, int nxorigindest, int nyorigindest, int nwidthdest, int hhightdest, HDC hdcsrc, int nxoriginsrc, int nyoriginsrc, int nwidthsrc, int nhightsrc, uint crtransparent); Parameter: hdcdest: handle to the target device environment. Nxorigindest: Specifies the x-axis coordinates of the upper left corner of the target rectangle, which are expressed in logical units. Nyorigindest: Specifies the y-axis coordinates of the upper left corner of the target rectangle, which are expressed in logical units. Nwidthdest: Specifies the width of the destination rectangle. Nheightdest: Specifies the height of the target rectangle. Hdcsr C: handle to the source device environment. Nxoriginsrc: Specifies the x-axis coordinates of the source rectangle (upper left corner), which are expressed in logical units. Nyoriginsrc: Specifies the y-axis coordinates of the source rectangle (upper left corner), which are expressed in logical units. Nwidthsrc: Specifies the width of the source rectangle. Nheightsrc: Specifies the height of the source rectangle. Crtransparent: RGB values in the source bitmap are treated as transparent colors. Return value: if the function is executed successfully, the return value is true; If the function fails, the return value is false. Windows NT: to get more error information, call the GetLastError function. Note: the transparentblt function supports 4-bit / pixel and 8-bit / pixel source bitmaps. AlphaBlend allows you to specify 32-bit / pixel bitmaps with transparency. If the sizes of the source and target rectangles are inconsistent, the source bitmap will be stretched to match the target rectangle. When the setstretchbltmode function is used, the two istretchmode modes of blackowhite and whiteonblock will be converted to the coloroncolor mode of the transparentblt function. The target device environment specifies the type of transformation used for the target coordinates, while the source device environment specifies the type of transformation used for the source coordinates. If the width or height of the source or destination bitmap is negative, the transparentblt function also does not mirror the bitmap. Quick check: Windows NT: 5.0 or above; Windows: 98 and above; Windows CE:Windows CE .NET 4.0 and later Header file: wingdi. H: library file: included as a resource in msimg32. DLL.
Hot content
