CN108845837B - Method for detecting operating mode of windows system and electronic equipment - Google Patents

Method for detecting operating mode of windows system and electronic equipment Download PDF

Info

Publication number
CN108845837B
CN108845837B CN201810745845.1A CN201810745845A CN108845837B CN 108845837 B CN108845837 B CN 108845837B CN 201810745845 A CN201810745845 A CN 201810745845A CN 108845837 B CN108845837 B CN 108845837B
Authority
CN
China
Prior art keywords
windows system
mode
object model
component object
model com
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.)
Active
Application number
CN201810745845.1A
Other languages
Chinese (zh)
Other versions
CN108845837A (en
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810745845.1A priority Critical patent/CN108845837B/en
Publication of CN108845837A publication Critical patent/CN108845837A/en
Application granted granted Critical
Publication of CN108845837B publication Critical patent/CN108845837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The disclosure provides a method for detecting a windows system operation mode, which comprises the following steps: loading a dynamic link library, acquiring an entry address of a function of the dynamic link library, creating a first Component Object Model (COM) object, and creating a Globally Unique Identifier (GUID) of the first component object model COM object, wherein the first component object model COM object comprises an operation mode of the windows system, and the first component object model COM object is unavailable for external calling in the windows system; acquiring content in the first component object model COM object according to the global unique identifier GUID, and creating a second component object model COM object according to the acquired content, wherein the second component object model COM object is available for external calling in the windows system; and calling a GetForWindow interface in the second component object model COM object, acquiring the operating mode of the windows system, and judging the type of the operating mode.

Description

Method for detecting operating mode of windows system and electronic equipment
Technical Field
The disclosure relates to a method for detecting a windows system operation mode and an electronic device.
Background
With the development of computer technology, windows systems have also undergone great changes, and most obviously, a tablet mode is added to the windows10 system. The tablet mode is used for a tablet computer or equipment with a touch screen, and particularly plays an important role in a notebook and tablet two-in-one super notebook.
In the development process of the client software, because the compatibility design is not made for the operation of the client software in the tablet mode of the windows10 system, the problems of abnormal program function display, errors and the like of the client software can occur when the client software operates in the tablet mode of the windows10 system. Therefore, in order to enable the client software to normally operate in the tablet mode of the windows10 system, the client software needs to determine whether the software operates in the tablet mode of the windows10 system in the re-operation process, so that the client software performs corresponding program logic processing to be compatible with the tablet mode of the windows10 system, but at present, there is no method for detecting that the windows10 system operates in the tablet mode. Because the windows10 system does not disclose an interface for detecting whether the client software runs in the tablet mode, whether the client software runs in the tablet mode of the windows10 system or not needs to be detected by an undisclosed method, the method for detecting the running mode of the windows10 system is mainly used for acquiring the running mode of the windows10 system through a windows universal platform development interface (UWP application development), the method for detecting the running mode of the windows system is designed, whether the client software runs in the tablet mode of the windows10 system or not can be correctly detected, and finally abnormal running of the client software in the tablet mode of the windows10 system is effectively avoided.
Disclosure of Invention
In view of the foregoing problems, the present disclosure provides a method for detecting a windows system operation mode and an electronic device, which can effectively detect whether a client software operates in a tablet mode, so that the client software performs subsequent processing, thereby avoiding problems such as program display abnormality and errors.
One aspect of the present disclosure provides a method for detecting an operation mode of a windows system, including: loading a dynamic link library, acquiring an entry address of a function of the dynamic link library, creating a first Component Object Model (COM) object, and creating a Globally Unique Identifier (GUID) of the first component object model COM object, wherein the first component object model COM object comprises an operation mode of the windows system, and the first component object model COM object is unavailable for external calling in the windows system; acquiring content in the first component object model COM object according to the global unique identifier GUID, and creating a second component object model COM object according to the acquired content, wherein the second component object model COM object is available for external calling in the windows system; and calling a GetForWindow interface in the second component object model COM object, acquiring the operating mode of the windows system, and judging the type of the operating mode.
Optionally, creating a first component object model COM object further includes: calling a LoadLibrary function to load a combass.dll dynamic library; calling the GetRecAddress function to obtain a function pointer of the RoGetActivationFunctory unpublished application programming interface.
Optionally, creating a second component object model COM object further includes: creating a globally unique identifier GUID of the second component object model COM object; and calling a RoGetActivationActivities interface of the first component object model COM object to obtain the content in the first component object model COM object.
Optionally, the obtaining an operation mode of the windows system, and determining a type of the operation mode further include: acquiring a type object returned by an interface of the second component object model COM object; obtaining a return value of the type object; and judging the operation mode of the windows system according to the return value.
Optionally, the operation mode is a tablet operation mode, and the method further includes: if the return value is equal to a value which is defined by the windows system and represents a flat plate mode, the windows system operation mode is the flat plate mode; and if the return value is not equal to the value which is defined by the windows system and represents the flat plate mode, the operation mode of the windows system is the desktop mode.
Optionally, the type of the second component object model COM object is an iuiviewsettingson inter type.
Optionally, the value defined by the windows system to represent the tablet mode is an enumerated value user interactionmode _ Toch.
Another aspect of the present disclosure further provides an electronic device for detecting an operation mode of a windows system, including: a processor; a memory storing a computer executable program which, when executed by the processor, causes the processor to perform the above-described method of detecting a windows system mode of operation.
In another aspect of the present disclosure, a system for detecting an operation mode of a windows system is provided, where the system for detecting an operation mode of a windows system includes: the loading module is used for loading the dynamic link library and acquiring the entry address of the function of the dynamic link library; the system comprises a first creation module, a second creation module and a third creation module, wherein the first creation module is used for creating a first component object model COM object, the first component object model COM object comprises an operation mode of a windows system, and the first component object model COM object cannot be called externally in the windows system; the second creation module is used for creating a second component object model COM object according to the acquired content of the first component object model COM object, and the second component object model COM object can be called externally in the windows system; the acquisition module calls a GetForWindow interface in a second component object model COM object to acquire the operating mode of the windows system; and the judging module is used for judging whether the current running mode is the flat running mode.
In another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the method for detecting the operating mode of the windows system.
Drawings
Fig. 1 schematically shows a flowchart of a method for detecting an operation mode of a windows system according to an embodiment of the present disclosure.
Fig. 2 schematically shows a block diagram of an electronic device for detecting a mode of operation of a windows system according to the present disclosure.
Fig. 3 schematically illustrates a block diagram of a windows system operation mode detection system according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). It will be further understood by those within the art that virtually any disjunctive word and/or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase "a or B" should be understood to include the possibility of "a" or "B", or "a and B".
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable medium having instructions stored thereon for use by or in connection with an instruction execution system. In the context of this disclosure, a computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, the computer readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the computer readable medium include: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or wired/wireless communication links.
Fig. 1 schematically shows a flowchart of a method for detecting an operation mode of a windows system according to an embodiment of the present disclosure.
As shown in fig. 1, the method comprises the following operations:
s1: and loading the dynamic library and acquiring an interface function pointer.
In the above operation S1, since the Windows system does not disclose the application programming interface for detecting the operation mode, the operation mode of the Windows system needs to be detected through the undisclosed application programming interface, and in this embodiment, the operation mode of the Windows system is mainly obtained through a Windows Universal Platform development interface (Universal Windows Platform, UWP).
First, since an Application Programming Interface (API) to be obtained is not disclosed in the windows system, a module that needs to dynamically load a Dynamic Link Library (DLL) file obtains a function pointer of the API. Dll.dll dynamic link library files are loaded by calling the LoadLibrary function, for example, the function LoadLibrary (conjase: PChar): Thandle is executed; indicating that the DLL file specified by the parameter combbase is loaded, if the operation of the LoadLibrary function is successful, an instance handle for loading the DLL library module specified by the parameter combbase is returned, and if the operation of the LoadLibrary function fails, an error code is returned.
Then, calling a GetRecaddress function to obtain a function pointer of the RotActivationnActivate unpublished application programming interface, for example, executing function GetRecaddress (Module: Thandle; ProcName: RotActivationnActivate): Tfproc; the parameter Module contains an instance handle of a DLL library Module returned by the LoadLibrary, the parameter ProcName contains a function interface pointer, if the operation of the GetRecaDdrress function is successful, the function pointer of the RoGetActivationnActivate unpublished application programming interface in the DLL specified by the parameter ProcName is returned, and if the operation of the GetRecaDress function is failed, nil is returned.
S2: a first component object model COM object and its globally unique identifier GUID are created.
In operation S2, first, according to the obtained function pointer of the rogetactionaffective unpublished api, the function pointer of the rogetactionaffective unpublished api is called to obtain the running mode of the windows system, and a COM object of the runtime class library of the windows system, that is, a first component object model COM object, is created. The first component object model COM object comprises an operation mode of a windows system, and the first component object model COM object is not available for external calls in the windows system.
Then, calling a GetProcAddress function to obtain a function pointer of the windows createsttrigng unpublished application programming interface, calling the windows createsttrigng unpublished application programming interface, and creating a Globally Unique Identifier (GUID) of the first component object model COM object. Wherein the globally unique identifier GUID is a binary 128-bit long numeric identifier in the format "XXXXXXX-XXXXX-XXXXXXX-XXXXXXXXXXXXXXX", wherein each X is a 4-bit long hexadecimal number in the range 0-9 or a-f, for example: 6F9619FF-8E86-E011-B42E-00C04FC964FF is a valid globally unique identifier GUID value.
S3: a second component object model COM object is created.
In operation S3, first, the rogettactionactual function interface obtained in operation S1 is called by using the global unique identifier GUID of the first component object model COM object, the class and the interface of the first component object model COM object are obtained, and information that includes the windows system operation mode in the first component object model COM object is obtained.
Then, the Windows CreateString function obtained by invoking operation S2 creates a view _ settings _ GUID object that stores the GUID of the COM object in the format "XXXXXXX-XXXXX-XXXXXXXXXXXXXXX", where each X is a 4-bit hexadecimal number in the range of 0-9 or a-f.
Further, a COM object of the IUIViewSettingsInterop type, i.e. a second component object model COM object, is created according to the global unique identifier GUID stored in the view _ settings _ GUID object. The global unique identifier GUID of the second component object model COM model is the global unique identifier GUID stored in the view _ settings _ GUID object, the second component object model COM object contains information of the windows system operation mode, and the second component object model COM object is an application programming interface which can be called externally and interacts with system settings when the windows runs.
S4: and acquiring the operation mode of the windows system.
In operation S4, first, a GetForWindow interface of the IUIViewSettings inter object obtained in operation S3 is called by the global unique identifier GUID of the second component object model COM object, and a class and an interface of the second component object model COM object are obtained, where the interface returns an IUIViewSettings type object that includes information of the windows system operation mode.
And then, calling a get _ UserInteractionMode interface of the IUIViewSettings object to acquire the running mode of the current windows system, wherein the get _ UserInteractionMode interface returns a return value of an enumeration type, and different enumeration type return values represent different running modes of the current windows system.
S5: and judging whether the current operation mode is a flat plate mode.
In the above operation S5, according to the enumerated value of the current windows system operation mode obtained in operation S4 and the enumerated value userrinteractionmode _ Touch defined by the windows system and indicating the panel mode, if the enumerated value of the current windows system operation mode obtained in S4 is equal to the enumerated value userrinteractionmode _ Touch defined by the windows system and indicating the panel mode, the current windows operates in the panel mode, and if the enumerated value of the current windows system operation mode obtained in S4 is not equal to the enumerated value userriactionmode _ Touch defined by the windows system and indicating the panel mode, the current windows operates in the desktop mode.
According to the operation, whether the client software runs in the windows tablet mode or not can be accurately detected.
As shown in fig. 2, electronic device 200 includes a processor 210, a computer-readable storage medium 220. The electronic device 200 may perform the method described above with reference to fig. 1 for message processing.
In particular, processor 210 may include, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. The processor 210 may also include onboard memory for caching purposes. Processor 210 may be a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure described with reference to fig. 1.
Computer-readable storage medium 220 may be, for example, any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the readable storage medium include: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or wired/wireless communication links.
The computer-readable storage medium 220 may include a computer program 221, which computer program 221 may include code/computer-executable instructions that, when executed by the processor 210, cause the processor 210 to perform a method flow such as that described above in connection with fig. 1 and any variations thereof.
The computer program 221 may be configured with computer program code, for example, comprising computer program modules. For example, in an example embodiment, code in computer program 221 may include one or more program modules, including, for example, 221A, modules 221B, … …. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, which when executed by the processor 210, enable the processor 210 to perform the method flow described above in connection with fig. 1 and any variations thereof, for example.
Fig. 3 schematically illustrates a block diagram of a windows system operation mode detection system according to an embodiment of the present disclosure.
As shown in fig. 3, the windows system operation mode detection system 300 includes a loading module 310, a first creating module 320, a second creating module 330, an obtaining module 340, and a determining module 350.
Specifically, the loading module 310 loads the dynamic library and obtains the interface function pointer. And calling a LoadLibrary function to load a combbase.dll file, and calling a GetProcAddress function to acquire a function pointer of a RoGetActivationFunctory unpublished application programming interface.
The first creation module 320 creates a first component object model COM object and its globally unique identifier GUID. And calling a RoGetActivationProgramming unpublished application programming interface to acquire the running mode of the windows system and create a first component object model COM object. And calling a GetProcAddress function to obtain a function pointer of the Windows CreateString unpublished application programming interface, calling the Windows CreateString unpublished application programming interface, and creating a globally unique identifier GUID of the first component object model COM object.
A second creation module 330 creates a second component object model COM object. And calling a RoGetActivationFunctory function interface through the global unique identifier GUID of the first component object model COM object, acquiring the class and the interface of the first component object model COM object, and acquiring information containing the windows system operation mode in the first component object model COM object. Then, a Windows CreateString function is called to create a view _ settings _ GUID object, and a second component object model COM object of an IUIViewSettingsInterop type is created according to a globally unique identifier GUID stored in the view _ settings _ GUID object.
The obtaining module 340 obtains an operation mode of the windows system. And calling a GetForWindow interface of the IUIViewSettingsInterop object through the global unique identifier GUID of the second component object model COM object to acquire the class and the interface of the second component object model COM object, wherein the interface returns an IUIViewSettings type object which contains information of the operating mode of the windows system. And then, calling a get _ UserInteractionMode interface of the IUIViewSettings object to acquire the running mode of the current windows system, wherein the get _ UserInteractionMode interface returns a return value of an enumeration type, and different enumeration type return values represent different running modes of the current windows system.
The determining module 350 determines whether the current operation mode is the tablet mode. And comparing the obtained enumeration value of the current windows system running mode with an enumeration value UserInteractionModeTouch which is defined by the windows system and represents a panel mode, if the two enumeration values are equal, the current windows runs in the panel mode, and if the two enumeration values are not equal, the current windows runs in a desktop mode.
It is understood that the loading module 310, the first creating module 320, the second creating module 330, the obtaining module 340 and the determining module 350 may be combined into one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present invention, at least one of the loading module 310, the first creating module 320, the second creating module 330, the obtaining module 340 and the determining module 350 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in a suitable combination of three implementations of software, hardware and firmware. Alternatively, at least one of the loading module 310, the first creating module 320, the second creating module 330, the obtaining module 340 and the judging module 350 may be at least partially implemented as a computer program module, and when the program is executed by a computer, the function of the corresponding module may be performed.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a program segment or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (10)

