CN106775601A - Method and device for determining connection state of mobile equipment - Google Patents

Method and device for determining connection state of mobile equipment Download PDF

Info

Publication number
CN106775601A
CN106775601A CN201510810359.XA CN201510810359A CN106775601A CN 106775601 A CN106775601 A CN 106775601A CN 201510810359 A CN201510810359 A CN 201510810359A CN 106775601 A CN106775601 A CN 106775601A
Authority
CN
China
Prior art keywords
message
mobile device
transfer
equipment
connection status
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510810359.XA
Other languages
Chinese (zh)
Inventor
杨峰
潘建军
王云峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Zhuhai Juntian Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd, Zhuhai Juntian Electronic Technology Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201510810359.XA priority Critical patent/CN106775601A/en
Publication of CN106775601A publication Critical patent/CN106775601A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a method and a device for determining the connection state of mobile equipment, relates to the technical field of computer optimization, and can quickly and accurately acquire the connection state of the mobile equipment. The method for determining the connection state of the mobile equipment comprises the following steps: monitoring the calling of a message transfer function in a Windows operating system; judging whether the current message to be transferred is a device connection change notification message; and if the current message to be transferred is the equipment connection change notification message, determining the connection state of the mobile equipment according to the equipment connection change notification message. The invention is suitable for connecting the mobile equipment with the system.

Description

