Page 1 of 1

DLL C++ Code - Problems executing funktins from other lib /

Posted: Fri Dec 26, 2014 7:08 pm
by chackl
Hello!

Well i'm trying to feed vjoy (http://vjoystick.sourceforge.net/site/) with data from Flowstone by getting the SDK of VJoy to an FS-DLL

Well i had look with some other easy DLLs that i made in the past. but this one keeps me busy. I'm not that c++ geek, so it might be cool if some one cold look at it.

The Problem is, that every time the DLLs tryes to run a funktion of the vjoy Lib - the flowstone DLL component does not find the function within the dll anymore.

If someone can find some time it would be helpfull, otherwise i have to freeze one project again.

I have uploaded the project file. it is a Visual C++ 2010 project.


Kind regards C.Hackl

Re: DLL C++ Code - Problems executing funktins from other li

Posted: Fri Dec 26, 2014 9:52 pm
by Tronic
Hi chackl,
in your project is missing the VJOYINTERFACE_EXPORTS
and the include for static link to the vJoyInterface.lib

Re: DLL C++ Code - Problems executing funktins from other li

Posted: Sat Dec 27, 2014 9:33 pm
by chackl
Hi!
Thanks for Reply!

What do you mean by missing the "VJOYINTERFACE_EXPORTS"

I added now the lib to the linker - but still same problems.

The Flowstone DLL component sais, that it had found the DLL but it did not find the function inside.
If i'm deleting all lines that call functions from the vjoy-lib, flowstone sais that it found the function without problems.

Kind regards, C.Hackl

Re: DLL C++ Code - Problems executing funktins from other li

Posted: Sat Dec 27, 2014 11:27 pm
by Tronic
You have to declare it in the "Preprocessor Definitions" in you project settings
add the "VJOYINTERFACE_EXPORTS"

Re: DLL C++ Code - Problems executing funktins from other li

Posted: Sat Dec 27, 2014 11:50 pm
by chackl
Ok I see now.

Well now Flowstone seems to take and accespt the DLL. But still if it runns a code from the DLL it does not continue.

I'm taking now another way to goal. Ruby seems to be 100% able with win32api to load the 32 bit interface dll. Well this is not often, that DLLS would fit over all here - but it seems that win32api has everything that vJoy needs. I'll post an example when it is done. (So finaly i can replace my old glovepie and ppjoy)

If i get the dll running i'll post it too.

Kind regards and big thans for help ;)
C.Hackl

Re: DLL C++ Code - Problems executing funktins from other li

Posted: Sun Dec 28, 2014 9:37 am
by Tronic
added this to the linker? AdditionalDependencies="Setupapi.lib"

Re: DLL C++ Code - Problems executing funktins from other li

Posted: Sun Dec 28, 2014 11:02 am
by chackl
Yes. gat that also. But still no luck.
I might get over this again in some time - i have to learn c++ more harder ;)

The Win32Api part with ruby is done:
viewtopic.php?f=3&t=3191

Thanks for help! Kind regards.