SRL Archive - C/C++ Help and Tutorials

C++ Plugin for SCAR [VS2008]


Smartzkid

2008-12-15 19:37:48

Has anyone been successful in creating a DLL in VS2008 that would work with SCAR?

Wizzup?

2008-12-15 19:53:15

With GCC, yes. With MSVS, No, never tried.
That was a C Plugin though.

n3ss3s

2008-12-16 09:22:23

Check Ben's C++ Plugins tutorial, although that might be what Wizzup said, GCC…

boberman

2008-12-16 11:16:52

it should be possible. just do __stdcall instead of __attribute((stdcall)) in front of your functions, after that, everything should compile the same.

Yakman

2008-12-16 11:27:17

iv done some research on those plugins in c (more then when benland showed in his thread)
perhaps ill write a tutorail about it summing it up.

shouldnt be too hard at all, in benland's thread he uses MSVC i think

Freddy1990

2008-12-16 18:58:46

Phoenix will probably support the fastcall convention, that'll make things easier

Buckleyindahouse

2008-12-16 19:01:26

Does scar support C# dll's?

Freddy1990

2008-12-17 10:47:30

From: Buckleyindahouse
Does scar support C# dll's?

Depends… If they're native libraries yes, if they're activex libraries, then no… It's also more a matter of having the dll support SCAR really, considering SCAR uses the stdcall convention and the fastsharemem unit which make it somewhat complicated… Took Benland a while to get around that in C++, hence I'll try to support the fastcall convention in phoenix

Smartzkid

2008-12-19 17:02:18

Got it to work. If anyone ever needs help with it, I've got it pretty well figured out.

Now to come up with a way to turn delphi strings into c++ strings. =O

Yakman

2008-12-19 19:16:41

delphi strings are null terminated like c strings
and c strings can easily be used to construct c++ strings

Smartzkid

2008-12-20 21:56:16

What's the whole function for that you made in your c plugin tutorial?

I tried to write it backwards, but I ended up ditching it; I'm not very adept with these languages… (yet :))