Determine the method and device of mobile device connection status
Technical field
The present invention relates to computerized optimization technique field, more particularly to a kind of determine mobile device connection status Method and device.
Background technology
Windows operating system is a system based on message mechanism, and message by system or can apply journey Sequence is produced.System produces message when there is incoming event.Such as, when user strokes, mobile mouse or Click control.System also produces message to respond the change brought by application program, such as application program changes System font changes frame size.Application program can produce message make forms perform task, or and other Windows Messenger in application program.
All of Message Processing is all come transfer by message transfer function in Windows system kernels.It is existing Some application programs are typically that after message described in transfer function pair carries out transfer the message could be obtained, this Application program described in sample has delay in time when the message is obtained, and have impact on the application program pair The treatment of the mobile device.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of method and device for determining mobile device connection status, The connection status of mobile device can rapidly and accurately be obtained.
In a first aspect, the embodiment of the present invention provides a kind of method for determining mobile device connection status, including:
Calling for message transfer function in Windows operating system is monitored;
Whether the message for judging currently to want transfer is equipment connection Notification of Changes message;
If the message for currently wanting transfer is equipment connection Notification of Changes message, Notification of Changes is connected according to equipment Message determines the connection status of mobile device.
It is described that Windows is operated with reference in a first aspect, in the first embodiment of first aspect Calling for message transfer function in system monitored, including:By Hook Function to the message transfer Calling for function is monitored;Wherein, the Hook Function is included in the driving of application program.
In with reference to the first embodiment of first aspect, in second embodiment of first aspect, The judgement currently wants whether the message of transfer is equipment connection Notification of Changes message, including:By the hook Subfunction judges whether the type parameter of the current message for wanting transfer is predetermined parameter value, if, it is determined that The message for currently wanting transfer is equipment connection Notification of Changes message, otherwise, it is determined that currently want the message of transfer It is not equipment connection Notification of Changes message.
In with reference to second embodiment of first aspect, in the third embodiment of first aspect, If the current message for want transfer is equipment connection Notification of Changes message, according to equipment connection Notification of Changes Message determines the connection status of mobile device, including:If the message for currently wanting transfer is equipment, and connection change is logical Know message, the Hook Function then obtains the information related to equipment connection Notification of Changes message, and root The connection status of mobile device is determined according to described information.
With reference to first aspect and first aspect the first to any one in the third embodiment can Embodiment, in the 4th kind of embodiment of first aspect, the connection status bag of the mobile device Include:Insertion equipment, extraction equipment, equipment are already inserted into and/or equipment has been extracted.
In with reference to the 4th kind of embodiment of first aspect, in the 5th kind of embodiment of first aspect, It is determined that after the connection status of the mobile device, methods described also includes:
Relevant treatment is carried out to the mobile device;
After relevant treatment is carried out to the mobile device, the Hook Function calls the message transfer letter It is several that transfer is carried out to the message.
In with reference to the 5th kind of embodiment of first aspect, in the 6th kind of embodiment of first aspect, If it is determined that the connection status of the mobile device is insertion equipment, then relevant treatment is carried out to the mobile device, Including:Before mobile device opening, virus scan treatment is carried out to the file in the mobile device.
Second aspect, the embodiment of the present invention provides a kind of device for determining mobile device connection status, including: Monitoring module, for being monitored to the calling for message transfer function in Windows operating system;First Judge module, whether the message for judging currently to want transfer is equipment connection Notification of Changes message;Second sentences Disconnected module, if being equipment connection Notification of Changes message for currently wanting the message of transfer, connects according to equipment Notification of Changes message determines the connection status of mobile device.
With reference to second aspect, in the first embodiment of second aspect, the monitoring module is located at should With in the drive module of program.
With reference to the first embodiment of second aspect, in second embodiment of second aspect, First judge module, including:First acquisition submodule, the class for obtaining the current message for wanting transfer Shape parameter;First judging submodule, for judging whether the type parameter is predetermined parameter value, if so, The message for then determining currently to want transfer is equipment connection Notification of Changes message, otherwise, it is determined that currently want transfer Message be not equipment connection Notification of Changes message;First notifies submodule, if for currently wanting disappearing for transfer Breath is equipment connection Notification of Changes message, then notify second judge module.
With reference to second embodiment of second aspect, in the third embodiment of second aspect, Second judge module, including:Second acquisition submodule, if the message for currently wanting transfer is equipment Connection Notification of Changes message, then obtain the information related to equipment connection Notification of Changes message;Second sentences Disconnected submodule, for according to the information related to equipment connection Notification of Changes message, determining mobile device Connection status.
With reference to second aspect and second aspect the first to any one in the third embodiment can Embodiment, in the 4th kind of embodiment of second aspect, the connection status bag of the mobile device Include:Insertion equipment, extraction equipment, equipment are already inserted into and/or equipment has been extracted.
With reference to the 4th kind of embodiment of second aspect, in the 5th kind of embodiment of second aspect, The device of described determination mobile device connection status, also includes:Processing module, for it is determined that the shifting After the connection status of dynamic equipment, relevant treatment is carried out to the mobile device;Calling module, for right The mobile device is carried out after relevant treatment, call the message transfer function pair described in message carry out transfer.
With reference to the 5th kind of embodiment of second aspect, in the 6th kind of embodiment of second aspect, The processing module, including:Scanning submodule, for if it is determined that the connection status of the mobile device is slotting Enter equipment, then before mobile device opening, virus scan is carried out to the file in the mobile device Treatment;Remind submodule, for it is determined that there is virus in the mobile device or during Malware, to Reminded at family.
The method and device for determining mobile device connection status provided in an embodiment of the present invention, by Windows Calling for message transfer function in operating system is monitored, when there is message to need transfer, judges current Whether the message for wanting transfer is equipment connection Notification of Changes message, if so, then can be logical according to equipment connection change Know that message determines the connection status of mobile device, so can in the message turn the connection change of function pair equipment logical Know that message carries out transfer before processing, you can capture equipment connection Notification of Changes message, calmly can be quickly accurate Really obtain the connection status of mobile device.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to implementing Example or the accompanying drawing to be used needed for description of the prior art are briefly described, it should be apparent that, describe below In accompanying drawing be only some embodiments of the present invention, for those of ordinary skill in the art, do not paying On the premise of going out creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is present invention determine that the schematic flow sheet of the embodiment of the method one of mobile device connection status;
Fig. 2 is present invention determine that the schematic flow sheet of the embodiment of the method two of mobile device connection status;
Fig. 3 is present invention determine that the structural representation of the device embodiment one of mobile device connection status;
Fig. 4 is present invention determine that the structural representation of the device embodiment two of mobile device connection status.
Specific embodiment
The method and device for determining mobile device connection status a kind of to the embodiment of the present invention is entered below in conjunction with the accompanying drawings Row is described in detail.
It will be appreciated that described embodiment is only a part of embodiment of the invention, rather than whole realities Apply example.Based on the embodiment in the present invention, those of ordinary skill in the art are not before creative work is made The all other embodiment for being obtained is put, the scope of present invention protection is belonged to.
Fig. 1 is present invention determine that the schematic flow sheet of the embodiment of the method one of mobile device connection status.Referring to Fig. 1, present invention determine that the embodiment of the method for mobile device connection status, comprises the following steps:
S101, the calling for message transfer function in Windows operating system is monitored.
In the present embodiment, the mobile device, also referred to as running gear (Mobile device), flowing Device, hand-held device (handheld device) etc., are a kind of computing devices of pocket size, are generally had One small display screens, touch-control input, or small-sized keyboard.
The type of mobile device has a lot, such as mobile phone, USB flash disk etc..For being provided with Windows operations system The computer equipment of system, when have mobile device into and out when, Windows operating system can all be produced and disappeared Breath, this message definition is WM_DEVICECHANGE, and it is 0x0219 to be worth.
In Windows operating system kernel, by message transfer function, i.e., all of Message Processing is all NtUserMessageCall functions carry out transfer.In the present embodiment, by NtUserMessageCall letters Several calling monitored, being capable of the Notification of Changes message of capture device connection in time.
S102, judgement currently want whether the message of transfer is equipment connection Notification of Changes message.
In the present embodiment, the type parameter of the message of transfer can be currently wanted by acquisition, according to such shape parameter Whether the message for judging currently to want transfer is equipment connection Notification of Changes message.
If S103, the current message for want transfer are equipment connection Notification of Changes message, according to equipment connection change More notification message determines the connection status of mobile device.
In the present embodiment, if the current message for want transfer is that equipment connects Notification of Changes message, can according to The related information of equipment connection Notification of Changes message determines the connection status of mobile device.
The method for determining mobile device connection status provided in an embodiment of the present invention, operates by Windows Calling for message transfer function in system is monitored, when there is message to need transfer, in judging currently to want Whether the message for turning is equipment connection Notification of Changes message, if so, Notification of Changes then can be connected according to equipment disappearing Breath determines the connection status of mobile device, so can in the message turn function pair equipment connection Notification of Changes and disappear Breath carries out transfer before processing, you can capture equipment connection Notification of Changes message, calmly can be rapidly and accurately Obtain the connection status of mobile device.
Fig. 2 is present invention determine that the schematic flow sheet of the embodiment of the method two of mobile device connection status.Referring to Fig. 2, present invention determine that the embodiment of the method for mobile device connection status, comprises the following steps:
S201, the calling for message transfer function is monitored by Hook Function;Wherein, the hook Subfunction is included in the driving of application program.
In the present embodiment, the mobile device, also referred to as running gear (Mobile device), flowing Device, hand-held device (handheld device) etc., are a kind of computing devices of pocket size, are generally had One small display screens, touch-control input, or small-sized keyboard.
The type of mobile device has a lot, such as mobile phone, USB flash disk etc..For being provided with Windows operations system The computer equipment of system, when have mobile device into and out when, Windows operating system can all be produced and disappeared Breath, this message definition is WM_DEVICECHANGE, and it is 0x0219 to be worth.
In Windows operating system kernel, by message transfer function, i.e., all of Message Processing is all NtUserMessageCall functions carry out transfer.In the present embodiment, by NtUserMessageCall letters Several calling monitored, being capable of the Notification of Changes message of capture device connection in time.
Before this step, can be by programming personnel in the driving of application program, such as in the anti-of Jinshan anti-virus software In imperial driving, hook (HOOK) function is set up.
Hook Function is actually a program segment for treatment message, is called by system, and it is linked into system. Whenever specific message sends, before without purpose window is reached, Hook Function just first captures the message, also I.e. Hook Function first obtains control.At this moment Hook Function be can be with the working process message, it is also possible to do not make Process and continue to transmit the message, the transmission of end can also be forced.
In the present embodiment, the present embodiment is revised as in the original entry address of NtUserMessageCall functions In Hook Function entry address.Windows operating system when NtUserMessageCall functions are called, Because the original entry address of NtUserMessageCall functions has been modified to the Hook Function of the present embodiment Entry address, called by NtUserMessageCall functions, you can skip to the hook of the present embodiment The execution of subfunction, is achieved in the monitoring to NtUserMessageCall functions.
In order to realize the readjustment to NtUserMessageCall functions, by NtUserMessageCall letters Several original entry addresses be revised as the entry address of the Hook Function in the present embodiment before, it is necessary to right The original entry address of NtUserMessageCall functions is preserved.
S202, judgement currently want whether the type parameter of the message of transfer is predetermined parameter value.
In the present embodiment, by the Hook Function judge the current message for wanting transfer type parameter whether be Predetermined parameter value, that is, whether the type parameter for judging the current message for wanting transfer is 0x0219, if so, then Step S203 is performed, otherwise, step S205 is performed.
S203, the acquisition information related to equipment connection Notification of Changes message, and it is true according to described information Determine the connection status of mobile device.
By the related information of Hook Function acquisition and equipment connection Notification of Changes message, and according to Described information determines the connection status of mobile device.
In the present embodiment, the information related to equipment connection Notification of Changes message has a lot, it is preferable that this reality Apply example and be only concerned following three kinds of information:
(1), DBT_DEVICEARRIVAL, it is 0x8000 to be worth, and represents that equipment reaches information, that is, insert equipment;
(2), DBT_DEVICEREMOVECOMPLETE, it is 0x8004 to be worth, and represents that equipment deletes information, that is, dial Go out equipment;
(3), DBT_DEVNODES_CHANGED, it is 0x0007 to be worth, and represents that facility information changes, that is, set It is standby to be already inserted into or transferred to.
In the present embodiment, can be according to the information parameter value related to equipment connection Notification of Changes message, it is determined that moving The connection status of dynamic equipment.
In the present embodiment, by judging to connect the related information of Notification of Changes message to equipment, if above One kind in three kinds, then perform step S204, if not the one kind in above three kinds, then performs step S205.
S204, relevant treatment is carried out to the mobile device.
In the present embodiment, it is determined that after the connection status of the mobile device, can enter to the mobile device Row relevant treatment.
Such as, however, it is determined that the connection status of the mobile device is insertion equipment, then beaten in the mobile device Before opening, virus scan treatment is carried out to the file in the mobile device.If being found the malice such as virus Software, then can remind user to carry out killing.
If it is determined that the connection status of the mobile device is extraction equipment, the text in it there is the mobile device When part is in open mode, user can be reminded first to close the file of opening, mobile device is then extracted again.
If it is determined that the connection status of the mobile device automatically can then set the movement to be already inserted into equipment It is standby to open.
If it is determined that the connection status of the mobile device can then cancel that the movement is set to have extracted equipment The display of standby drive.
More than, only it is the illustrative explanation that relevant treatment is carried out to the mobile device, the invention is not restricted to this, The mobile device can also be processed using other processing modes.
S205, call the message transfer function pair described in message carry out transfer.
In the present embodiment, after relevant treatment is carried out to the mobile device, the Hook Function calls institute Message described in stating message transfer function pair carries out transfer.
In the present embodiment, original of the Hook Function according to the NtUserMessageCall functions for pre-saving Beginning entry address, call NtUserMessageCall functions, it is complete by NtUserMessageCall functions The transfer of the paired message.
The method for determining mobile device connection status provided in an embodiment of the present invention, by setting up in application program Driving in Hook Function, calling for NtUserMessageCall functions is monitored, Neng Gou The inner nuclear layer of windows operating systems is monitored to calling for NtUserMessageCall functions, quick accurate Really capture the connection status of mobile device, and before can not yet being opened after mobile device insertion, to moving File in dynamic equipment carries out previously-scanned treatment, if being found the Malwares such as virus, can remind use Family carries out killing.
Fig. 3 is present invention determine that the structural representation of the device embodiment one of mobile device connection status.Referring to Fig. 3, present invention determine that the device embodiment of mobile device connection status, including:Monitoring module 31, first The judge module 33 of judge module 32 and second;Wherein,
Monitoring module 31, for being monitored to the calling for message transfer function in Windows operating system.
In the present embodiment, the mobile device, also referred to as running gear (Mobile device), flowing Device, hand-held device (handheld device) etc., are a kind of computing devices of pocket size, are generally had One small display screens, touch-control input, or small-sized keyboard.
The type of mobile device has a lot, such as mobile phone, USB flash disk etc..For being provided with Windows operations system The computer equipment of system, when have mobile device into and out when, Windows operating system can all be produced and disappeared Breath, this message definition is WM_DEVICECHANGE, and it is 0x0219 to be worth.
In Windows operating system kernel, by message transfer function, i.e., all of Message Processing is all NtUserMessageCall functions carry out transfer.In the present embodiment, by NtUserMessageCall letters Several calling monitored, being capable of the Notification of Changes message of capture device connection in time.
First judge module 32, whether the message for judging currently to want transfer is that equipment connection Notification of Changes disappears Breath.In the present embodiment, the type parameter of the message of transfer can be currently wanted by acquisition, according to such shape parameter Whether the message for judging currently to want transfer is equipment connection Notification of Changes message.
Second judge module 33, if being equipment connection Notification of Changes message for currently wanting the message of transfer, The connection status that Notification of Changes message determines mobile device is connected according to equipment.In the present embodiment, if currently The message of transfer is equipment connection Notification of Changes message, then can be according to related to equipment connection Notification of Changes message Information determine the connection status of mobile device.
The device for determining mobile device connection status provided in an embodiment of the present invention, operates by Windows Calling for message transfer function in system is monitored, when there is message to need transfer, in judging currently to want Whether the message for turning is equipment connection Notification of Changes message, if so, Notification of Changes then can be connected according to equipment disappearing Breath determines the connection status of mobile device, so can in the message turn function pair equipment connection Notification of Changes and disappear Breath carries out transfer before processing, you can capture equipment connection Notification of Changes message, calmly can be rapidly and accurately Obtain the connection status of mobile device.
The device of the present embodiment, can be used for performing the technical scheme of embodiment of the method shown in Fig. 1, and it realizes former Reason is similar with technique effect, and here is omitted.
Fig. 4 is present invention determine that the structural representation of the device embodiment two of mobile device connection status.This reality Apply in example, the monitoring module is in the drive module of application program.Referring to Fig. 4, the device of the present embodiment On the basis of Fig. 3 shown device structures, further, first judge module 32 can include: First acquisition submodule 321, the first judging submodule 322 and first notify submodule 323;Wherein,
First acquisition submodule 321, the type parameter for obtaining the current message for wanting transfer.
First judging submodule 322, for judging whether the type parameter is predetermined parameter value, if so, The message for then determining currently to want transfer is equipment connection Notification of Changes message, otherwise, it is determined that currently want transfer Message be not equipment connection Notification of Changes message.
Whether it is predetermined parameter value by the type parameter for judging the current message for wanting transfer in the present embodiment, Whether the type parameter for judging the current message for wanting transfer is 0x0219, if, it is determined that currently want transfer Message be equipment connection Notification of Changes message, otherwise, it is determined that the current message for want transfer is not equipment company Connect Notification of Changes message.
First notifies submodule 323, if being equipment connection Notification of Changes message for currently wanting the message of transfer, Second judge module is then notified, if the message for currently wanting transfer is not equipment connection Notification of Changes message, Then notify the calling module 35.
In the present embodiment, further, second judge module 33 can include:Second obtains submodule The judging submodule 332 of block 331 and second;Wherein,
Second acquisition submodule 331, if being equipment connection Notification of Changes message for currently wanting the message of transfer, Then obtain the information related to equipment connection Notification of Changes message.
In embodiment, the information related to equipment connection Notification of Changes message has a lot, it is preferable that this implementation Example is only concerned following three kinds of information:
(1), DBT_DEVICEARRIVAL, it is 0x8000 to be worth, and represents that equipment reaches information, that is, insert equipment;
(2), DBT_DEVICEREMOVECOMPLETE, it is 0x8004 to be worth, and represents that equipment deletes information, that is, dial Go out equipment;
(3), DBT_DEVNODES_CHANGED, it is 0x0007 to be worth, and represents that facility information changes, that is, set It is standby to be already inserted into or transferred to.
Second judging submodule 332, for connecting the related information of Notification of Changes message to equipment according to described, Determine the connection status of mobile device.
In the present embodiment, can be according to the information parameter value related to equipment connection Notification of Changes message, it is determined that moving The connection status of dynamic equipment.
In the present embodiment, further, the device of described determination mobile device connection status also includes: Processing module 34 and calling module 35;Wherein,
Processing module 34, for it is determined that after the connection status of the mobile device, to the mobile device Carry out relevant treatment.In the present embodiment, it is determined that after the connection status of the mobile device, can be to described Mobile device carries out relevant treatment.
Such as, however, it is determined that the connection status of the mobile device is insertion equipment, then beaten in the mobile device Before opening, virus scan treatment is carried out to the file in the mobile device.If being found the malice such as virus Software, then can remind user to carry out killing.
If it is determined that the connection status of the mobile device is extraction equipment, the text in it there is the mobile device When part is in open mode, user can be reminded first to close the file of opening, mobile device is then extracted again.
If it is determined that the connection status of the mobile device automatically can then set the movement to be already inserted into equipment It is standby to open.
If it is determined that the connection status of the mobile device can then cancel that the movement is set to have extracted equipment The display of standby drive.
More than, only it is the illustrative explanation that relevant treatment is carried out to the mobile device, the invention is not restricted to this, The mobile device can also be processed using other processing modes.
Calling module 35, for after relevant treatment is carried out to the mobile device, calling the message in Turning message described in function pair carries out transfer.
In the present embodiment, according to the original entry address of the NtUserMessageCall functions for pre-saving, NtUserMessageCall functions are called, is completed to the message by NtUserMessageCall functions Transfer.
In the present embodiment, further, the processing module 34, including:Scanning submodule 341 and prompting Submodule 342;Wherein, submodule 341 is scanned, for if it is determined that the connection status of the mobile device is slotting Enter equipment, then before mobile device opening, virus scan is carried out to the file in the mobile device Treatment reminds submodule 342, right for when it is determined that there is virus or Malware in the mobile device User is reminded.
The device for determining mobile device connection status provided in an embodiment of the present invention, by right Calling for NtUserMessageCall functions monitored, can be in the inner nuclear layer pair of windows operating systems Calling for NtUserMessageCall functions monitored, rapidly and accurately captures the connection shape of mobile device State, and can mobile device insertion after not yet open before, the file in mobile device is carried out previously-scanned Treatment, if being found the Malwares such as virus, can remind user to carry out killing.
The device of the present embodiment, can be used for performing the technical scheme of embodiment of the method shown in Fig. 2, and it realizes former Reason is similar with technique effect, and here is omitted.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method, Computer program be can be by instruct the hardware of correlation to complete, described program can be stored in a calculating In machine read/write memory medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method. Wherein, described storage medium can for magnetic disc, CD, read-only memory (Read-Only Memory, ) or random access memory (Random Access Memory, RAM) etc. ROM.
The above, specific embodiment only of the invention, but protective range of the invention is not limited to This, any one skilled in the art the invention discloses technical scope in, can readily occur in Change or replacement, should all cover within protective range of the invention.Therefore, protective range of the invention Should be defined by the protective range of claim.