1. A method for detecting the operation mode of a windows system comprises the following steps:
loading a dynamic link library, acquiring an entry address of a function of the dynamic link library, creating a first Component Object Model (COM) object, and creating a Globally Unique Identifier (GUID) of the first component object model COM object, wherein the first component object model COM object comprises an operation mode of the windows system, and the first component object model COM object is unavailable for external calling in the windows system;
acquiring content in the first component object model COM object according to the global unique identifier GUID, and creating a second component object model COM object according to the acquired content, wherein the second component object model COM object is available for external calling in the windows system;
and calling a GetForWindow interface in the second component object model COM object, acquiring the operating mode of the windows system, and judging the type of the operating mode.
2. The method for detecting a windows system mode of operation of claim 1, wherein creating a first component object model COM object further comprises:
calling a LoadLibrary function to load a combass.dll dynamic library;
calling the GetRecAddress function to obtain a function pointer of the RoGetActivationFunctory unpublished application programming interface.
3. The method for detecting a windows system mode of operation of claim 1, wherein creating a second component object model COM object further comprises:
creating a globally unique identifier GUID of the second component object model COM object;
and calling a RoGetActivationActivities interface of the first component object model COM object to obtain the content in the first component object model COM object.
4. The method of claim 1, wherein the obtaining of the operating mode of the windows system and the determining of the type of the operating mode further comprise:
acquiring a type object returned by an interface of the second component object model COM object;
obtaining a return value of the type object;
and judging the operation mode of the windows system according to the return value.
5. The method of detecting a windows system mode of operation of claim 4, the mode of operation being a tablet mode of operation, the method further comprising:
if the return value is equal to a value which is defined by the windows system and represents a panel running mode, the windows system running mode is the panel running mode;
and if the return value is not equal to the value which is defined by the windows system and represents the panel running mode, the windows system running mode is the desktop running mode.
6. The method for detecting the operation mode of the windows system as claimed in claim 1, wherein the type of the second component object model COM object is an IUIViewSettingsInterop type.
7. The method of detecting windows system operational mode of claim 5 wherein the windows system defined value representing tablet operational mode is an enumerated value UserInteractionModeToch.
8. An electronic device for detecting a windows system operation mode, comprising:
a processor;
memory storing a computer executable program which, when executed by the processor, causes the processor to perform a method of detecting a windows system mode of operation as claimed in any of claims 1 to 7.
9. A system for detecting a mode of operation of a windows system, the system comprising:
the loading module is used for loading the dynamic link library and acquiring the entry address of the function of the dynamic link library;
the system comprises a first creation module, a second creation module and a third creation module, wherein the first creation module is used for creating a first component object model COM object, the first component object model COM object comprises an operation mode of a windows system, and the first component object model COM object cannot be called externally in the windows system;
the second creation module is used for creating a second component object model COM object according to the acquired content of the first component object model COM object, and the second component object model COM object can be called externally in the windows system;
the obtaining module calls a GetForWindow interface in the second component object model COM object to obtain the operating mode of the windows system;
and the judging module is used for judging whether the current running mode is the flat running mode.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of detecting a mode of operation of a windows system as claimed in any one of claims 1 to 7.
CN201810745845.1A 2018-07-09 2018-07-09 Method for detecting operating mode of windows system and electronic equipment Active CN108845837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810745845.1A CN108845837B (en) 2018-07-09 2018-07-09 Method for detecting operating mode of windows system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810745845.1A CN108845837B (en) 2018-07-09 2018-07-09 Method for detecting operating mode of windows system and electronic equipment

