oyo113 Posted April 19, 2016 Posted April 19, 2016 .cpp expandcollapse popup#include "main.h" #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <iostream> using namespace std; // a sample exported function string test_name() { return "test"; } =============================== #ifndef __MAIN_H__ #define __MAIN_H__ #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <iostream> using namespace std; /* To use this exported function of dll, include this header * in your project. */ #ifdef BUILD_DLL #define DLL_EXPORT __declspec(dllexport) #else #define DLL_EXPORT __declspec(dllimport) #endif #ifdef __cplusplus extern "C" { #endif string DLL_EXPORT test_name(); #ifdef __cplusplus } #endif #endif // __MAIN_H__ #include <MsgBoxConstants.au3> $test = DllCall("testdll.dll", "wstr:cdecl", "test_name","none") MsgBox(0,"",$test[0]) How to get string from my dll? Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now