Claims (10)

1. it is a kind of determine mobile device connection status method, it is characterised in that including:
Calling for message transfer function in Windows operating system is monitored;
Whether the message for judging currently to want transfer is equipment connection Notification of Changes message;
If the message for currently wanting transfer is equipment connection Notification of Changes message, Notification of Changes is connected according to equipment Message determines the connection status of mobile device.
2. it is according to claim 1 determine mobile device connection status method, it is characterised in that institute State and the calling for message transfer function in Windows operating system is monitored, including:
The calling for message transfer function is monitored by Hook Function;Wherein, the Hook Function It is included in the driving of application program.
3. it is according to claim 2 determine mobile device connection status method, it is characterised in that institute State and judge whether the message for currently wanting transfer is equipment connection Notification of Changes message, including:
Whether the type parameter that the current message for wanting transfer is judged by the Hook Function is predetermined parameter Value, if, it is determined that the message for currently wanting transfer is equipment connection Notification of Changes message, otherwise, it is determined that The message for currently wanting transfer is not equipment connection Notification of Changes message.
4. it is according to claim 3 determine mobile device connection status method, it is characterised in that institute If it is equipment connection Notification of Changes message to state the current message for want transfer, disappeared according to equipment connection Notification of Changes Breath determines the connection status of mobile device, including:
If the message for currently wanting transfer is equipment connection Notification of Changes message, the Hook Function is then obtained and institute The related information of equipment connection Notification of Changes message is stated, and the connection shape of mobile device is determined according to described information State.
5. the method for the determination mobile device connection status according to any one of Claims 1-4, it is special Levy and be, the connection status of the mobile device includes:Insertion equipment, extraction equipment, equipment are already inserted into And/or equipment has been extracted.
6. it is according to claim 5 determine mobile device connection status method, it is characterised in that
It is determined that after the connection status of the mobile device, methods described also includes:
Relevant treatment is carried out to the mobile device;
After relevant treatment is carried out to the mobile device, the Hook Function calls the message transfer letter It is several that transfer is carried out to the message.
7. it is according to claim 6 determine mobile device connection status method, it is characterised in that
It is described if it is determined that the mobile device connection status be insertion equipment, then the mobile device is carried out Relevant treatment, including:
Before mobile device opening, virus scan treatment is carried out to the file in the mobile device.
8. it is a kind of determine mobile device connection status device, it is characterised in that including:
Monitoring module, for being monitored to the calling for message transfer function in Windows operating system;
First judge module, whether the message for judging currently to want transfer is equipment connection Notification of Changes message;
Second judge module, if being equipment connection Notification of Changes message, root for currently wanting the message of transfer The connection status of mobile device is determined according to equipment connection Notification of Changes message.
9. it is according to claim 8 determine mobile device connection status device, it is characterised in that institute Monitoring module is stated to be located in the drive module of application program.
10. it is according to claim 9 determine mobile device connection status device, it is characterised in that First judge module, including:
First acquisition submodule, the type parameter for obtaining the current message for wanting transfer;
First judging submodule, for judging whether the type parameter is predetermined parameter value, if so, then It is determined that the message for currently wanting transfer is equipment connection Notification of Changes message, otherwise, it is determined that currently want transfer Message is not equipment connection Notification of Changes message;
First notifies submodule, if being equipment connection Notification of Changes message for currently wanting the message of transfer, Notify second judge module.
CN201510810359.XA 2015-11-19 2015-11-19 Method and device for determining connection state of mobile equipment Pending CN106775601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510810359.XA CN106775601A (en) 2015-11-19 2015-11-19 Method and device for determining connection state of mobile equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510810359.XA CN106775601A (en) 2015-11-19 2015-11-19 Method and device for determining connection state of mobile equipment

