Home > Software engineering >  C console program calls the MFC generated DLL interface can be generated, but how to do information
C console program calls the MFC generated DLL interface can be generated, but how to do information

Time:10-09



Figure 1 is a MFC dynamic library DLL export functions, figure 2 is a common console application, figure 3 is to run screenshot, but now you can call out the interface, but don't return a value, can't do data interaction, is there any way to put the interface in the return value of the returned to the source program

CodePudding user response:

Inside the DLL interface design is not good

CodePudding user response:

You can change your interface function prototype, see what data you need to pass out,
Such as int show (TYPE * TYPE,... );

CodePudding user response:

is now a call after the show, the initiative on the interface, the main program cannot do processing, can't get the return value, also did not print, can't return to the interface data -....

CodePudding user response:

reference u013033015 reply: 3/f
is now a call after the show, the initiative on the interface, the main program cannot do processing, can't get the return value, also did not print, can't return to the interface data - -

Yourself to add several interfaces, or to modify the original interface

CodePudding user response:

reference 4 floor VisualEleven response:
Quote: reference u013033015 reply: 3/f

is now a call after the show, the initiative on the interface, the main program cannot do processing, can't get the return value, also did not print, can't return to the interface data -. -

Yourself to add several interfaces, or modify the original interface can ~

How should make MAO, webmaster greatly, what kind of interface to modify the

CodePudding user response:


DLL design inside a class you add
Cstrings yourclass: : (parameters 1, 2);

Cstrings yourclass: : (parameters 1, 2)
{
Dosometing;
The result of the return cstrings type;
}

Then the main program you join top class header files with lib library
The main program in direct call

CodePudding user response:

refer to 6th floor SWWLLX response:

DLL design inside a class you add
Cstrings yourclass: : (parameters 1, 2);

Cstrings yourclass: : (parameters 1, 2)
{
Dosometing;
The result of the return cstrings type;
}

Then the main program you join top class header files with lib library
The main program called directly inside ah

Do ah=.=are mainly console c program in calls to the MFC dynamic libraries after the generated interface to get the return value of interface, and then in the console display

CodePudding user response:

Console calls must be console you get results, have what problem?
  • Related