Ciantic / VirtualDesktopAccessor

DLL for accessing Windows 11/10 Virtual Desktop features from e.g. AutoHotkey

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[C++ learner question]

Saya47 opened this issue · comments

Hello! I'm a new C++ learner! I see that your function names are not mangled by the compiler but I don't see you use extern "C" anywhere in your code, can you please teach me how you do this?

If you are exporting functions in a C++ file, you have to either place the decorated names in the DEF file or define your exported functions with standard C linkage by using extern "C".

https://docs.microsoft.com/en-us/cpp/build/exporting-from-a-dll-using-def-files?view=vs-2019

See this file:

https://github.com/Ciantic/VirtualDesktopAccessor/blob/master/VirtualDesktopAccessor/dllmain.def