Publications (1)

Publication Number Publication Date
CN106775601A true CN106775601A (en) 2017-05-31

Family

ID=58885798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510810359.XA Pending CN106775601A (en) 2015-11-19 2015-11-19 Method and device for determining connection state of mobile equipment

Country Status (1)

Country Link
CN (1) CN106775601A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090126006A1 (en) * 2007-11-08 2009-05-14 Samsung Electronics Co., Ltd. Securing cpu affinity in multiprocessor architectures
CN101577696A (en) * 2008-05-07 2009-11-11 谭力 Method for preventing from stealing passwords
US7703081B1 (en) * 2005-09-22 2010-04-20 Symantec Corporation Fast system call hooking on x86-64 bit windows XP platforms
CN101751524B (en) * 2008-12-04 2013-03-27 联想(北京)有限公司 Device, method and computer for management of computer external equipment
CN103218561A (en) * 2013-03-18 2013-07-24 珠海市君天电子科技有限公司 Tamper-proof method and device for protecting browser
CN104156661A (en) * 2014-07-26 2014-11-19 珠海市君天电子科技有限公司 Device and method for preventing account passwords from being tampered

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7703081B1 (en) * 2005-09-22 2010-04-20 Symantec Corporation Fast system call hooking on x86-64 bit windows XP platforms
US20090126006A1 (en) * 2007-11-08 2009-05-14 Samsung Electronics Co., Ltd. Securing cpu affinity in multiprocessor architectures
CN101577696A (en) * 2008-05-07 2009-11-11 谭力 Method for preventing from stealing passwords
CN101751524B (en) * 2008-12-04 2013-03-27 联想(北京)有限公司 Device, method and computer for management of computer external equipment
CN103218561A (en) * 2013-03-18 2013-07-24 珠海市君天电子科技有限公司 Tamper-proof method and device for protecting browser
CN104156661A (en) * 2014-07-26 2014-11-19 珠海市君天电子科技有限公司 Device and method for preventing account passwords from being tampered

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
九天科技编著: "《轻松学电脑维护与故障排除》", 31 May 2011, 中国铁道出版社 *
冰海: "自己编程抓肉鸡——将捕获消息进行到底", 《黑客防线》 *
季雪岗、王晓辉、张宏林 等编著: "《Delphi编程疑难详解》", 31 July 2000, 人民邮电出版社 *
张荣梅 梁晓林 赵宝琴 编著: "《Visual C++实用教程》", 30 September 2009, 中国铁道出版社 *
杨格编著: "《从零开始学电脑 上网、办公、理财、维护一本通》", 30 November 2014, 中国青年出版社 *
胡艳蓉 刘新竹 编著: "《办公自动化技术》", 31 October 2009, 武汉大学出版社 *
蒋媛媛编著: "《黑客攻防从新手到高手 超值版》", 31 January 2012, 中国铁道出版社 *