Publications (2)

Publication Number Publication Date
CN108845837A CN108845837A (en) 2018-11-20
CN108845837B true CN108845837B (en) 2021-05-28

Family

ID=64196000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810745845.1A Active CN108845837B (en) 2018-07-09 2018-07-09 Method for detecting operating mode of windows system and electronic equipment

Country Status (1)

Country Link
CN (1) CN108845837B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988279A (en) * 2021-04-16 2021-06-18 广州南方卫星导航仪器有限公司 Object processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101078985A (en) * 2006-05-23 2007-11-28 国际商业机器公司 Method and system for identifying an operating system running on a computer system
CN104750470A (en) * 2013-12-27 2015-07-01 广州华多网络科技有限公司 Client and application communicating method and device
CN105556463A (en) * 2013-09-30 2016-05-04 惠普发展公司,有限责任合伙企业 Selecting operating systems based on a computing device mode
US9471201B1 (en) * 2014-05-20 2016-10-18 Google Inc. Laptop-to-tablet mode adaptation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101078985A (en) * 2006-05-23 2007-11-28 国际商业机器公司 Method and system for identifying an operating system running on a computer system
CN105556463A (en) * 2013-09-30 2016-05-04 惠普发展公司,有限责任合伙企业 Selecting operating systems based on a computing device mode
CN104750470A (en) * 2013-12-27 2015-07-01 广州华多网络科技有限公司 Client and application communicating method and device
US9471201B1 (en) * 2014-05-20 2016-10-18 Google Inc. Laptop-to-tablet mode adaptation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
c#–窗口10在Windows窗体应用程序中进入平板电脑模式时如何检测;程序园;《http://www.voidcn.com/article/p-tlrdxgjt-bsv.html》;20180214;第1-4页 *
Windows QPA:Detect Windows 10 tablet mode;Friedeman Kleint;《https://git.sailfishos.org/mer-core/qtbase/commit/d377f14fd5b4fe3ed64392c6b743bac395f9f891》;20161107;第1-7页 *

