I have q question about using ruby/dl for win32 dll

B

bbmerong

I'd like to access some function in win32 dll

Sample dll's source is like the belows.

-- part of source --

#ifndef
TESTDLL
#define TESTDLL extern "C"
__declspec(dllimport)
#endif


TESTDLL float _stdcall AddNum(float a, int b);
TESTDLL int _stdcall MulNum(int a, int b);


Firstly, I succeed accessing functions with "Win32API"

But, I met the limitation of accessing 'float' or 'string' variable,
so I'd like to access functions using "ruby/dl'

Please let me know the ways and samples.

Thank you for reading my questions.

Then, Thank you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top