Similar Documents

Publication Publication Date Title
CN104898952B (en) A kind of terminal split screen implementation method and terminal
CN110431521B (en) Split screen display method and device and terminal
WO2012055714A1 (en) Automated adjustment of input configuration
EP4206883A1 (en) Permission setting method and apparatus and electronic device
CN112817676B (en) Information processing method and electronic device
CN107122120A (en) A kind of processing method of dummy keyboard, device and terminal
CN107133002A (en) A kind of information processing method and electronic equipment
CN114385049A (en) Message processing method, device, equipment and storage medium
CN114443203A (en) Information display method and device, electronic equipment and readable storage medium
CN114327088A (en) Message sending method, device, electronic equipment and medium
CN104980335B (en) The reception email processing method and system of mailbox
CN105955634A (en) Mobile intelligent terminal screenshot method and screenshot system
CN112929254A (en) Message processing method and device and electronic equipment
CN112578975A (en) Information processing method and device and electronic equipment
CN106951168A (en) A kind of literal processing method and mobile terminal
WO2023134599A1 (en) Voice information sending method and apparatus, and electronic device
CN108984024B (en) Touch operation method and device, storage medium and electronic equipment
CN104331214B (en) Information processing method and electronic equipment
CN105808045B (en) Method and system for setting computer display function
CN112162689B (en) Input method and device and electronic equipment
CN106775601A (en) Method and device for determining connection state of mobile equipment
CN113342223B (en) Unread message identifier display method and device and electronic equipment
US20170010805A1 (en) Character Input Method and Electronic Device
CN115412634A (en) Message display method and device
CN112291630B (en) Electronic equipment screen sharing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20181214

Address after: 519031 Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Applicant after: Zhuhai Leopard Technology Co.,Ltd.

Address before: 519070, six level 601F, 10 main building, science and technology road, Tangjia Bay Town, Zhuhai, Guangdong.

Applicant before: Zhuhai Juntian Electronic Technology Co.,Ltd.

Applicant before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531