Also Published As

Publication number Publication date
CN108845837A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
US20050060526A1 (en) System and method for firmware to export pre-boot data into the operating system runtime environment
TW201537461A (en) Framework for user-mode crash reporting
US20150082279A1 (en) Software testing system and method
US10754765B2 (en) Operating system validation
US9785540B2 (en) Generic language application programming interface interpreter
US20080270842A1 (en) Computer operating system handling of severe hardware errors
US9779014B2 (en) Resilient mock object creation for unit testing
US10831642B2 (en) Detecting potential class loader problems using the class search path sequence for each class loader
CN108845837B (en) Method for detecting operating mode of windows system and electronic equipment
US20120017072A1 (en) Modifying a video resolution of video data in a pre-operating system environment
US9009671B2 (en) Crash notification between debuggers
US20120185733A1 (en) Application reliability and fault tolerant chip configurations
US8782638B2 (en) Execution pathway for interfacing with legacy programs in a mainframe environment
US20120054557A1 (en) System and method for testing peripheral component interconnect express switch
US9442831B1 (en) Automated testing of program code for processing a simple boot flag data structure
US11675593B2 (en) Dynamically updating a dynamic library
US11269729B1 (en) Overloading a boot error signaling mechanism to enable error mitigation actions to be performed
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN109710415B (en) Processing method and device for calling popup control and electronic equipment
US20060150198A1 (en) Routing exceptions to operating system subsystems
US9575831B2 (en) Detecting the use of stale data values due to weak consistency
CN117827632A (en) Test method, test device and storage medium
US20190057017A1 (en) Correlation Of Function Calls To Functions In Asynchronously Executed Threads
US8850425B1 (en) Method and system for displaying configuration test results by leveraged data protection software

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
GR01 Patent grant
GR01 Patent grant