Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Automatic code generating method and automatic code generating device for loading dynamic link library

A dynamic link library and automatic generation technology, applied in the direction of program control devices, etc., can solve the problem of not supporting the selection of lists that need to encapsulate functions and constants, and achieve the effect of improving development efficiency

Active Publication Date: 2015-01-28
CHINA ELECTRONIS TECH INSTR CO LTD
View PDF2 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although the second method supports the packaging of DLLs in multiple target languages, it relies on Microsoft Visual Studio and can only generate loading codes for programming languages ​​supported by Microsoft Visual Studio; and the process of automatically generating codes has some limitations. This time, all the functions and constants in the FP file are encapsulated, and it is not supported to select the list of functions and constants that need to be encapsulated.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Automatic code generating method and automatic code generating device for loading dynamic link library
  • Automatic code generating method and automatic code generating device for loading dynamic link library
  • Automatic code generating method and automatic code generating device for loading dynamic link library

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0095] The present invention provides an automatic code generation device for loading a dynamic link library. The device 11 of the present invention is divided into a function prototype and constant definition extraction module 112, an extraction rule editing module 111, a code template and parameter conversion rule editing module 113, and an object code Generate module 114 four parts, such as figure 1 As shown, the extraction rule editing module 111 defines the extraction rules for the extraction module; the function prototype and constant definition extraction module 112 extracts the function prototype and constant definition list from the header file 10 according to the defined extraction rules; the code template and parameter conversion rule editing module 113, for editing code templates and parameter conversion rules; the target code generation module 114, according to the target code language and loading method, selects the corresponding code template and parameter conver...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides an automatic code generating method and an automatic code generating device for loading a dynamic link library. The device comprises an extracting rule editing module, a function prototype and constant definition extracting module, a code template and parameter transformation rule editing module and an object code generating module, wherein the extracting rule editing module is used for defining an extracting rule for an extracting module; the function prototype and constant definition extracting module is used for extracting a function prototype and constant definition list from a header file according to the defined extracting rule; the code template and parameter transformation rule editing module is used for editing a code template and parameter transformation rule; and the object code generating module is used for selecting a corresponding code template and parameter transformation rule according to an object code language and a filling mode, and is used for transforming function prototype and constant definition into object programming language codes. By the scheme, loading codes are generated automatically, demands on developers are reduced, and the developers do not need to concern dynamic loading and static loading specific implementing methods of the DLL (dynamic link library) under optional programming languages, and do not need to be familiar with corresponding relations of parameter types under different languages.

Description

technical field [0001] The invention belongs to the technical field of automatic code generation, and in particular relates to an automatic code generation method and device for loading a dynamic link library. Background technique [0002] There are two ways to load DLL: static loading and dynamic loading. The static loading method includes three static loading methods: [0003] (1) Manually write the code to load the DLL, and the steps adopted by different languages ​​are different: add a reference to the LIB file in the C language, and redefine the functions and constants that need to be called, the definitions of the functions and constants and the header files corresponding to the DLL The definition in is similar, except that the parameter type is changed to the type in the current programming language; in the C# language, create a class, and declare in the class the definition corresponding to the function in the header file; [0004] (2) Under the LabWindows CVI of N...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 邱田华宋斌刘毅吴波方鹏郑艳梅谭旭
Owner CHINA ELECTRONIS TECH INSTR CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products